]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 May 2011 21:22:04 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 May 2011 21:22:04 +0000 (14:22 -0700)
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] ngene: Fix CI data transfer regression Fix CI data transfer regression introduced by previous cleanup.
  [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev
  [media] Missing frontend config for LME DM04/QQBOX
  [media] rc_core: avoid kernel oops when rmmod saa7134
  [media] imon: add conditional locking in change_protocol
  [media] rc: show RC_TYPE_OTHER in sysfs
  [media] ite-cir: modular build on ppc requires delay.h include
  [media] mceusb: add Dell transceiver ID

3274 files changed:
CREDITS
Documentation/00-INDEX
Documentation/ABI/testing/sysfs-bus-css
Documentation/ABI/testing/sysfs-class-led
Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
Documentation/ABI/testing/sysfs-platform-asus-laptop
Documentation/DocBook/dvb/dvbproperty.xml
Documentation/DocBook/dvb/frontend.xml
Documentation/DocBook/kernel-locking.tmpl
Documentation/DocBook/libata.tmpl
Documentation/DocBook/mtdnand.tmpl
Documentation/DocBook/regulator.tmpl
Documentation/DocBook/uio-howto.tmpl
Documentation/DocBook/usb.tmpl
Documentation/DocBook/v4l/common.xml
Documentation/DocBook/v4l/controls.xml
Documentation/DocBook/v4l/dev-subdev.xml
Documentation/DocBook/v4l/libv4l.xml
Documentation/DocBook/v4l/remote_controllers.xml
Documentation/DocBook/writing-an-alsa-driver.tmpl
Documentation/PCI/MSI-HOWTO.txt
Documentation/SecurityBugs
Documentation/SubmittingDrivers
Documentation/SubmittingPatches
Documentation/arm/IXP4xx
Documentation/arm/Samsung-S3C24XX/Suspend.txt
Documentation/arm/Samsung/GPIO.txt
Documentation/block/biodoc.txt
Documentation/cgroups/cgroups.txt
Documentation/cgroups/memory.txt
Documentation/cpu-hotplug.txt
Documentation/dell_rbu.txt
Documentation/device-mapper/dm-service-time.txt
Documentation/devicetree/bindings/fb/sm501fb.txt
Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
Documentation/devicetree/bindings/net/can/sja1000.txt
Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
Documentation/devicetree/booting-without-of.txt
Documentation/dvb/README.dvb-usb
Documentation/dvb/ci.txt
Documentation/dvb/faq.txt
Documentation/dvb/udev.txt
Documentation/edac.txt
Documentation/eisa.txt
Documentation/fb/viafb.txt
Documentation/feature-removal-schedule.txt
Documentation/filesystems/autofs4-mount-control.txt
Documentation/filesystems/caching/netfs-api.txt
Documentation/filesystems/configfs/configfs.txt
Documentation/filesystems/ext4.txt
Documentation/filesystems/gfs2-uevents.txt
Documentation/filesystems/gfs2.txt
Documentation/filesystems/ntfs.txt
Documentation/filesystems/ocfs2.txt
Documentation/filesystems/path-lookup.txt
Documentation/filesystems/pohmelfs/network_protocol.txt
Documentation/filesystems/proc.txt
Documentation/filesystems/squashfs.txt
Documentation/filesystems/sysfs.txt
Documentation/filesystems/vfs.txt
Documentation/filesystems/xfs-delayed-logging-design.txt
Documentation/flexible-arrays.txt
Documentation/hwmon/abituguru
Documentation/hwmon/abituguru-datasheet
Documentation/hwmon/abituguru3
Documentation/hwmon/adm1021
Documentation/hwmon/lm90
Documentation/hwmon/max16064 [new file with mode: 0644]
Documentation/hwmon/max34440 [new file with mode: 0644]
Documentation/hwmon/max8688 [new file with mode: 0644]
Documentation/hwmon/pmbus
Documentation/hwmon/smm665
Documentation/hwmon/submitting-patches [new file with mode: 0644]
Documentation/hwmon/sysfs-interface
Documentation/hwmon/w83781d
Documentation/hwmon/w83791d
Documentation/i2c/busses/i2c-parport-light
Documentation/i2c/busses/i2c-sis96x
Documentation/i2c/busses/i2c-taos-evm
Documentation/i2o/README
Documentation/ia64/aliasing-test.c
Documentation/input/event-codes.txt [new file with mode: 0644]
Documentation/input/joystick-parport.txt
Documentation/input/rotary-encoder.txt
Documentation/input/walkera0701.txt
Documentation/irqflags-tracing.txt
Documentation/isdn/INTERFACE.CAPI
Documentation/kbuild/kbuild.txt
Documentation/kernel-parameters.txt
Documentation/kmemleak.txt
Documentation/kvm/mmu.txt
Documentation/kvm/ppc-pv.txt
Documentation/kvm/timekeeping.txt
Documentation/laptops/asus-laptop.txt
Documentation/leds/00-INDEX [new file with mode: 0644]
Documentation/leds/leds-class.txt [moved from Documentation/leds-class.txt with 99% similarity]
Documentation/leds/leds-lp3944.txt [moved from Documentation/leds-lp3944.txt with 100% similarity]
Documentation/md.txt
Documentation/media-framework.txt
Documentation/mips/AU1xxx_IDE.README
Documentation/misc-devices/ics932s401
Documentation/networking/3c359.txt
Documentation/networking/README.ipw2200
Documentation/networking/batman-adv.txt
Documentation/networking/bonding.txt
Documentation/networking/caif/Linux-CAIF.txt
Documentation/networking/caif/spi_porting.txt
Documentation/networking/can.txt
Documentation/networking/ieee802154.txt
Documentation/networking/olympic.txt
Documentation/networking/packet_mmap.txt
Documentation/networking/s2io.txt
Documentation/networking/tc-actions-env-rules.txt
Documentation/power/devices.txt
Documentation/power/notifiers.txt
Documentation/power/opp.txt
Documentation/power/swsusp.txt
Documentation/power/userland-swsusp.txt
Documentation/powerpc/hvcs.txt
Documentation/s390/Debugging390.txt
Documentation/scheduler/sched-domains.txt
Documentation/scsi/ChangeLog.lpfc
Documentation/scsi/ChangeLog.megaraid
Documentation/scsi/ChangeLog.ncr53c8xx
Documentation/scsi/ChangeLog.sym53c8xx
Documentation/scsi/aha152x.txt
Documentation/scsi/aic79xx.txt
Documentation/scsi/ibmmca.txt
Documentation/scsi/scsi-changer.txt
Documentation/scsi/scsi_eh.txt
Documentation/scsi/scsi_fc_transport.txt
Documentation/scsi/sym53c8xx_2.txt
Documentation/serial/moxa-smartio
Documentation/serial/n_gsm.txt
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/sound/alsa/SB-Live-mixer.txt
Documentation/sound/oss/AudioExcelDSP16
Documentation/sound/oss/README.OSS
Documentation/sound/oss/README.ymfsb
Documentation/spi/pxa2xx
Documentation/spi/spi-lm70llp
Documentation/telephony/ixj.txt
Documentation/trace/ring-buffer-design.txt
Documentation/video4linux/README.pvrusb2
Documentation/video4linux/bttv/Insmod-options
Documentation/video4linux/bttv/README
Documentation/video4linux/bttv/README.freeze
Documentation/video4linux/bttv/Sound-FAQ
Documentation/video4linux/et61x251.txt
Documentation/video4linux/pxa_camera.txt
Documentation/video4linux/sn9c102.txt
Documentation/video4linux/v4l2-framework.txt
Documentation/video4linux/w9968cf.txt
Documentation/video4linux/zc0301.txt
Documentation/vm/active_mm.txt
Documentation/vm/hugetlbpage.txt
Documentation/vm/overcommit-accounting
Documentation/w1/slaves/w1_ds2423
Documentation/w1/w1.netlink
Documentation/watchdog/hpwdt.txt
Documentation/workqueue.txt
MAINTAINERS
Makefile
arch/alpha/include/asm/elf.h
arch/alpha/kernel/Makefile
arch/alpha/kernel/core_lca.c
arch/alpha/kernel/core_mcpcia.c
arch/alpha/kernel/err_marvel.c
arch/alpha/kernel/err_titan.c
arch/alpha/kernel/irq_alpha.c
arch/alpha/kernel/setup.c
arch/alpha/kernel/smc37c93x.c
arch/alpha/kernel/sys_wildfire.c
arch/alpha/kernel/time.c
arch/alpha/lib/ev67-strrchr.S
arch/alpha/lib/fls.c
arch/alpha/lib/strrchr.S
arch/alpha/oprofile/op_model_ev67.c
arch/arm/Kconfig
arch/arm/Kconfig-nommu
arch/arm/Kconfig.debug
arch/arm/common/Makefile
arch/arm/common/pl330.c
arch/arm/include/asm/cputype.h
arch/arm/include/asm/fpstate.h
arch/arm/include/asm/glue-cache.h
arch/arm/include/asm/glue.h
arch/arm/include/asm/hardware/pl080.h
arch/arm/include/asm/kprobes.h
arch/arm/include/asm/system.h
arch/arm/include/asm/thread_notify.h
arch/arm/include/asm/ucontext.h
arch/arm/include/asm/unistd.h
arch/arm/kernel/Makefile
arch/arm/kernel/calls.S
arch/arm/kernel/elf.c
arch/arm/kernel/hw_breakpoint.c
arch/arm/kernel/kprobes-decode.c
arch/arm/kernel/kprobes.c
arch/arm/kernel/perf_event.c
arch/arm/kernel/process.c
arch/arm/kernel/smp.c
arch/arm/kernel/swp_emulate.c
arch/arm/kernel/sys_oabi-compat.c
arch/arm/kernel/traps.c
arch/arm/mach-at91/board-carmeva.c
arch/arm/mach-at91/include/mach/at91_mci.h
arch/arm/mach-at91/include/mach/gpio.h
arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c
arch/arm/mach-bcmring/dma.c
arch/arm/mach-bcmring/include/csp/dmacHw.h
arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h
arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h
arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h
arch/arm/mach-bcmring/include/mach/reg_umi.h
arch/arm/mach-davinci/Kconfig
arch/arm/mach-davinci/board-mityomapl138.c
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/cpufreq.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-davinci/devices-da8xx.c
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/include/mach/cputype.h
arch/arm/mach-davinci/include/mach/debug-macro.S
arch/arm/mach-davinci/include/mach/serial.h
arch/arm/mach-ep93xx/gpio.c
arch/arm/mach-exynos4/include/mach/gpio.h
arch/arm/mach-exynos4/mct.c
arch/arm/mach-exynos4/setup-sdhci-gpio.c
arch/arm/mach-exynos4/setup-sdhci.c
arch/arm/mach-iop13xx/pci.c
arch/arm/mach-kirkwood/tsx1x-common.c
arch/arm/mach-lpc32xx/pm.c
arch/arm/mach-mmp/include/mach/gpio.h
arch/arm/mach-mmp/include/mach/mfp-pxa168.h
arch/arm/mach-mmp/time.c
arch/arm/mach-msm/acpuclock-arm11.c
arch/arm/mach-msm/board-qsd8x50.c
arch/arm/mach-msm/scm.c
arch/arm/mach-msm/timer.c
arch/arm/mach-mx3/mach-vpr200.c
arch/arm/mach-mx5/board-mx53_loco.c
arch/arm/mach-mxs/clock-mx28.c
arch/arm/mach-omap1/ams-delta-fiq-handler.S
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/include/mach/ams-delta-fiq.h
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-igep0030.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/clock44xx_data.c
arch/arm/mach-omap2/clockdomain.c
arch/arm/mach-omap2/clockdomain.h
arch/arm/mach-omap2/cm2xxx_3xxx.c
arch/arm/mach-omap2/control.c
arch/arm/mach-omap2/cpuidle34xx.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/dma.c
arch/arm/mach-omap2/gpio.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/mux2430.h
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_l3_smx.c
arch/arm/mach-omap2/omap_phy_internal.c
arch/arm/mach-omap2/omap_twl.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/powerdomain.h
arch/arm/mach-omap2/powerdomains3xxx_data.c
arch/arm/mach-omap2/smartreflex.c
arch/arm/mach-omap2/voltage.c
arch/arm/mach-orion5x/addr-map.c
arch/arm/mach-orion5x/net2big-setup.c
arch/arm/mach-orion5x/ts209-setup.c
arch/arm/mach-orion5x/ts409-setup.c
arch/arm/mach-pxa/hx4700.c
arch/arm/mach-pxa/include/mach/gpio.h
arch/arm/mach-pxa/include/mach/irqs.h
arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
arch/arm/mach-pxa/include/mach/zeus.h
arch/arm/mach-pxa/magician.c
arch/arm/mach-pxa/mioa701.c
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-s3c2410/include/mach/dma.h
arch/arm/mach-s3c2410/include/mach/regs-mem.h
arch/arm/mach-s3c2410/mach-n30.c
arch/arm/mach-s3c2440/mach-gta02.c
arch/arm/mach-s3c2440/mach-mini2440.c
arch/arm/mach-s3c64xx/dma.c
arch/arm/mach-s5pc100/include/mach/regs-fb.h
arch/arm/mach-s5pc100/setup-sdhci.c
arch/arm/mach-s5pv210/include/mach/gpio.h
arch/arm/mach-s5pv210/setup-sdhci-gpio.c
arch/arm/mach-s5pv210/setup-sdhci.c
arch/arm/mach-sa1100/Makefile
arch/arm/mach-sa1100/cpu-sa1100.c
arch/arm/mach-sa1100/include/mach/SA-1100.h
arch/arm/mach-sa1100/jornada720_ssp.c
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/include/mach/mmc.h
arch/arm/mach-shmobile/include/mach/zboot.h
arch/arm/mach-tegra/dma.c
arch/arm/mach-tegra/gpio.c
arch/arm/mach-tegra/include/mach/dma.h
arch/arm/mach-tegra/tegra2_clocks.c
arch/arm/mach-u300/clock.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/include/mach/db8500-regs.h
arch/arm/mm/cache-v4wb.S
arch/arm/mm/cache-v4wt.S
arch/arm/mm/cache-v7.S
arch/arm/mm/mmap.c
arch/arm/mm/proc-arm1020.S
arch/arm/mm/proc-arm1020e.S
arch/arm/mm/proc-arm1022.S
arch/arm/mm/proc-arm1026.S
arch/arm/mm/proc-arm720.S
arch/arm/mm/proc-arm920.S
arch/arm/mm/proc-arm922.S
arch/arm/mm/proc-arm925.S
arch/arm/mm/proc-arm926.S
arch/arm/mm/proc-macros.S
arch/arm/mm/proc-sa1100.S
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7.S
arch/arm/mm/proc-xsc3.S
arch/arm/mm/proc-xscale.S
arch/arm/plat-mxc/cpufreq.c
arch/arm/plat-mxc/gpio.c
arch/arm/plat-mxc/include/mach/entry-macro.S
arch/arm/plat-mxc/include/mach/mxc_nand.h
arch/arm/plat-mxc/ssi-fiq.S
arch/arm/plat-omap/devices.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/include/plat/gpio.h
arch/arm/plat-omap/include/plat/gpmc.h
arch/arm/plat-omap/mcbsp.c
arch/arm/plat-pxa/include/plat/mfp.h
arch/arm/plat-s3c24xx/Makefile
arch/arm/plat-s3c24xx/cpu-freq.c
arch/arm/plat-s3c24xx/dma.c
arch/arm/plat-s5p/irq-gpioint.c
arch/arm/plat-s5p/pm.c
arch/arm/plat-samsung/include/plat/clock.h
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
arch/arm/plat-samsung/include/plat/gpio-cfg.h
arch/arm/plat-samsung/include/plat/gpio-core.h
arch/arm/plat-samsung/include/plat/sdhci.h
arch/arm/plat-samsung/pm-check.c
arch/arm/plat-samsung/pm.c
arch/arm/plat-samsung/s3c-pl330.c
arch/arm/plat-spear/include/plat/clock.h
arch/arm/vfp/vfpmodule.c
arch/avr32/include/asm/setup.h
arch/avr32/kernel/setup.c
arch/avr32/kernel/traps.c
arch/avr32/mach-at32ap/clock.c
arch/avr32/mach-at32ap/extint.c
arch/avr32/mach-at32ap/pio.c
arch/avr32/mach-at32ap/pm-at32ap700x.S
arch/blackfin/Kconfig.debug
arch/blackfin/include/asm/system.h
arch/blackfin/include/asm/traps.h
arch/blackfin/kernel/gptimers.c
arch/blackfin/kernel/kgdb.c
arch/blackfin/kernel/time-ts.c
arch/blackfin/kernel/traps.c
arch/blackfin/lib/ins.S
arch/blackfin/lib/memmove.S
arch/blackfin/mach-bf537/boards/stamp.c
arch/blackfin/mach-common/entry.S
arch/blackfin/mach-common/head.S
arch/blackfin/mach-common/smp.c
arch/cris/arch-v10/README.mm
arch/cris/arch-v10/drivers/sync_serial.c
arch/cris/arch-v32/drivers/axisflashmap.c
arch/cris/arch-v32/drivers/mach-a3/nandflash.c
arch/cris/arch-v32/drivers/mach-fs/nandflash.c
arch/cris/arch-v32/drivers/sync_serial.c
arch/cris/arch-v32/kernel/entry.S
arch/cris/arch-v32/kernel/irq.c
arch/cris/arch-v32/kernel/kgdb.c
arch/cris/arch-v32/kernel/process.c
arch/cris/arch-v32/kernel/signal.c
arch/cris/arch-v32/mach-a3/arbiter.c
arch/cris/arch-v32/mach-fs/arbiter.c
arch/cris/boot/rescue/head_v10.S
arch/cris/include/arch-v32/arch/hwregs/Makefile
arch/cris/include/arch-v32/arch/hwregs/iop/Makefile
arch/cris/include/asm/pgtable.h
arch/cris/kernel/traps.c
arch/frv/include/asm/pci.h
arch/frv/include/asm/spr-regs.h
arch/frv/include/asm/virtconvert.h
arch/frv/kernel/entry-table.S
arch/ia64/Kconfig
arch/ia64/include/asm/pal.h
arch/ia64/include/asm/perfmon_default_smpl.h
arch/ia64/include/asm/sn/bte.h
arch/ia64/include/asm/sn/shub_mmr.h
arch/ia64/include/asm/sn/shubio.h
arch/ia64/kernel/cyclone.c
arch/ia64/kernel/perfmon_default_smpl.c
arch/ia64/kernel/smpboot.c
arch/ia64/kernel/topology.c
arch/ia64/kvm/process.c
arch/ia64/lib/do_csum.S
arch/ia64/sn/kernel/irq.c
arch/ia64/sn/pci/pcibr/pcibr_dma.c
arch/m32r/include/asm/m32104ut/m32104ut_pld.h
arch/m32r/include/asm/m32700ut/m32700ut_pld.h
arch/m32r/include/asm/opsput/opsput_pld.h
arch/m32r/include/asm/pgtable-2level.h
arch/m32r/mm/fault.c
arch/m68k/atari/atakeyb.c
arch/m68k/fpsp040/bindec.S
arch/m68k/ifpsp060/src/fpsp.S
arch/m68k/ifpsp060/src/pfpsp.S
arch/m68k/include/asm/atariints.h
arch/m68k/include/asm/bootstd.h
arch/m68k/include/asm/commproc.h
arch/m68k/include/asm/delay_no.h
arch/m68k/include/asm/gpio.h
arch/m68k/include/asm/m520xsim.h
arch/m68k/include/asm/m523xsim.h
arch/m68k/include/asm/m527xsim.h
arch/m68k/include/asm/m5307sim.h
arch/m68k/include/asm/m5407sim.h
arch/m68k/include/asm/m68360_quicc.h
arch/m68k/include/asm/mac_oss.h
arch/m68k/include/asm/mac_via.h
arch/m68k/include/asm/macintosh.h
arch/m68k/include/asm/mcftimer.h
arch/m68k/include/asm/unistd.h
arch/m68k/kernel/entry_mm.S
arch/m68k/kernel/head.S
arch/m68k/kernel/syscalltable.S
arch/m68k/kernel/vmlinux.lds_no.S
arch/m68k/mm/motorola.c
arch/m68k/platform/523x/config.c
arch/m68k/platform/5272/intc.c
arch/m68k/platform/527x/config.c
arch/m68k/platform/528x/config.c
arch/m68k/platform/coldfire/cache.c
arch/m68k/platform/coldfire/entry.S
arch/m68k/platform/coldfire/head.S
arch/m68k/platform/coldfire/intc.c
arch/m68k/platform/coldfire/sltimers.c
arch/m68k/q40/README
arch/microblaze/Kconfig
arch/microblaze/Makefile
arch/microblaze/include/asm/io.h
arch/microblaze/include/asm/pci-bridge.h
arch/microblaze/include/asm/pci.h
arch/microblaze/include/asm/unistd.h
arch/microblaze/kernel/Makefile
arch/microblaze/kernel/cpu/cache.c
arch/microblaze/kernel/ftrace.c
arch/microblaze/kernel/intc.c
arch/microblaze/kernel/syscall_table.S
arch/microblaze/lib/Makefile
arch/microblaze/lib/memcpy.c
arch/microblaze/lib/memmove.c
arch/microblaze/lib/memset.c
arch/microblaze/pci/indirect_pci.c
arch/microblaze/platform/generic/Kconfig.auto
arch/mips/Kconfig
arch/mips/Makefile
arch/mips/alchemy/common/clocks.c
arch/mips/cavium-octeon/executive/octeon-model.c
arch/mips/cavium-octeon/octeon-platform.c
arch/mips/cavium-octeon/setup.c
arch/mips/fw/arc/promlib.c
arch/mips/include/asm/dec/prom.h
arch/mips/include/asm/floppy.h
arch/mips/include/asm/hw_irq.h
arch/mips/include/asm/io.h
arch/mips/include/asm/irqflags.h
arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h
arch/mips/include/asm/mach-ip32/mc146818rtc.h
arch/mips/include/asm/mach-loongson/cs5536/cs5536.h
arch/mips/include/asm/mach-pb1x00/pb1000.h
arch/mips/include/asm/mach-pb1x00/pb1200.h
arch/mips/include/asm/mach-pb1x00/pb1550.h
arch/mips/include/asm/mach-powertv/dma-coherence.h
arch/mips/include/asm/mipsregs.h
arch/mips/include/asm/octeon/cvmx-bootinfo.h
arch/mips/include/asm/octeon/cvmx-bootmem.h
arch/mips/include/asm/octeon/cvmx-l2c.h
arch/mips/include/asm/octeon/cvmx.h
arch/mips/include/asm/paccess.h
arch/mips/include/asm/pci/bridge.h
arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h
arch/mips/include/asm/processor.h
arch/mips/include/asm/sgi/ioc.h
arch/mips/include/asm/sibyte/sb1250_mac.h
arch/mips/include/asm/siginfo.h
arch/mips/include/asm/sn/klconfig.h
arch/mips/include/asm/sn/sn0/hubio.h
arch/mips/include/asm/stackframe.h
arch/mips/include/asm/war.h
arch/mips/jz4740/board-qi_lb60.c
arch/mips/kernel/cpu-bugs64.c
arch/mips/kernel/perf_event_mipsxx.c
arch/mips/kernel/process.c
arch/mips/kernel/smp-mt.c
arch/mips/kernel/time.c
arch/mips/kernel/vpe.c
arch/mips/lib/strnlen_user.S
arch/mips/math-emu/dp_fsp.c
arch/mips/math-emu/dp_mul.c
arch/mips/math-emu/dsemul.c
arch/mips/math-emu/sp_mul.c
arch/mips/mm/cex-sb1.S
arch/mips/mm/tlbex.c
arch/mips/mti-malta/malta-smtc.c
arch/mips/pci/ops-pmcmsp.c
arch/mips/pci/pci-bcm1480.c
arch/mips/pci/pci-octeon.c
arch/mips/pci/pci.c
arch/mips/pmc-sierra/msp71xx/msp_setup.c
arch/mips/pnx833x/common/platform.c
arch/mips/sgi-ip27/Kconfig
arch/mips/sgi-ip27/TODO
arch/mips/sgi-ip27/ip27-init.c
arch/mips/sgi-ip27/ip27-irq.c
arch/mn10300/include/asm/cpu-regs.h
arch/parisc/include/asm/eisa_eeprom.h
arch/parisc/kernel/entry.S
arch/parisc/kernel/head.S
arch/parisc/kernel/inventory.c
arch/parisc/kernel/signal.c
arch/parisc/kernel/syscall.S
arch/parisc/kernel/syscall_table.S
arch/parisc/math-emu/dfadd.c
arch/parisc/math-emu/dfsub.c
arch/parisc/math-emu/fmpyfadd.c
arch/parisc/math-emu/sfadd.c
arch/parisc/math-emu/sfsub.c
arch/parisc/mm/init.c
arch/powerpc/Kconfig
arch/powerpc/boot/dts/p1020rdb.dts
arch/powerpc/boot/dts/p2020rdb.dts
arch/powerpc/boot/dts/p2020rdb_camp_core0.dts
arch/powerpc/boot/dts/p2020rdb_camp_core1.dts
arch/powerpc/include/asm/8xx_immap.h
arch/powerpc/include/asm/bitops.h
arch/powerpc/include/asm/compat.h
arch/powerpc/include/asm/cpm.h
arch/powerpc/include/asm/cpm1.h
arch/powerpc/include/asm/cputable.h
arch/powerpc/include/asm/hvcall.h
arch/powerpc/include/asm/kprobes.h
arch/powerpc/include/asm/lppaca.h
arch/powerpc/include/asm/page_64.h
arch/powerpc/include/asm/pasemi_dma.h
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/include/asm/pmac_feature.h
arch/powerpc/include/asm/pte-common.h
arch/powerpc/include/asm/reg_booke.h
arch/powerpc/include/asm/spu_priv1.h
arch/powerpc/include/asm/uninorth.h
arch/powerpc/include/asm/vdso_datapage.h
arch/powerpc/kernel/btext.c
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/crash.c
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/head_40x.S
arch/powerpc/kernel/head_44x.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/head_fsl_booke.S
arch/powerpc/kernel/ibmebus.c
arch/powerpc/kernel/l2cr_6xx.S
arch/powerpc/kernel/legacy_serial.c
arch/powerpc/kernel/lparcfg.c
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/perf_event.c
arch/powerpc/kernel/ppc_save_regs.S
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/ptrace.c
arch/powerpc/kernel/rtasd.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/swsusp_32.S
arch/powerpc/kernel/time.c
arch/powerpc/kernel/traps.c
arch/powerpc/kernel/udbg_16550.c
arch/powerpc/kernel/vdso32/sigtramp.S
arch/powerpc/kernel/vdso64/sigtramp.S
arch/powerpc/mm/hash_low_64.S
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/mem.c
arch/powerpc/mm/numa.c
arch/powerpc/mm/tlb_low_64e.S
arch/powerpc/oprofile/op_model_cell.c
arch/powerpc/oprofile/op_model_power4.c
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
arch/powerpc/platforms/Kconfig
arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
arch/powerpc/platforms/cell/spufs/sched.c
arch/powerpc/platforms/cell/spufs/spu_restore.c
arch/powerpc/platforms/iseries/mf.c
arch/powerpc/platforms/iseries/viopath.c
arch/powerpc/platforms/pasemi/dma_lib.c
arch/powerpc/platforms/powermac/Makefile
arch/powerpc/platforms/powermac/low_i2c.c
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/powermac/smp.c
arch/powerpc/platforms/pseries/dlpar.c
arch/powerpc/platforms/pseries/eeh.c
arch/powerpc/platforms/pseries/hotplug-cpu.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/pseries/smp.c
arch/powerpc/platforms/pseries/xics.c
arch/powerpc/sysdev/axonram.c
arch/powerpc/sysdev/bestcomm/bestcomm.h
arch/powerpc/sysdev/bestcomm/bestcomm_priv.h
arch/powerpc/sysdev/cpm1.c
arch/powerpc/sysdev/fsl_pci.c
arch/powerpc/sysdev/fsl_rio.c
arch/powerpc/sysdev/indirect_pci.c
arch/powerpc/sysdev/ppc4xx_pci.h
arch/s390/crypto/prng.c
arch/s390/include/asm/atomic.h
arch/s390/include/asm/cio.h
arch/s390/kernel/head.S
arch/s390/kernel/reipl64.S
arch/s390/kernel/setup.c
arch/s390/kernel/switch_cpu.S
arch/s390/kernel/switch_cpu64.S
arch/s390/kernel/time.c
arch/s390/kernel/vtime.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/priv.c
arch/s390/kvm/sie64a.S
arch/s390/mm/fault.c
arch/s390/mm/pageattr.c
arch/s390/oprofile/hwsampler.c
arch/score/Makefile
arch/sh/Kconfig
arch/sh/Kconfig.debug
arch/sh/boards/board-sh7757lcr.c
arch/sh/boards/mach-ap325rxa/setup.c
arch/sh/boards/mach-dreamcast/irq.c
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/boards/mach-landisk/setup.c
arch/sh/drivers/pci/pci-sh7751.h
arch/sh/drivers/pci/pci.c
arch/sh/include/asm/page.h
arch/sh/include/asm/pgtable_32.h
arch/sh/include/asm/unaligned-sh4a.h
arch/sh/include/mach-common/mach/highlander.h
arch/sh/include/mach-common/mach/r2d.h
arch/sh/kernel/cpu/clock-cpg.c
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
arch/sh/kernel/irq.c
arch/sh/kernel/setup.c
arch/sh/lib64/copy_user_memcpy.S
arch/sh/lib64/memcpy.S
arch/sparc/include/asm/hypervisor.h
arch/sparc/include/asm/ns87303.h
arch/sparc/include/asm/pcr.h
arch/sparc/include/asm/ptrace.h
arch/sparc/kernel/entry.S
arch/sparc/kernel/head_64.S
arch/sparc/kernel/init_task.c
arch/sparc/kernel/of_device_64.c
arch/sparc/kernel/perf_event.c
arch/sparc/math-emu/Makefile
arch/tile/Kconfig
arch/tile/include/hv/drv_xgbe_intf.h
arch/tile/include/hv/hypervisor.h
arch/tile/kernel/pci.c
arch/tile/mm/fault.c
arch/tile/mm/hugetlbpage.c
arch/um/Kconfig.net
arch/um/Kconfig.um
arch/um/Kconfig.x86
arch/um/include/asm/bug.h [new file with mode: 0644]
arch/um/include/asm/thread_info.h
arch/um/sys-i386/Makefile
arch/um/sys-i386/atomic64_cx8_32.S [new file with mode: 0644]
arch/unicore32/include/mach/regs-umal.h
arch/unicore32/kernel/head.S
arch/x86/boot/memory.c
arch/x86/include/asm/apic.h
arch/x86/include/asm/dma.h
arch/x86/include/asm/gart.h
arch/x86/include/asm/i387.h
arch/x86/include/asm/io_apic.h
arch/x86/include/asm/msr-index.h
arch/x86/include/asm/numa.h
arch/x86/kernel/amd_nb.c
arch/x86/kernel/aperture_64.c
arch/x86/kernel/apic/hw_nmi.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/kernel/apm_32.c
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/mtrr/main.c
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event_amd.c
arch/x86/kernel/cpu/perf_event_intel.c
arch/x86/kernel/cpu/perf_event_p4.c
arch/x86/kernel/devicetree.c
arch/x86/kernel/irq.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/reboot.c
arch/x86/kernel/reboot_32.S
arch/x86/kernel/setup.c
arch/x86/kvm/x86.c
arch/x86/mm/numa.c
arch/x86/mm/numa_64.c
arch/x86/mm/numa_emulation.c
arch/x86/mm/srat_32.c
arch/x86/oprofile/nmi_int.c
arch/x86/oprofile/op_counter.h
arch/x86/platform/ce4100/falconfalls.dts
arch/x86/platform/mrst/mrst.c
arch/x86/platform/mrst/vrtc.c
arch/x86/platform/uv/tlb_uv.c
arch/x86/platform/visws/visws_quirks.c
arch/x86/xen/Kconfig
arch/x86/xen/enlighten.c
arch/x86/xen/mmu.c
arch/x86/xen/setup.c
arch/xtensa/include/asm/dma.h
arch/xtensa/kernel/entry.S
arch/xtensa/kernel/irq.c
block/blk-cgroup.c
block/blk-core.c
block/blk-exec.c
block/blk-flush.c
block/blk-integrity.c
block/blk-sysfs.c
block/blk-throttle.c
block/blk.h
block/cfq-iosched.c
block/elevator.c
block/genhd.c
crypto/ansi_cprng.c
crypto/async_tx/async_xor.c
crypto/gf128mul.c
crypto/vmac.c
crypto/xts.c
drivers/acpi/apei/ghes.c
drivers/acpi/processor_throttling.c
drivers/acpi/scan.c
drivers/acpi/video.c
drivers/amba/bus.c
drivers/ata/ahci.c
drivers/ata/ahci.h
drivers/ata/ata_piix.c
drivers/ata/libahci.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
drivers/ata/libata-sff.c
drivers/ata/pata_amd.c
drivers/ata/pata_arasan_cf.c
drivers/ata/pata_at91.c
drivers/ata/pata_bf54x.c
drivers/ata/pata_cs5520.c
drivers/ata/pata_mpiix.c
drivers/ata/pata_rz1000.c
drivers/ata/pata_sil680.c
drivers/ata/pata_sis.c
drivers/ata/pata_triflex.c
drivers/ata/sata_fsl.c
drivers/ata/sata_mv.c
drivers/ata/sata_nv.c
drivers/ata/sata_via.c
drivers/atm/ambassador.c
drivers/atm/firestream.c
drivers/atm/fore200e.h
drivers/atm/horizon.c
drivers/atm/idt77252.c
drivers/atm/idt77252.h
drivers/atm/iphase.c
drivers/atm/lanai.c
drivers/auxdisplay/cfag12864b.c
drivers/base/platform.c
drivers/base/power/main.c
drivers/base/power/runtime.c
drivers/base/power/wakeup.c
drivers/base/sys.c
drivers/base/syscore.c
drivers/block/DAC960.c
drivers/block/drbd/drbd_actlog.c
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_receiver.c
drivers/block/drbd/drbd_vli.h
drivers/block/hd.c
drivers/block/viodasd.c
drivers/block/xsysace.c
drivers/bluetooth/btusb.c
drivers/bluetooth/hci_ll.c
drivers/cdrom/cdrom.c
drivers/char/agp/agp.h
drivers/char/agp/amd-k7-agp.c
drivers/char/agp/generic.c
drivers/char/agp/sworks-agp.c
drivers/char/agp/via-agp.c
drivers/char/ipmi/ipmi_poweroff.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/mbcs.h
drivers/char/mwave/3780i.h
drivers/char/nwbutton.c
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/random.c
drivers/char/sonypi.c
drivers/char/virtio_console.c
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/clk/clkdev.c
drivers/connector/connector.c
drivers/cpufreq/cpufreq.c
drivers/crypto/amcc/crypto4xx_sa.c
drivers/crypto/amcc/crypto4xx_sa.h
drivers/crypto/ixp4xx_crypto.c
drivers/dma/at_hdmac.c
drivers/dma/coh901318.c
drivers/dma/fsldma.c
drivers/dma/intel_mid_dma.c
drivers/dma/intel_mid_dma_regs.h
drivers/dma/mpc512x_dma.c
drivers/dma/shdma.c
drivers/dma/ste_dma40.c
drivers/edac/Kconfig
drivers/edac/amd64_edac.c
drivers/edac/amd64_edac.h
drivers/edac/cpc925_edac.c
drivers/edac/edac_core.h
drivers/edac/edac_device.c
drivers/edac/edac_device_sysfs.c
drivers/edac/edac_mc.c
drivers/edac/edac_mc_sysfs.c
drivers/edac/edac_pci_sysfs.c
drivers/edac/i5000_edac.c
drivers/edac/i5100_edac.c
drivers/edac/i5400_edac.c
drivers/edac/i7300_edac.c
drivers/edac/i7core_edac.c
drivers/edac/i82443bxgx_edac.c
drivers/edac/mce_amd_inj.c
drivers/edac/mpc85xx_edac.c
drivers/edac/r82600_edac.c
drivers/firewire/net.c
drivers/firewire/ohci.c
drivers/gpio/mc33880.c
drivers/gpio/ml_ioh_gpio.c
drivers/gpio/pca953x.c
drivers/gpio/pch_gpio.c
drivers/gpu/drm/Kconfig
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/drm_mm.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_crt.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/i915/intel_i2c.c
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/i915/intel_sdvo_regs.h
drivers/gpu/drm/i915/intel_tv.c
drivers/gpu/drm/mga/mga_dma.c
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_channel.c
drivers/gpu/drm/nouveau/nouveau_dma.c
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nouveau_notifier.c
drivers/gpu/drm/nouveau/nouveau_object.c
drivers/gpu/drm/nouveau/nouveau_perf.c
drivers/gpu/drm/nouveau/nouveau_sgdma.c
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nv04_crtc.c
drivers/gpu/drm/nouveau/nv04_dfp.c
drivers/gpu/drm/nouveau/nv40_graph.c
drivers/gpu/drm/nouveau/nv50_crtc.c
drivers/gpu/drm/nouveau/nv50_evo.c
drivers/gpu/drm/nouveau/nv50_graph.c
drivers/gpu/drm/nouveau/nv50_instmem.c
drivers/gpu/drm/nouveau/nv50_vm.c
drivers/gpu/drm/nouveau/nvc0_vm.c
drivers/gpu/drm/radeon/atom.c
drivers/gpu/drm/radeon/atombios.h
drivers/gpu/drm/radeon/atombios_crtc.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/evergreen_cs.c
drivers/gpu/drm/radeon/evergreend.h
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/r300_reg.h
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_cs.c
drivers/gpu/drm/radeon/r600_hdmi.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_asic.c
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_combios.c
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_cp.c
drivers/gpu/drm/radeon/radeon_cursor.c
drivers/gpu/drm/radeon/radeon_device.c
drivers/gpu/drm/radeon/radeon_display.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_fence.c
drivers/gpu/drm/radeon/radeon_gart.c
drivers/gpu/drm/radeon/radeon_i2c.c
drivers/gpu/drm/radeon/radeon_kms.c
drivers/gpu/drm/radeon/radeon_legacy_encoders.c
drivers/gpu/drm/radeon/radeon_object.h
drivers/gpu/drm/radeon/radeon_pm.c
drivers/gpu/drm/radeon/radeon_ring.c
drivers/gpu/drm/radeon/radeon_state.c
drivers/gpu/drm/radeon/reg_srcs/r600
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rv770.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_page_alloc.c
drivers/gpu/drm/ttm/ttm_tt.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/stub/Kconfig
drivers/gpu/vga/vgaarb.c
drivers/hid/Kconfig
drivers/hid/hid-core.c
drivers/hid/hid-debug.c
drivers/hid/hid-ids.h
drivers/hid/hid-lgff.c
drivers/hid/hid-magicmouse.c
drivers/hid/hid-ortek.c
drivers/hid/hid-picolcd.c
drivers/hid/hid-roccat-kone.h
drivers/hid/hid-roccat-pyra.c
drivers/hid/usbhid/hid-quirks.c
drivers/hwmon/Kconfig
drivers/hwmon/abituguru.c
drivers/hwmon/abituguru3.c
drivers/hwmon/adm1026.c
drivers/hwmon/lm85.c
drivers/hwmon/lm90.c
drivers/hwmon/pmbus_core.c
drivers/hwmon/sht15.c
drivers/hwmon/tmp102.c
drivers/hwmon/twl4030-madc-hwmon.c
drivers/hwmon/w83791d.c
drivers/hwmon/w83792d.c
drivers/hwmon/w83793.c
drivers/i2c/algos/i2c-algo-bit.c
drivers/i2c/algos/i2c-algo-pca.c
drivers/i2c/busses/i2c-ali1535.c
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-davinci.c
drivers/i2c/busses/i2c-designware.c
drivers/i2c/busses/i2c-elektor.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-ibm_iic.c
drivers/i2c/busses/i2c-intel-mid.c
drivers/i2c/busses/i2c-isch.c
drivers/i2c/busses/i2c-mxs.c
drivers/i2c/busses/i2c-nomadik.c
drivers/i2c/busses/i2c-parport.c
drivers/i2c/busses/i2c-s6000.c
drivers/i2c/busses/i2c-stu300.c
drivers/i2c/busses/i2c-tegra.c
drivers/i2c/busses/i2c-xiic.c
drivers/i2c/i2c-core.c
drivers/ide/cy82c693.c
drivers/ide/ide-cd.c
drivers/ide/ide-cd_ioctl.c
drivers/ide/ide-floppy.c
drivers/ide/ide-gd.c
drivers/ide/ide-io.c
drivers/ide/ide-taskfile.c
drivers/ide/piix.c
drivers/ide/sis5513.c
drivers/ide/triflex.c
drivers/ide/via82cxxx.c
drivers/infiniband/hw/amso1100/c2_ae.c
drivers/infiniband/hw/amso1100/c2_qp.c
drivers/infiniband/hw/amso1100/c2_wr.h
drivers/infiniband/hw/ipath/ipath_driver.c
drivers/infiniband/hw/ipath/ipath_file_ops.c
drivers/infiniband/hw/ipath/ipath_init_chip.c
drivers/infiniband/hw/ipath/ipath_ud.c
drivers/infiniband/hw/ipath/ipath_user_sdma.c
drivers/infiniband/hw/nes/nes_cm.c
drivers/infiniband/hw/nes/nes_hw.c
drivers/infiniband/hw/nes/nes_nic.c
drivers/infiniband/hw/qib/qib.h
drivers/infiniband/hw/qib/qib_file_ops.c
drivers/infiniband/hw/qib/qib_iba6120.c
drivers/infiniband/hw/qib/qib_iba7220.c
drivers/infiniband/hw/qib/qib_iba7322.c
drivers/infiniband/hw/qib/qib_init.c
drivers/infiniband/hw/qib/qib_mad.h
drivers/infiniband/hw/qib/qib_twsi.c
drivers/infiniband/hw/qib/qib_ud.c
drivers/infiniband/hw/qib/qib_user_sdma.c
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/input/evdev.c
drivers/input/input.c
drivers/input/joydev.c
drivers/input/joystick/a3d.c
drivers/input/keyboard/davinci_keyscan.c
drivers/input/keyboard/spear-keyboard.c
drivers/input/keyboard/twl4030_keypad.c
drivers/input/misc/adxl34x.c
drivers/input/misc/keyspan_remote.c
drivers/input/misc/uinput.c
drivers/input/misc/wistron_btns.c
drivers/input/misc/xen-kbdfront.c
drivers/input/mouse/bcm5974.c
drivers/input/mouse/synaptics.c
drivers/input/mouse/synaptics_i2c.c
drivers/input/mouse/vsxxxaa.c
drivers/input/serio/hp_sdc.c
drivers/input/serio/i8042.c
drivers/input/serio/rpckbd.c
drivers/input/serio/xilinx_ps2.c
drivers/input/sparse-keymap.c
drivers/input/tablet/wacom_wac.c
drivers/input/tablet/wacom_wac.h
drivers/input/touchscreen/h3600_ts_input.c
drivers/input/touchscreen/intel-mid-touch.c
drivers/input/touchscreen/ucb1400_ts.c
drivers/input/touchscreen/wm831x-ts.c
drivers/input/touchscreen/wm9705.c
drivers/input/touchscreen/wm9712.c
drivers/input/touchscreen/wm9713.c
drivers/input/touchscreen/wm97xx-core.c
drivers/isdn/hardware/eicon/divacapi.h
drivers/isdn/hardware/eicon/io.h
drivers/isdn/hardware/eicon/message.c
drivers/isdn/hardware/eicon/pc.h
drivers/isdn/hardware/eicon/um_idi.c
drivers/isdn/hardware/mISDN/hfcmulti.c
drivers/isdn/hardware/mISDN/hfcpci.c
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hfc_sx.c
drivers/isdn/hisax/hfc_usb.h
drivers/isdn/hisax/l3dss1.c
drivers/isdn/hisax/l3ni1.c
drivers/isdn/hisax/nj_s.c
drivers/isdn/hisax/st5481_b.c
drivers/isdn/hisax/st5481_usb.c
drivers/isdn/hisax/teles_cs.c
drivers/isdn/hysdn/hysdn_sched.c
drivers/isdn/i4l/isdn_net.c
drivers/isdn/i4l/isdn_ppp.c
drivers/isdn/i4l/isdn_tty.c
drivers/isdn/isdnloop/isdnloop.c
drivers/isdn/mISDN/dsp.h
drivers/isdn/mISDN/dsp_cmx.c
drivers/isdn/mISDN/dsp_core.c
drivers/isdn/mISDN/dsp_dtmf.c
drivers/isdn/mISDN/dsp_tones.c
drivers/isdn/mISDN/l1oip_core.c
drivers/isdn/mISDN/layer2.c
drivers/leds/leds-pca9532.c
drivers/leds/leds-regulator.c
drivers/leds/leds-wm8350.c
drivers/lguest/lguest_user.c
drivers/macintosh/adbhid.c
drivers/macintosh/macio-adb.c
drivers/macintosh/therm_adt746x.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/therm_windtunnel.c
drivers/md/bitmap.h
drivers/md/dm-raid.c
drivers/md/dm-region-hash.c
drivers/md/dm-table.c
drivers/md/faulty.c
drivers/md/md.c
drivers/md/md.h
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid10.h
drivers/md/raid5.c
drivers/md/raid5.h
drivers/media/common/saa7146_i2c.c
drivers/media/common/tuners/mxl5005s.c
drivers/media/common/tuners/tda18271.h
drivers/media/dvb/b2c2/flexcop-pci.c
drivers/media/dvb/bt8xx/dvb-bt8xx.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-usb/af9005-fe.c
drivers/media/dvb/dvb-usb/friio.h
drivers/media/dvb/dvb-usb/lmedm04.c
drivers/media/dvb/frontends/atbm8830.h
drivers/media/dvb/frontends/au8522_dig.c
drivers/media/dvb/frontends/bcm3510.c
drivers/media/dvb/frontends/cx22700.c
drivers/media/dvb/frontends/cx22702.c
drivers/media/dvb/frontends/cx24110.c
drivers/media/dvb/frontends/cx24113.h
drivers/media/dvb/frontends/cx24123.c
drivers/media/dvb/frontends/drx397xD.c
drivers/media/dvb/frontends/mb86a16.c
drivers/media/dvb/frontends/mb86a20s.c
drivers/media/dvb/frontends/mt312.c
drivers/media/dvb/frontends/s5h1420.c
drivers/media/dvb/frontends/stb6100.c
drivers/media/dvb/frontends/stv0297.c
drivers/media/dvb/frontends/stv0367.c
drivers/media/dvb/frontends/stv0900_priv.h
drivers/media/dvb/frontends/stv090x.c
drivers/media/dvb/mantis/mantis_uart.c
drivers/media/dvb/ngene/ngene-core.c
drivers/media/dvb/pluto2/pluto2.c
drivers/media/dvb/siano/smsdvb.c
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/budget-patch.c
drivers/media/dvb/ttusb-dec/ttusb_dec.c
drivers/media/radio/radio-mr800.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/si4713-i2c.c
drivers/media/radio/wl128x/fmdrv_common.c
drivers/media/radio/wl128x/fmdrv_common.h
drivers/media/rc/ene_ir.c
drivers/media/rc/imon.c
drivers/media/rc/ir-raw.c
drivers/media/rc/ite-cir.c
drivers/media/rc/keymaps/rc-lme2510.c
drivers/media/rc/keymaps/rc-msi-tvanywhere.c
drivers/media/rc/keymaps/rc-norwood.c
drivers/media/rc/rc-main.c
drivers/media/video/au0828/au0828-video.c
drivers/media/video/bt8xx/bttv-cards.c
drivers/media/video/bt8xx/bttv-gpio.c
drivers/media/video/cafe_ccic.c
drivers/media/video/cx18/cx18-av-core.h
drivers/media/video/cx18/cx18-ioctl.c
drivers/media/video/cx18/cx18-vbi.c
drivers/media/video/cx231xx/cx231xx-avcore.c
drivers/media/video/cx231xx/cx231xx-vbi.c
drivers/media/video/cx231xx/cx231xx-video.c
drivers/media/video/cx23885/cimax2.c
drivers/media/video/cx23885/cx23885.h
drivers/media/video/cx25840/cx25840-core.c
drivers/media/video/davinci/dm644x_ccdc.c
drivers/media/video/davinci/vpfe_capture.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/gspca/gl860/gl860-mi1320.c
drivers/media/video/gspca/gspca.c
drivers/media/video/gspca/mars.c
drivers/media/video/gspca/mr97310a.c
drivers/media/video/gspca/ov519.c
drivers/media/video/gspca/sonixb.c
drivers/media/video/gspca/spca500.c
drivers/media/video/gspca/spca508.c
drivers/media/video/gspca/sq905.c
drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
drivers/media/video/hexium_gemini.c
drivers/media/video/ivtv/ivtv-firmware.c
drivers/media/video/ivtv/ivtvfb.c
drivers/media/video/msp3400-driver.c
drivers/media/video/msp3400-kthreads.c
drivers/media/video/omap/omap_vout.c
drivers/media/video/omap/omap_voutlib.c
drivers/media/video/omap1_camera.c
drivers/media/video/omap3isp/isp.c
drivers/media/video/omap3isp/ispccdc.h
drivers/media/video/omap3isp/ispccp2.c
drivers/media/video/omap3isp/ispcsi2.c
drivers/media/video/omap3isp/isppreview.c
drivers/media/video/omap3isp/isppreview.h
drivers/media/video/omap3isp/ispqueue.h
drivers/media/video/omap3isp/ispresizer.c
drivers/media/video/omap3isp/ispvideo.c
drivers/media/video/ov6650.c
drivers/media/video/ov9640.c
drivers/media/video/pvrusb2/pvrusb2-eeprom.c
drivers/media/video/pvrusb2/pvrusb2-hdw.h
drivers/media/video/pxa_camera.c
drivers/media/video/s5p-fimc/fimc-reg.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7164/saa7164-cmd.c
drivers/media/video/saa7164/saa7164-fw.c
drivers/media/video/saa7164/saa7164-types.h
drivers/media/video/sn9c102/sn9c102_core.c
drivers/media/video/sn9c102/sn9c102_sensor.h
drivers/media/video/tcm825x.c
drivers/media/video/tvaudio.c
drivers/media/video/uvc/uvc_video.c
drivers/media/video/v4l2-ioctl.c
drivers/media/video/videobuf-dma-contig.c
drivers/media/video/vpx3220.c
drivers/media/video/zoran/videocodec.h
drivers/media/video/zoran/zoran.h
drivers/media/video/zoran/zoran_driver.c
drivers/memstick/core/mspro_block.c
drivers/memstick/host/r592.c
drivers/memstick/host/r592.h
drivers/message/fusion/lsi/mpi_log_fc.h
drivers/message/fusion/lsi/mpi_log_sas.h
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptctl.c
drivers/message/fusion/mptsas.c
drivers/message/i2o/README
drivers/message/i2o/device.c
drivers/message/i2o/i2o_block.c
drivers/message/i2o/i2o_block.h
drivers/message/i2o/i2o_scsi.c
drivers/mfd/Kconfig
drivers/mfd/ab8500-gpadc.c
drivers/mfd/ezx-pcap.c
drivers/mfd/mfd-core.c
drivers/mfd/omap-usb-host.c
drivers/mfd/pcf50633-core.c
drivers/mfd/twl6030-irq.c
drivers/mfd/ucb1400_core.c
drivers/misc/bmp085.c
drivers/misc/c2port/c2port-duramar2150.c
drivers/misc/ibmasm/remote.h
drivers/misc/iwmc3200top/main.c
drivers/misc/kgdbts.c
drivers/misc/sgi-gru/grufile.c
drivers/misc/sgi-gru/grukservices.c
drivers/misc/sgi-gru/grutables.h
drivers/misc/ti-st/st_kim.c
drivers/mmc/card/mmc_test.c
drivers/mmc/core/bus.c
drivers/mmc/core/host.c
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/sdio_irq.c
drivers/mmc/host/atmel-mci.c
drivers/mmc/host/mmc_spi.c
drivers/mmc/host/omap.c
drivers/mmc/host/s3cmci.c
drivers/mmc/host/sdhci-pci.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/tmio_mmc_pio.c
drivers/mmc/host/wbsd.c
drivers/mtd/chips/Kconfig
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_util.c
drivers/mtd/chips/jedec_probe.c
drivers/mtd/devices/block2mtd.c
drivers/mtd/devices/doc2001plus.c
drivers/mtd/devices/docecc.c
drivers/mtd/devices/lart.c
drivers/mtd/devices/pmc551.c
drivers/mtd/lpddr/lpddr_cmds.c
drivers/mtd/maps/ceiva.c
drivers/mtd/maps/cfi_flagadm.c
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/maps/pmcmsp-flash.c
drivers/mtd/maps/sc520cdp.c
drivers/mtd/maps/tqm8xxl.c
drivers/mtd/mtdblock.c
drivers/mtd/mtdchar.c
drivers/mtd/mtdswap.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/ams-delta.c
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/autcpu12.c
drivers/mtd/nand/cs553x_nand.c
drivers/mtd/nand/denali.c
drivers/mtd/nand/diskonchip.c
drivers/mtd/nand/fsl_elbc_nand.c
drivers/mtd/nand/fsmc_nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/nandsim.c
drivers/mtd/nand/nomadik_nand.c
drivers/mtd/nand/pasemi_nand.c
drivers/mtd/nand/plat_nand.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/mtd/nand/r852.c
drivers/mtd/nand/sh_flctl.c
drivers/mtd/nand/sm_common.c
drivers/mtd/nand/tmio_nand.c
drivers/mtd/onenand/omap2.c
drivers/mtd/onenand/onenand_sim.c
drivers/mtd/sm_ftl.c
drivers/mtd/ubi/Kconfig
drivers/mtd/ubi/io.c
drivers/mtd/ubi/scan.c
drivers/mtd/ubi/vmt.c
drivers/net/3c501.c
drivers/net/3c523.c
drivers/net/3c527.c
drivers/net/3c59x.c
drivers/net/acenic.c
drivers/net/amd8111e.c
drivers/net/at1700.c
drivers/net/atl1c/atl1c.h
drivers/net/atl1c/atl1c_main.c
drivers/net/atl1e/atl1e_main.c
drivers/net/atlx/atl2.c
drivers/net/bcm63xx_enet.c
drivers/net/benet/be.h
drivers/net/benet/be_cmds.c
drivers/net/benet/be_main.c
drivers/net/bna/bfa_ioc.c
drivers/net/bna/bfa_ioc.h
drivers/net/bna/bfa_ioc_ct.c
drivers/net/bna/bfi.h
drivers/net/bna/bna_hw.h
drivers/net/bna/bnad.c
drivers/net/bnx2.c
drivers/net/bnx2x/bnx2x.h
drivers/net/bnx2x/bnx2x_cmn.c
drivers/net/bnx2x/bnx2x_ethtool.c
drivers/net/bnx2x/bnx2x_hsi.h
drivers/net/bnx2x/bnx2x_link.c
drivers/net/bnx2x/bnx2x_main.c
drivers/net/bnx2x/bnx2x_reg.h
drivers/net/bonding/bond_3ad.c
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_alb.h
drivers/net/caif/caif_shmcore.c
drivers/net/caif/caif_spi.c
drivers/net/caif/caif_spi_slave.c
drivers/net/can/at91_can.c
drivers/net/can/c_can/c_can.c
drivers/net/can/janz-ican3.c
drivers/net/can/mcp251x.c
drivers/net/can/mscan/mpc5xxx_can.c
drivers/net/can/mscan/mscan.c
drivers/net/can/sja1000/sja1000.c
drivers/net/can/softing/softing.h
drivers/net/can/softing/softing_main.c
drivers/net/can/ti_hecc.c
drivers/net/can/usb/ems_usb.c
drivers/net/can/usb/esd_usb2.c
drivers/net/cassini.c
drivers/net/cassini.h
drivers/net/chelsio/mv88e1xxx.c
drivers/net/chelsio/pm3393.c
drivers/net/chelsio/sge.c
drivers/net/chelsio/vsc7326.c
drivers/net/cris/eth_v10.c
drivers/net/cxgb3/sge.c
drivers/net/cxgb3/t3_hw.c
drivers/net/cxgb4/t4_hw.c
drivers/net/cxgb4vf/cxgb4vf_main.c
drivers/net/cxgb4vf/sge.c
drivers/net/davinci_emac.c
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_hw.h
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/netdev.c
drivers/net/ehea/ehea_main.c
drivers/net/enc28j60_hw.h
drivers/net/eth16i.c
drivers/net/ethoc.c
drivers/net/fec.h
drivers/net/forcedeth.c
drivers/net/fs_enet/mac-fec.c
drivers/net/ftmac100.c
drivers/net/gianfar.h
drivers/net/hamradio/Makefile
drivers/net/hamradio/yam.c
drivers/net/hp100.c
drivers/net/hp100.h
drivers/net/ibm_newemac/tah.c
drivers/net/ibmlana.c
drivers/net/ibmlana.h
drivers/net/igb/e1000_mac.c
drivers/net/igb/e1000_phy.c
drivers/net/igb/igb_main.c
drivers/net/igbvf/netdev.c
drivers/net/ipg.c
drivers/net/irda/ali-ircc.c
drivers/net/irda/donauboe.c
drivers/net/irda/donauboe.h
drivers/net/irda/girbil-sir.c
drivers/net/irda/irda-usb.c
drivers/net/irda/mcs7780.c
drivers/net/irda/nsc-ircc.c
drivers/net/irda/nsc-ircc.h
drivers/net/irda/pxaficp_ir.c
drivers/net/irda/smsc-ircc2.c
drivers/net/irda/via-ircc.c
drivers/net/irda/vlsi_ir.h
drivers/net/ixgbe/ixgbe_dcb.c
drivers/net/ixgbe/ixgbe_dcb_nl.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_phy.c
drivers/net/ixgbe/ixgbe_x540.c
drivers/net/ixgbevf/ixgbevf_main.c
drivers/net/ks8842.c
drivers/net/ks8851.c
drivers/net/ks8851_mll.c
drivers/net/lib8390.c
drivers/net/loopback.c
drivers/net/lp486e.c
drivers/net/meth.h
drivers/net/mii.c
drivers/net/mlx4/en_main.c
drivers/net/mlx4/en_netdev.c
drivers/net/mlx4/en_rx.c
drivers/net/mlx4/en_selftest.c
drivers/net/mlx4/en_tx.c
drivers/net/mlx4/main.c
drivers/net/mlx4/mcg.c
drivers/net/mlx4/mlx4.h
drivers/net/mlx4/port.c
drivers/net/mlx4/sense.c
drivers/net/myri10ge/myri10ge.c
drivers/net/myri_sbus.c
drivers/net/natsemi.c
drivers/net/netconsole.c
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_hdr.h
drivers/net/netxen/netxen_nic_main.c
drivers/net/ns83820.c
drivers/net/pch_gbe/pch_gbe.h
drivers/net/pch_gbe/pch_gbe_ethtool.c
drivers/net/pch_gbe/pch_gbe_main.c
drivers/net/pci-skeleton.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcnet32.c
drivers/net/phy/phy_device.c
drivers/net/ppp_generic.c
drivers/net/ppp_synctty.c
drivers/net/pppoe.c
drivers/net/ps3_gelic_net.c
drivers/net/ps3_gelic_net.h
drivers/net/ps3_gelic_wireless.c
drivers/net/pxa168_eth.c
drivers/net/qla3xxx.h
drivers/net/qlcnic/qlcnic.h
drivers/net/qlcnic/qlcnic_main.c
drivers/net/qlge/qlge_main.c
drivers/net/r6040.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/s2io.h
drivers/net/sfc/efx.c
drivers/net/sfc/falcon.c
drivers/net/sfc/io.h
drivers/net/sfc/mcdi.c
drivers/net/sfc/mcdi_pcol.h
drivers/net/sfc/mcdi_phy.c
drivers/net/sfc/net_driver.h
drivers/net/sfc/nic.c
drivers/net/sfc/nic.h
drivers/net/sfc/selftest.c
drivers/net/sfc/tx.c
drivers/net/sgiseeq.c
drivers/net/sh_eth.c
drivers/net/sis190.c
drivers/net/sis900.c
drivers/net/skfp/ess.c
drivers/net/skfp/fplustm.c
drivers/net/skfp/h/cmtdef.h
drivers/net/skfp/h/fplustm.h
drivers/net/skfp/h/smc.h
drivers/net/skfp/h/smt.h
drivers/net/skfp/h/supern_2.h
drivers/net/skfp/hwmtm.c
drivers/net/skfp/pcmplc.c
drivers/net/skfp/smt.c
drivers/net/skge.h
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/smc91x.h
drivers/net/smsc911x.c
drivers/net/smsc9420.c
drivers/net/starfire.c
drivers/net/stmmac/dwmac_lib.c
drivers/net/stmmac/norm_desc.c
drivers/net/stmmac/stmmac_main.c
drivers/net/sunbmac.h
drivers/net/sungem.c
drivers/net/sunhme.h
drivers/net/tc35815.c
drivers/net/tehuti.c
drivers/net/tehuti.h
drivers/net/tg3.c
drivers/net/tg3.h
drivers/net/tokenring/3c359.c
drivers/net/tokenring/lanstreamer.c
drivers/net/tokenring/madgemc.c
drivers/net/tokenring/olympic.c
drivers/net/tokenring/smctr.c
drivers/net/tokenring/tms380tr.h
drivers/net/tsi108_eth.h
drivers/net/tulip/de4x5.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/eeprom.c
drivers/net/typhoon.c
drivers/net/ucc_geth.h
drivers/net/usb/cdc_eem.c
drivers/net/usb/cdc_ether.c
drivers/net/usb/cdc_ncm.c
drivers/net/usb/cdc_subset.c
drivers/net/usb/gl620a.c
drivers/net/usb/kaweth.c
drivers/net/usb/net1080.c
drivers/net/usb/plusb.c
drivers/net/usb/rndis_host.c
drivers/net/usb/smsc95xx.c
drivers/net/usb/usbnet.c
drivers/net/usb/zaurus.c
drivers/net/veth.c
drivers/net/via-rhine.c
drivers/net/via-velocity.c
drivers/net/vmxnet3/vmxnet3_drv.c
drivers/net/vxge/vxge-config.c
drivers/net/vxge/vxge-main.c
drivers/net/vxge/vxge-traffic.c
drivers/net/vxge/vxge-traffic.h
drivers/net/wan/cosa.c
drivers/net/wan/dscc4.c
drivers/net/wan/hostess_sv11.c
drivers/net/wan/ixp4xx_hss.c
drivers/net/wan/lmc/lmc_main.c
drivers/net/wan/lmc/lmc_var.h
drivers/net/wan/z85230.c
drivers/net/wimax/i2400m/control.c
drivers/net/wimax/i2400m/driver.c
drivers/net/wimax/i2400m/fw.c
drivers/net/wimax/i2400m/i2400m-usb.h
drivers/net/wimax/i2400m/i2400m.h
drivers/net/wimax/i2400m/netdev.c
drivers/net/wimax/i2400m/op-rfkill.c
drivers/net/wimax/i2400m/rx.c
drivers/net/wimax/i2400m/tx.c
drivers/net/wimax/i2400m/usb-fw.c
drivers/net/wimax/i2400m/usb-rx.c
drivers/net/wimax/i2400m/usb-tx.c
drivers/net/wireless/airo.c
drivers/net/wireless/ath/ar9170/main.c
drivers/net/wireless/ath/ar9170/phy.c
drivers/net/wireless/ath/ath5k/ani.h
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/desc.c
drivers/net/wireless/ath/ath5k/eeprom.c
drivers/net/wireless/ath/ath5k/pci.c
drivers/net/wireless/ath/ath5k/pcu.c
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/ath/ath5k/reg.h
drivers/net/wireless/ath/ath9k/ar5008_phy.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/hif_usb.c
drivers/net/wireless/ath/ath9k/htc_hst.c
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/mac.c
drivers/net/wireless/ath/ath9k/mac.h
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/pci.c
drivers/net/wireless/ath/ath9k/rc.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/ath/carl9170/carl9170.h
drivers/net/wireless/ath/carl9170/main.c
drivers/net/wireless/ath/carl9170/phy.c
drivers/net/wireless/ath/carl9170/rx.c
drivers/net/wireless/ath/carl9170/tx.c
drivers/net/wireless/ath/carl9170/usb.c
drivers/net/wireless/ath/hw.c
drivers/net/wireless/ath/regd.c
drivers/net/wireless/ath/regd_common.h
drivers/net/wireless/atmel.c
drivers/net/wireless/atmel_cs.c
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43/dma.c
drivers/net/wireless/b43/dma.h
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/phy_g.h
drivers/net/wireless/b43/phy_n.h
drivers/net/wireless/b43legacy/b43legacy.h
drivers/net/wireless/hostap/hostap_ap.c
drivers/net/wireless/hostap/hostap_ap.h
drivers/net/wireless/hostap/hostap_ioctl.c
drivers/net/wireless/hostap/hostap_wlan.h
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/ipw2x00/libipw_rx.c
drivers/net/wireless/iwlegacy/Kconfig
drivers/net/wireless/iwlegacy/iwl-3945-hw.h
drivers/net/wireless/iwlegacy/iwl-4965-hw.h
drivers/net/wireless/iwlegacy/iwl-4965-tx.c
drivers/net/wireless/iwlegacy/iwl-core.c
drivers/net/wireless/iwlegacy/iwl-eeprom.c
drivers/net/wireless/iwlegacy/iwl-fh.h
drivers/net/wireless/iwlegacy/iwl-led.c
drivers/net/wireless/iwlegacy/iwl-scan.c
drivers/net/wireless/iwlegacy/iwl-sta.c
drivers/net/wireless/iwlegacy/iwl3945-base.c
drivers/net/wireless/iwlegacy/iwl4965-base.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn-ict.c
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-eeprom.h
drivers/net/wireless/iwlwifi/iwl-fh.h
drivers/net/wireless/iwlwifi/iwl-scan.c
drivers/net/wireless/iwmc3200wifi/hal.c
drivers/net/wireless/iwmc3200wifi/tx.c
drivers/net/wireless/libertas/README
drivers/net/wireless/libertas/cfg.c
drivers/net/wireless/libertas/if_cs.c
drivers/net/wireless/libertas/if_spi.h
drivers/net/wireless/mac80211_hwsim.c
drivers/net/wireless/mwl8k.c
drivers/net/wireless/orinoco/hw.c
drivers/net/wireless/p54/main.c
drivers/net/wireless/p54/p54spi.c
drivers/net/wireless/p54/p54usb.c
drivers/net/wireless/p54/txrx.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/net/wireless/rayctl.h
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2800lib.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00config.c
drivers/net/wireless/rt2x00/rt2x00crypto.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt2x00dump.h
drivers/net/wireless/rt2x00/rt2x00link.c
drivers/net/wireless/rt2x00/rt2x00queue.c
drivers/net/wireless/rt2x00/rt2x00queue.h
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rt2x00/rt2x00usb.h
drivers/net/wireless/rtlwifi/base.c
drivers/net/wireless/rtlwifi/efuse.c
drivers/net/wireless/rtlwifi/pci.c
drivers/net/wireless/rtlwifi/regd.c
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
drivers/net/wireless/rtlwifi/usb.c
drivers/net/wireless/rtlwifi/wifi.h
drivers/net/wireless/wl1251/cmd.c
drivers/net/wireless/wl1251/rx.c
drivers/net/wireless/wl12xx/cmd.c
drivers/net/wireless/wl12xx/conf.h
drivers/net/wireless/wl12xx/io.h
drivers/net/wireless/wl12xx/sdio.c
drivers/net/wireless/wl12xx/spi.c
drivers/net/wireless/wl12xx/testmode.c
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
drivers/net/wireless/zd1211rw/zd_usb.c
drivers/net/wireless/zd1211rw/zd_usb.h
drivers/net/xilinx_emaclite.c
drivers/net/znet.c
drivers/of/fdt.c
drivers/of/of_mdio.c
drivers/parisc/pdc_stable.c
drivers/parport/Kconfig
drivers/parport/ieee1284.c
drivers/parport/parport_pc.c
drivers/pci/Kconfig
drivers/pci/Makefile
drivers/pci/hotplug/acpi_pcihp.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/rpaphp_core.c
drivers/pci/intel-iommu.c
drivers/pci/intr_remapping.c
drivers/pci/iova.c
drivers/pci/pci-driver.c
drivers/pci/pci-sysfs.c
drivers/pci/quirks.c
drivers/pci/setup-bus.c
drivers/pcmcia/i82092.c
drivers/pcmcia/pcmcia_resource.c
drivers/pcmcia/pxa2xx_balloon3.c
drivers/pcmcia/pxa2xx_lubbock.c
drivers/pcmcia/pxa2xx_trizeps4.c
drivers/pcmcia/ti113x.h
drivers/platform/x86/Kconfig
drivers/platform/x86/acer-wmi.c
drivers/platform/x86/asus-wmi.c
drivers/platform/x86/eeepc-wmi.c
drivers/platform/x86/intel_mid_thermal.c
drivers/platform/x86/intel_pmic_gpio.c
drivers/platform/x86/samsung-laptop.c
drivers/platform/x86/sony-laptop.c
drivers/platform/x86/thinkpad_acpi.c
drivers/pnp/card.c
drivers/pnp/pnpbios/bioscalls.c
drivers/pps/Kconfig
drivers/ps3/ps3-lpm.c
drivers/ps3/ps3-sys-manager.c
drivers/rapidio/rio-scan.c
drivers/rapidio/rio.c
drivers/rapidio/switches/idt_gen2.c
drivers/regulator/core.c
drivers/regulator/max8952.c
drivers/rtc/class.c
drivers/rtc/interface.c
drivers/rtc/rtc-at91rm9200.c
drivers/rtc/rtc-bfin.c
drivers/rtc/rtc-coh901331.c
drivers/rtc/rtc-lpc32xx.c
drivers/rtc/rtc-max8925.c
drivers/rtc/rtc-mc13xxx.c
drivers/rtc/rtc-mrst.c
drivers/rtc/rtc-omap.c
drivers/rtc/rtc-s3c.c
drivers/rtc/rtc-x1205.c
drivers/s390/block/dasd.c
drivers/s390/block/dasd_3990_erp.c
drivers/s390/block/dasd_devmap.c
drivers/s390/block/dasd_diag.c
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_genhd.c
drivers/s390/block/dasd_int.h
drivers/s390/block/dasd_ioctl.c
drivers/s390/char/raw3270.c
drivers/s390/char/tape_char.c
drivers/s390/char/tty3270.c
drivers/s390/cio/device.c
drivers/s390/cio/device_fsm.c
drivers/s390/cio/qdio_main.c
drivers/s390/crypto/zcrypt_api.h
drivers/s390/kvm/kvm_virtio.c
drivers/s390/net/claw.c
drivers/s390/net/ctcm_fsms.c
drivers/s390/net/lcs.c
drivers/s390/net/qeth_core_main.c
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_qdio.c
drivers/sbus/char/jsflash.c
drivers/sbus/char/max1617.h
drivers/scsi/3w-9xxx.h
drivers/scsi/3w-xxxx.h
drivers/scsi/53c700.scr
drivers/scsi/53c700_d.h_shipped
drivers/scsi/FlashPoint.c
drivers/scsi/NCR5380.c
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/commsup.c
drivers/scsi/advansys.c
drivers/scsi/aha1740.c
drivers/scsi/aic7xxx/aic79xx.h
drivers/scsi/aic7xxx/aic79xx.reg
drivers/scsi/aic7xxx/aic79xx.seq
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic7xxx.h
drivers/scsi/aic7xxx/aic7xxx.reg
drivers/scsi/aic7xxx/aic7xxx.seq
drivers/scsi/aic7xxx/aic7xxx_core.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_pci.c
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
drivers/scsi/aic7xxx_old.c
drivers/scsi/aic7xxx_old/aic7xxx.seq
drivers/scsi/aic94xx/aic94xx_reg_def.h
drivers/scsi/arm/acornscsi.c
drivers/scsi/arm/acornscsi.h
drivers/scsi/arm/arxescsi.c
drivers/scsi/arm/cumana_2.c
drivers/scsi/arm/eesox.c
drivers/scsi/arm/fas216.c
drivers/scsi/arm/fas216.h
drivers/scsi/arm/powertec.c
drivers/scsi/atari_NCR5380.c
drivers/scsi/atp870u.c
drivers/scsi/be2iscsi/be_cmds.h
drivers/scsi/bfa/bfa_core.c
drivers/scsi/bfa/bfa_defs_svc.h
drivers/scsi/bfa/bfa_fc.h
drivers/scsi/bfa/bfa_fcs.c
drivers/scsi/bfa/bfa_fcs.h
drivers/scsi/bfa/bfa_fcs_lport.c
drivers/scsi/bfa/bfa_svc.c
drivers/scsi/bfa/bfa_svc.h
drivers/scsi/bfa/bfad.c
drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h
drivers/scsi/bnx2fc/bnx2fc_els.c
drivers/scsi/bnx2fc/bnx2fc_io.c
drivers/scsi/bnx2fc/bnx2fc_tgt.c
drivers/scsi/bnx2i/bnx2i_hwi.c
drivers/scsi/cxgbi/libcxgbi.h
drivers/scsi/dc395x.c
drivers/scsi/dc395x.h
drivers/scsi/device_handler/scsi_dh.c
drivers/scsi/device_handler/scsi_dh_alua.c
drivers/scsi/dpt/sys_info.h
drivers/scsi/eata.c
drivers/scsi/fcoe/fcoe_ctlr.c
drivers/scsi/fdomain.c
drivers/scsi/fnic/fnic_fcs.c
drivers/scsi/fnic/fnic_scsi.c
drivers/scsi/g_NCR5380.c
drivers/scsi/gdth.h
drivers/scsi/gvp11.c
drivers/scsi/imm.c
drivers/scsi/initio.c
drivers/scsi/initio.h
drivers/scsi/ips.c
drivers/scsi/ips.h
drivers/scsi/iscsi_tcp.c
drivers/scsi/libfc/fc_exch.c
drivers/scsi/libfc/fc_fcp.c
drivers/scsi/libfc/fc_lport.c
drivers/scsi/libsas/sas_expander.c
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_mbox.c
drivers/scsi/lpfc/lpfc_nl.h
drivers/scsi/lpfc/lpfc_nportdisc.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/lpfc/lpfc_scsi.h
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/megaraid.c
drivers/scsi/megaraid.h
drivers/scsi/megaraid/mbox_defs.h
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_sas.h
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/mpt2sas/mpi/mpi2_init.h
drivers/scsi/mpt2sas/mpt2sas_base.c
drivers/scsi/mpt2sas/mpt2sas_config.c
drivers/scsi/mpt2sas/mpt2sas_ctl.c
drivers/scsi/mpt2sas/mpt2sas_scsih.c
drivers/scsi/ncr53c8xx.c
drivers/scsi/nsp32.c
drivers/scsi/nsp32.h
drivers/scsi/osst.c
drivers/scsi/osst.h
drivers/scsi/pcmcia/nsp_cs.c
drivers/scsi/pm8001/pm8001_hwi.c
drivers/scsi/pm8001/pm8001_hwi.h
drivers/scsi/pm8001/pm8001_sas.h
drivers/scsi/pmcraid.c
drivers/scsi/pmcraid.h
drivers/scsi/qla1280.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_fw.h
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_nx.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla4xxx/ql4_def.h
drivers/scsi/qla4xxx/ql4_init.c
drivers/scsi/qla4xxx/ql4_nvram.h
drivers/scsi/qla4xxx/ql4_os.c
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_netlink.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/scsi_tgt_lib.c
drivers/scsi/scsi_transport_fc.c
drivers/scsi/sd.c
drivers/scsi/sr.c
drivers/scsi/sun3_NCR5380.c
drivers/scsi/sym53c416.c
drivers/scsi/sym53c8xx_2/sym_fw1.h
drivers/scsi/sym53c8xx_2/sym_fw2.h
drivers/scsi/sym53c8xx_2/sym_hipd.c
drivers/scsi/sym53c8xx_2/sym_malloc.c
drivers/scsi/ultrastor.c
drivers/scsi/wd33c93.c
drivers/scsi/wd7000.c
drivers/sfi/sfi_core.c
drivers/spi/amba-pl022.c
drivers/spi/au1550_spi.c
drivers/spi/dw_spi.c
drivers/spi/dw_spi.h
drivers/spi/ep93xx_spi.c
drivers/spi/pxa2xx_spi.c
drivers/spi/spi.c
drivers/spi/spi_bfin5xx.c
drivers/spi/spi_fsl_espi.c
drivers/ssb/pci.c
drivers/ssb/sprom.c
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
drivers/staging/ath6kl/include/aggr_recv_api.h
drivers/staging/ath6kl/include/common/a_hci.h
drivers/staging/ath6kl/include/common/dbglog.h
drivers/staging/ath6kl/include/common/epping_test.h
drivers/staging/ath6kl/include/common/ini_dset.h
drivers/staging/ath6kl/include/common/testcmd.h
drivers/staging/ath6kl/include/common/wmi.h
drivers/staging/ath6kl/include/common/wmix.h
drivers/staging/ath6kl/include/htc_api.h
drivers/staging/ath6kl/miscdrv/credit_dist.c
drivers/staging/ath6kl/os/linux/ar6000_android.c
drivers/staging/ath6kl/os/linux/ar6000_drv.c
drivers/staging/ath6kl/wmi/wmi.c
drivers/staging/bcm/Adapter.h
drivers/staging/bcm/CmHost.c
drivers/staging/bcm/HostMIBSInterface.h
drivers/staging/bcm/IPv6Protocol.c
drivers/staging/bcm/InterfaceIdleMode.c
drivers/staging/bcm/InterfaceIsr.c
drivers/staging/bcm/InterfaceRx.c
drivers/staging/bcm/Ioctl.h
drivers/staging/bcm/LeakyBucket.c
drivers/staging/bcm/Misc.c
drivers/staging/bcm/Qos.c
drivers/staging/bcm/cntrl_SignalingInterface.h
drivers/staging/bcm/nvm.c
drivers/staging/brcm80211/README
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c
drivers/staging/brcm80211/brcmfmac/dhd_linux.c
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
drivers/staging/brcm80211/brcmsmac/wlc_main.c
drivers/staging/brcm80211/brcmsmac/wlc_rate.c
drivers/staging/brcm80211/include/bcmsrom_fmt.h
drivers/staging/brcm80211/include/hndsoc.h
drivers/staging/brcm80211/util/bcmotp.c
drivers/staging/brcm80211/util/bcmsrom.c
drivers/staging/brcm80211/util/hnddma.c
drivers/staging/brcm80211/util/sbpcmcia.h
drivers/staging/brcm80211/util/siutils.c
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c
drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
drivers/staging/comedi/drivers/adl_pci9118.c
drivers/staging/comedi/drivers/adq12b.c
drivers/staging/comedi/drivers/adv_pci1710.c
drivers/staging/comedi/drivers/cb_pcidas.c
drivers/staging/comedi/drivers/cb_pcidas64.c
drivers/staging/comedi/drivers/comedi_test.c
drivers/staging/comedi/drivers/das1800.c
drivers/staging/comedi/drivers/das800.c
drivers/staging/comedi/drivers/dmm32at.c
drivers/staging/comedi/drivers/dt2811.c
drivers/staging/comedi/drivers/dt9812.c
drivers/staging/comedi/drivers/gsc_hpdi.c
drivers/staging/comedi/drivers/icp_multi.c
drivers/staging/comedi/drivers/me4000.c
drivers/staging/comedi/drivers/mpc624.c
drivers/staging/comedi/drivers/ni_at_a2150.c
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/ni_pcidio.c
drivers/staging/comedi/drivers/pcl812.c
drivers/staging/comedi/drivers/pcl816.c
drivers/staging/comedi/drivers/pcl818.c
drivers/staging/comedi/drivers/pcmmio.c
drivers/staging/comedi/drivers/pcmuio.c
drivers/staging/comedi/drivers/quatech_daqp_cs.c
drivers/staging/comedi/drivers/rtd520.c
drivers/staging/comedi/drivers/s626.c
drivers/staging/comedi/drivers/usbdux.c
drivers/staging/comedi/drivers/usbduxfast.c
drivers/staging/cptm1217/clearpad_tm1217.c
drivers/staging/crystalhd/crystalhd_cmds.c
drivers/staging/crystalhd/crystalhd_hw.c
drivers/staging/cxt1e1/musycc.c
drivers/staging/cxt1e1/musycc.h
drivers/staging/cxt1e1/pmcc4_defs.h
drivers/staging/cxt1e1/sbecrc.c
drivers/staging/cxt1e1/sbeproc.c
drivers/staging/et131x/et1310_address_map.h
drivers/staging/et131x/et1310_phy.h
drivers/staging/et131x/et1310_rx.c
drivers/staging/et131x/et131x_isr.c
drivers/staging/et131x/et131x_netdev.c
drivers/staging/ft1000/ft1000-pcmcia/ft1000_dev.h
drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
drivers/staging/ft1000/ft1000-usb/ft1000_download.c
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
drivers/staging/generic_serial/generic_serial.c
drivers/staging/generic_serial/rio/map.h
drivers/staging/generic_serial/rio/rioboot.c
drivers/staging/generic_serial/rio/riocmd.c
drivers/staging/generic_serial/rio/rioroute.c
drivers/staging/generic_serial/rio/riotty.c
drivers/staging/generic_serial/sx.c
drivers/staging/gma500/psb_drm.h
drivers/staging/gma500/psb_drv.c
drivers/staging/gma500/psb_intel_bios.c
drivers/staging/gma500/psb_intel_sdvo.c
drivers/staging/gma500/psb_intel_sdvo_regs.h
drivers/staging/gma500/psb_ttm_fence_user.h
drivers/staging/go7007/go7007.txt
drivers/staging/hv/blkvsc_drv.c
drivers/staging/hv/channel.c
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/connection.c
drivers/staging/hv/hv.c
drivers/staging/hv/hv_api.h
drivers/staging/hv/hv_kvp.h
drivers/staging/hv/hv_mouse.c
drivers/staging/hv/hv_util.c
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/rndis_filter.c
drivers/staging/hv/tools/hv_kvp_daemon.c
drivers/staging/hv/vmbus_drv.c
drivers/staging/hv/vmbus_private.h
drivers/staging/iio/Documentation/iio_utils.h
drivers/staging/iio/accel/adis16201.h
drivers/staging/iio/accel/adis16203.h
drivers/staging/iio/accel/adis16204.h
drivers/staging/iio/accel/adis16209.h
drivers/staging/iio/accel/adis16220.h
drivers/staging/iio/accel/adis16240.h
drivers/staging/iio/accel/lis3l02dq.h
drivers/staging/iio/accel/lis3l02dq_core.c
drivers/staging/iio/accel/lis3l02dq_ring.c
drivers/staging/iio/accel/sca3000.h
drivers/staging/iio/accel/sca3000_ring.c
drivers/staging/iio/adc/ad7298_ring.c
drivers/staging/iio/adc/ad7476_ring.c
drivers/staging/iio/adc/ad7887_ring.c
drivers/staging/iio/adc/ad799x_core.c
drivers/staging/iio/adc/ad799x_ring.c
drivers/staging/iio/adc/max1363_core.c
drivers/staging/iio/adc/max1363_ring.c
drivers/staging/iio/chrdev.h
drivers/staging/iio/gyro/adis16060_core.c
drivers/staging/iio/gyro/adis16080_core.c
drivers/staging/iio/gyro/adis16260.h
drivers/staging/iio/iio.h
drivers/staging/iio/imu/adis16300.h
drivers/staging/iio/imu/adis16350.h
drivers/staging/iio/imu/adis16400.h
drivers/staging/iio/imu/adis16400_core.c
drivers/staging/iio/imu/adis16400_ring.c
drivers/staging/iio/industrialio-core.c
drivers/staging/iio/meter/ade7753.h
drivers/staging/iio/meter/ade7754.h
drivers/staging/iio/meter/ade7758.h
drivers/staging/iio/meter/ade7759.h
drivers/staging/iio/meter/ade7854.h
drivers/staging/iio/ring_generic.h
drivers/staging/intel_sst/TODO
drivers/staging/intel_sst/intel_sst.c
drivers/staging/intel_sst/intel_sst_app_interface.c
drivers/staging/intel_sst/intel_sst_drv_interface.c
drivers/staging/intel_sst/intel_sst_dsp.c
drivers/staging/intel_sst/intel_sst_fw_ipc.h
drivers/staging/intel_sst/intel_sst_stream.c
drivers/staging/intel_sst/intel_sst_stream_encoded.c
drivers/staging/intel_sst/intelmid.c
drivers/staging/intel_sst/intelmid.h
drivers/staging/keucr/init.c
drivers/staging/keucr/smilmain.c
drivers/staging/keucr/smilsub.c
drivers/staging/lirc/lirc_ene0100.h
drivers/staging/memrar/Kconfig [deleted file]
drivers/staging/memrar/Makefile [deleted file]
drivers/staging/memrar/TODO [deleted file]
drivers/staging/memrar/memrar-abi [deleted file]
drivers/staging/memrar/memrar.h [deleted file]
drivers/staging/memrar/memrar_allocator.c [deleted file]
drivers/staging/memrar/memrar_allocator.h [deleted file]
drivers/staging/memrar/memrar_handler.c [deleted file]
drivers/staging/msm/mdp4_overlay.c
drivers/staging/msm/mdp_ppp_dq.c
drivers/staging/msm/msm_fb.c
drivers/staging/octeon/cvmx-cmd-queue.h
drivers/staging/octeon/cvmx-fpa.h
drivers/staging/octeon/cvmx-helper-board.h
drivers/staging/octeon/cvmx-helper-util.c
drivers/staging/octeon/cvmx-helper.c
drivers/staging/octeon/cvmx-mdio.h
drivers/staging/octeon/cvmx-pko.h
drivers/staging/octeon/cvmx-pow.h
drivers/staging/octeon/ethernet-util.h
drivers/staging/olpc_dcon/Kconfig
drivers/staging/olpc_dcon/olpc_dcon_xo_1.c
drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c
drivers/staging/pohmelfs/crypto.c
drivers/staging/quatech_usb2/quatech_usb2.c
drivers/staging/rt2860/chip/rtmp_phy.h
drivers/staging/rt2860/common/ba_action.c
drivers/staging/rt2860/common/cmm_aes.c
drivers/staging/rt2860/common/cmm_cfg.c
drivers/staging/rt2860/common/cmm_data.c
drivers/staging/rt2860/common/cmm_data_pci.c
drivers/staging/rt2860/common/cmm_data_usb.c
drivers/staging/rt2860/common/cmm_mac_pci.c
drivers/staging/rt2860/common/cmm_sanity.c
drivers/staging/rt2860/common/cmm_sync.c
drivers/staging/rt2860/common/cmm_wpa.c
drivers/staging/rt2860/common/mlme.c
drivers/staging/rt2860/common/rtmp_init.c
drivers/staging/rt2860/common/spectrum.c
drivers/staging/rt2860/mlme.h
drivers/staging/rt2860/rt_linux.c
drivers/staging/rt2860/rt_pci_rbus.c
drivers/staging/rt2860/rtmp.h
drivers/staging/rt2860/sta_ioctl.c
drivers/staging/rt2870/common/rtusb_bulk.c
drivers/staging/rt2870/common/rtusb_data.c
drivers/staging/rtl8187se/Kconfig
drivers/staging/rtl8187se/ieee80211/ieee80211.h
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8187se/r8180_core.c
drivers/staging/rtl8187se/r8180_dm.c
drivers/staging/rtl8187se/r8180_rtl8225z2.c
drivers/staging/rtl8187se/r8185b_init.c
drivers/staging/rtl8192e/Kconfig
drivers/staging/rtl8192e/ieee80211/ieee80211.h
drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h
drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c
drivers/staging/rtl8192e/ieee80211/rtl819x_TS.h
drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c
drivers/staging/rtl8192e/r819xE_phy.c
drivers/staging/rtl8192u/Kconfig
drivers/staging/rtl8192u/ieee80211/ieee80211.h
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
drivers/staging/rtl8192u/ieee80211/scatterwalk.c
drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r819xU_HTType.h
drivers/staging/rtl8192u/r819xU_phy.c
drivers/staging/rtl8712/rtl871x_cmd.h
drivers/staging/rtl8712/rtl871x_led.h
drivers/staging/rtl8712/rtl871x_mlme.c
drivers/staging/rtl8712/rtl871x_mlme.h
drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h
drivers/staging/rtl8712/usb_halinit.c
drivers/staging/rts_pstor/rtsx.c
drivers/staging/rts_pstor/rtsx_chip.c
drivers/staging/rts_pstor/rtsx_chip.h
drivers/staging/rts_pstor/rtsx_scsi.h
drivers/staging/rts_pstor/sd.c
drivers/staging/samsung-laptop/Kconfig [deleted file]
drivers/staging/samsung-laptop/Makefile [deleted file]
drivers/staging/samsung-laptop/TODO [deleted file]
drivers/staging/samsung-laptop/samsung-laptop.c [deleted file]
drivers/staging/sep/sep_driver.c
drivers/staging/sep/sep_driver_config.h
drivers/staging/slicoss/README
drivers/staging/sm7xx/smtcfb.c
drivers/staging/speakup/keyhelp.c
drivers/staging/speakup/spkguide.txt
drivers/staging/spectra/ffsport.c
drivers/staging/spectra/flash.c
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
drivers/staging/tidspbridge/core/_tiomap.h
drivers/staging/tidspbridge/core/chnl_sm.c
drivers/staging/tidspbridge/dynload/cload.c
drivers/staging/tidspbridge/hw/hw_mmu.c
drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h
drivers/staging/tidspbridge/include/dspbridge/clk.h
drivers/staging/tidspbridge/include/dspbridge/cmm.h
drivers/staging/tidspbridge/include/dspbridge/cod.h
drivers/staging/tidspbridge/include/dspbridge/dev.h
drivers/staging/tidspbridge/include/dspbridge/drv.h
drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
drivers/staging/tidspbridge/include/dspbridge/mgr.h
drivers/staging/tidspbridge/include/dspbridge/node.h
drivers/staging/tidspbridge/include/dspbridge/proc.h
drivers/staging/tidspbridge/include/dspbridge/pwr.h
drivers/staging/tidspbridge/pmgr/dev.c
drivers/staging/tidspbridge/rmgr/drv.c
drivers/staging/tidspbridge/rmgr/nldr.c
drivers/staging/tidspbridge/rmgr/proc.c
drivers/staging/tm6000/tm6000-video.c
drivers/staging/tty/cd1865.h
drivers/staging/tty/epca.c
drivers/staging/tty/ip2/i2hw.h
drivers/staging/tty/ip2/i2lib.c
drivers/staging/tty/ip2/ip2main.c
drivers/staging/tty/specialix.c
drivers/staging/tty/specialix_io8.h
drivers/staging/usbip/stub_dev.c
drivers/staging/usbip/stub_rx.c
drivers/staging/usbip/stub_tx.c
drivers/staging/usbip/usbip_common.c
drivers/staging/usbip/usbip_common.h
drivers/staging/usbip/vhci_hcd.c
drivers/staging/usbip/vhci_rx.c
drivers/staging/vme/bridges/vme_ca91cx42.c
drivers/staging/vme/bridges/vme_tsi148.c
drivers/staging/vme/bridges/vme_tsi148.h
drivers/staging/vme/vme_api.txt
drivers/staging/vt6655/Kconfig
drivers/staging/vt6655/card.c
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/wcmd.c
drivers/staging/vt6655/wmgr.h
drivers/staging/vt6656/Kconfig
drivers/staging/vt6656/rxtx.c
drivers/staging/vt6656/wcmd.c
drivers/staging/vt6656/wmgr.h
drivers/staging/westbridge/astoria/api/src/cyasdma.c
drivers/staging/westbridge/astoria/api/src/cyaslep2pep.c
drivers/staging/westbridge/astoria/api/src/cyaslowlevel.c
drivers/staging/westbridge/astoria/api/src/cyasmisc.c
drivers/staging/westbridge/astoria/api/src/cyasmtp.c
drivers/staging/westbridge/astoria/api/src/cyasstorage.c
drivers/staging/westbridge/astoria/api/src/cyasusb.c
drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c
drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyashalomap_kernel.h
drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyasmemmap.h
drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c
drivers/staging/westbridge/astoria/gadget/cyasgadget.c
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdevice.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdma.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyaserr.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyashaldoc.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasintr.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasusb.h
drivers/staging/winbond/mds.c
drivers/staging/wlags49_h2/README.ubuntu
drivers/staging/wlags49_h2/TODO
drivers/staging/wlags49_h2/hcf.c
drivers/staging/wlags49_h2/hcfdef.h
drivers/staging/wlags49_h2/wl_wext.c
drivers/staging/wlags49_h25/TODO
drivers/staging/wlan-ng/prism2sta.c
drivers/staging/xgifb/vb_setmode.c
drivers/staging/xgifb/vgatypes.h
drivers/target/target_core_alua.c
drivers/target/target_core_device.c
drivers/target/target_core_fabric_lib.c
drivers/target/target_core_file.c
drivers/target/target_core_pr.c
drivers/target/target_core_transport.c
drivers/target/target_core_ua.c
drivers/telephony/ixj.c
drivers/telephony/ixj.h
drivers/tty/hvc/hvc_iucv.c
drivers/tty/hvc/hvc_vio.c
drivers/tty/hvc/hvcs.c
drivers/tty/mxser.h
drivers/tty/n_gsm.c
drivers/tty/n_tty.c
drivers/tty/nozomi.c
drivers/tty/rocket.c
drivers/tty/serial/8250.c
drivers/tty/serial/8250_pci.c
drivers/tty/serial/amba-pl011.c
drivers/tty/serial/icom.c
drivers/tty/serial/imx.c
drivers/tty/serial/ip22zilog.c
drivers/tty/serial/jsm/jsm.h
drivers/tty/serial/jsm/jsm_neo.c
drivers/tty/serial/max3107.h
drivers/tty/serial/mrst_max3110.c
drivers/tty/serial/mrst_max3110.h
drivers/tty/serial/msm_serial_hs.c
drivers/tty/serial/omap-serial.c
drivers/tty/serial/pmac_zilog.c
drivers/tty/serial/samsung.c
drivers/tty/serial/sh-sci.c
drivers/tty/serial/sn_console.c
drivers/tty/serial/sunzilog.c
drivers/tty/synclink.c
drivers/tty/synclink_gt.c
drivers/tty/synclinkmp.c
drivers/tty/tty_buffer.c
drivers/tty/tty_io.c
drivers/tty/tty_ioctl.c
drivers/tty/vt/vt.c
drivers/uio/uio_pruss.c
drivers/usb/Kconfig
drivers/usb/atm/ueagle-atm.c
drivers/usb/c67x00/c67x00-drv.c
drivers/usb/c67x00/c67x00-hcd.h
drivers/usb/c67x00/c67x00-sched.c
drivers/usb/class/cdc-acm.h
drivers/usb/class/usbtmc.c
drivers/usb/core/devices.c
drivers/usb/core/hcd.c
drivers/usb/core/hub.c
drivers/usb/early/ehci-dbgp.c
drivers/usb/gadget/amd5536udc.c
drivers/usb/gadget/amd5536udc.h
drivers/usb/gadget/at91_udc.c
drivers/usb/gadget/composite.c
drivers/usb/gadget/f_audio.c
drivers/usb/gadget/f_eem.c
drivers/usb/gadget/f_ncm.c
drivers/usb/gadget/fsl_qe_udc.c
drivers/usb/gadget/fsl_qe_udc.h
drivers/usb/gadget/fsl_udc_core.c
drivers/usb/gadget/fsl_usb2_udc.h
drivers/usb/gadget/gmidi.c
drivers/usb/gadget/inode.c
drivers/usb/gadget/langwell_udc.c
drivers/usb/gadget/mv_udc_core.c
drivers/usb/gadget/net2280.c
drivers/usb/gadget/nokia.c
drivers/usb/gadget/pch_udc.c
drivers/usb/gadget/printer.c
drivers/usb/gadget/pxa27x_udc.c
drivers/usb/gadget/r8a66597-udc.c
drivers/usb/gadget/s3c-hsotg.c
drivers/usb/host/Kconfig
drivers/usb/host/ehci-q.c
drivers/usb/host/ehci.h
drivers/usb/host/fhci-hcd.c
drivers/usb/host/fhci-tds.c
drivers/usb/host/fhci.h
drivers/usb/host/imx21-hcd.c
drivers/usb/host/isp116x.h
drivers/usb/host/isp1362-hcd.c
drivers/usb/host/isp1760-hcd.c
drivers/usb/host/ohci-au1xxx.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/oxu210hp-hcd.c
drivers/usb/host/pci-quirks.c
drivers/usb/host/whci/qset.c
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/image/microtek.c
drivers/usb/misc/iowarrior.c
drivers/usb/musb/Kconfig
drivers/usb/musb/blackfin.c
drivers/usb/musb/cppi_dma.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/musbhsdma.c
drivers/usb/musb/omap2430.c
drivers/usb/musb/ux500.c
drivers/usb/otg/isp1301_omap.c
drivers/usb/otg/langwell_otg.c
drivers/usb/serial/aircable.c
drivers/usb/serial/cp210x.c
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h
drivers/usb/serial/io_edgeport.c
drivers/usb/serial/io_edgeport.h
drivers/usb/serial/io_ti.c
drivers/usb/serial/mct_u232.c
drivers/usb/serial/opticon.c
drivers/usb/serial/option.c
drivers/usb/serial/qcserial.c
drivers/usb/storage/ene_ub6250.c
drivers/usb/storage/isd200.c
drivers/usb/storage/scsiglue.c
drivers/usb/storage/shuttle_usbat.c
drivers/usb/wusbcore/crypto.c
drivers/usb/wusbcore/reservation.c
drivers/usb/wusbcore/rh.c
drivers/usb/wusbcore/wa-rpipe.c
drivers/usb/wusbcore/wa-xfer.c
drivers/usb/wusbcore/wusbhc.h
drivers/uwb/driver.c
drivers/uwb/drp.c
drivers/uwb/lc-rc.c
drivers/uwb/reset.c
drivers/uwb/umc-dev.c
drivers/video/atmel_lcdfb.c
drivers/video/aty/atyfb_base.c
drivers/video/aty/mach64_cursor.c
drivers/video/au1200fb.c
drivers/video/backlight/corgi_lcd.c
drivers/video/backlight/locomolcd.c
drivers/video/bfin-lq035q1-fb.c
drivers/video/bfin_adv7393fb.h
drivers/video/console/fbcon.c
drivers/video/console/font_mini_4x6.c
drivers/video/da8xx-fb.c
drivers/video/display/display-sysfs.c
drivers/video/efifb.c
drivers/video/ep93xx-fb.c
drivers/video/fbmem.c
drivers/video/fbsysfs.c
drivers/video/fm2fb.c
drivers/video/fsl-diu-fb.c
drivers/video/gbefb.c
drivers/video/geode/lxfb.h
drivers/video/i810/i810_accel.c
drivers/video/kyro/STG4000OverlayDevice.c
drivers/video/kyro/STG4000Reg.h
drivers/video/matrox/matroxfb_DAC1064.h
drivers/video/matrox/matroxfb_Ti3026.c
drivers/video/matrox/matroxfb_base.c
drivers/video/matrox/matroxfb_base.h
drivers/video/nuc900fb.h
drivers/video/omap/Kconfig
drivers/video/omap2/dss/hdmi.c
drivers/video/pxa3xx-gcu.c
drivers/video/pxafb.c
drivers/video/s3c-fb.c
drivers/video/s3fb.c
drivers/video/savage/savagefb-i2c.c
drivers/video/savage/savagefb.h
drivers/video/savage/savagefb_driver.c
drivers/video/sh_mobile_lcdcfb.c
drivers/video/sh_mobile_lcdcfb.h
drivers/video/sm501fb.c
drivers/video/sstfb.c
drivers/video/sticore.h
drivers/video/tdfxfb.c
drivers/video/tmiofb.c
drivers/video/udlfb.c
drivers/video/vga16fb.c
drivers/video/via/chip.h
drivers/video/via/hw.c
drivers/video/via/hw.h
drivers/video/via/via_utility.c
drivers/video/via/via_utility.h
drivers/video/via/viafbdev.c
drivers/video/w100fb.c
drivers/virtio/virtio_pci.c
drivers/virtio/virtio_ring.c
drivers/w1/masters/omap_hdq.c
drivers/watchdog/Kconfig
drivers/watchdog/Makefile
drivers/watchdog/acquirewdt.c
drivers/watchdog/iTCO_wdt.c
drivers/watchdog/mpc8xxx_wdt.c
drivers/watchdog/pc87413_wdt.c
drivers/watchdog/sbc7240_wdt.c
drivers/watchdog/sch311x_wdt.c
drivers/watchdog/shwdt.c
drivers/watchdog/smsc37b787_wdt.c
drivers/watchdog/sp805_wdt.c
drivers/xen/events.c
drivers/xen/manage.c
fs/9p/fid.c
fs/9p/v9fs.h
fs/9p/vfs_dentry.c
fs/9p/vfs_inode_dotl.c
fs/9p/vfs_super.c
fs/adfs/map.c
fs/afs/cache.c
fs/afs/cell.c
fs/attr.c
fs/autofs4/root.c
fs/befs/ChangeLog
fs/befs/befs_fs_types.h
fs/befs/btree.c
fs/befs/linuxvfs.c
fs/binfmt_elf.c
fs/binfmt_flat.c
fs/bio.c
fs/block_dev.c
fs/btrfs/acl.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/extent_map.c
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/relocation.c
fs/btrfs/root-tree.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h
fs/btrfs/tree-log.c
fs/btrfs/volumes.c
fs/btrfs/xattr.c
fs/cachefiles/interface.c
fs/ceph/addr.c
fs/ceph/caps.c
fs/ceph/snap.c
fs/cifs/AUTHORS
fs/cifs/README
fs/cifs/cache.c
fs/cifs/cifs_debug.c
fs/cifs/cifs_dfs_ref.c
fs/cifs/cifs_spnego.c
fs/cifs/cifs_unicode.c
fs/cifs/cifs_unicode.h
fs/cifs/cifsencrypt.c
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/file.c
fs/cifs/link.c
fs/cifs/misc.c
fs/cifs/sess.c
fs/configfs/dir.c
fs/dcache.c
fs/dlm/lock.c
fs/dlm/lowcomms.c
fs/dlm/recover.c
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/file.c
fs/ecryptfs/inode.c
fs/ecryptfs/kthread.c
fs/ecryptfs/main.c
fs/ecryptfs/super.c
fs/eventpoll.c
fs/exofs/common.h
fs/ext2/balloc.c
fs/ext2/inode.c
fs/ext2/super.c
fs/ext2/xattr.c
fs/ext3/balloc.c
fs/ext3/inode.c
fs/ext3/resize.c
fs/ext3/super.c
fs/ext4/balloc.c
fs/ext4/ext4_jbd2.h
fs/ext4/extents.c
fs/ext4/fsync.c
fs/ext4/inode.c
fs/ext4/mballoc.c
fs/ext4/migrate.c
fs/ext4/super.c
fs/fhandle.c
fs/file.c
fs/filesystems.c
fs/freevxfs/vxfs_fshead.c
fs/freevxfs/vxfs_lookup.c
fs/freevxfs/vxfs_olt.h
fs/fs-writeback.c
fs/fuse/file.c
fs/gfs2/aops.c
fs/gfs2/bmap.c
fs/gfs2/dir.c
fs/gfs2/file.c
fs/gfs2/glock.c
fs/gfs2/glops.c
fs/gfs2/inode.c
fs/gfs2/inode.h
fs/gfs2/ops_fstype.c
fs/gfs2/rgrp.c
fs/gfs2/super.c
fs/inode.c
fs/jbd/commit.c
fs/jbd/journal.c
fs/jbd/revoke.c
fs/jbd/transaction.c
fs/jbd2/commit.c
fs/jbd2/journal.c
fs/jbd2/revoke.c
fs/jbd2/transaction.c
fs/jffs2/TODO
fs/jffs2/readinode.c
fs/jffs2/summary.c
fs/jffs2/wbuf.c
fs/jfs/jfs_dmap.c
fs/jfs/jfs_extent.c
fs/jfs/jfs_imap.c
fs/jfs/jfs_logmgr.h
fs/jfs/jfs_metapage.h
fs/jfs/jfs_txnmgr.c
fs/jfs/resize.c
fs/jfs/super.c
fs/logfs/dev_mtd.c
fs/logfs/dir.c
fs/logfs/readwrite.c
fs/logfs/super.c
fs/mbcache.c
fs/namei.c
fs/namespace.c
fs/ncpfs/inode.c
fs/nfs/callback_xdr.c
fs/nfs/file.c
fs/nfs/namespace.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4filelayout.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c
fs/nfs/nfs4xdr.c
fs/nfs/pnfs.c
fs/nfs/super.c
fs/nfs/write.c
fs/nfs_common/nfsacl.c
fs/nfsd/lockd.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfs4state.c
fs/nfsd/nfsxdr.c
fs/nfsd/vfs.c
fs/nilfs2/page.c
fs/notify/fanotify/fanotify_user.c
fs/notify/inotify/inotify_fsnotify.c
fs/notify/inotify/inotify_user.c
fs/notify/mark.c
fs/ntfs/attrib.c
fs/ntfs/compress.c
fs/ntfs/inode.c
fs/ntfs/layout.h
fs/ntfs/logfile.c
fs/ntfs/logfile.h
fs/ntfs/mft.c
fs/ntfs/runlist.c
fs/ntfs/super.c
fs/ocfs2/alloc.c
fs/ocfs2/aops.h
fs/ocfs2/cluster/heartbeat.c
fs/ocfs2/cluster/quorum.c
fs/ocfs2/cluster/tcp.c
fs/ocfs2/dlm/dlmmaster.c
fs/ocfs2/inode.c
fs/ocfs2/journal.c
fs/ocfs2/journal.h
fs/ocfs2/namei.c
fs/ocfs2/ocfs2_fs.h
fs/ocfs2/quota_global.c
fs/ocfs2/reservations.h
fs/ocfs2/stackglue.h
fs/ocfs2/suballoc.c
fs/ocfs2/super.c
fs/ocfs2/xattr.c
fs/partitions/check.c
fs/partitions/ldm.c
fs/proc/base.c
fs/pstore/Kconfig
fs/quota/dquot.c
fs/ramfs/file-nommu.c
fs/reiserfs/journal.c
fs/reiserfs/lock.c
fs/reiserfs/super.c
fs/reiserfs/xattr.c
fs/squashfs/cache.c
fs/ubifs/Kconfig
fs/ubifs/budget.c
fs/ubifs/commit.c
fs/ubifs/debug.c
fs/ubifs/debug.h
fs/ubifs/file.c
fs/ubifs/log.c
fs/ubifs/lpt.c
fs/ubifs/recovery.c
fs/ubifs/replay.c
fs/ubifs/super.c
fs/ubifs/xattr.c
fs/ufs/inode.c
fs/ufs/super.c
fs/ufs/truncate.c
fs/xattr.c
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_file.c
fs/xfs/linux-2.6/xfs_iops.c
fs/xfs/linux-2.6/xfs_message.c
fs/xfs/linux-2.6/xfs_message.h
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/linux-2.6/xfs_sync.h
fs/xfs/quota/xfs_dquot.c
fs/xfs/quota/xfs_qm.c
fs/xfs/quota/xfs_qm.h
fs/xfs/quota/xfs_qm_bhv.c
fs/xfs/quota/xfs_qm_syscalls.c
fs/xfs/xfs_alloc.c
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_itable.c
fs/xfs/xfs_log.c
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_inode.c
fs/xfs/xfs_trans_priv.h
fs/xfs/xfs_vnodeops.c
include/acpi/actbl.h
include/asm-generic/bug.h
include/asm-generic/siginfo.h
include/asm-generic/vmlinux.lds.h
include/drm/drmP.h
include/drm/drm_crtc.h
include/drm/drm_fb_helper.h
include/drm/drm_mm.h
include/drm/drm_mode.h
include/drm/drm_pciids.h
include/drm/mga_drm.h
include/drm/radeon_drm.h
include/drm/savage_drm.h
include/drm/ttm/ttm_bo_api.h
include/drm/ttm/ttm_bo_driver.h
include/drm/vmwgfx_drm.h
include/linux/amba/clcd.h
include/linux/amba/mmci.h
include/linux/bit_spinlock.h
include/linux/blkdev.h
include/linux/can/error.h
include/linux/can/netlink.h
include/linux/can/platform/mcp251x.h
include/linux/cdk.h
include/linux/cfag12864b.h
include/linux/cgroup.h
include/linux/cm4000_cs.h
include/linux/configfs.h
include/linux/cper.h
include/linux/dcache.h
include/linux/decompress/mm.h
include/linux/device-mapper.h
include/linux/dmaengine.h
include/linux/drbd.h
include/linux/drbd_limits.h
include/linux/elevator.h
include/linux/ethtool.h
include/linux/eventpoll.h
include/linux/exportfs.h
include/linux/fb.h
include/linux/firewire-cdev.h
include/linux/flex_array.h
include/linux/fs.h
include/linux/fscache-cache.h
include/linux/fscache.h
include/linux/hid.h
include/linux/hp_sdc.h
include/linux/huge_mm.h
include/linux/i2o.h
include/linux/input.h
include/linux/input/mt.h
include/linux/interrupt.h
include/linux/ipmi.h
include/linux/isdn/hdlc.h
include/linux/ixjuser.h
include/linux/jiffies.h
include/linux/ktime.h
include/linux/led-lm3530.h
include/linux/libata.h
include/linux/list_bl.h
include/linux/lru_cache.h
include/linux/memcontrol.h
include/linux/mfd/core.h
include/linux/mfd/wm831x/pdata.h
include/linux/mfd/wm8350/pmic.h
include/linux/mm.h
include/linux/mmc/dw_mmc.h
include/linux/mmc/host.h
include/linux/mroute6.h
include/linux/mtd/cfi.h
include/linux/mtd/nand.h
include/linux/mtd/xip.h
include/linux/netdevice.h
include/linux/netfilter.h
include/linux/netfilter/ipset/ip_set.h
include/linux/netfilter/ipset/ip_set_ahash.h
include/linux/netfilter/nf_conntrack_proto_gre.h
include/linux/netfilter_bridge/ebtables.h
include/linux/nfs4.h
include/linux/nfs_fs_sb.h
include/linux/nfs_xdr.h
include/linux/nfsd/export.h
include/linux/nfsd/nfsfh.h
include/linux/nl80211.h
include/linux/notifier.h
include/linux/omap3isp.h
include/linux/page_cgroup.h
include/linux/pci_ids.h
include/linux/pci_regs.h
include/linux/percpu.h
include/linux/perf_event.h
include/linux/pid.h
include/linux/pkt_sched.h
include/linux/platform_device.h
include/linux/poll.h
include/linux/posix-clock.h
include/linux/prefetch.h
include/linux/pxa2xx_ssp.h
include/linux/raid/md_p.h
include/linux/rcupdate.h
include/linux/reiserfs_fs.h
include/linux/rio.h
include/linux/rio_ids.h
include/linux/rtc.h
include/linux/sched.h
include/linux/security.h
include/linux/skbuff.h
include/linux/smc91x.h
include/linux/socket.h
include/linux/soundcard.h
include/linux/spi/spidev.h
include/linux/spinlock.h
include/linux/stmmac.h
include/linux/stop_machine.h
include/linux/sunrpc/cache.h
include/linux/sunrpc/sched.h
include/linux/sunrpc/svcauth_gss.h
include/linux/suspend.h
include/linux/sysdev.h
include/linux/timerqueue.h
include/linux/tracehook.h
include/linux/ucb1400.h
include/linux/usb.h
include/linux/usb/composite.h
include/linux/usb/ehci_def.h
include/linux/usb/functionfs.h
include/linux/usb/gadget.h
include/linux/usb/midi.h
include/linux/usb/usbnet.h
include/linux/usb/wusb.h
include/linux/uwb.h
include/linux/uwb/umc.h
include/linux/vgaarb.h
include/linux/vmstat.h
include/linux/wimax.h
include/linux/xilinxfb.h
include/media/davinci/dm355_ccdc.h
include/media/davinci/isif.h
include/media/lirc.h
include/net/9p/9p.h
include/net/9p/client.h
include/net/9p/transport.h
include/net/bluetooth/hci.h
include/net/caif/cfcnfg.h
include/net/gen_stats.h
include/net/ip_vs.h
include/net/irda/irlap.h
include/net/irda/wrapper.h
include/net/iucv/iucv.h
include/net/iw_handler.h
include/net/mac80211.h
include/net/pkt_sched.h
include/net/route.h
include/net/sctp/structs.h
include/net/sock.h
include/net/transp_v6.h
include/net/wimax.h
include/net/wpan-phy.h
include/rxrpc/packet.h
include/scsi/fc/fc_fcp.h
include/scsi/iscsi_if.h
include/scsi/libfc.h
include/scsi/libiscsi_tcp.h
include/scsi/osd_initiator.h
include/scsi/scsi_host.h
include/scsi/scsi_transport_fc.h
include/sound/ac97_codec.h
include/sound/control.h
include/sound/cs46xx_dsp_spos.h
include/sound/hdspm.h
include/sound/soc-dapm.h
include/target/target_core_base.h
include/target/target_core_fabric_ops.h
include/trace/events/block.h
include/video/kyro.h
include/video/neomagic.h
include/video/newport.h
include/video/sisfb.h
include/video/sstfb.h
include/xen/interface/elfnote.h
init/Kconfig
init/do_mounts.c
ipc/msg.c
ipc/sem.c
ipc/shm.c
kernel/audit_tree.c
kernel/auditsc.c
kernel/cgroup.c
kernel/cpu.c
kernel/debug/debug_core.c
kernel/debug/kdb/kdb_main.c
kernel/debug/kdb/kdb_support.c
kernel/exit.c
kernel/futex.c
kernel/hrtimer.c
kernel/irq/chip.c
kernel/irq/manage.c
kernel/irq/migration.c
kernel/irq/proc.c
kernel/kexec.c
kernel/kthread.c
kernel/latencytop.c
kernel/lockdep.c
kernel/module.c
kernel/mutex.c
kernel/padata.c
kernel/params.c
kernel/perf_event.c
kernel/pid.c
kernel/posix-cpu-timers.c
kernel/posix-timers.c
kernel/power/Kconfig
kernel/power/hibernate.c
kernel/power/main.c
kernel/power/suspend.c
kernel/sched.c
kernel/sched_autogroup.c
kernel/sched_fair.c
kernel/sched_rt.c
kernel/signal.c
kernel/softirq.c
kernel/time/jiffies.c
kernel/time/posix-clock.c
kernel/time/timer_stats.c
kernel/trace/Kconfig
kernel/trace/blktrace.c
kernel/trace/ftrace.c
kernel/trace/ring_buffer.c
kernel/trace/trace.c
kernel/trace/trace_clock.c
kernel/trace/trace_entries.h
kernel/trace/trace_functions_graph.c
kernel/trace/trace_irqsoff.c
kernel/trace/trace_kprobe.c
kernel/user-return-notifier.c
kernel/wait.c
kernel/watchdog.c
kernel/workqueue.c
lib/Kconfig.debug
lib/bitmap.c
lib/btree.c
lib/decompress_unxz.c
lib/flex_array.c
lib/kstrtox.c
lib/parser.c
lib/test-kstrtox.c
lib/timerqueue.c
lib/xz/xz_dec_lzma2.c
mm/backing-dev.c
mm/huge_memory.c
mm/hugetlb.c
mm/hwpoison-inject.c
mm/internal.h
mm/kmemleak.c
mm/ksm.c
mm/memcontrol.c
mm/memory-failure.c
mm/memory.c
mm/memory_hotplug.c
mm/migrate.c
mm/mlock.c
mm/mmap.c
mm/mremap.c
mm/nobootmem.c
mm/oom_kill.c
mm/page_alloc.c
mm/page_cgroup.c
mm/percpu.c
mm/shmem.c
mm/slab.c
mm/slub.c
mm/sparse.c
mm/util.c
mm/vmscan.c
mm/vmstat.c
net/8021q/vlanproc.c
net/9p/client.c
net/9p/protocol.c
net/9p/trans_common.c
net/9p/trans_virtio.c
net/9p/util.c
net/atm/br2684.c
net/atm/lec.h
net/batman-adv/soft-interface.c
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c
net/bluetooth/mgmt.c
net/bluetooth/sco.c
net/bridge/br_fdb.c
net/bridge/br_input.c
net/bridge/br_ioctl.c
net/bridge/br_netfilter.c
net/caif/caif_socket.c
net/caif/cfdgml.c
net/caif/cfmuxl.c
net/can/bcm.c
net/can/raw.c
net/ceph/osd_client.c
net/core/dev.c
net/core/filter.c
net/core/link_watch.c
net/core/rtnetlink.c
net/core/skbuff.c
net/core/sock.c
net/dccp/output.c
net/dsa/Kconfig
net/dsa/mv88e6131.c
net/dsa/mv88e6xxx.h
net/ieee802154/Makefile
net/ipv4/cipso_ipv4.c
net/ipv4/devinet.c
net/ipv4/fib_trie.c
net/ipv4/icmp.c
net/ipv4/inet_connection_sock.c
net/ipv4/inetpeer.c
net/ipv4/ip_options.c
net/ipv4/ip_output.c
net/ipv4/ipconfig.c
net/ipv4/netfilter.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/nf_nat_core.c
net/ipv4/raw.c
net/ipv4/route.c
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp_lp.c
net/ipv4/tcp_output.c
net/ipv4/tcp_yeah.c
net/ipv4/udp.c
net/ipv4/xfrm4_policy.c
net/ipv6/addrconf.c
net/ipv6/af_inet6.c
net/ipv6/esp6.c
net/ipv6/inet6_connection_sock.c
net/ipv6/ip6_output.c
net/ipv6/netfilter.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
net/ipv6/route.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c
net/irda/af_irda.c
net/irda/irlap.c
net/irda/irlap_event.c
net/irda/irlap_frame.c
net/irda/irlmp_event.c
net/irda/irnet/irnet.h
net/irda/irqueue.c
net/irda/irttp.c
net/irda/qos.c
net/irda/timer.c
net/iucv/af_iucv.c
net/iucv/iucv.c
net/l2tp/l2tp_ip.c
net/llc/llc_input.c
net/mac80211/cfg.c
net/mac80211/debugfs_netdev.c
net/mac80211/ieee80211_i.h
net/mac80211/key.c
net/mac80211/mesh_pathtbl.c
net/mac80211/rc80211_minstrel_ht.c
net/mac80211/rc80211_pid.h
net/mac80211/rx.c
net/mac80211/sta_info.c
net/mac80211/sta_info.h
net/netfilter/Kconfig
net/netfilter/ipset/ip_set_bitmap_ip.c
net/netfilter/ipset/ip_set_bitmap_ipmac.c
net/netfilter/ipset/ip_set_bitmap_port.c
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_list_set.c
net/netfilter/ipvs/ip_vs_conn.c
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_lblc.c
net/netfilter/ipvs/ip_vs_lblcr.c
net/netfilter/ipvs/ip_vs_proto_sctp.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_h323_asn1.c
net/netfilter/nf_conntrack_h323_main.c
net/netfilter/nf_conntrack_proto_dccp.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_sip.c
net/netfilter/nf_queue.c
net/netfilter/xt_TCPMSS.c
net/netfilter/xt_addrtype.c
net/netfilter/xt_conntrack.c
net/netfilter/xt_set.c
net/netlabel/netlabel_domainhash.c
net/netlabel/netlabel_mgmt.c
net/rds/ib_send.c
net/rds/iw_cm.c
net/rds/iw_rdma.c
net/rds/iw_send.c
net/rds/send.c
net/rose/rose_route.c
net/sched/act_api.c
net/sched/act_pedit.c
net/sched/em_meta.c
net/sched/sch_htb.c
net/sched/sch_netem.c
net/sctp/associola.c
net/sctp/auth.c
net/sctp/input.c
net/sctp/output.c
net/sctp/outqueue.c
net/sctp/sm_make_chunk.c
net/sctp/sm_sideeffect.c
net/sctp/sm_statefuns.c
net/sctp/socket.c
net/sctp/ulpevent.c
net/sctp/ulpqueue.c
net/socket.c
net/sunrpc/Kconfig
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_gss/gss_krb5_mech.c
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/clnt.c
net/sunrpc/xprt.c
net/sunrpc/xprtsock.c
net/tipc/link.c
net/tipc/name_distr.c
net/unix/af_unix.c
net/wanrouter/wanproc.c
net/wireless/reg.c
net/wireless/scan.c
net/x25/x25_facilities.c
net/x25/x25_forward.c
net/xfrm/xfrm_replay.c
net/xfrm/xfrm_user.c
samples/Kconfig
samples/hw_breakpoint/data_breakpoint.c
scripts/Makefile.modpost
scripts/checkpatch.pl
scripts/dtc/libfdt/libfdt.h
scripts/dtc/livetree.c
scripts/gen_initramfs_list.sh
scripts/kconfig/conf.c
scripts/kernel-doc
scripts/package/buildtar
scripts/rt-tester/rt-tester.py
security/apparmor/match.c
security/apparmor/policy_unpack.c
security/capability.c
security/security.c
security/selinux/avc.c
security/selinux/hooks.c
security/selinux/include/avc.h
security/selinux/netlabel.c
security/selinux/ss/policydb.c
security/selinux/ss/services.c
security/smack/smack_access.c
security/smack/smack_lsm.c
security/smack/smackfs.c
security/tomoyo/load_policy.c
sound/arm/pxa2xx-pcm-lib.c
sound/core/pcm_memory.c
sound/core/pcm_native.c
sound/core/seq/seq_dummy.c
sound/core/vmaster.c
sound/drivers/pcm-indirect2.c
sound/drivers/vx/vx_pcm.c
sound/isa/sb/emu8000.c
sound/isa/wavefront/wavefront_midi.c
sound/isa/wss/wss_lib.c
sound/oss/ac97_codec.c
sound/oss/audio.c
sound/oss/dmasound/dmasound_core.c
sound/oss/midibuf.c
sound/oss/sb_card.c
sound/oss/sb_ess.c
sound/oss/swarm_cs4297a.c
sound/oss/vidc.c
sound/pci/ad1889.c
sound/pci/asihpi/asihpi.c
sound/pci/asihpi/hpi.h
sound/pci/asihpi/hpi6000.c
sound/pci/asihpi/hpi6205.c
sound/pci/asihpi/hpi_internal.h
sound/pci/asihpi/hpimsgx.c
sound/pci/au88x0/au88x0.h
sound/pci/au88x0/au88x0_a3d.c
sound/pci/au88x0/au88x0_pcm.c
sound/pci/azt3328.c
sound/pci/ca0106/ca0106.h
sound/pci/ca0106/ca0106_main.c
sound/pci/ca0106/ca0106_mixer.c
sound/pci/ca0106/ca0106_proc.c
sound/pci/cmipci.c
sound/pci/ctxfi/ctatc.c
sound/pci/ctxfi/cthw20k1.c
sound/pci/emu10k1/memory.c
sound/pci/emu10k1/p16v.c
sound/pci/emu10k1/p16v.h
sound/pci/hda/hda_codec.c
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_via.c
sound/pci/ice1712/aureon.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/pontis.c
sound/pci/ice1712/prodigy_hifi.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/mixart/mixart_core.c
sound/pci/pcxhr/pcxhr_core.c
sound/pci/rme96.c
sound/pci/rme9652/hdspm.c
sound/pci/sis7019.c
sound/ppc/snd_ps3.c
sound/ppc/snd_ps3_reg.h
sound/soc/atmel/atmel_ssc_dai.c
sound/soc/codecs/alc5623.c
sound/soc/codecs/jz4740.c
sound/soc/codecs/lm4857.c
sound/soc/codecs/sn95031.c
sound/soc/codecs/tlv320aic26.h
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320dac33.c
sound/soc/codecs/twl4030.c
sound/soc/codecs/wm8580.c
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8904.c
sound/soc/codecs/wm8955.c
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8991.c
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm9081.c
sound/soc/codecs/wm_hubs.c
sound/soc/imx/imx-ssi.c
sound/soc/kirkwood/kirkwood-dma.c
sound/soc/mid-x86/sst_platform.c
sound/soc/omap/ams-delta.c
sound/soc/pxa/pxa2xx-pcm.c
sound/soc/pxa/zylonite.c
sound/soc/samsung/neo1973_wm8753.c
sound/soc/samsung/pcm.c
sound/soc/sh/fsi.c
sound/soc/soc-core.c
sound/soc/tegra/harmony.c
sound/usb/6fire/firmware.c
sound/usb/format.c
sound/usb/midi.c
sound/usb/mixer.c
sound/usb/quirks.c
sound/usb/usx2y/usx2yhwdeppcm.c
tools/perf/Makefile
tools/perf/builtin-record.c
tools/perf/builtin-stat.c
tools/perf/builtin-test.c
tools/perf/builtin-top.c
tools/perf/util/cgroup.c
tools/perf/util/debug.c
tools/perf/util/debug.h
tools/perf/util/event.c
tools/perf/util/evlist.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/probe-event.c
tools/perf/util/probe-finder.c
tools/perf/util/python.c
tools/perf/util/setup.py
tools/perf/util/string.c
tools/perf/util/symbol.c
tools/perf/util/ui/browsers/annotate.c
tools/perf/util/ui/browsers/hists.c
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
virt/kvm/eventfd.c
virt/kvm/kvm_main.c

diff --git a/CREDITS b/CREDITS
index 1d39a6d0a510c97558d38e3b8d4b836eff0f9039..dca6abcead6b061afc30f5d2e8176fb11f897103 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1677,7 +1677,7 @@ W: http://www.codemonkey.org.uk
 D: Assorted VIA x86 support.
 D: 2.5 AGPGART overhaul.
 D: CPUFREQ maintenance.
-D: Fedora kernel maintainence.
+D: Fedora kernel maintenance.
 D: Misc/Other.
 S: 314 Littleton Rd, Westford, MA 01886, USA
 
@@ -3211,7 +3211,7 @@ N: James Simmons
 E: jsimmons@infradead.org
 E: jsimmons@users.sf.net 
 D: Frame buffer device maintainer
-D: input layer developement 
+D: input layer development
 D: tty/console layer
 D: various mipsel devices 
 S: 115 Carmel Avenue 
@@ -3290,7 +3290,7 @@ S: USA
 N: Manfred Spraul
 E: manfred@colorfullife.com
 W: http://www.colorfullife.com/~manfred
-D: Lots of tiny hacks. Larger improvments to SysV IPC msg,
+D: Lots of tiny hacks. Larger improvements to SysV IPC msg,
 D: slab, pipe, select.
 S: 71701 Schwieberdingen
 S: Germany
index f607367e642fe2f8cd04b22d72bc66a944d11d76..c17cd4bb2290895ee209764708efcb372815b8bb 100644 (file)
@@ -206,8 +206,8 @@ laptops/
        - directory with laptop related info and laptop driver documentation.
 ldm.txt
        - a brief description of LDM (Windows Dynamic Disks).
-leds-class.txt
-       - documents LED handling under Linux.
+leds/
+       - directory with info about LED handling under Linux.
 local_ops.txt
        - semantics and behavior of local atomic operations.
 lockdep-design.txt
index b585ec258a08ecbe64a07156dd6e264c9e3d91ef..2979c40c10e97b1ce6088a875cbbe0a84b6a8e22 100644 (file)
@@ -29,7 +29,7 @@ Contact:      Cornelia Huck <cornelia.huck@de.ibm.com>
                linux-s390@vger.kernel.org
 Description:   Contains the PIM/PAM/POM values, as reported by the
                channel subsystem when last queried by the common I/O
-               layer (this implies that this attribute is not neccessarily
+               layer (this implies that this attribute is not necessarily
                in sync with the values current in the channel subsystem).
                Note: This is an I/O-subchannel specific attribute.
 Users:         s390-tools, HAL
index edff6630c8057164e51221a4c6d5c5753c2b522d..3646ec85d513f2b23c020206fa93506cb05a0ab9 100644 (file)
@@ -33,5 +33,5 @@ Contact:      Richard Purdie <rpurdie@rpsys.net>
 Description:
                Invert the LED on/off state. This parameter is specific to
                gpio and backlight triggers. In case of the backlight trigger,
-               it is usefull when driving a LED which is intended to indicate
+               it is useful when driving a LED which is intended to indicate
                a device in a standby like state.
index b4c4f158ab9cfedebe478fa3d32d23bf06ff1a20..3ca3971109bf627fc299fa971c624c953619841e 100644 (file)
@@ -40,7 +40,7 @@ What:         /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-
 Date:          March 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
-                press of a button. A profile holds informations like button
+                press of a button. A profile holds information like button
                 mappings, sensitivity, the colors of the 5 leds and light
                 effects.
                 When read, these files return the respective profile. The
index 00efced7396988467293d9763ea0548a9c764162..326e05452da72bcefba8b4f8f7cd903c12466ff3 100644 (file)
@@ -33,7 +33,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When written, this file lets one write the respective profile
                buttons back to the mouse. The data has to be 77 bytes long.
                The mouse will reject invalid data.
@@ -47,7 +47,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When read, these files return the respective profile buttons.
                The returned data is 77 bytes in size.
                This file is readonly.
@@ -58,7 +58,7 @@ Date:         October 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When written, this file lets one write the respective profile
                settings back to the mouse. The data has to be 43 bytes long.
@@ -73,7 +73,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When read, these files return the respective profile settings.
                The returned data is 43 bytes in size.
index fdfa16f8189b8f8cbf384b7290dbbba0fbdb7f16..20f937c9d84f2ca713baaf4ef041bbaadc01da2e 100644 (file)
@@ -52,7 +52,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When written, this file lets one write the respective profile
                buttons back to the mouse. The data has to be 23 bytes long.
                The mouse will reject invalid data.
@@ -66,7 +66,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When read, these files return the respective profile buttons.
                The returned data is 23 bytes in size.
                This file is readonly.
@@ -77,7 +77,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When written, this file lets one write the respective profile
                settings back to the mouse. The data has to be 16 bytes long.
@@ -92,7 +92,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When read, these files return the respective profile settings.
                The returned data is 16 bytes in size.
index 5fab71af3c4627cd519e9223fe01502e71512114..3f8de50e4ff1dfb017da9f57befc8a568361cc71 100644 (file)
@@ -39,7 +39,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When written, this file lets one write the respective profile
                settings back to the mouse. The data has to be 13 bytes long.
@@ -54,7 +54,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When read, these files return the respective profile settings.
                The returned data is 13 bytes in size.
@@ -66,7 +66,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When written, this file lets one write the respective profile
                buttons back to the mouse. The data has to be 19 bytes long.
                The mouse will reject invalid data.
@@ -80,7 +80,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When read, these files return the respective profile buttons.
                The returned data is 19 bytes in size.
                This file is readonly.
index 41ff8ae4dee0f852380f9e4007025293501b10c0..cd9d667c3da2ef9c4dc2f5d0ec2878f53d5a8f72 100644 (file)
@@ -27,7 +27,7 @@ KernelVersion:        2.6.20
 Contact:       "Corentin Chary" <corentincj@iksaif.net>
 Description:
                Some models like the W1N have a LED display that can be
-               used to display several informations.
+               used to display several items of information.
                To control the LED display, use the following :
                    echo 0x0T000DDD > /sys/devices/platform/asus_laptop/
                where T control the 3 letters display, and DDD the 3 digits display.
index 5f57c7ccd4ba70e106e2b380ebfbde8e514a388c..97f397e2fb3a32be5df12c0be7480ba341687a90 100644 (file)
@@ -40,7 +40,7 @@
 
                        <para>Central frequency of the channel.</para>
 
-                       <para>For ISDB-T the channels are usally transmitted with an offset of 143kHz. E.g. a
+                       <para>For ISDB-T the channels are usually transmitted with an offset of 143kHz. E.g. a
                                valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of
                                the channel which is 6MHz.</para>
 
index 78d756de5906ecbee16b2b8976b7550e22d8aa03..60c6976fb3116c9ac6468381f392eedf0c9ef7a0 100644 (file)
@@ -139,7 +139,7 @@ consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
 <section id="frontend_sec_tone">
 <title>SEC continuous tone</title>
 
-<para>The continous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
+<para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
 high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
 be switched consistently to the DiSEqC commands as described in the DiSEqC
 spec.</para>
index f66f4df186908f5d6ba79171e303949683107a1e..67e7ab41c0a6592a747bd414e3bf5923f111ca6a 100644 (file)
@@ -1763,7 +1763,7 @@ as it would be on UP.
 There is a furthur optimization possible here: remember our original
 cache code, where there were no reference counts and the caller simply
 held the lock whenever using the object?  This is still possible: if
-you hold the lock, noone can delete the object, so you don't need to
+you hold the lock, no one can delete the object, so you don't need to
 get and put the reference count.
 </para>
 
index 8c5411cfeaf0055b3415542646cdc9b662b28e3f..cdd1bb9aac0d979be9702630be04689edf6b324f 100644 (file)
@@ -1032,7 +1032,7 @@ and other resources, etc.
           <listitem>
           <para>
           This is indicated by ICRC bit in the ERROR register and
-          means that corruption occurred during data transfer.  Upto
+          means that corruption occurred during data transfer.  Up to
           ATA/ATAPI-7, the standard specifies that this bit is only
           applicable to UDMA transfers but ATA/ATAPI-8 draft revision
           1f says that the bit may be applicable to multiword DMA and
@@ -1045,10 +1045,10 @@ and other resources, etc.
           <term>ABRT error during data transfer or on completion</term>
           <listitem>
           <para>
-          Upto ATA/ATAPI-7, the standard specifies that ABRT could be
+          Up to ATA/ATAPI-7, the standard specifies that ABRT could be
           set on ICRC errors and on cases where a device is not able
           to complete a command.  Combined with the fact that MWDMA
-          and PIO transfer errors aren't allowed to use ICRC bit upto
+          and PIO transfer errors aren't allowed to use ICRC bit up to
           ATA/ATAPI-7, it seems to imply that ABRT bit alone could
           indicate tranfer errors.
           </para>
@@ -1122,7 +1122,7 @@ and other resources, etc.
        <para>
        Depending on commands, not all STATUS/ERROR bits are
        applicable.  These non-applicable bits are marked with
-       &quot;na&quot; in the output descriptions but upto ATA/ATAPI-7
+       &quot;na&quot; in the output descriptions but up to ATA/ATAPI-7
        no definition of &quot;na&quot; can be found.  However,
        ATA/ATAPI-8 draft revision 1f describes &quot;N/A&quot; as
        follows.
@@ -1507,7 +1507,7 @@ and other resources, etc.
 
        <listitem>
        <para>
-       CHS set up with INITIALIZE DEVICE PARAMETERS (seldomly used)
+       CHS set up with INITIALIZE DEVICE PARAMETERS (seldom used)
        </para>
        </listitem>
 
index 620eb3f6a90abe6001b65d50095ef15c46f28f7f..6f242d5dee9ad0942b26fc5f454b5be4e5a111fe 100644 (file)
@@ -485,7 +485,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
                                Reed-Solomon library.
                        </para>
                        <para>
-                               The ECC bytes must be placed immidiately after the data
+                               The ECC bytes must be placed immediately after the data
                                bytes in order to make the syndrome generator work. This
                                is contrary to the usual layout used by software ECC. The
                                separation of data and out of band area is not longer
@@ -629,7 +629,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
                                holds the bad block table. Store a pointer to the pattern  
                                in the pattern field. Further the length of the pattern has to be 
                                stored in len and the offset in the spare area must be given
-                               in the offs member of the nand_bbt_descr stucture. For mirrored
+                               in the offs member of the nand_bbt_descr structure. For mirrored
                                bad block tables different patterns are mandatory.</para></listitem>
                                <listitem><para>Table creation</para>
                                <para>Set the option NAND_BBT_CREATE to enable the table creation
@@ -648,7 +648,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
                                <listitem><para>Table version control</para>
                                <para>Set the option NAND_BBT_VERSION to enable the table version control.
                                It's highly recommended to enable this for mirrored tables with write
-                               support. It makes sure that the risk of loosing the bad block
+                               support. It makes sure that the risk of losing the bad block
                                table information is reduced to the loss of the information about the
                                one worn out block which should be marked bad. The version is stored in
                                4 consecutive bytes in the spare area of the device. The position of
@@ -1060,19 +1060,19 @@ data in this page</entry>
 <row>
 <entry>0x3D</entry>
 <entry>ECC byte 21</entry>
-<entry>Error correction code byte 0 of the eigth 256 Bytes of data
+<entry>Error correction code byte 0 of the eighth 256 Bytes of data
 in this page</entry>
 </row>
 <row>
 <entry>0x3E</entry>
 <entry>ECC byte 22</entry>
-<entry>Error correction code byte 1 of the eigth 256 Bytes of data
+<entry>Error correction code byte 1 of the eighth 256 Bytes of data
 in this page</entry>
 </row>
 <row>
 <entry>0x3F</entry>
 <entry>ECC byte 23</entry>
-<entry>Error correction code byte 2 of the eigth 256 Bytes of data
+<entry>Error correction code byte 2 of the eighth 256 Bytes of data
 in this page</entry>
 </row>
 </tbody></tgroup></informaltable>
index 53f4f8d3b81038e8642d99507bf7d97a562a661c..346e552fa2cc64b4458f654f8ade9dca9564171d 100644 (file)
      <sect1 id="machine-constraint">
        <title>Constraints</title>
        <para>
-        As well as definining the connections the machine interface
-        also provides constraints definining the operations that
+        As well as defining the connections the machine interface
+        also provides constraints defining the operations that
         clients are allowed to perform and the parameters that may be
         set.  This is required since generally regulator devices will
         offer more flexibility than it is safe to use on a given
index b4665b9c40b0ec46253b9ae6cf9bb1bbd06ec563..7c4b514d62b1f705a8424e36e1b1ab1ebdca7d93 100644 (file)
@@ -797,7 +797,7 @@ framework to set up sysfs files for this region. Simply leave it alone.
        perform some initialization. After that, your hardware
        starts working and will generate an interrupt as soon
        as it's finished, has some data available, or needs your
-       attention because an error occured.
+       attention because an error occurred.
        </para>
        <para>
        <filename>/dev/uioX</filename> is a read-only file. A
index af293606fbe39adba3f592bd2cd3b5a380c126b6..8d57c1888dca4fa32326578477441f317068ce61 100644 (file)
@@ -690,7 +690,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
                    </para><para>
                    This request lets kernel drivers talk to user mode code
                    through filesystem operations even when they don't create
-                   a charactor or block special device.
+                   a character or block special device.
                    It's also been used to do things like ask devices what
                    device special file should be used.
                    Two pre-defined ioctls are used
index dbab79c215c1fd55f29a6f94ce92a3953391a3e7..9028721438dc3625cce32fba512c715ab38f337f 100644 (file)
@@ -100,7 +100,7 @@ linux-kernel@vger.kernel.org, 2002-11-20. --></para>
 
       <para>By convention system administrators create various
 character device special files with these major and minor numbers in
-the <filename>/dev</filename> directory. The names recomended for the
+the <filename>/dev</filename> directory. The names recommended for the
 different V4L2 device types are listed in <xref linkend="devices" />.
 </para>
 
index 2fae3e87ce73c9d742ea5ac598d5d755439fcad8..a920ee80f640608d5f0b94f51f5dca682c2a5303 100644 (file)
@@ -1243,7 +1243,7 @@ values are:</entry>
              </row><row><entry spanname="descr">Mutes the audio when
 capturing. This is not done by muting audio hardware, which can still
 produce a slight hiss, but in the encoder itself, guaranteeing a fixed
-and reproducable audio bitstream. 0 = unmuted, 1 = muted.</entry>
+and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
              </row>
              <row><entry></entry></row>
              <row id="v4l2-mpeg-video-encoding">
index 21caff6d159bcc9352ba729823429c5878dc9397..05c8fefcbcbe91fd01169472ee6fac5d6dbd8ab3 100644 (file)
@@ -90,7 +90,7 @@
     processing hardware.</para>
 
     <figure id="pipeline-scaling">
-      <title>Image Format Negotation on Pipelines</title>
+      <title>Image Format Negotiation on Pipelines</title>
       <mediaobject>
        <imageobject>
          <imagedata fileref="pipeline.pdf" format="PS" />
index c14fc3db2a81b8b11293ebc07a213077ceb00712..3cb10ec5192947fd731831b00cc7e2b5fcb5c4df 100644 (file)
@@ -140,7 +140,7 @@ and is not locked sets the cid to the scaled value.
                        <para>int v4l2_get_control(int fd, int cid) -
 This function returns a value of 0 - 65535, scaled to from the actual range
 of the given v4l control id. when the cid does not exist, could not be
-accessed for some reason, or some error occured 0 is returned.
+accessed for some reason, or some error occurred 0 is returned.
 </para></listitem>
 </itemizedlist>
                </section>
index 3c3b667b28e755d3b8e1233a16fcf76ac3657170..160e464d44b7588e963313c77730d4f28db6bd0c 100644 (file)
@@ -133,7 +133,7 @@ different IR's. Due to that, V4L2 API now specifies a standard for mapping Media
 <row><entry><constant>KEY_LEFT</constant></entry><entry>Left key</entry><entry>LEFT</entry></row>
 <row><entry><constant>KEY_RIGHT</constant></entry><entry>Right key</entry><entry>RIGHT</entry></row>
 
-<row><entry><emphasis role="bold">Miscelaneous keys</emphasis></entry></row>
+<row><entry><emphasis role="bold">Miscellaneous keys</emphasis></entry></row>
 
 <row><entry><constant>KEY_DOT</constant></entry><entry>Return a dot</entry><entry>.</entry></row>
 <row><entry><constant>KEY_FN</constant></entry><entry>Select a function</entry><entry>FUNCTION</entry></row>
index 0ba149de2608795726e8967d9531cbd3b9831358..58ced2346e67874867604792d4430c27b75e5739 100644 (file)
@@ -4784,7 +4784,7 @@ struct _snd_pcm_runtime {
         FM registers can be directly accessed through the direct-FM API,
       defined in <filename>&lt;sound/asound_fm.h&gt;</filename>. In
       ALSA native mode, FM registers are accessed through
-      the Hardware-Dependant Device direct-FM extension API, whereas in
+      the Hardware-Dependent Device direct-FM extension API, whereas in
       OSS compatible mode, FM registers can be accessed with the OSS
       direct-FM compatible API in <filename>/dev/dmfmX</filename> device. 
       </para>
index dcf7acc720e18bb68c572e38c6913863b5ead701..3f5e0b09bed5b29efe2493a3c05857e8c7a56901 100644 (file)
@@ -253,8 +253,8 @@ In constrast, MSI is restricted to a maximum of 32 interrupts (and
 must be a power of two).  In addition, the MSI interrupt vectors must
 be allocated consecutively, so the system may not be able to allocate
 as many vectors for MSI as it could for MSI-X.  On some platforms, MSI
-interrupts must all be targetted at the same set of CPUs whereas MSI-X
-interrupts can all be targetted at different CPUs.
+interrupts must all be targeted at the same set of CPUs whereas MSI-X
+interrupts can all be targeted at different CPUs.
 
 4.5.2 Spinlocks
 
index 26c3b3635d9fa1b017f2b23e35c342fb92e76977..a660d494c8edcf9fc9bbaec9887ac6203bfcd60e 100644 (file)
@@ -28,7 +28,7 @@ expect these delays to be short, measurable in days, not weeks or months.
 A disclosure date is negotiated by the security team working with the
 bug submitter as well as vendors.  However, the kernel security team
 holds the final say when setting a disclosure date.  The timeframe for
-disclosure is from immediate (esp. if it's already publically known)
+disclosure is from immediate (esp. if it's already publicly known)
 to a few weeks.  As a basic default policy, we expect report date to
 disclosure date to be on the order of 7 days.
 
index 38d2aab59cace778379eea1b99e2d370410d73ae..319baa8b60dd727d82c5e8fa062c13e3bb3126d5 100644 (file)
@@ -101,7 +101,7 @@ PM support: Since Linux is used on many portable and desktop systems, your
                complete overview of the power management issues related to
                drivers see Documentation/power/devices.txt .
 
-Control:       In general if there is active maintainance of a driver by
+Control:       In general if there is active maintenance of a driver by
                the author then patches will be redirected to them unless
                they are totally obvious and without need of checking.
                If you want to be the contact and update point for the
index 689e2371095cc5dfea9927120009341f369159aa..e439cd0d33752fd4231bcea896f39871aeff8dc3 100644 (file)
@@ -729,7 +729,7 @@ Linus Torvalds's mail on the canonical patch format:
   <http://lkml.org/lkml/2005/4/7/183>
 
 Andi Kleen, "On submitting kernel patches"
-  Some strategies to get difficult or controversal changes in.
+  Some strategies to get difficult or controversial changes in.
   http://halobates.de/on-submitting-patches.pdf
 
 --
index 133c5fa6c7a16d16985d9e57066815b6ae7714a9..7b9351f2f555d5c460a53fea90a76efc14728136 100644 (file)
@@ -36,7 +36,7 @@ Linux currently supports the following features on the IXP4xx chips:
 - Timers (watchdog, OS)
 
 The following components of the chips are not supported by Linux and
-require the use of Intel's propietary CSR softare:
+require the use of Intel's proprietary CSR softare:
 
 - USB device interface
 - Network interfaces (HSS, Utopia, NPEs, etc)
@@ -47,7 +47,7 @@ software from:
 
    http://developer.intel.com/design/network/products/npfamily/ixp425.htm    
 
-DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPIETARY
+DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPRIETARY
 SOFTWARE.
 
 There are several websites that provide directions/pointers on using
index 7edd0e2e6c5b7d9e11c8885e87bec8d5ead39a11..1ca63b3e5635bec2c763e4ae93e1155f32a1a295 100644 (file)
@@ -116,7 +116,7 @@ Configuration
     Allows the entire memory to be checksummed before and after the
     suspend to see if there has been any corruption of the contents.
 
-    Note, the time to calculate the CRC is dependant on the CPU speed
+    Note, the time to calculate the CRC is dependent on the CPU speed
     and the size of memory. For an 64Mbyte RAM area on an 200MHz
     S3C2410, this can take approximately 4 seconds to complete.
 
index 05850c62abebd45c23ea7430471f67d25f0a01a5..513f2562c1a3162af49dc01fdb44780b9076b51b 100644 (file)
@@ -5,7 +5,7 @@ Introduction
 ------------
 
 This outlines the Samsung GPIO implementation and the architecture
-specfic calls provided alongisde the drivers/gpio core.
+specific calls provided alongisde the drivers/gpio core.
 
 
 S3C24XX (Legacy)
index 2a7b38c832c72e705bd9136ace4d9ece77c16628..c6d84cfd2f56a55d2892e8e6afbea2383274ce95 100644 (file)
@@ -497,7 +497,7 @@ The scatter gather list is in the form of an array of <page, offset, len>
 entries with their corresponding dma address mappings filled in at the
 appropriate time. As an optimization, contiguous physical pages can be
 covered by a single entry where <page> refers to the first page and <len>
-covers the range of pages (upto 16 contiguous pages could be covered this
+covers the range of pages (up to 16 contiguous pages could be covered this
 way). There is a helper routine (blk_rq_map_sg) which drivers can use to build
 the sg list.
 
@@ -565,7 +565,7 @@ struct request {
        .
        int tag;        /* command tag associated with request */
        void *special;  /* same as before */
-       char *buffer;   /* valid only for low memory buffers upto
+       char *buffer;   /* valid only for low memory buffers up to
                         current_nr_sectors */
        .
        .
index cbdfb7d9455bcc58e6df3cad510d752b47742547..aedf1bd02fddd0a4427902e496949ba337423e3d 100644 (file)
@@ -110,22 +110,22 @@ university server with various users - students, professors, system
 tasks etc. The resource planning for this server could be along the
 following lines:
 
-       CPU :           Top cpuset
+       CPU :          "Top cpuset"
                        /       \
                CPUSet1         CPUSet2
-                  |              |
-               (Profs)         (Students)
+                  |               |
+               (Professors)    (Students)
 
                In addition (system tasks) are attached to topcpuset (so
                that they can run anywhere) with a limit of 20%
 
-       Memory : Professors (50%), students (30%), system (20%)
+       Memory : Professors (50%), Students (30%), system (20%)
 
-       Disk : Prof (50%), students (30%), system (20%)
+       Disk : Professors (50%), Students (30%), system (20%)
 
        Network : WWW browsing (20%), Network File System (60%), others (20%)
                                / \
-                       Prof (15%) students (5%)
+               Professors (15%)  students (5%)
 
 Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go
 into NFS network class.
index b6ed61c958560d987e40cc28a9eca7f7d12401a1..7c163477fcd8f001fb217cc66e4c67812af907a7 100644 (file)
@@ -52,8 +52,10 @@ Brief summary of control files.
  tasks                          # attach a task(thread) and show list of threads
  cgroup.procs                   # show list of processes
  cgroup.event_control           # an interface for event_fd()
- memory.usage_in_bytes          # show current memory(RSS+Cache) usage.
- memory.memsw.usage_in_bytes    # show current memory+Swap usage
+ memory.usage_in_bytes          # show current res_counter usage for memory
+                                (See 5.5 for details)
+ memory.memsw.usage_in_bytes    # show current res_counter usage for memory+Swap
+                                (See 5.5 for details)
  memory.limit_in_bytes          # set/show limit of memory usage
  memory.memsw.limit_in_bytes    # set/show limit of memory+Swap usage
  memory.failcnt                         # show the number of memory usage hits limits
@@ -453,6 +455,15 @@ memory under it will be reclaimed.
 You can reset failcnt by writing 0 to failcnt file.
 # echo 0 > .../memory.failcnt
 
+5.5 usage_in_bytes
+
+For efficiency, as other kernel components, memory cgroup uses some optimization
+to avoid unnecessary cacheline false sharing. usage_in_bytes is affected by the
+method and doesn't show 'exact' value of memory(and swap) usage, it's an fuzz
+value for efficient access. (Of course, when necessary, it's synchronized.)
+If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
+value in memory.stat(see 5.2).
+
 6. Hierarchy support
 
 The memory controller supports a deep hierarchy and hierarchical accounting.
index 45d5a217484f76b12e03bae77d93ef3eb44fe374..a20bfd415e41cca69297760cee32de91c8d2812c 100644 (file)
@@ -196,7 +196,7 @@ the state as 0 when a cpu if offline and 1 when its online.
        #To display the current cpu state.
        #cat /sys/devices/system/cpu/cpuX/online
 
-Q: Why cant i remove CPU0 on some systems?
+Q: Why can't i remove CPU0 on some systems?
 A: Some architectures may have some special dependency on a certain CPU.
 
 For e.g in IA64 platforms we have ability to sent platform interrupts to the
index 15174985ad08d0262c5f15288a0feb51916c3fb1..d262e22bddec06945136bbec0e25826ef2df696e 100644 (file)
@@ -62,7 +62,7 @@ image file and then arrange all these packets back to back in to one single
 file.
 This file is then copied to /sys/class/firmware/dell_rbu/data.
 Once this file gets to the driver, the driver extracts packet_size data from
-the file and spreads it accross the physical memory in contiguous packet_sized
+the file and spreads it across the physical memory in contiguous packet_sized
 space.
 This method makes sure that all the packets get to the driver in a single operation.
 
index 7d00668e97bbb810d967f4cb913d1163b332fd7c..fb1d4a0cf12288f4e346f245459ab945c96db5ee 100644 (file)
@@ -37,7 +37,7 @@ Algorithm
 =========
 
 dm-service-time adds the I/O size to 'in-flight-size' when the I/O is
-dispatched and substracts when completed.
+dispatched and subtracts when completed.
 Basically, dm-service-time selects a path having minimum service time
 which is calculated by:
 
index 7d319fba9b5b7cef4ca793dc2cb0133724610607..9d9f0098092b927b48dabbf198ee252e91d08a58 100644 (file)
@@ -18,9 +18,9 @@ Optional properties:
 - edid : verbatim EDID data block describing attached display.
   Data from the detailed timing descriptor will be used to
   program the display controller.
-- little-endian: availiable on big endian systems, to
+- little-endian: available on big endian systems, to
   set different foreign endian.
-- big-endian: availiable on little endian systems, to
+- big-endian: available on little endian systems, to
   set different foreign endian.
 
 Example for MPC5200:
index a48b2cadc7f08fd4203bbf67f12f3afed3f447ed..00f1f546b32e2b5cfaa4ea3a0a0edb3ece022327 100644 (file)
@@ -15,7 +15,7 @@ Optional properties:
 - gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins
        (R/B#). For multi-chip devices, "n" GPIO definitions are required
        according to the number of chips.
-- chip-delay : chip dependent delay for transfering data from array to
+- chip-delay : chip dependent delay for transferring data from array to
        read registers (tR). Required if property "gpios" is not used
        (R/B# pins not connected).
 
index d6d209ded937908d153385ba458bebfcde042500..c2dbcec0ee31d33482858367e097140a766516d4 100644 (file)
@@ -39,7 +39,7 @@ Optional properties:
 
 - nxp,no-comparator-bypass : Allows to disable the CAN input comperator.
 
-For futher information, please have a look to the SJA1000 data sheet.
+For further information, please have a look to the SJA1000 data sheet.
 
 Examples:
 
index 8aa10f45ebe6633510c0701009df8a4c41229083..4f6145859aab6bd2b2dc06a4265666acdac566e2 100644 (file)
@@ -199,7 +199,7 @@ EXAMPLE 4
 
 EXAMPLE 5
        /*
-        * Definition of an error interrupt (interupt type 1).
+        * Definition of an error interrupt (interrupt type 1).
         * SoC interrupt number is 16 and the specific error
          * interrupt bit in the error interrupt summary register
         * is 23.
index 55fd2623445b5d1ea02ab65a5a445eb0260e6d23..50619a0720a8fd070b5f83cb1fc9ced9ff79a858 100644 (file)
@@ -138,7 +138,7 @@ and properties to be present. This will be described in detail in
 section III, but, for example, the kernel does not require you to
 create a node for every PCI device in the system. It is a requirement
 to have a node for PCI host bridges in order to provide interrupt
-routing informations and memory/IO ranges, among others. It is also
+routing information and memory/IO ranges, among others. It is also
 recommended to define nodes for on chip devices and other buses that
 don't specifically fit in an existing OF specification. This creates a
 great flexibility in the way the kernel can then probe those and match
@@ -385,7 +385,7 @@ struct boot_param_header {
      among others, by kexec. If you are on an SMP system, this value
      should match the content of the "reg" property of the CPU node in
      the device-tree corresponding to the CPU calling the kernel entry
-     point (see further chapters for more informations on the required
+     point (see further chapters for more information on the required
      device-tree contents)
 
    - size_dt_strings
@@ -553,7 +553,7 @@ looks like in practice.
 
 This tree is almost a minimal tree. It pretty much contains the
 minimal set of required nodes and properties to boot a linux kernel;
-that is, some basic model informations at the root, the CPUs, and the
+that is, some basic model information at the root, the CPUs, and the
 physical memory layout.  It also includes misc information passed
 through /chosen, like in this example, the platform type (mandatory)
 and the kernel command line arguments (optional).
index c8238e44ed6b9016be360bc099f5b8806bff2b09..c4d963a67d6ffc1ec7e54b8d31cc7d9b41537796 100644 (file)
@@ -138,7 +138,7 @@ Hotplug is able to load the driver, when it is needed (because you plugged
 in the device).
 
 If you want to enable debug output, you have to load the driver manually and
-from withing the dvb-kernel cvs repository.
+from within the dvb-kernel cvs repository.
 
 first have a look, which debug level are available:
 
index 4a0c2b56e690073576fd014fa84a53d286d1d500..6c3bda50f7dcb122b46d159f22d5f1388e65549f 100644 (file)
@@ -47,7 +47,7 @@ so on.
 
 * CI modules that are supported
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The CI module support is largely dependant upon the firmware on the cards
+The CI module support is largely dependent upon the firmware on the cards
 Some cards do support almost all of the available CI modules. There is
 nothing much that can be done in order to make additional CI modules
 working with these cards.
index 121832e5d899906d37f0f3a6b879fb425128477c..97b1373f2428e11bc38ed7e2a5adf71a570a4de2 100644 (file)
@@ -106,7 +106,7 @@ Some very frequently asked questions about linuxtv-dvb
 5. The dvb_net device doesn't give me any packets at all
 
        Run tcpdump on the dvb0_0 interface. This sets the interface
-       into promiscous mode so it accepts any packets from the PID
+       into promiscuous mode so it accepts any packets from the PID
        you have configured with the dvbnet utility. Check if there
        are any packets with the IP addr and MAC addr you have
        configured with ifconfig.
index 68ee224b6aaee53dda46ed6992bc4d07ffb5cf1d..412305b7c55792efecb825ebbafd646019f5bf4b 100644 (file)
@@ -1,7 +1,7 @@
 The DVB subsystem currently registers to the sysfs subsystem using the
 "class_simple" interface.
 
-This means that only the basic informations like module loading parameters
+This means that only the basic information like module loading parameters
 are presented through sysfs. Other things that might be interesting are
 currently *not* available.
 
index 9ee774de57cda04609dbf41b105c01069f0b2bcf..249822cde82bcc8609b3c459d0ad3d8b9193ff35 100644 (file)
@@ -311,7 +311,7 @@ Total Correctable Errors count attribute file:
        'ce_noinfo_count'
 
        This attribute file displays the number of CEs that
-       have occurred wherewith no informations as to which DIMM slot
+       have occurred wherewith no information as to which DIMM slot
        is having errors. Memory is handicapped, but operational,
        yet no information is available to indicate which slot
        the failing memory is in. This count field should be also
@@ -741,7 +741,7 @@ were done at i7core_edac driver. This chapter will cover those differences
    As EDAC API maps the minimum unity is csrows, the driver sequencially
    maps channel/dimm into different csrows.
 
-   For example, suposing the following layout:
+   For example, supposing the following layout:
        Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs
          dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400
          dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400
index f297fc1202ae41876e46161965d16065c7dbae66..38cf0c7b559f57a4c8fa75329457ca230e868fad 100644 (file)
@@ -84,7 +84,7 @@ struct eisa_driver {
 
 id_table       : an array of NULL terminated EISA id strings,
                  followed by an empty string. Each string can
-                 optionally be paired with a driver-dependant value
+                 optionally be paired with a driver-dependent value
                  (driver_data).
 
 driver         : a generic driver, such as described in
index 1a2e8aa3fbb199cea43ad7f5f214b92cf1694fa1..444e34b52ae164019c77c74ea83384a5ac006f63 100644 (file)
@@ -204,7 +204,7 @@ Notes:
 
     supported_output_devices
 
-        This read-only file contains a full ',' seperated list containing all
+        This read-only file contains a full ',' separated list containing all
         output devices that could be available on your platform. It is likely
         that not all of those have a connector on your hardware but it should
         provide a good starting point to figure out which of those names match
@@ -225,7 +225,7 @@ Notes:
         This can happen for example if only one (the other) iga is used.
         Writing to these files allows adjusting the output devices during
         runtime. One can add new devices, remove existing ones or switch
-        between igas. Essentially you can write a ',' seperated list of device
+        between igas. Essentially you can write a ',' separated list of device
         names (or a single one) in the same format as the output to those
         files. You can add a '+' or '-' as a prefix allowing simple addition
         and removal of devices. So a prefix '+' adds the devices from your list
index 274b32d12532a2e0e3814e70940b39721dde864a..492e81df296835e04ff6195304b3a32931e466c6 100644 (file)
@@ -387,26 +387,6 @@ Who:       Tejun Heo <tj@kernel.org>
 
 ----------------------------
 
-What:  Support for lcd_switch and display_get in asus-laptop driver
-When:  March 2010
-Why:   These two features use non-standard interfaces. There are the
-       only features that really need multiple path to guess what's
-       the right method name on a specific laptop.
-
-       Removing them will allow to remove a lot of code an significantly
-       clean the drivers.
-
-       This will affect the backlight code which won't be able to know
-       if the backlight is on or off. The platform display file will also be
-       write only (like the one in eeepc-laptop).
-
-       This should'nt affect a lot of user because they usually know
-       when their display is on or off.
-
-Who:   Corentin Chary <corentin.chary@gmail.com>
-
-----------------------------
-
 What:  sysfs-class-rfkill state file
 When:  Feb 2014
 Files: net/rfkill/core.c
index 51986bf08a4d0943a6db2e5e7c9349147b5656bd..4c95935cbcf4434c3414345bcd665ce7a3c8a99f 100644 (file)
@@ -309,7 +309,7 @@ ioctlfd field set to the descriptor obtained from the open call.
 AUTOFS_DEV_IOCTL_TIMEOUT_CMD
 ----------------------------
 
-Set the expire timeout for mounts withing an autofs mount point.
+Set the expire timeout for mounts within an autofs mount point.
 
 The call requires an initialized struct autofs_dev_ioctl with the
 ioctlfd field set to the descriptor obtained from the open call.
index 1902c57b72ef7e103a07856dd520aef772c1e684..a167ab876c357111c8e5ba4e1a204bda29a7285e 100644 (file)
@@ -95,7 +95,7 @@ restraints as possible on how an index is structured and where it is placed in
 the tree.  The netfs can even mix indices and data files at the same level, but
 it's not recommended.
 
-Each index entry consists of a key of indeterminate length plus some auxilliary
+Each index entry consists of a key of indeterminate length plus some auxiliary
 data, also of indeterminate length.
 
 There are some limits on indices:
@@ -203,23 +203,23 @@ This has the following fields:
 
      If the function is absent, a file size of 0 is assumed.
 
- (6) A function to retrieve auxilliary data from the netfs [optional].
+ (6) A function to retrieve auxiliary data from the netfs [optional].
 
      This function will be called with the netfs data that was passed to the
-     cookie acquisition function and the maximum length of auxilliary data that
-     it may provide.  It should write the auxilliary data into the given buffer
+     cookie acquisition function and the maximum length of auxiliary data that
+     it may provide.  It should write the auxiliary data into the given buffer
      and return the quantity it wrote.
 
-     If this function is absent, the auxilliary data length will be set to 0.
+     If this function is absent, the auxiliary data length will be set to 0.
 
-     The length of the auxilliary data buffer may be dependent on the key
+     The length of the auxiliary data buffer may be dependent on the key
      length.  A netfs mustn't rely on being able to provide more than 400 bytes
      for both.
 
- (7) A function to check the auxilliary data [optional].
+ (7) A function to check the auxiliary data [optional].
 
      This function will be called to check that a match found in the cache for
-     this object is valid.  For instance with AFS it could check the auxilliary
+     this object is valid.  For instance with AFS it could check the auxiliary
      data against the data version number returned by the server to determine
      whether the index entry in a cache is still valid.
 
@@ -232,7 +232,7 @@ This has the following fields:
        (*) FSCACHE_CHECKAUX_NEEDS_UPDATE       - the entry requires update
        (*) FSCACHE_CHECKAUX_OBSOLETE           - the entry should be deleted
 
-     This function can also be used to extract data from the auxilliary data in
+     This function can also be used to extract data from the auxiliary data in
      the cache and copy it into the netfs's structures.
 
  (8) A pair of functions to manage contexts for the completion callback
index fabcb0e00f25d4288c31382699c844d5f3820939..dd57bb6bb3902af33760a56fa618898d43aeb40a 100644 (file)
@@ -409,7 +409,7 @@ As a consequence of this, default_groups cannot be removed directly via
 rmdir(2).  They also are not considered when rmdir(2) on the parent
 group is checking for children.
 
-[Dependant Subsystems]
+[Dependent Subsystems]
 
 Sometimes other drivers depend on particular configfs items.  For
 example, ocfs2 mounts depend on a heartbeat region item.  If that
index 6b050464a90de62d1bd4b5c3d372baa044f36d16..c79ec58fd7f6f3df8ee32d98448cf4acfe5d7705 100644 (file)
@@ -97,7 +97,7 @@ Note: More extensive information for getting started with ext4 can be
 * Inode allocation using large virtual block groups via flex_bg
 * delayed allocation
 * large block (up to pagesize) support
-* efficent new ordered mode in JBD2 and ext4(avoid using buffer head to force
+* efficient new ordered mode in JBD2 and ext4(avoid using buffer head to force
   the ordering)
 
 [1] Filesystems with a block size of 1k may see a limit imposed by the
@@ -106,7 +106,7 @@ directory hash tree having a maximum depth of two.
 2.2 Candidate features for future inclusion
 
 * Online defrag (patches available but not well tested)
-* reduced mke2fs time via lazy itable initialization in conjuction with
+* reduced mke2fs time via lazy itable initialization in conjunction with
   the uninit_bg feature (capability to do this is available in e2fsprogs
   but a kernel thread to do lazy zeroing of unused inode table blocks
   after filesystem is first mounted is required for safety)
index fd966dc9979a9c37346633b051beaaf9686604ba..d81889669293d84d8fce823739618e37785cd75f 100644 (file)
@@ -62,7 +62,7 @@ be fixed.
 
 The REMOVE uevent is generated at the end of an unsuccessful mount
 or at the end of a umount of the filesystem. All REMOVE uevents will
-have been preceeded by at least an ADD uevent for the same fileystem,
+have been preceded by at least an ADD uevent for the same fileystem,
 and unlike the other uevents is generated automatically by the kernel's
 kobject subsystem.
 
index 0b59c0200912853a3ccd6f6baa70646ada1c1766..4cda926628aa219327fa1b8d054b3f0ad9cc7296 100644 (file)
@@ -11,7 +11,7 @@ their I/O so file system consistency is maintained.  One of the nifty
 features of GFS is perfect consistency -- changes made to the file system
 on one machine show up immediately on all other machines in the cluster.
 
-GFS uses interchangable inter-node locking mechanisms, the currently
+GFS uses interchangeable inter-node locking mechanisms, the currently
 supported mechanisms are:
 
   lock_nolock -- allows gfs to be used as a local file system
index 933bc66ccff1881470c68f14b350407dae1d1318..791af8dac0652cf7f286bd34146314e9f2a8120a 100644 (file)
@@ -350,7 +350,7 @@ Note the "Should sync?" parameter "nosync" means that the two mirrors are
 already in sync which will be the case on a clean shutdown of Windows.  If the
 mirrors are not clean, you can specify the "sync" option instead of "nosync"
 and the Device-Mapper driver will then copy the entirety of the "Source Device"
-to the "Target Device" or if you specified multipled target devices to all of
+to the "Target Device" or if you specified multiple target devices to all of
 them.
 
 Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1),
index 5393e6611691617db6c933a945df25baa0bd1090..9ed920a8cd79e92ef871e3fa29201b0777a8ce2a 100644 (file)
@@ -80,7 +80,7 @@ user_xattr    (*)     Enables Extended User Attributes.
 nouser_xattr           Disables Extended User Attributes.
 acl                    Enables POSIX Access Control Lists support.
 noacl          (*)     Disables POSIX Access Control Lists support.
-resv_level=2   (*)     Set how agressive allocation reservations will be.
+resv_level=2   (*)     Set how aggressive allocation reservations will be.
                        Valid values are between 0 (reservations off) to 8
                        (maximum space for reservations).
 dir_resv_level=        (*)     By default, directory reservations will scale with file
index eb59c8b44be99f3bf033142c90cd565b8f2814d3..3571667c71054ad407bf47cd425b996b7a557780 100644 (file)
@@ -42,7 +42,7 @@ Path walking overview
 A name string specifies a start (root directory, cwd, fd-relative) and a
 sequence of elements (directory entry names), which together refer to a path in
 the namespace. A path is represented as a (dentry, vfsmount) tuple. The name
-elements are sub-strings, seperated by '/'.
+elements are sub-strings, separated by '/'.
 
 Name lookups will want to find a particular path that a name string refers to
 (usually the final element, or parent of final element). This is done by taking
@@ -354,7 +354,7 @@ vfstest 24185492        4945    708725(2.9%) 1076136(4.4%)     0        2651
 
 What this shows is that failed rcu-walk lookups, ie. ones that are restarted
 entirely with ref-walk, are quite rare. Even the "vfstest" case which
-specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to excercise
+specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to exercise
 such races is not showing a huge amount of restarts.
 
 Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where
index 40ea6c295afb0f0b30c38a2733b9e093a6b28a87..65e03dd44823879a923d4d0f819587865cc67f1d 100644 (file)
@@ -20,7 +20,7 @@ Commands can be embedded into transaction command (which in turn has own command
 so one can extend protocol as needed without breaking backward compatibility as long
 as old commands are supported. All string lengths include tail 0 byte.
 
-All commans are transfered over the network in big-endian. CPU endianess is used at the end peers.
+All commands are transferred over the network in big-endian. CPU endianess is used at the end peers.
 
 @cmd - command number, which specifies command to be processed. Following
        commands are used currently:
index 23cae6548d3ac93f8c14e2329122fb27f44c706c..b0b814d75ca138090395820794d5a2749d0052f4 100644 (file)
@@ -543,7 +543,7 @@ just those considered 'most important'.  The new vectors are:
   their statistics are used by kernel developers and interested users to
   determine the occurrence of interrupts of the given type.
 
-The above IRQ vectors are displayed only when relevent.  For example,
+The above IRQ vectors are displayed only when relevant.  For example,
 the threshold vector does not exist on x86_64 platforms.  Others are
 suppressed when the system is a uniprocessor.  As of this writing, only
 i386 and x86_64 platforms support the new IRQ vector displays.
@@ -1202,7 +1202,7 @@ The columns are:
                        W = can do write operations
                        U = can do unblank
   flags                E = it is enabled
-                       C = it is prefered console
+                       C = it is preferred console
                        B = it is primary boot console
                        p = it is used for printk buffer
                        b = it is not a TTY but a Braille device
@@ -1331,7 +1331,7 @@ NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see
 Documentation/feature-removal-schedule.txt.
 
 Caveat: when a parent task is selected, the oom killer will sacrifice any first
-generation children with seperate address spaces instead, if possible.  This
+generation children with separate address spaces instead, if possible.  This
 avoids servers and important system daemons from being killed and loses the
 minimal amount of work.
 
index 2d78f191184498459b951e3292a1e81770ddefb5..d4d41465a0b1bcaf2d712fb6af0314c63ab4b832 100644 (file)
@@ -219,7 +219,7 @@ or if it is stored out of line (in which case the value field stores a
 reference to where the actual value is stored).  This allows large values
 to be stored out of line improving scanning and lookup performance and it
 also allows values to be de-duplicated, the value being stored once, and
-all other occurences holding an out of line reference to that value.
+all other occurrences holding an out of line reference to that value.
 
 The xattr lists are packed into compressed 8K metadata blocks.
 To reduce overhead in inodes, rather than storing the on-disk
index f806e50aaa639a6211683632a0eb3d4fcab48513..597f728e7b4e9d4c2e9ec231c166be3f1d277642 100644 (file)
@@ -62,7 +62,7 @@ values of the same type.
 
 Mixing types, expressing multiple lines of data, and doing fancy
 formatting of data is heavily frowned upon. Doing these things may get
-you publically humiliated and your code rewritten without notice. 
+you publicly humiliated and your code rewritten without notice. 
 
 
 An attribute definition is simply:
index 80815ed654cb499a1b5fc7683c016438bf8886f5..21a7dc467bba197758caceb4d18285f784da6bb2 100644 (file)
@@ -97,7 +97,7 @@ functions:
 The passed struct file_system_type describes your filesystem. When a
 request is made to mount a filesystem onto a directory in your namespace,
 the VFS will call the appropriate mount() method for the specific
-filesystem.  New vfsmount refering to the tree returned by ->mount()
+filesystem.  New vfsmount referring to the tree returned by ->mount()
 will be attached to the mountpoint, so that when pathname resolution
 reaches the mountpoint it will jump into the root of that vfsmount.
 
index 5282e3e5141310ac1b73c3dd28d192d020932d97..2ce36439c09f859502823d877b9af4be063beb33 100644 (file)
@@ -42,7 +42,7 @@ the aggregation of all the previous changes currently held only in the log.
 This relogging technique also allows objects to be moved forward in the log so
 that an object being relogged does not prevent the tail of the log from ever
 moving forward.  This can be seen in the table above by the changing
-(increasing) LSN of each subsquent transaction - the LSN is effectively a
+(increasing) LSN of each subsequent transaction - the LSN is effectively a
 direct encoding of the location in the log of the transaction.
 
 This relogging is also used to implement long-running, multiple-commit
@@ -338,7 +338,7 @@ the same time another transaction modifies the item and inserts the log item
 into the new CIL, then checkpoint transaction commit code cannot use log items
 to store the list of log vectors that need to be written into the transaction.
 Hence log vectors need to be able to be chained together to allow them to be
-detatched from the log items. That is, when the CIL is flushed the memory
+detached from the log items. That is, when the CIL is flushed the memory
 buffer and log vector attached to each log item needs to be attached to the
 checkpoint context so that the log item can be released. In diagrammatic form,
 the CIL would look like this before the flush:
@@ -577,7 +577,7 @@ only becomes unpinned when all the transactions complete and there are no
 pending transactions. Thus the pinning and unpinning of a log item is symmetric
 as there is a 1:1 relationship with transaction commit and log item completion.
 
-For delayed logging, however, we have an assymetric transaction commit to
+For delayed logging, however, we have an asymmetric transaction commit to
 completion relationship. Every time an object is relogged in the CIL it goes
 through the commit process without a corresponding completion being registered.
 That is, we now have a many-to-one relationship between transaction commit and
@@ -780,7 +780,7 @@ With delayed logging, there are new steps inserted into the life cycle:
 From this, it can be seen that the only life cycle differences between the two
 logging methods are in the middle of the life cycle - they still have the same
 beginning and end and execution constraints. The only differences are in the
-commiting of the log items to the log itself and the completion processing.
+committing of the log items to the log itself and the completion processing.
 Hence delayed logging should not introduce any constraints on log item
 behaviour, allocation or freeing that don't already exist.
 
index cb8a3a00cc92694947cb72840ddbcb340407ce08..df904aec99044f8056ac530b9e9dc6de8f26f73e 100644 (file)
@@ -66,10 +66,10 @@ trick is to ensure that any needed memory allocations are done before
 entering atomic context, using:
 
     int flex_array_prealloc(struct flex_array *array, unsigned int start,
-                           unsigned int end, gfp_t flags);
+                           unsigned int nr_elements, gfp_t flags);
 
 This function will ensure that memory for the elements indexed in the range
-defined by start and end has been allocated.  Thereafter, a
+defined by start and nr_elements has been allocated.  Thereafter, a
 flex_array_put() call on an element in that range is guaranteed not to
 block.
 
index 5eb3b9d5f0d5834aa9a81634423b580fb5d4cd53..915f32063a261fac2dc975f561c1ef82f6fd67ba 100644 (file)
@@ -78,7 +78,7 @@ motherboards (most modern Abit motherboards).
 
 The first and second revision of the uGuru chip in reality is a Winbond
 W83L950D in disguise (despite Abit claiming it is "a new microprocessor
-designed by the ABIT Engineers"). Unfortunatly this doesn't help since the
+designed by the ABIT Engineers"). Unfortunately this doesn't help since the
 W83L950D is a generic microcontroller with a custom Abit application running
 on it.
 
index d9251efdcec72a1a92cf7b4e3c75505e85caf4d1..8d2be8a0b1e38c146a80130d8d96d94ce6025516 100644 (file)
@@ -5,9 +5,9 @@ First of all, what I know about uGuru is no fact based on any help, hints or
 datasheet from Abit. The data I have got on uGuru have I assembled through
 my weak knowledge in "backwards engineering".
 And just for the record, you may have noticed uGuru isn't a chip developed by
-Abit, as they claim it to be. It's realy just an microprocessor (uC) created by
+Abit, as they claim it to be. It's really just an microprocessor (uC) created by
 Winbond (W83L950D). And no, reading the manual for this specific uC or
-mailing  Windbond for help won't give any usefull data about uGuru, as it is
+mailing  Windbond for help won't give any useful data about uGuru, as it is
 the program inside the uC that is responding to calls.
 
 Olle Sandberg <ollebull@gmail.com>, 2005-05-25
@@ -41,7 +41,7 @@ later on attached again data-port will hold 0x08, more about this later.
 
 After wider testing of the Linux kernel driver some variants of the uGuru have
 turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also
-have to test CMD for two different values. On these uGuru's DATA will initally
+have to test CMD for two different values. On these uGuru's DATA will initially
 hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read
 first!
 
@@ -308,5 +308,5 @@ the voltage / clock programming out, I tried reading and only reading banks
 resulted in a _permanent_ reprogramming of the voltages, luckily I had the
 sensors part configured so that it would shutdown my system on any out of spec
 voltages which proprably safed my computer (after a reboot I managed to
-immediatly enter the bios and reload the defaults). This probably means that
+immediately enter the bios and reload the defaults). This probably means that
 the read/write cycle for the non sensor part is different from the sensor part.
index fa598aac22faddc1519a859e6819a9e5335beeb8..a6ccfe4bb6aaaf531f5e531569aafb259c3934da 100644 (file)
@@ -47,7 +47,7 @@ This driver supports the hardware monitoring features of the third revision of
 the Abit uGuru chip, found on recent Abit uGuru featuring motherboards.
 
 The 3rd revision of the uGuru chip in reality is a Winbond W83L951G.
-Unfortunatly this doesn't help since the W83L951G is a generic microcontroller
+Unfortunately this doesn't help since the W83L951G is a generic microcontroller
 with a custom Abit application running on it.
 
 Despite Abit not releasing any information regarding the uGuru revision 3,
index 03d02bfb3df13a8f7f06859f8669de4a905bcc88..02ad96cf9b2b18e5b1307f0e8ad88be4f07d3fce 100644 (file)
@@ -14,10 +14,6 @@ Supported chips:
     Prefix: 'gl523sm'
     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
     Datasheet:
-  * Intel Xeon Processor
-    Prefix: - any other - may require 'force_adm1021' parameter
-    Addresses scanned: none
-    Datasheet: Publicly available at Intel website
   * Maxim MAX1617
     Prefix: 'max1617'
     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
@@ -91,21 +87,27 @@ will do no harm, but will return 'old' values. It is possible to make
 ADM1021-clones do faster measurements, but there is really no good reason
 for that.
 
-Xeon support
-------------
 
-Some Xeon processors have real max1617, adm1021, or compatible chips
-within them, with two temperature sensors.
+Netburst-based Xeon support
+---------------------------
 
-Other Xeons have chips with only one sensor.
+Some Xeon processors based on the Netburst (early Pentium 4, from 2001 to
+2003) microarchitecture had real MAX1617, ADM1021, or compatible chips
+within them, with two temperature sensors. Other Xeon processors of this
+era (with 400 MHz FSB) had chips with only one temperature sensor.
 
-If you have a Xeon, and the adm1021 module loads, and both temperatures
-appear valid, then things are good.
+If you have such an old Xeon, and you get two valid temperatures when
+loading the adm1021 module, then things are good.
 
-If the adm1021 module doesn't load, you should try this:
-       modprobe adm1021 force_adm1021=BUS,ADDRESS
-       ADDRESS can only be 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e.
+If nothing happens when loading the adm1021 module, and you are certain
+that your specific Xeon processor model includes compatible sensors, you
+will have to explicitly instantiate the sensor chips from user-space. See
+method 4 in Documentation/i2c/instantiating-devices. Possible slave
+addresses are 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. It is likely that
+only temp2 will be correct and temp1 will have to be ignored.
 
-If you have dual Xeons you may have appear to have two separate
-adm1021-compatible chips, or two single-temperature sensors, at distinct
-addresses.
+Previous generations of the Xeon processor (based on Pentium II/III)
+didn't have these sensors. Next generations of Xeon processors (533 MHz
+FSB and faster) lost them, until the Core-based generation which
+introduced integrated digital thermal sensors. These are supported by
+the coretemp driver.
index fa475c0a48a34330e98b412e896013881dd6c50d..f3efd18e87f402ac3ba346ae15da07119f392fa6 100644 (file)
@@ -32,6 +32,16 @@ Supported chips:
     Addresses scanned: I2C 0x4c and 0x4d
     Datasheet: Publicly available at the ON Semiconductor website
                http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
+  * Analog Devices ADT7461A
+    Prefix: 'adt7461a'
+    Addresses scanned: I2C 0x4c and 0x4d
+    Datasheet: Publicly available at the ON Semiconductor website
+               http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
+  * ON Semiconductor NCT1008
+    Prefix: 'nct1008'
+    Addresses scanned: I2C 0x4c and 0x4d
+    Datasheet: Publicly available at the ON Semiconductor website
+               http://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
   * Maxim MAX6646
     Prefix: 'max6646'
     Addresses scanned: I2C 0x4d
@@ -149,7 +159,7 @@ ADM1032:
   * ALERT is triggered by open remote sensor.
   * SMBus PEC support for Write Byte and Receive Byte transactions.
 
-ADT7461:
+ADT7461, ADT7461A, NCT1008:
   * Extended temperature range (breaks compatibility)
   * Lower resolution for remote temperature
 
@@ -195,9 +205,9 @@ are exported, one for each channel, but these values are of course linked.
 Only the local hysteresis can be set from user-space, and the same delta
 applies to the remote hysteresis.
 
-The lm90 driver will not update its values more frequently than every
-other second; reading them more often will do no harm, but will return
-'old' values.
+The lm90 driver will not update its values more frequently than configured with
+the update_interval attribute; reading them more often will do no harm, but will
+return 'old' values.
 
 SMBus Alert Support
 -------------------
@@ -205,11 +215,12 @@ SMBus Alert Support
 This driver has basic support for SMBus alert. When an alert is received,
 the status register is read and the faulty temperature channel is logged.
 
-The Analog Devices chips (ADM1032 and ADT7461) do not implement the SMBus
-alert protocol properly so additional care is needed: the ALERT output is
-disabled when an alert is received, and is re-enabled only when the alarm
-is gone. Otherwise the chip would block alerts from other chips in the bus
-as long as the alarm is active.
+The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
+Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
+properly so additional care is needed: the ALERT output is disabled when
+an alert is received, and is re-enabled only when the alarm is gone.
+Otherwise the chip would block alerts from other chips in the bus as long
+as the alarm is active.
 
 PEC Support
 -----------
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064
new file mode 100644 (file)
index 0000000..4172899
--- /dev/null
@@ -0,0 +1,62 @@
+Kernel driver max16064
+======================
+
+Supported chips:
+  * Maxim MAX16064
+    Prefix: 'max16064'
+    Addresses scanned: -
+    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf
+
+Author: Guenter Roeck <guenter.roeck@ericsson.com>
+
+
+Description
+-----------
+
+This driver supports hardware montoring for Maxim MAX16064 Quad Power-Supply
+Controller with Active-Voltage Output Control and PMBus Interface.
+
+The driver is a client driver to the core PMBus driver.
+Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+
+
+Usage Notes
+-----------
+
+This driver does not auto-detect devices. You will have to instantiate the
+devices explicitly. Please see Documentation/i2c/instantiating-devices for
+details.
+
+
+Platform data support
+---------------------
+
+The driver supports standard PMBus driver platform data.
+
+
+Sysfs entries
+-------------
+
+The following attributes are supported. Limits are read-write; all other
+attributes are read-only.
+
+in[1-4]_label          "vout[1-4]"
+in[1-4]_input          Measured voltage. From READ_VOUT register.
+in[1-4]_min            Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
+in[1-4]_max            Maximum voltage. From VOUT_OV_WARN_LIMIT register.
+in[1-4]_lcrit          Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
+in[1-4]_crit           Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
+in[1-4]_min_alarm      Voltage low alarm. From VOLTAGE_UV_WARNING status.
+in[1-4]_max_alarm      Voltage high alarm. From VOLTAGE_OV_WARNING status.
+in[1-4]_lcrit_alarm    Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
+in[1-4]_crit_alarm     Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
+
+temp1_input            Measured temperature. From READ_TEMPERATURE_1 register.
+temp1_max              Maximum temperature. From OT_WARN_LIMIT register.
+temp1_crit             Critical high temperature. From OT_FAULT_LIMIT register.
+temp1_max_alarm                Chip temperature high alarm. Set by comparing
+                       READ_TEMPERATURE_1 with OT_WARN_LIMIT if TEMP_OT_WARNING
+                       status is set.
+temp1_crit_alarm       Chip temperature critical high alarm. Set by comparing
+                       READ_TEMPERATURE_1 with OT_FAULT_LIMIT if TEMP_OT_FAULT
+                       status is set.
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440
new file mode 100644 (file)
index 0000000..6c525dd
--- /dev/null
@@ -0,0 +1,79 @@
+Kernel driver max34440
+======================
+
+Supported chips:
+  * Maxim MAX34440
+    Prefixes: 'max34440'
+    Addresses scanned: -
+    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34440.pdf
+  * Maxim MAX34441
+    PMBus 5-Channel Power-Supply Manager and Intelligent Fan Controller
+    Prefixes: 'max34441'
+    Addresses scanned: -
+    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf
+
+Author: Guenter Roeck <guenter.roeck@ericsson.com>
+
+
+Description
+-----------
+
+This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel
+Power-Supply Manager and MAX34441 PMBus 5-Channel Power-Supply Manager
+and Intelligent Fan Controller.
+
+The driver is a client driver to the core PMBus driver. Please see
+Documentation/hwmon/pmbus for details on PMBus client drivers.
+
+
+Usage Notes
+-----------
+
+This driver does not auto-detect devices. You will have to instantiate the
+devices explicitly. Please see Documentation/i2c/instantiating-devices for
+details.
+
+
+Platform data support
+---------------------
+
+The driver supports standard PMBus driver platform data.
+
+
+Sysfs entries
+-------------
+
+The following attributes are supported. Limits are read-write; all other
+attributes are read-only.
+
+in[1-6]_label          "vout[1-6]".
+in[1-6]_input          Measured voltage. From READ_VOUT register.
+in[1-6]_min            Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
+in[1-6]_max            Maximum voltage. From VOUT_OV_WARN_LIMIT register.
+in[1-6]_lcrit          Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
+in[1-6]_crit           Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
+in[1-6]_min_alarm      Voltage low alarm. From VOLTAGE_UV_WARNING status.
+in[1-6]_max_alarm      Voltage high alarm. From VOLTAGE_OV_WARNING status.
+in[1-6]_lcrit_alarm    Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
+in[1-6]_crit_alarm     Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
+
+curr[1-6]_label                "iout[1-6]".
+curr[1-6]_input                Measured current. From READ_IOUT register.
+curr[1-6]_max          Maximum current. From IOUT_OC_WARN_LIMIT register.
+curr[1-6]_crit         Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
+curr[1-6]_max_alarm    Current high alarm. From IOUT_OC_WARNING status.
+curr[1-6]_crit_alarm   Current critical high alarm. From IOUT_OC_FAULT status.
+
+                       in6 and curr6 attributes only exist for MAX34440.
+
+temp[1-8]_input                Measured temperatures. From READ_TEMPERATURE_1 register.
+                       temp1 is the chip's internal temperature. temp2..temp5
+                       are remote I2C temperature sensors. For MAX34441, temp6
+                       is a remote thermal-diode sensor. For MAX34440, temp6..8
+                       are remote I2C temperature sensors.
+temp[1-8]_max          Maximum temperature. From OT_WARN_LIMIT register.
+temp[1-8]_crit         Critical high temperature. From OT_FAULT_LIMIT register.
+temp[1-8]_max_alarm    Temperature high alarm.
+temp[1-8]_crit_alarm   Temperature critical high alarm.
+
+                       temp7 and temp8 attributes only exist for MAX34440.
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688
new file mode 100644 (file)
index 0000000..0ddd3a4
--- /dev/null
@@ -0,0 +1,69 @@
+Kernel driver max8688
+=====================
+
+Supported chips:
+  * Maxim MAX8688
+    Prefix: 'max8688'
+    Addresses scanned: -
+    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf
+
+Author: Guenter Roeck <guenter.roeck@ericsson.com>
+
+
+Description
+-----------
+
+This driver supports hardware montoring for Maxim MAX8688 Digital Power-Supply
+Controller/Monitor with PMBus Interface.
+
+The driver is a client driver to the core PMBus driver. Please see
+Documentation/hwmon/pmbus for details on PMBus client drivers.
+
+
+Usage Notes
+-----------
+
+This driver does not auto-detect devices. You will have to instantiate the
+devices explicitly. Please see Documentation/i2c/instantiating-devices for
+details.
+
+
+Platform data support
+---------------------
+
+The driver supports standard PMBus driver platform data.
+
+
+Sysfs entries
+-------------
+
+The following attributes are supported. Limits are read-write; all other
+attributes are read-only.
+
+in1_label              "vout1"
+in1_input              Measured voltage. From READ_VOUT register.
+in1_min                        Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
+in1_max                        Maximum voltage. From VOUT_OV_WARN_LIMIT register.
+in1_lcrit              Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
+in1_crit               Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
+in1_min_alarm          Voltage low alarm. From VOLTAGE_UV_WARNING status.
+in1_max_alarm          Voltage high alarm. From VOLTAGE_OV_WARNING status.
+in1_lcrit_alarm                Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
+in1_crit_alarm         Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
+
+curr1_label            "iout1"
+curr1_input            Measured current. From READ_IOUT register.
+curr1_max              Maximum current. From IOUT_OC_WARN_LIMIT register.
+curr1_crit             Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
+curr1_max_alarm                Current high alarm. From IOUT_OC_WARN_LIMIT register.
+curr1_crit_alarm       Current critical high alarm. From IOUT_OC_FAULT status.
+
+temp1_input            Measured temperature. From READ_TEMPERATURE_1 register.
+temp1_max              Maximum temperature. From OT_WARN_LIMIT register.
+temp1_crit             Critical high temperature. From OT_FAULT_LIMIT register.
+temp1_max_alarm                Chip temperature high alarm. Set by comparing
+                       READ_TEMPERATURE_1 with OT_WARN_LIMIT if TEMP_OT_WARNING
+                       status is set.
+temp1_crit_alarm       Chip temperature critical high alarm. Set by comparing
+                       READ_TEMPERATURE_1 with OT_FAULT_LIMIT if TEMP_OT_FAULT
+                       status is set.
index f2d42e8bdf48b93a5b6dba12261dafdaf2179e33..5e462fc7f99b5f2e0f42c4edb92ebc1ac6c7571f 100644 (file)
@@ -13,26 +13,6 @@ Supported chips:
     Prefix: 'ltc2978'
     Addresses scanned: -
     Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
-  * Maxim MAX16064
-    Quad Power-Supply Controller
-    Prefix: 'max16064'
-    Addresses scanned: -
-    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf
-  * Maxim MAX34440
-    PMBus 6-Channel Power-Supply Manager
-    Prefixes: 'max34440'
-    Addresses scanned: -
-    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34440.pdf
-  * Maxim MAX34441
-    PMBus 5-Channel Power-Supply Manager and Intelligent Fan Controller
-    Prefixes: 'max34441'
-    Addresses scanned: -
-    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf
-  * Maxim MAX8688
-    Digital Power-Supply Controller/Monitor
-    Prefix: 'max8688'
-    Addresses scanned: -
-    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf
   * Generic PMBus devices
     Prefix: 'pmbus'
     Addresses scanned: -
@@ -150,11 +130,11 @@ The following attributes are supported. Limits are read-write; all other
 attributes are read-only.
 
 inX_input              Measured voltage. From READ_VIN or READ_VOUT register.
-inX_min                        Minumum Voltage.
+inX_min                        Minimum Voltage.
                        From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register.
 inX_max                        Maximum voltage.
                        From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register.
-inX_lcrit              Critical minumum Voltage.
+inX_lcrit              Critical minimum Voltage.
                        From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register.
 inX_crit               Critical maximum voltage.
                        From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register.
@@ -169,17 +149,19 @@ inX_label         "vin", "vcap", or "voutY"
 currX_input            Measured current. From READ_IIN or READ_IOUT register.
 currX_max              Maximum current.
                        From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register.
-currX_lcrit            Critical minumum output current.
+currX_lcrit            Critical minimum output current.
                        From IOUT_UC_FAULT_LIMIT register.
 currX_crit             Critical maximum current.
                        From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register.
 currX_alarm            Current high alarm.
                        From IIN_OC_WARNING or IOUT_OC_WARNING status.
+currX_max_alarm                Current high alarm.
+                       From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT status.
 currX_lcrit_alarm      Output current critical low alarm.
                        From IOUT_UC_FAULT status.
 currX_crit_alarm       Current critical high alarm.
                        From IIN_OC_FAULT or IOUT_OC_FAULT status.
-currX_label            "iin" or "vinY"
+currX_label            "iin" or "ioutY"
 
 powerX_input           Measured power. From READ_PIN or READ_POUT register.
 powerX_cap             Output power cap. From POUT_MAX register.
@@ -193,13 +175,13 @@ powerX_crit_alarm Output power critical high alarm.
                        From POUT_OP_FAULT status.
 powerX_label           "pin" or "poutY"
 
-tempX_input            Measured tempererature.
+tempX_input            Measured temperature.
                        From READ_TEMPERATURE_X register.
-tempX_min              Mimimum tempererature. From UT_WARN_LIMIT register.
-tempX_max              Maximum tempererature. From OT_WARN_LIMIT register.
-tempX_lcrit            Critical low tempererature.
+tempX_min              Mimimum temperature. From UT_WARN_LIMIT register.
+tempX_max              Maximum temperature. From OT_WARN_LIMIT register.
+tempX_lcrit            Critical low temperature.
                        From UT_FAULT_LIMIT register.
-tempX_crit             Critical high tempererature.
+tempX_crit             Critical high temperature.
                        From OT_FAULT_LIMIT register.
 tempX_min_alarm                Chip temperature low alarm. Set by comparing
                        READ_TEMPERATURE_X with UT_WARN_LIMIT if
index 3820fc9ca52d25ae4c3ed9a7e6d7f04fcb092bee..59e316140542017517be09171448fc4e6e16d28e 100644 (file)
@@ -150,8 +150,8 @@ in8_crit_alarm              Channel F critical alarm
 in9_crit_alarm         AIN1 critical alarm
 in10_crit_alarm                AIN2 critical alarm
 
-temp1_input            Chip tempererature
-temp1_min              Mimimum chip tempererature
-temp1_max              Maximum chip tempererature
-temp1_crit             Critical chip tempererature
+temp1_input            Chip temperature
+temp1_min              Mimimum chip temperature
+temp1_max              Maximum chip temperature
+temp1_crit             Critical chip temperature
 temp1_crit_alarm       Temperature critical alarm
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches
new file mode 100644 (file)
index 0000000..86f42e8
--- /dev/null
@@ -0,0 +1,109 @@
+       How to Get Your Patch Accepted Into the Hwmon Subsystem
+       -------------------------------------------------------
+
+This text is is a collection of suggestions for people writing patches or
+drivers for the hwmon subsystem. Following these suggestions will greatly
+increase the chances of your change being accepted.
+
+
+1. General
+----------
+
+* It should be unnecessary to mention, but please read and follow
+    Documentation/SubmitChecklist
+    Documentation/SubmittingDrivers
+    Documentation/SubmittingPatches
+    Documentation/CodingStyle
+
+* If your patch generates checkpatch warnings, please refrain from explanations
+  such as "I don't like that coding style". Keep in mind that each unnecessary
+  warning helps hiding a real problem. If you don't like the kernel coding
+  style, don't write kernel drivers.
+
+* Please test your patch thoroughly. We are not your test group.
+  Sometimes a patch can not or not completely be tested because of missing
+  hardware. In such cases, you should test-build the code on at least one
+  architecture. If run-time testing was not achieved, it should be written
+  explicitly below the patch header.
+
+* If your patch (or the driver) is affected by configuration options such as
+  CONFIG_SMP or CONFIG_HOTPLUG, make sure it compiles for all configuration
+  variants.
+
+
+2. Adding functionality to existing drivers
+-------------------------------------------
+
+* Make sure the documentation in Documentation/hwmon/<driver_name> is up to
+  date.
+
+* Make sure the information in Kconfig is up to date.
+
+* If the added functionality requires some cleanup or structural changes, split
+  your patch into a cleanup part and the actual addition. This makes it easier
+  to review your changes, and to bisect any resulting problems.
+
+* Never mix bug fixes, cleanup, and functional enhancements in a single patch.
+
+
+3. New drivers
+--------------
+
+* Running your patch or driver file(s) through checkpatch does not mean its
+  formatting is clean. If unsure about formatting in your new driver, run it
+  through Lindent. Lindent is not perfect, and you may have to do some minor
+  cleanup, but it is a good start.
+
+* Consider adding yourself to MAINTAINERS.
+
+* Document the driver in Documentation/hwmon/<driver_name>.
+
+* Add the driver to Kconfig and Makefile in alphabetical order.
+
+* Make sure that all dependencies are listed in Kconfig. For new drivers, it
+  is most likely prudent to add a dependency on EXPERIMENTAL.
+
+* Avoid forward declarations if you can. Rearrange the code if necessary.
+
+* Avoid calculations in macros and macro-generated functions. While such macros
+  may save a line or so in the source, it obfuscates the code and makes code
+  review more difficult. It may also result in code which is more complicated
+  than necessary. Use inline functions or just regular functions instead.
+
+* If the driver has a detect function, make sure it is silent. Debug messages
+  and messages printed after a successful detection are acceptable, but it
+  must not print messages such as "Chip XXX not found/supported".
+
+  Keep in mind that the detect function will run for all drivers supporting an
+  address if a chip is detected on that address. Unnecessary messages will just
+  pollute the kernel log and not provide any value.
+
+* Provide a detect function if and only if a chip can be detected reliably.
+
+* Avoid writing to chip registers in the detect function. If you have to write,
+  only do it after you have already gathered enough data to be certain that the
+  detection is going to be successful.
+
+  Keep in mind that the chip might not be what your driver believes it is, and
+  writing to it might cause a bad misconfiguration.
+
+* Make sure there are no race conditions in the probe function. Specifically,
+  completely initialize your chip first, then create sysfs entries and register
+  with the hwmon subsystem.
+
+* Do not provide support for deprecated sysfs attributes.
+
+* Do not create non-standard attributes unless really needed. If you have to use
+  non-standard attributes, or you believe you do, discuss it on the mailing list
+  first. Either case, provide a detailed explanation why you need the
+  non-standard attribute(s).
+  Standard attributes are specified in Documentation/hwmon/sysfs-interface.
+
+* When deciding which sysfs attributes to support, look at the chip's
+  capabilities. While we do not expect your driver to support everything the
+  chip may offer, it should at least support all limits and alarms.
+
+* Last but not least, please check if a driver for your chip already exists
+  before starting to write a new driver. Especially for temperature sensors,
+  new chips are often variants of previously released chips. In some cases,
+  a presumably new chip may simply have been relabeled.
index 83a698773ade1cffd9cf4c343a20d56adf7ee5f3..8f63c244f1aab95b610c711abdaddc5e4335e7ee 100644 (file)
@@ -579,7 +579,7 @@ channel should not be trusted.
 fan[1-*]_fault
 temp[1-*]_fault
                Input fault condition
-               0: no fault occured
+               0: no fault occurred
                1: fault condition
                RO
 
index ecbc1e4574b4197623aa66b68599bd100407a87c..129b0a3b555bab03cee678004e1469871680bfb8 100644 (file)
@@ -403,7 +403,7 @@ found out the following values do work as a form of coarse pwm:
 
 0x80 - seems to turn fans off after some time(1-2 minutes)... might be
 some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an
-old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attemp at Qfan
+old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attempt at Qfan
 that was dropped at the BIOS)
 0x81 - off
 0x82 - slightly "on-ner" than off, but my fans do not get to move. I can
index 5663e491655c7845b11a0305df76d9d3374aaf5d..90387c3540f70e4cb99e2401b2f608672f51ffc3 100644 (file)
@@ -93,7 +93,7 @@ The sysfs interface to the beep bitmask has migrated from the original legacy
 method of a single sysfs beep_mask file to a newer method using multiple
 *_beep files as described in .../Documentation/hwmon/sysfs-interface.
 
-A similar change has occured for the bitmap corresponding to the alarms. The
+A similar change has occurred for the bitmap corresponding to the alarms. The
 original legacy method used a single sysfs alarms file containing a bitmap
 of triggered alarms. The newer method uses multiple sysfs *_alarm files
 (again following the pattern described in sysfs-interface).
index bdc9cbb2e0f2df74086c092d52036c59e7267dbe..c22ee063e1e52e6f5d03d6cf191bf564a7492857 100644 (file)
@@ -4,7 +4,7 @@ Author: Jean Delvare <khali@linux-fr.org>
 
 This driver is a light version of i2c-parport. It doesn't depend        
 on the parport driver, and uses direct I/O access instead. This might be
-prefered on embedded systems where wasting memory for the clean but heavy
+preferred on embedded systems where wasting memory for the clean but heavy
 parport handling is not an option. The drawback is a reduced portability
 and the impossibility to daisy-chain other parallel port devices.                 
   
index 70e6a0cc1e15e822b5d20f831d57a60eb078668e..0b979f3252a48dfc65c1557248122acd5753b395 100644 (file)
@@ -35,7 +35,7 @@ or perhaps this...
 
 (kernel versions later than 2.4.18 may fill in the "Unknown"s)
 
-If you cant see it please look on quirk_sis_96x_smbus
+If you can't see it please look on quirk_sis_96x_smbus
 (drivers/pci/quirks.c) (also if southbridge detection fails)
 
 I suspect that this driver could be made to work for the following SiS
index 9146e33be6dd9c7bb92f25c6e3a1fae8a28c9637..63f62bcbf59200524b628d7b04859e1c09f9069f 100644 (file)
@@ -13,7 +13,7 @@ Currently supported devices are:
 
 * TAOS TSL2550 EVM
 
-For addtional information on TAOS products, please see
+For additional information on TAOS products, please see
   http://www.taosinc.com/
 
 
index 0ebf58c73f54e9acd6bd611033c9639f160e6880..ee91e2626ff072e817a0f91e05d01e439c943f0a 100644 (file)
@@ -53,7 +53,7 @@ Symbios Logic (Now LSI)
 BoxHill Corporation
        Loan of initial FibreChannel disk array used for development work.
 
-European Comission
+European Commission
        Funding the work done by the University of Helsinki
 
 SysKonnect
index 3dfb76ca6931dd302e7fe53c57339dd9742511df..5caa2af33207917369c1cae917c07384ddc2837c 100644 (file)
@@ -177,7 +177,7 @@ static int scan_rom(char *path, char *file)
 
                        /*
                         * It's OK if the ROM is unreadable.  Maybe there
-                        * is no ROM, or some other error ocurred.  The
+                        * is no ROM, or some other error occurred.  The
                         * important thing is that no MCA happened.
                         */
                        if (rc > 0)
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt
new file mode 100644 (file)
index 0000000..23fcb05
--- /dev/null
@@ -0,0 +1,262 @@
+The input protocol uses a map of types and codes to express input device values
+to userspace. This document describes the types and codes and how and when they
+may be used.
+
+A single hardware event generates multiple input events. Each input event
+contains the new value of a single data item. A special event type, EV_SYN, is
+used to separate input events into packets of input data changes occurring at
+the same moment in time. In the following, the term "event" refers to a single
+input event encompassing a type, code, and value.
+
+The input protocol is a stateful protocol. Events are emitted only when values
+of event codes have changed. However, the state is maintained within the Linux
+input subsystem; drivers do not need to maintain the state and may attempt to
+emit unchanged values without harm. Userspace may obtain the current state of
+event code values using the EVIOCG* ioctls defined in linux/input.h. The event
+reports supported by a device are also provided by sysfs in
+class/input/event*/device/capabilities/, and the properties of a device are
+provided in class/input/event*/device/properties.
+
+Types:
+==========
+Types are groupings of codes under a logical input construct. Each type has a
+set of applicable codes to be used in generating events. See the Codes section
+for details on valid codes for each type.
+
+* EV_SYN:
+  - Used as markers to separate events. Events may be separated in time or in
+    space, such as with the multitouch protocol.
+
+* EV_KEY:
+  - Used to describe state changes of keyboards, buttons, or other key-like
+    devices.
+
+* EV_REL:
+  - Used to describe relative axis value changes, e.g. moving the mouse 5 units
+    to the left.
+
+* EV_ABS:
+  - Used to describe absolute axis value changes, e.g. describing the
+    coordinates of a touch on a touchscreen.
+
+* EV_MSC:
+  - Used to describe miscellaneous input data that do not fit into other types.
+
+* EV_SW:
+  - Used to describe binary state input switches.
+
+* EV_LED:
+  - Used to turn LEDs on devices on and off.
+
+* EV_SND:
+  - Used to output sound to devices.
+
+* EV_REP:
+  - Used for autorepeating devices.
+
+* EV_FF:
+  - Used to send force feedback commands to an input device.
+
+* EV_PWR:
+  - A special type for power button and switch input.
+
+* EV_FF_STATUS:
+  - Used to receive force feedback device status.
+
+Codes:
+==========
+Codes define the precise type of event.
+
+EV_SYN:
+----------
+EV_SYN event values are undefined. Their usage is defined only by when they are
+sent in the evdev event stream.
+
+* SYN_REPORT:
+  - Used to synchronize and separate events into packets of input data changes
+    occurring at the same moment in time. For example, motion of a mouse may set
+    the REL_X and REL_Y values for one motion, then emit a SYN_REPORT. The next
+    motion will emit more REL_X and REL_Y values and send another SYN_REPORT.
+
+* SYN_CONFIG:
+  - TBD
+
+* SYN_MT_REPORT:
+  - Used to synchronize and separate touch events. See the
+    multi-touch-protocol.txt document for more information.
+
+* SYN_DROPPED:
+  - Used to indicate buffer overrun in the evdev client's event queue.
+    Client should ignore all events up to and including next SYN_REPORT
+    event and query the device (using EVIOCG* ioctls) to obtain its
+    current state.
+
+EV_KEY:
+----------
+EV_KEY events take the form KEY_<name> or BTN_<name>. For example, KEY_A is used
+to represent the 'A' key on a keyboard. When a key is depressed, an event with
+the key's code is emitted with value 1. When the key is released, an event is
+emitted with value 0. Some hardware send events when a key is repeated. These
+events have a value of 2. In general, KEY_<name> is used for keyboard keys, and
+BTN_<name> is used for other types of momentary switch events.
+
+A few EV_KEY codes have special meanings:
+
+* BTN_TOOL_<name>:
+  - These codes are used in conjunction with input trackpads, tablets, and
+    touchscreens. These devices may be used with fingers, pens, or other tools.
+    When an event occurs and a tool is used, the corresponding BTN_TOOL_<name>
+    code should be set to a value of 1. When the tool is no longer interacting
+    with the input device, the BTN_TOOL_<name> code should be reset to 0. All
+    trackpads, tablets, and touchscreens should use at least one BTN_TOOL_<name>
+    code when events are generated.
+
+* BTN_TOUCH:
+    BTN_TOUCH is used for touch contact. While an input tool is determined to be
+    within meaningful physical contact, the value of this property must be set
+    to 1. Meaningful physical contact may mean any contact, or it may mean
+    contact conditioned by an implementation defined property. For example, a
+    touchpad may set the value to 1 only when the touch pressure rises above a
+    certain value. BTN_TOUCH may be combined with BTN_TOOL_<name> codes. For
+    example, a pen tablet may set BTN_TOOL_PEN to 1 and BTN_TOUCH to 0 while the
+    pen is hovering over but not touching the tablet surface.
+
+Note: For appropriate function of the legacy mousedev emulation driver,
+BTN_TOUCH must be the first evdev code emitted in a synchronization frame.
+
+Note: Historically a touch device with BTN_TOOL_FINGER and BTN_TOUCH was
+interpreted as a touchpad by userspace, while a similar device without
+BTN_TOOL_FINGER was interpreted as a touchscreen. For backwards compatibility
+with current userspace it is recommended to follow this distinction. In the
+future, this distinction will be deprecated and the device properties ioctl
+EVIOCGPROP, defined in linux/input.h, will be used to convey the device type.
+
+* BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP, BTN_TOOL_TRIPLETAP, BTN_TOOL_QUADTAP:
+  - These codes denote one, two, three, and four finger interaction on a
+    trackpad or touchscreen. For example, if the user uses two fingers and moves
+    them on the touchpad in an effort to scroll content on screen,
+    BTN_TOOL_DOUBLETAP should be set to value 1 for the duration of the motion.
+    Note that all BTN_TOOL_<name> codes and the BTN_TOUCH code are orthogonal in
+    purpose. A trackpad event generated by finger touches should generate events
+    for one code from each group. At most only one of these BTN_TOOL_<name>
+    codes should have a value of 1 during any synchronization frame.
+
+Note: Historically some drivers emitted multiple of the finger count codes with
+a value of 1 in the same synchronization frame. This usage is deprecated.
+
+Note: In multitouch drivers, the input_mt_report_finger_count() function should
+be used to emit these codes. Please see multi-touch-protocol.txt for details.
+
+EV_REL:
+----------
+EV_REL events describe relative changes in a property. For example, a mouse may
+move to the left by a certain number of units, but its absolute position in
+space is unknown. If the absolute position is known, EV_ABS codes should be used
+instead of EV_REL codes.
+
+A few EV_REL codes have special meanings:
+
+* REL_WHEEL, REL_HWHEEL:
+  - These codes are used for vertical and horizontal scroll wheels,
+    respectively.
+
+EV_ABS:
+----------
+EV_ABS events describe absolute changes in a property. For example, a touchpad
+may emit coordinates for a touch location.
+
+A few EV_ABS codes have special meanings:
+
+* ABS_DISTANCE:
+  - Used to describe the distance of a tool from an interaction surface. This
+    event should only be emitted while the tool is hovering, meaning in close
+    proximity of the device and while the value of the BTN_TOUCH code is 0. If
+    the input device may be used freely in three dimensions, consider ABS_Z
+    instead.
+
+* ABS_MT_<name>:
+  - Used to describe multitouch input events. Please see
+    multi-touch-protocol.txt for details.
+
+EV_SW:
+----------
+EV_SW events describe stateful binary switches. For example, the SW_LID code is
+used to denote when a laptop lid is closed.
+
+Upon binding to a device or resuming from suspend, a driver must report
+the current switch state. This ensures that the device, kernel, and userspace
+state is in sync.
+
+Upon resume, if the switch state is the same as before suspend, then the input
+subsystem will filter out the duplicate switch state reports. The driver does
+not need to keep the state of the switch at any time.
+
+EV_MSC:
+----------
+EV_MSC events are used for input and output events that do not fall under other
+categories.
+
+EV_LED:
+----------
+EV_LED events are used for input and output to set and query the state of
+various LEDs on devices.
+
+EV_REP:
+----------
+EV_REP events are used for specifying autorepeating events.
+
+EV_SND:
+----------
+EV_SND events are used for sending sound commands to simple sound output
+devices.
+
+EV_FF:
+----------
+EV_FF events are used to initialize a force feedback capable device and to cause
+such device to feedback.
+
+EV_PWR:
+----------
+EV_PWR events are a special type of event used specifically for power
+mangement. Its usage is not well defined. To be addressed later.
+
+Guidelines:
+==========
+The guidelines below ensure proper single-touch and multi-finger functionality.
+For multi-touch functionality, see the multi-touch-protocol.txt document for
+more information.
+
+Mice:
+----------
+REL_{X,Y} must be reported when the mouse moves. BTN_LEFT must be used to report
+the primary button press. BTN_{MIDDLE,RIGHT,4,5,etc.} should be used to report
+further buttons of the device. REL_WHEEL and REL_HWHEEL should be used to report
+scroll wheel events where available.
+
+Touchscreens:
+----------
+ABS_{X,Y} must be reported with the location of the touch. BTN_TOUCH must be
+used to report when a touch is active on the screen.
+BTN_{MOUSE,LEFT,MIDDLE,RIGHT} must not be reported as the result of touch
+contact. BTN_TOOL_<name> events should be reported where possible.
+
+Trackpads:
+----------
+Legacy trackpads that only provide relative position information must report
+events like mice described above.
+
+Trackpads that provide absolute touch position must report ABS_{X,Y} for the
+location of the touch. BTN_TOUCH should be used to report when a touch is active
+on the trackpad. Where multi-finger support is available, BTN_TOOL_<name> should
+be used to report the number of touches active on the trackpad.
+
+Tablets:
+----------
+BTN_TOOL_<name> events must be reported when a stylus or other tool is active on
+the tablet. ABS_{X,Y} must be reported with the location of the tool. BTN_TOUCH
+should be used to report when the tool is in contact with the tablet.
+BTN_{STYLUS,STYLUS2} should be used to report buttons on the tool itself. Any
+button may be used for buttons on the tablet except BTN_{MOUSE,LEFT}.
+BTN_{0,1,2,etc} are good generic codes for unlabeled buttons. Do not use
+meaningful buttons, like BTN_FORWARD, unless the button is labeled for that
+purpose on the device.
index 1c856f32ff2c3bc880746533c149ec6cc146806f..56870c70a7965a1efbe2c628e8acd27d3664cc52 100644 (file)
@@ -272,7 +272,7 @@ if you want to use gamecon.c.
 
   Also, the connection is a bit more complex. You'll need a bunch of diodes,
 and one pullup resistor. First, you connect the Directions and the button
-the same as for db9, however with the diodes inbetween.
+the same as for db9, however with the diodes between.
 
            Diodes
 (pin 2) -----|<|----> Up
index 8b4129de1d2d3d26176a322c74df0ec11aaccfd6..943e8f6f2b15fdcc491441d20e30854fd56f1803 100644 (file)
@@ -46,7 +46,7 @@ c) Falling edge on channel A, channel B in high state
 
 d) Falling edge on channel B, channel A in low state
        Parking position. If the encoder enters this state, a full transition
-       should have happend, unless it flipped back on half the way. The
+       should have happened, unless it flipped back on half the way. The
        'armed' state tells us about that.
 
 2. Platform requirements
index 8f4289efc5c44965138d8184674f86421e07712a..561385d38482100d9c0a917b8647598aefd9f810 100644 (file)
@@ -77,7 +77,7 @@ pulse length:
 
 24 bin+oct values + 1 bin value = 24*4+1 bits  = 97 bits
 
-(Warning, pulses on ACK ar inverted by transistor, irq is rised up on sync
+(Warning, pulses on ACK are inverted by transistor, irq is raised up on sync
 to bin change or octal value to bin change).
 
 Binary data representations:
index 6a444877ee0b7404ca3514fc2d4d8da8ea374614..67aa71e73035dd6029bfd8d75d5466fca297e53f 100644 (file)
@@ -53,5 +53,5 @@ implementation in an architecture: lockdep will detect that and will
 turn itself off. I.e. the lock validator will still be reliable. There
 should be no crashes due to irq-tracing bugs. (except if the assembly
 changes break other code by modifying conditions or registers that
-shouldnt be)
+shouldn't be)
 
index 309eb5ed942b138a13f0123de28d02efd2d0de47..1688b5a1fd77ac1de87ae4822713d02a9164b0bf 100644 (file)
@@ -240,7 +240,7 @@ Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert
 messages between their transport encoding described in the CAPI 2.0 standard
 and their _cmsg structure representation. Note that capi_cmsg2message() does
 not know or check the size of its destination buffer. The caller must make
-sure it is big enough to accomodate the resulting CAPI message.
+sure it is big enough to accommodate the resulting CAPI message.
 
 
 5. Lower Layer Interface Functions
index f1431d099fce31371aa74f63efed4f7ce5f9b64b..7c2a89ba674c3b6cd230f95d4327710acc652c72 100644 (file)
@@ -26,11 +26,11 @@ Additional options to the assembler (for built-in and modules).
 
 AFLAGS_MODULE
 --------------------------------------------------
-Addtional module specific options to use for $(AS).
+Additional module specific options to use for $(AS).
 
 AFLAGS_KERNEL
 --------------------------------------------------
-Addtional options for $(AS) when used for assembler
+Additional options for $(AS) when used for assembler
 code for code that is compiled as built-in.
 
 KCFLAGS
@@ -39,12 +39,12 @@ Additional options to the C compiler (for built-in and modules).
 
 CFLAGS_KERNEL
 --------------------------------------------------
-Addtional options for $(CC) when used to compile
+Additional options for $(CC) when used to compile
 code that is compiled as built-in.
 
 CFLAGS_MODULE
 --------------------------------------------------
-Addtional module specific options to use for $(CC).
+Additional module specific options to use for $(CC).
 
 LDFLAGS_MODULE
 --------------------------------------------------
index c357a31411cdb98978153eb5de0ecb2db025648f..cc85a927819070bef71e5802204b0f07cfb76973 100644 (file)
@@ -699,7 +699,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
        ekgdboc=        [X86,KGDB] Allow early kernel console debugging
                        ekgdboc=kbd
 
-                       This is desgined to be used in conjunction with
+                       This is designed to be used in conjunction with
                        the boot argument: earlyprintk=vga
 
        edd=            [EDD]
@@ -1832,15 +1832,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                                perfmon on Intel CPUs instead of the
                                CPU specific event set.
 
-       oops=panic      Always panic on oopses. Default is to just kill the process,
-                       but there is a small probability of deadlocking the machine.
+       oops=panic      Always panic on oopses. Default is to just kill the
+                       process, but there is a small probability of
+                       deadlocking the machine.
                        This will also cause panics on machine check exceptions.
                        Useful together with panic=30 to trigger a reboot.
 
        OSS             [HW,OSS]
                        See Documentation/sound/oss/oss-parameters.txt
 
-       panic=          [KNL] Kernel behaviour on panic
+       panic=          [KNL] Kernel behaviour on panic: delay <timeout>
+                       seconds before rebooting
                        Format: <timeout>
 
        parkbd.port=    [HW] Parallel port number the keyboard adapter is
@@ -2343,6 +2345,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
        softlockup_panic=
                        [KNL] Should the soft-lockup detector generate panics.
+                       Format: <integer>
 
        sonypi.*=       [HW] Sony Programmable I/O Control Device driver
                        See Documentation/sonypi.txt
@@ -2475,8 +2478,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
        topology=       [S390]
                        Format: {off | on}
                        Specify if the kernel should make use of the cpu
-                       topology informations if the hardware supports these.
-                       The scheduler will make use of these informations and
+                       topology information if the hardware supports this.
+                       The scheduler will make use of this information and
                        e.g. base its process migration decisions on it.
                        Default is on.
 
@@ -2529,8 +2532,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                        reported either.
 
        unknown_nmi_panic
-                       [X86]
-                       Set unknown_nmi_panic=1 early on boot.
+                       [X86] Cause panic on unknown NMI.
 
        usbcore.autosuspend=
                        [USB] The autosuspend time delay (in seconds) used
index 34f6638aa5aceec30d290812fdc7fcebf3b86621..090e6ee04536285398a81257e1f9a1f9d34e398d 100644 (file)
@@ -11,6 +11,7 @@ with the difference that the orphan objects are not freed but only
 reported via /sys/kernel/debug/kmemleak. A similar method is used by the
 Valgrind tool (memcheck --leak-check) to detect the memory leaks in
 user-space applications.
+Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile.
 
 Usage
 -----
@@ -178,5 +179,4 @@ block doesn't need to be freed (some cases in the init_call functions),
 the pointer is calculated by other methods than the usual container_of
 macro or the pointer is stored in a location not scanned by kmemleak.
 
-Page allocations and ioremap are not tracked. Only the ARM and x86
-architectures are currently supported.
+Page allocations and ioremap are not tracked.
index 142cc5136650be89a8cbfe545bb50804b41ecf71..f46aa58389cab01b9a7281eb5bc313a630a9c99f 100644 (file)
@@ -23,7 +23,7 @@ The mmu code attempts to satisfy the following requirements:
                and framebuffer-based displays
 - footprint:   keep the amount of pinned kernel memory low (most memory
                should be shrinkable)
-- reliablity:  avoid multipage or GFP_ATOMIC allocations
+- reliability:  avoid multipage or GFP_ATOMIC allocations
 
 Acronyms
 ========
index a7f2244b3be90238425ff73beea75dc8656edad0..3ab969c5904646f342f67da59666ad390c5c5787 100644 (file)
@@ -136,7 +136,7 @@ Patched instructions
 ====================
 
 The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions
-respectively on 32 bit systems with an added offset of 4 to accomodate for big
+respectively on 32 bit systems with an added offset of 4 to accommodate for big
 endianness.
 
 The following is a list of mapping the Linux kernel performs when running as
index 0c5033a58c9e5fa9ce53d407d1bc32ae69df561d..df8946377cb65cf4175392099b9f1bea85d8d72e 100644 (file)
@@ -81,7 +81,7 @@ Mode 0: Single Timeout.   This is a one-shot software timeout that counts down
  when the gate is high (always true for timers 0 and 1).  When the count
  reaches zero, the output goes high.
 
-Mode 1: Triggered One-shot.  The output is intially set high.  When the gate
+Mode 1: Triggered One-shot.  The output is initially set high.  When the gate
  line is set high, a countdown is initiated (which does not stop if the gate is
  lowered), during which the output is set low.  When the count reaches zero,
  the output goes high.
index c1c5be84e4b19c3ac7dc581c5a72024cf59598f2..803e51f6768b65d6bb8a02f4914f0b98e563ef79 100644 (file)
@@ -61,7 +61,7 @@ Usage
   Hotkeys are also reported as input keys (like keyboards) you can check
   which key are supported using "xev" under X11.
 
-  You can get informations on the version of your DSDT table by reading the
+  You can get information on the version of your DSDT table by reading the
   /sys/devices/platform/asus-laptop/infos entry. If you have a question or a
   bug report to do, please include the output of this entry.
 
@@ -178,7 +178,7 @@ LED display
 -----------
 
   Some models like the W1N have a LED display that can be used to display
-  several informations.
+  several items of information.
 
   LED display works for the following models:
     W1000N
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX
new file mode 100644 (file)
index 0000000..29f481d
--- /dev/null
@@ -0,0 +1,8 @@
+leds-class.txt
+       - documents LED handling under Linux.
+leds-lp3944.txt
+       - notes on how to use the leds-lp3944 driver.
+leds-lp5521.txt
+       - notes on how to use the leds-lp5521 driver.
+leds-lp5523.txt
+       - notes on how to use the leds-lp5523 driver.
similarity index 99%
rename from Documentation/leds-class.txt
rename to Documentation/leds/leds-class.txt
index 58b266bd1846f1d0560bdae575f6e764a95fd4b3..4996586e27e865f4874470c021e318eb89fbc24b 100644 (file)
@@ -95,4 +95,3 @@ There are a number of cases where a trigger might only be mappable to a
 particular LED (ACPI?). The addition of triggers provided by the LED driver
 should cover this option and be possible to add without breaking the
 current interface.
-
index a81c7b4790f2177afb7ad1911dbc20a5128ad7eb..2366b1c8cf19492f52480669449ecd2b0a0d0f34 100644 (file)
@@ -552,6 +552,16 @@ also have
      within the array where IO will be blocked.  This is currently
      only supported for raid4/5/6.
 
+   sync_min
+   sync_max
+     The two values, given as numbers of sectors, indicate a range
+     withing the array where 'check'/'repair' will operate. Must be
+     a multiple of chunk_size. When it reaches "sync_max" it will
+     pause, rather than complete.
+     You can use 'select' or 'poll' on "sync_completed" to wait for
+     that number to reach sync_max.  Then you can either increase
+     "sync_max", or can write 'idle' to "sync_action".
+
 
 Each active md device may also have attributes specific to the
 personality module that manages it.
index fd48add02cb025d491ffaf18f48ae5d0b3fde734..76a2087db20578e587ba2b63f70109939324b3fc 100644 (file)
@@ -194,7 +194,7 @@ each pad.
 
 Links are represented by a struct media_link instance, defined in
 include/media/media-entity.h. Each entity stores all links originating at or
-targetting any of its pads in a links array. A given link is thus stored
+targeting any of its pads in a links array. A given link is thus stored
 twice, once in the source entity and once in the target entity. The array is
 pre-allocated and grows dynamically as needed.
 
@@ -348,6 +348,6 @@ a streaming entity. Links that can be modified while streaming must be marked
 with the MEDIA_LNK_FL_DYNAMIC flag.
 
 If other operations need to be disallowed on streaming entities (such as
-changing entities configuration parameters) drivers can explictly check the
+changing entities configuration parameters) drivers can explicitly check the
 media_entity stream_count field to find out if an entity is streaming. This
 operation must be done with the media_device graph_mutex held.
index 8ace35ebdcd55adce48f19ad30108aa1d516e87f..cc887ecfd6eb364f58ac3f57f6b05cb760a623ea 100644 (file)
@@ -39,13 +39,13 @@ Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE
       Interface and Linux Device Driver" Application Note.
 
 
-FILES, CONFIGS AND COMPATABILITY
+FILES, CONFIGS AND COMPATIBILITY
 --------------------------------
 
 Two files are introduced:
 
   a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h'
-     containes : struct _auide_hwif
+     contains : struct _auide_hwif
                  timing parameters for PIO mode 0/1/2/3/4
                  timing parameters for MWDMA 0/1/2
 
index 07a739f406d8a811dc9213c12eaf152db535da4d..bdac67ff6e3f35f0fce2d6f32e880acf6a210ca1 100644 (file)
@@ -5,7 +5,7 @@ Supported chips:
   * IDT ICS932S401
     Prefix: 'ics932s401'
     Addresses scanned: I2C 0x69
-    Datasheet: Publically available at the IDT website
+    Datasheet: Publicly available at the IDT website
 
 Author: Darrick J. Wong
 
index 4af8071a6d18e87e1094a2fda2ab0fea168a5edc..dadfe8147ab82f572c4f35c7be2765ae289532cb 100644 (file)
@@ -45,7 +45,7 @@ debugging messages on, that must be done by modified the source code.
 
 Variable MTU size:
 
-The driver can handle a MTU size upto either 4500 or 18000 depending upon 
+The driver can handle a MTU size up to either 4500 or 18000 depending upon 
 ring speed.  The driver also changes the size of the receive buffers as part
 of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
 to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring 
index 616a8e540b0b0551b1cd8e15bd28ed52d9393408..b7658bed490690a96abcb63132d6342a2483ee4f 100644 (file)
@@ -256,7 +256,7 @@ You can set the debug level via:
 
 Where $VALUE would be a number in the case of this sysfs entry.  The 
 input to sysfs files does not have to be a number.  For example, the 
-firmware loader used by hotplug utilizes sysfs entries for transfering 
+firmware loader used by hotplug utilizes sysfs entries for transferring 
 the firmware image from user space into the driver.
 
 The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries 
index 18afcd8afd5132f3050b9e7d31d2a57be3496c4e..ee496eb2f4a6a54266d5227a84823476b4918ea7 100644 (file)
@@ -72,7 +72,7 @@ folder:
 #  fragmentation    gw_sel_class  vis_mode
 
 
-There is a special folder for debugging informations:
+There is a special folder for debugging information:
 
 #  ls /sys/kernel/debug/batman_adv/bat0/
 #  gateways     socket        transtable_global  vis_data
index b36e741e94dbf9305a55535fa1eaaeed3fa3372e..e27202bb8d752dd72dead86953976762b78e34be 100644 (file)
@@ -368,7 +368,7 @@ fail_over_mac
                gratuitous ARP is lost, communication may be
                disrupted.
 
-               When this policy is used in conjuction with the mii
+               When this policy is used in conjunction with the mii
                monitor, devices which assert link up prior to being
                able to actually transmit and receive are particularly
                susceptible to loss of the gratuitous ARP, and an
index 7fe7a9a33a4f5fd1a1cbbd48f8c3b41347c25572..e52fd62bef3a06cff2c9332313c34a3bf3a310f8 100644 (file)
@@ -136,7 +136,7 @@ The CAIF Protocol implementation contains:
       - CFMUX CAIF Mux layer. Handles multiplexing between multiple
        physical bearers and multiple channels such as VEI, Datagram, etc.
        The MUX keeps track of the existing CAIF Channels and
-       Physical Instances and selects the apropriate instance based
+       Physical Instances and selects the appropriate instance based
        on Channel-Id and Physical-ID.
 
       - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length
index 0cb8cb9098f4c3f6be0589ab19a3109b6754070a..9efd0687dc4c8f290a6fc798da3c3437647daaeb 100644 (file)
@@ -150,7 +150,7 @@ static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev)
 void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev)
 {
        /* If xfer is true then you should assert the SPI_INT to indicate to
-        * the master that you are ready to recieve the data from the master
+        * the master that you are ready to receive the data from the master
         * SPI. If xfer is false then you should de-assert SPI_INT to indicate
         * that the transfer is done.
         */
index 5b04b67ddca2c3f2318cdd11c434a7cf9db981f3..56ca3b75376ea471adc9a88c9aaa2c953d2c3a44 100644 (file)
@@ -240,7 +240,7 @@ solution for a couple of reasons:
   the user application using the common CAN filter mechanisms. Inside
   this filter definition the (interested) type of errors may be
   selected. The reception of error frames is disabled by default.
-  The format of the CAN error frame is briefly decribed in the Linux
+  The format of the CAN error frame is briefly described in the Linux
   header file "include/linux/can/error.h".
 
 4. How to use Socket CAN
index 23c995e640328f51de9ee8ec0f5e21e13bb291bd..f41ea24052206d7657ee8c10b90d857bdb1e373a 100644 (file)
@@ -9,7 +9,7 @@ The Linux-ZigBee project goal is to provide complete implementation
 of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack
 of protocols for organizing Low-Rate Wireless Personal Area Networks.
 
-Currently only IEEE 802.15.4 layer is implemented. We have choosen
+Currently only IEEE 802.15.4 layer is implemented. We have chosen
 to use plain Berkeley socket API, the generic Linux networking stack
 to transfer IEEE 802.15.4 messages and a special protocol over genetlink
 for configuration/management
index c65a94010ea8589defbf7dd2827c84fcacce5655..b95b5bf967512bc5503ff1e222ac049791454de9 100644 (file)
@@ -65,7 +65,7 @@ together.
 
 Variable MTU size:
 
-The driver can handle a MTU size upto either 4500 or 18000 depending upon 
+The driver can handle a MTU size up to either 4500 or 18000 depending upon 
 ring speed.  The driver also changes the size of the receive buffers as part
 of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
 to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring 
index 073894d1c09307f9374e112a093bbc47ebb3171c..4acea660372011ab7ae95d42cc84decc55d4cc22 100644 (file)
@@ -223,7 +223,7 @@ we will get the following buffer structure:
 
 A frame can be of any size with the only condition it can fit in a block. A block
 can only hold an integer number of frames, or in other words, a frame cannot 
-be spawned accross two blocks, so there are some details you have to take into 
+be spawned across two blocks, so there are some details you have to take into 
 account when choosing the frame_size. See "Mapping and use of the circular 
 buffer (ring)".
 
index 9d4e0f4df5a8f2395fd4c3b90f4d211d520b77f5..4be0c039edbc14ae13e8cb2bf2caf7b9042f46cb 100644 (file)
@@ -37,7 +37,7 @@ To associate an interface with a physical adapter use "ethtool -p <ethX>".
 The corresponding adapter's LED will blink multiple times.
 
 3.     Features supported:
-a. Jumbo frames. Xframe I/II supports MTU upto 9600 bytes,
+a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes,
 modifiable using ifconfig command.
 
 b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit
@@ -49,7 +49,7 @@ significant performance improvement on certain platforms(SGI Altix,
 IBM xSeries).
 
 d. MSI/MSI-X. Can be enabled on platforms which support this feature
-(IA64, Xeon) resulting in noticeable performance improvement(upto 7%
+(IA64, Xeon) resulting in noticeable performance improvement(up to 7%
 on certain platforms).
 
 e. Statistics. Comprehensive MAC-level and software statistics displayed
index dcadf6f88e34222ef430d9423b34604c4ff37edd..70d6cf608251b5cc9b35550c72c2095f2a87c026 100644 (file)
@@ -1,5 +1,5 @@
 
-The "enviromental" rules for authors of any new tc actions are:
+The "environmental" rules for authors of any new tc actions are:
 
 1) If you stealeth or borroweth any packet thou shalt be branching
 from the righteous path and thou shalt cloneth.
@@ -20,7 +20,7 @@ this way any action downstream can stomp on the packet.
 3) Dropping packets you don't own is a no-no. You simply return
 TC_ACT_SHOT to the caller and they will drop it.
 
-The "enviromental" rules for callers of actions (qdiscs etc) are:
+The "environmental" rules for callers of actions (qdiscs etc) are:
 
 *) Thou art responsible for freeing anything returned as being
 TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is
index f023ba6bba62c2dcbd514691de267ab7229d0942..1971bcf48a602fd5466bd3c1e440b666115f2a8a 100644 (file)
@@ -367,7 +367,7 @@ Drivers need to be able to handle hardware which has been reset since the
 suspend methods were called, for example by complete reinitialization.
 This may be the hardest part, and the one most protected by NDA'd documents
 and chip errata.  It's simplest if the hardware state hasn't changed since
-the suspend was carried out, but that can't be guaranteed (in fact, it ususally
+the suspend was carried out, but that can't be guaranteed (in fact, it usually
 is not the case).
 
 Drivers must also be prepared to notice that the device has been removed
index ae1b7ec07684bad822171767bba66fc9798cc204..cf980709122aa25cfaef984e60da0f2f7218e92e 100644 (file)
@@ -24,7 +24,7 @@ PM_HIBERNATION_PREPARE        The system is going to hibernate or suspend, tasks will
                        be frozen immediately.
 
 PM_POST_HIBERNATION    The system memory state has been restored from a
-                       hibernation image or an error occured during the
+                       hibernation image or an error occurred during the
                        hibernation.  Device drivers' .resume() callbacks have
                        been executed and tasks have been thawed.
 
@@ -38,7 +38,7 @@ PM_POST_RESTORE               An error occurred during the hibernation restore.
 
 PM_SUSPEND_PREPARE     The system is preparing for a suspend.
 
-PM_POST_SUSPEND                The system has just resumed or an error occured during
+PM_POST_SUSPEND                The system has just resumed or an error occurred during
                        the suspend.    Device drivers' .resume() callbacks have
                        been executed and tasks have been thawed.
 
index cd445582d1f80a91abb619230d7b0a9dcb84e6e3..5ae70a12c1e24741960192852e880f19151c323e 100644 (file)
@@ -178,7 +178,7 @@ opp_find_freq_ceil - Search for an available OPP which is *at least* the
                if (!IS_ERR(opp))
                        soc_switch_to_freq_voltage(freq);
                else
-                       /* do something when we cant satisfy the req */
+                       /* do something when we can't satisfy the req */
                /* do other stuff */
         }
 
index ea718891a665b0cad258ec2881f6ab0b8b5fe96f..ac190cf1963e05e310edf6a96df2466f01eb1355 100644 (file)
@@ -192,7 +192,7 @@ Q: There don't seem to be any generally useful behavioral
 distinctions between SUSPEND and FREEZE.
 
 A: Doing SUSPEND when you are asked to do FREEZE is always correct,
-but it may be unneccessarily slow. If you want your driver to stay simple,
+but it may be unnecessarily slow. If you want your driver to stay simple,
 slowness may not matter to you. It can always be fixed later.
 
 For devices like disk it does matter, you do not want to spindown for
@@ -237,7 +237,7 @@ disk. Whole sequence goes like
 
       running system, user asks for suspend-to-disk
 
-      user processes are stopped (in common case there are none, but with resume-from-initrd, noone knows)
+      user processes are stopped (in common case there are none, but with resume-from-initrd, no one knows)
 
       read image from disk
 
index 81680f9f5909c28667689802a49a752119bf7afa..1101bee4e822366203e7b394be09294ac07a957a 100644 (file)
@@ -98,7 +98,7 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
 The device's read() operation can be used to transfer the snapshot image from
 the kernel.  It has the following limitations:
 - you cannot read() more than one virtual memory page at a time
-- read()s accross page boundaries are impossible (ie. if ypu read() 1/2 of
+- read()s across page boundaries are impossible (ie. if ypu read() 1/2 of
        a page in the previous call, you will only be able to read()
        _at_ _most_ 1/2 of the page in the next call)
 
@@ -137,7 +137,7 @@ mechanism and the userland utilities using the interface SHOULD use additional
 means, such as checksums, to ensure the integrity of the snapshot image.
 
 The suspending and resuming utilities MUST lock themselves in memory,
-preferrably using mlockall(), before calling SNAPSHOT_FREEZE.
+preferably using mlockall(), before calling SNAPSHOT_FREEZE.
 
 The suspending utility MUST check the value stored by SNAPSHOT_CREATE_IMAGE
 in the memory location pointed to by the last argument of ioctl() and proceed
@@ -147,7 +147,7 @@ in accordance with it:
        (a)     The suspending utility MUST NOT close the snapshot device
                _unless_ the whole suspend procedure is to be cancelled, in
                which case, if the snapshot image has already been saved, the
-               suspending utility SHOULD destroy it, preferrably by zapping
+               suspending utility SHOULD destroy it, preferably by zapping
                its header.  If the suspend is not to be cancelled, the
                system MUST be powered off or rebooted after the snapshot
                image has been saved.
index 6d8be3468d7dd3ab5a376b22ba7b3a5900ded38e..a730ca5a07f8482c26c32dc6704615a06d98ceec 100644 (file)
@@ -528,7 +528,7 @@ this driver assignment of hotplug added vty-servers may be in a different
 order than how they would be exposed on module load.  Rebooting or
 reloading the module after dynamic addition may result in the /dev/hvcs*
 and vty-server coupling changing if a vty-server adapter was added in a
-slot inbetween two other vty-server adapters.  Refer to the section above
+slot between two other vty-server adapters.  Refer to the section above
 on how to determine which vty-server goes with which /dev/hvcs* node.
 Hint; look at the sysfs "index" attribute for the vty-server.
 
index 86f9f74b2b34f60deaf8adf8ce84a4e4015b39de..efe998becc5b21e3d35631ced012e4c54249e7e2 100644 (file)
@@ -2273,7 +2273,7 @@ IP forwarding is on.
 There is a lot of useful info in here best found by going in & having a look around,
 so I'll take you through some entries I consider important.
 
-All the processes running on the machine have there own entry defined by
+All the processes running on the machine have their own entry defined by
 /proc/<pid>
 So lets have a look at the init process
 cd /proc/1
index 373ceacc367eb9a98cb6bbcad6f7ea4e83c21982..b7ee379b651bea7d962fcb51789b40689bb0e112 100644 (file)
@@ -1,8 +1,7 @@
-Each CPU has a "base" scheduling domain (struct sched_domain). These are
-accessed via cpu_sched_domain(i) and this_sched_domain() macros. The domain
+Each CPU has a "base" scheduling domain (struct sched_domain). The domain
 hierarchy is built from these base domains via the ->parent pointer. ->parent
-MUST be NULL terminated, and domain structures should be per-CPU as they
-are locklessly updated.
+MUST be NULL terminated, and domain structures should be per-CPU as they are
+locklessly updated.
 
 Each scheduling domain spans a number of CPUs (stored in the ->span field).
 A domain's span MUST be a superset of it child's span (this restriction could
@@ -26,11 +25,26 @@ is treated as one entity. The load of a group is defined as the sum of the
 load of each of its member CPUs, and only when the load of a group becomes
 out of balance are tasks moved between groups.
 
-In kernel/sched.c, rebalance_tick is run periodically on each CPU. This
-function takes its CPU's base sched domain and checks to see if has reached
-its rebalance interval. If so, then it will run load_balance on that domain.
-rebalance_tick then checks the parent sched_domain (if it exists), and the
-parent of the parent and so forth.
+In kernel/sched.c, trigger_load_balance() is run periodically on each CPU
+through scheduler_tick(). It raises a softirq after the next regularly scheduled
+rebalancing event for the current runqueue has arrived. The actual load
+balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run
+in softirq context (SCHED_SOFTIRQ).
+
+The latter function takes two arguments: the current CPU and whether it was idle
+at the time the scheduler_tick() happened and iterates over all sched domains
+our CPU is on, starting from its base domain and going up the ->parent chain.
+While doing that, it checks to see if the current domain has exhausted its
+rebalance interval. If so, it runs load_balance() on that domain. It then checks
+the parent sched_domain (if it exists), and the parent of the parent and so
+forth.
+
+Initially, load_balance() finds the busiest group in the current sched domain.
+If it succeeds, it looks for the busiest runqueue of all the CPUs' runqueues in
+that group. If it manages to find such a runqueue, it locks both our initial
+CPU's runqueue and the newly found busiest one and starts moving tasks from it
+to our runqueue. The exact number of tasks amounts to an imbalance previously
+computed while iterating over this sched domain's groups.
 
 *** Implementing sched domains ***
 The "base" domain will "span" the first level of the hierarchy. In the case
index 5e83769c6aa9d8492b28de2ff57e826a4e9a9604..c56ec99d7b2fbec50f3456c71b83961f1e88e961 100644 (file)
@@ -352,7 +352,7 @@ Changes from 20041229 to 20050110
          lpfc_scsiport.c
        * In remote port changes: no longer nulling target->pnode when
          removing from mapped list. Pnode get nulled when the node is
-         freed (after nodev tmo). This bug was causing i/o recieved in
+         freed (after nodev tmo). This bug was causing i/o received in
          the small window while the device was blocked to be errored w/
          did_no_connect. With the fix, it returns host_busy
          (per the pre-remote port changes).
@@ -530,7 +530,7 @@ Changes from 20041018 to 20041123
          coherent mappings.  Note: There are more consistent mappings
          that are using pci_dma_sync calls. Probably these should be
          removed as well.
-       * Modified lpfc_free_scsi_buf to accomodate all three scsi_buf
+       * Modified lpfc_free_scsi_buf to accommodate all three scsi_buf
          free types to alleviate miscellaneous panics with cable pull
          testing.
        * Set hotplug to default 0 and lpfc_target_remove to not remove
@@ -583,7 +583,7 @@ Changes from 20041018 to 20041123
          included more than once.
        * Replaced "set_current_state(TASK_UNINTERRUPTIBLE);
          schedule_timeout(timeout)" with "msleep(timeout)".
-       * Fixnode was loosing starget when rediscovered. We saw messages
+       * Fixnode was losing starget when rediscovered. We saw messages
          like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a
          result.  Moved starget field into struct lpfc_target which is
          referenced from the node.
@@ -604,7 +604,7 @@ Changes from 20041018 to 20041123
        * Make 3 functions static: lpfc_get_hba_sym_node_name,
          lpfc_intr_prep and lpfc_setup_slim_access.  Move lpfc_intr_prep
          and lpfc_setup_slim_access so they're defined before being used.
-       * Remove an unecessary list_del() in lpfc_hbadisc.c.
+       * Remove an unnecessary list_del() in lpfc_hbadisc.c.
        * Set nlp_state before calling lpfc_nlp_list() since this will
          potentially call fc_target_unblock which may cause a race in
          queuecommand by releasing host_lock.
@@ -753,7 +753,7 @@ Changes from 20040908 to 20040920
        * Changed version number to 8.0.12
        * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and
          PCI_LATENCY_VALUE from lpfc_hw.h.
-       * Changes to accomodate rnid.
+       * Changes to accommodate rnid.
        * Fix RSCN handling so RSCN NS queries only effect NPorts found in
          RSCN data.
        * If we rcv a plogi on a NPort queued up for discovery, clear the
@@ -813,7 +813,7 @@ Changes from 20040908 to 20040920
          counter instead, brd_no isn't reused anymore.  Also some tiny
          whitespace cleanups in surrounding code.
        * Reorder functions in lpfc_els.c to remove need for prototypes.
-       * Removed unsed prototypes from lpfc_crtn.h -
+       * Removed unused prototypes from lpfc_crtn.h -
          lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke.
        * Removed some unused prototypes from lpfc_crtn.h -
          lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn,
@@ -863,7 +863,7 @@ Changes from 20040823 to 20040908
        * Minimal support for SCSI flat space addressing/volume set
          addressing.  Use 16 bits of LUN address so that flat
          addressing/VSA will work.
-       * Changed 2 occurences of if( 1 != f(x)) to if(f(x) != 1)
+       * Changed 2 occurrences of if( 1 != f(x)) to if(f(x) != 1)
        * Drop include of lpfc_cfgparm.h.
        * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c.
        * Add minimum range checking property to /sys write/store
@@ -1449,7 +1449,7 @@ Changes from 20040402 to 20040409
        * Removed lpfc_els_chk_latt from the lpfc_config_post function.
          lpfc_els_chk_latt will enable the link event interrupts when
          flogi is pending which causes two discovery state machines
-         running parallely.
+         running parallelly.
        * Add pci_disable_device to unload path.
        * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c
        * Call dma_map_single() & pci_map_single() directly instead of via
@@ -1590,7 +1590,7 @@ Changes from 20040326 to 20040402
          ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC
          ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET
          ELX_READ_HBA ELX_INSTANCE ELX_LIP.  Also introduced
-         attribute "set" to be used in conjuction with the above
+         attribute "set" to be used in conjunction with the above
          attributes.
        * Removed DLINK, enque and deque declarations now that clock
          doesn't use them anymore
index 5e07d320817d5ba6cb19ce7c50cb07467cfd12b7..d2052fdbedd236d0325f86c2f6df57721fd1322e 100644 (file)
@@ -168,7 +168,7 @@ Older Version       : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
 
 1.     Sorted out PCI IDs to remove megaraid support overlaps.
        Based on the patch from Daniel, sorted out PCI IDs along with
-       charactor node name change from 'megadev' to 'megadev_legacy' to avoid
+       character node name change from 'megadev' to 'megadev_legacy' to avoid
        conflict.
        ---
        Hopefully we'll be getting the build restriction zapped much sooner, 
index 8b278c10edfd4ec36df7efa9dc2ca541ff5a1ee7..9288e3d8974aafa4bb0dedf93f737ea133588fc8 100644 (file)
@@ -200,7 +200,7 @@ Sun Feb  14:00 1999 Gerard Roudier (groudier@club-internet.fr)
          By default the driver uses both IRQF_SHARED and IRQF_DISABLED.
          Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by 
          a 53C8XX adapter and a network board.
-       - Tiny mispelling fixed (ABORT instead of ABRT). Was fortunately 
+       - Tiny misspelling fixed (ABORT instead of ABRT). Was fortunately 
          harmless.
        - Negotiate SYNC data transfers with CCS devices.
 
index 02ffbc1e8a8411f115f9cb591c40ae12c8dea188..c1933707d0bc6b20467dec93a01013af750e5257 100644 (file)
@@ -457,7 +457,7 @@ Fri Jan  1  20:00 1999 Gerard Roudier (groudier@club-internet.fr)
 Sat Dec 19  21:00 1998 Gerard Roudier (groudier@club-internet.fr)
        * version sym53c8xx-1.0
        - Define some new IO registers for the 896 (istat1, mbox0, mbox1)
-       - Revamp slighly the Symbios NVRAM lay-out based on the excerpt of 
+       - Revamp slightly the Symbios NVRAM lay-out based on the excerpt of 
          the header file I received from Symbios.
        - Check the PCI bus number for the boot order (Using a fast 
          PCI controller behing a PCI-PCI bridge seems sub-optimal).
index 29ce6d87e451b37627b5fe6fbbfd584fbc79b165..94848734ac66399379ea5da7991de2e7f1465253 100644 (file)
@@ -124,7 +124,7 @@ in the partition table and therefore every operating system has to know
 the right geometry to be able to interpret it.
 
 Moreover there are certain limitations to the C/H/S addressing scheme,
-namely the address space is limited to upto 255 heads, upto 63 sectors
+namely the address space is limited to up to 255 heads, up to 63 sectors
 and a maximum of 1023 cylinders.
 
 The AHA-1522 BIOS calculates the geometry by fixing the number of heads
index 16e054c9c70b55ff31a79c2d79c47c468b5e54f2..64ac7093c872040f327193cb2037276eab000f33 100644 (file)
@@ -267,7 +267,7 @@ The following information is available in this file:
               Option: tag_info:{{value[,value...]}[,{value[,value...]}...]}
           Definition: Set the per-target tagged queue depth on a
                       per controller basis.  Both controllers and targets
-                      may be ommitted indicating that they should retain
+                      may be omitted indicating that they should retain
                       the default tag depth.
             Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32}
                         On Controller 0
@@ -291,7 +291,7 @@ The following information is available in this file:
                       The rd_strm_bitmask is a 16 bit hex value in which
                       each bit represents a target.  Setting the target's
                       bit to '1' enables read streaming for that
-                      target.  Controllers may be ommitted indicating that
+                      target.  Controllers may be omitted indicating that
                       they should retain the default read streaming setting.
              Example: rd_strm:{0x0041}
                         On Controller 0
@@ -313,7 +313,7 @@ The following information is available in this file:
    -----------------------------------------------------------------
               Option: dv: {value[,value...]}
           Definition: Set Domain Validation Policy on a per-controller basis.
-                      Controllers may be ommitted indicating that
+                      Controllers may be omitted indicating that
                       they should retain the default read streaming setting.
              Example: dv:{-1,0,,1,1,0}
                         On Controller 0 leave DV at its default setting.
@@ -340,7 +340,7 @@ The following information is available in this file:
               Option: precomp: {value[,value...]}
           Definition: Set IO Cell precompensation value on a per-controller
                       basis.
-                      Controllers may be ommitted indicating that
+                      Controllers may be omitted indicating that
                       they should retain the default precompensation setting.
              Example: precomp:{0x1}
                         On Controller 0 set precompensation to 1.
@@ -353,7 +353,7 @@ The following information is available in this file:
    -----------------------------------------------------------------
               Option: slewrate: {value[,value...]}
           Definition: Set IO Cell slew rate on a per-controller basis.
-                      Controllers may be ommitted indicating that
+                      Controllers may be omitted indicating that
                       they should retain the default slew rate setting.
              Example: slewrate:{0x1}
                         On Controller 0 set slew rate to 1.
@@ -366,7 +366,7 @@ The following information is available in this file:
    -----------------------------------------------------------------
               Option: amplitude: {value[,value...]}
           Definition: Set IO Cell signal amplitude on a per-controller basis.
-                      Controllers may be ommitted indicating that
+                      Controllers may be omitted indicating that
                       they should retain the default read streaming setting.
              Example: amplitude:{0x1}
                         On Controller 0 set amplitude to 1.
index 45d61ad8c6f7b3f7d0981216fc093bdc286c82fd..ac41a9fcac77e2c1dfb48e045ae7e587e2a04c94 100644 (file)
    (scb) and calls a local function issue_cmd(), which writes a scb 
    command into subsystem I/O ports. Once the scb command is carried out, 
    the interrupt_handler() is invoked. If a device is determined to be 
-   existant and it has not assigned any ldn, it gets one dynamically.
+   existent and it has not assigned any ldn, it gets one dynamically.
    For this, the whole stuff is done in ibmmca_queuecommand().
 
    2.6 Abort & Reset Commands
       some error appeared, else it is undefined. Now, this is fixed. Before
       any SCB command gets queued, the tsb.dev_status is set to 0, so the 
       cmd->result won't screw up Linux higher level drivers.
-   2) The reset-function has slightly improved. This is still planed for 
+   2) The reset-function has slightly improved. This is still planned for 
       abort. During the abort and the reset function, no interrupts are 
       allowed. This is however quite hard to cope with, so the INT-status
       register is read. When the interrupt gets queued, one can find its
index 032399b16a539e5be25be8b04d065b8798bc57ed..ade046ea7c17a60420148644837486e6e4172e82 100644 (file)
@@ -102,7 +102,7 @@ Trouble?
 
 If you insmod the driver with "insmod debug=1", it will be verbose and
 prints a lot of stuff to the syslog.  Compiling the kernel with
-CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages alot
+CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages a lot
 because the kernel will translate the error codes into human-readable
 strings then.
 
index 7acbebb17fa6c42bd07f1da11311dde70b4bc60b..6ff16b620d84cf63d3e6e669a0cb7dab7d350c54 100644 (file)
@@ -290,7 +290,7 @@ scmd->allowed.
        SCSI transports/LLDDs automatically acquire sense data on
        command failures (autosense).  Autosense is recommended for
        performance reasons and as sense information could get out of
-       sync inbetween occurrence of CHECK CONDITION and this action.
+       sync between occurrence of CHECK CONDITION and this action.
 
        Note that if autosense is not supported, scmd->sense_buffer
        contains invalid sense data when error-completing the scmd
index e00192de4d1c060d7dc6ca8995a44608cba2392c..f79282fc48d7a9d96e1bdb4065b2dcf8ea7d27ea 100644 (file)
@@ -291,7 +291,7 @@ Transport <-> LLDD Interfaces :
 Vport support by LLDD:
 
   The LLDD indicates support for vports by supplying a vport_create()
-  function in the transport template.  The presense of this function will
+  function in the transport template.  The presence of this function will
   cause the creation of the new attributes on the fc_host.  As part of
   the physical port completing its initialization relative to the
   transport, it should set the max_npiv_vports attribute to indicate the
index 6f63b7989679e18ebd8d806beeffb6658b3af3c7..6af8f7a7770fa473271944736bb2374407de152a 100644 (file)
@@ -285,7 +285,7 @@ from the driver.
 
 7. Profiling information
 
-This driver does not provide profiling informations as did its predecessors.
+This driver does not provide profiling information as did its predecessors.
 This feature was not this useful and added complexity to the code. 
 As the driver code got more complex, I have decided to remove everything 
 that didn't seem actually useful.
index d1044391868494f93c4df47a7b02b1db05f026c9..5d2a33be0bd8e0dc2cc7407b9be14e64f85719e7 100644 (file)
@@ -473,7 +473,7 @@ Content
    spd_normal    Use  38.4kb  when  the application requests 38.4kb.
    spd_cust      Use  the custom divisor to set the speed when  the
                  application requests 38.4kb.
-   divisor       This option set the custom divison.
+   divisor       This option set the custom division.
    baud_base     This option set the base baud rate.
 
 -----------------------------------------------------------------------------
index 397f41a1f153f4494f7dc5466934aa06c85bcc87..a5d91126a8f7110b4dd86b2286842127adc0ff4b 100644 (file)
@@ -34,7 +34,7 @@ Major parts of the initialization program :
        /* configure the serial port : speed, flow control ... */
 
        /* send the AT commands to switch the modem to CMUX mode
-          and check that it's succesful (should return OK) */
+          and check that it's successful (should return OK) */
        write(fd, "AT+CMUX=0\r", 10);
 
        /* experience showed that some modems need some time before
index 3c1eddd9fcc762c66220cff439cb0fc88e0f59c3..9822afb6313cb1a56d5fdec722c62847cb98ce87 100644 (file)
@@ -322,7 +322,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
     "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
     or the value stored in the card's EEPROM for cards that have an EEPROM and
     their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
-    be choosen freely from the options enumerated above.
+    be chosen freely from the options enumerated above.
 
     If dma2 is specified and different from dma1, the card will operate in
     full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
@@ -356,7 +356,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
     "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
     or the value stored in the card's EEPROM for cards that have an EEPROM and
     their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
-    be choosen freely from the options enumerated above.
+    be chosen freely from the options enumerated above.
 
     If dma2 is specified and different from dma1, the card will operate in
     full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
@@ -2229,7 +2229,7 @@ Proc interfaces (/proc/asound)
 
 /proc/asound/card#/pcm#[cp]/oss
 -------------------------------
-  String "erase" - erase all additional informations about OSS applications
+  String "erase" - erase all additional information about OSS applications
   String "<app_name> <fragments> <fragment_size> [<options>]"
 
    <app_name> - name of application with (higher priority) or without path
index f5639d40521df5a60706d542d5dd93ace9f24c1c..f4b5988f450cf296dc625eb55b4840a557ca4732 100644 (file)
@@ -87,14 +87,14 @@ accumulator. ALSA uses accumulators 0 and 1 for left and right PCM.
 The result is forwarded to the ADC capture FIFO (thus to the standard capture
 PCM device).
 
-name='Music Playback Volume',index=0
+name='Synth Playback Volume',index=0
 
 This control is used to attenuate samples for left and right MIDI FX-bus
 accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
 The result samples are forwarded to the front DAC PCM slots of the AC97 codec.
 
-name='Music Capture Volume',index=0
-name='Music Capture Switch',index=0
+name='Synth Capture Volume',index=0
+name='Synth Capture Switch',index=0
 
 These controls are used to attenuate samples for left and right MIDI FX-bus
 accumulator. ALSA uses accumulators 4 and 5 for left and right PCM.
index c0f08922993bfd10d7c3c5d792fe353c8fd20b5b..e0dc0641b480e0c8c3f12e7d73cb880c37c23eba 100644 (file)
@@ -1,10 +1,10 @@
 Driver
 ------
 
-Informations about Audio Excel DSP 16 driver can be found in the source
+Information about Audio Excel DSP 16 driver can be found in the source
 file aedsp16.c
 Please, read the head of the source before using it. It contain useful
-informations.
+information.
 
 Configuration
 -------------
@@ -68,7 +68,7 @@ Sound cards supported
 This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
 It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
 I'm working on the III version of the card: if someone have useful
-informations about it, please let me know.
+information about it, please let me know.
 For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
 activating the audio card with the MS-DOS device driver, then you have to
 <ctrl>-<alt>-<del> and boot Linux.
index c615debbf08dc25f551433bb006c7e3c3c1c9f9a..4be259428a1cd09414d7a91d5cdffaddc72f40a2 100644 (file)
@@ -1352,7 +1352,7 @@ OSS-mixer.
 The PCM20 contains a radio tuner, which is also controlled by
 ACI. This radio tuner is supported by the ACI driver together with the
 miropcm20.o module. Also the 7-band equalizer is integrated
-(limited by the OSS-design). Developement has started and maybe
+(limited by the OSS-design). Development has started and maybe
 finished for the RDS decoder on this card, too. You will be able to
 read RadioText, the Programme Service name, Programme TYpe and
 others. Even the v4l radio module benefits from it with a refined
index af8a7d3a4e8e99c21182b65c006ec2b3f7c9341d..b6b77906b58d5f0c161c03056b5d72073c53f6e0 100644 (file)
@@ -5,7 +5,7 @@ FIRST OF ALL
 ============
 
   This code references YAMAHA's sample codes and data sheets.
-  I respect and thank for all people they made open the informations
+  I respect and thank for all people they made open the information
   about YMF7xx cards.
 
   And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s
index 68a4fe3818a157a806e3c35a492218683085b8cb..493dada573722019bdf3dbba7af06feb9c82d924 100644 (file)
@@ -143,7 +143,7 @@ configured to use SSPFRM instead.
 NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the
 chipselect is dropped after each spi_transfer.  Most devices need chip select
 asserted around the complete message.  Use SSPFRM as a GPIO (through cs_control)
-to accomodate these chips.
+to accommodate these chips.
 
 
 NSSP SLAVE SAMPLE
index 34a9cfd746bdb674ced376703c955e69e45cb395..463f6d01fa155f3d61eed020c650de3e5511cc81 100644 (file)
@@ -46,7 +46,7 @@ The hardware interfacing on the LM70 LLP eval board is as follows:
 
 Note that since the LM70 uses a "3-wire" variant of SPI, the SI/SO pin
 is connected to both pin D7 (as Master Out) and Select (as Master In)
-using an arrangment that lets either the parport or the LM70 pull the
+using an arrangement that lets either the parport or the LM70 pull the
 pin low.  This can't be shared with true SPI devices, but other 3-wire
 devices might share the same SI/SO pin.
 
index 4fb314d51702c6ced0f48499513da164ca6c6cca..db94fb6c56782d81b1c263bf702c0c074ec5f5fc 100644 (file)
@@ -51,7 +51,7 @@ be removed to protect the rights of others.
 Specifically, very old Internet PhoneJACK cards have non-standard
 G.723.1 codecs (due to the early nature of the DSPs in those days).
 The auto-conversion code to bring those cards into compliance with
-todays standards is available as a binary only module to those people
+today's standards is available as a binary only module to those people
 needing it.  If you bought your card after 1997 or so, you are OK -
 it's only the very old cards that are affected.
 
index d299ff31df57f0b4f1ea25cf328e77390eee50ee..7d350b496585863daaa09e671c421453ba163d84 100644 (file)
@@ -237,7 +237,7 @@ with the previous write.
       |written  |
       +---------+
       |written  |
-      +---------+  <--- next positon for write (current commit)
+      +---------+  <--- next position for write (current commit)
       | empty   |
       +---------+
 
index a747200fe67c5b7d4bdcae47bdee0ee2508ce3bd..2137b589276b0a144b044d5b89aa51eecd52da8e 100644 (file)
@@ -172,7 +172,7 @@ Source file list / functional overview:
     to provide a streaming API usable by a read() system call style of
     I/O.  Right now this is the only layer on top of pvrusb2-io.[ch],
     however the underlying architecture here was intended to allow for
-    other styles of I/O to be implemented with additonal modules, like
+    other styles of I/O to be implemented with additional modules, like
     mmap()'ed buffers or something even more exotic.
 
   pvrusb2-main.c - This is the top level of the driver.  Module level
index bbe3ed667d911a1a6fa06646f21b22fe34c464aa..14c065fa23efb9ae8f1dbd656fdb6143f62191c9 100644 (file)
@@ -1,5 +1,5 @@
 
-Note: "modinfo <module>" prints various informations about a kernel
+Note: "modinfo <module>" prints various information about a kernel
 module, among them a complete and up-to-date list of insmod options.
 This list tends to be outdated because it is updated manually ...
 
index 3a367cdb664e9b1e8947a5d427a19f1bf23f1b22..7cbf4fb6cf314695daaeb72961bcea7d095776e4 100644 (file)
@@ -70,7 +70,7 @@ If you have trouble with some specific TV card, try to ask there
 instead of mailing me directly.  The chance that someone with the
 same card listens there is much higher...
 
-For problems with sound:  There are alot of different systems used
+For problems with sound:  There are a lot of different systems used
 for TV sound all over the world.  And there are also different chips
 which decode the audio signal.  Reports about sound problems ("stereo
 does'nt work") are pretty useless unless you include some details
index 4259dccc8287fdd421693bf0d08879175fa64386..5eddfa076cfb0269d96aa1787a45dd527efe0000 100644 (file)
@@ -33,7 +33,7 @@ state is stuck.
 
 I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid
 for some people.  Thus probably a small buglet left somewhere in bttv
-0.7.x.  I have no idea where exactly, it works stable for me and alot of
+0.7.x.  I have no idea where exactly, it works stable for me and a lot of
 other people.  But in case you have problems with the 0.7.x versions you
 can give 0.8.x a try ...
 
index 1e6328f91083646a38e4dc46a384daee83b8abf2..395f6c6fdd9899883e6e8a75ed7ae517a2efac62 100644 (file)
@@ -2,13 +2,13 @@
 bttv and sound mini howto
 =========================
 
-There are alot of different bt848/849/878/879 based boards available.
+There are a lot of different bt848/849/878/879 based boards available.
 Making video work often is not a big deal, because this is handled
 completely by the bt8xx chip, which is common on all boards.  But
 sound is handled in slightly different ways on each board.
 
 To handle the grabber boards correctly, there is a array tvcards[] in
-bttv-cards.c, which holds the informations required for each board.
+bttv-cards.c, which holds the information required for each board.
 Sound will work only, if the correct entry is used (for video it often
 makes no difference).  The bttv driver prints a line to the kernel
 log, telling which card type is used.  Like this one:
index 1247566c4de38211458144eb206432db0a8698d0..e0cdae49185802b11fc0795e5c99dcf47bfc3e3c 100644 (file)
@@ -191,10 +191,10 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 3:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = more verbose messages
                Level 3 is useful for testing only, when only one device
-               is used at the same time. It also shows some more informations
+               is used at the same time. It also shows some more information
                about the hardware being detected. This module parameter can be
                changed at runtime thanks to the /sys filesystem interface.
 Default:        2
index 4f6d0ca019564f86b4dfed75fff7b9597dbd838b..51ed1578b0e8cebb9149916ee4f779c179c074d0 100644 (file)
@@ -84,12 +84,12 @@ DMA usage
        transfer is not started. On "End Of Frame" interrupt, the irq handler
        starts the DMA chain.
      - capture of one videobuffer
-       The DMA chain starts transfering data into videobuffer RAM pages.
-       When all pages are transfered, the DMA irq is raised on "ENDINTR" status
+       The DMA chain starts transferring data into videobuffer RAM pages.
+       When all pages are transferred, the DMA irq is raised on "ENDINTR" status
      - finishing one videobuffer
        The DMA irq handler marks the videobuffer as "done", and removes it from
        the active running queue
-       Meanwhile, the next videobuffer (if there is one), is transfered by DMA
+       Meanwhile, the next videobuffer (if there is one), is transferred by DMA
      - finishing the last videobuffer
        On the DMA irq of the last videobuffer, the QCI is stopped.
 
@@ -101,7 +101,7 @@ DMA usage
 
      This structure is pointed by dma->sg_cpu.
      The descriptors are used as follows :
-      - desc-sg[i]: i-th descriptor, transfering the i-th sg
+      - desc-sg[i]: i-th descriptor, transferring the i-th sg
         element to the video buffer scatter gather
       - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN
       - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0
index 73de4050d63738dd15c4d3872e3ca49d5e5e089d..b4f67040403a277d09147bfb49ee5c32141ca49f 100644 (file)
@@ -214,10 +214,10 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 3:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = more verbose messages
                Level 3 is useful for testing only. It also shows some more
-               informations about the hardware being detected.
+               information about the hardware being detected.
                This parameter can be changed at runtime thanks to the /sys
                filesystem interface.
 Default:        2
index 3b15608ee0700029a2b816bb5a971059af603386..cf21f7aae976a903b43b7d12a69855acfef101e0 100644 (file)
@@ -343,7 +343,7 @@ ignored. If you want to check for errors use this:
        err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip);
 
 Any error except -ENOIOCTLCMD will exit the loop with that error. If no
-errors (except -ENOIOCTLCMD) occured, then 0 is returned.
+errors (except -ENOIOCTLCMD) occurred, then 0 is returned.
 
 The second argument to both calls is a group ID. If 0, then all subdevs are
 called. If non-zero, then only those whose group ID match that value will
index 05138e8aea07c7c3ca125072481c7b39dc0ea1a5..9649450f3b905a61c558d8ec7b1761c0c3684d50 100644 (file)
@@ -413,7 +413,7 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 6:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = configuration or general messages
                4 = warnings
                5 = called functions
index befdfdacdc5b36e7e63de4415666e37b60e5a686..b41c83cf09f4addd31dbd6dc8ba95ffd51633896 100644 (file)
@@ -181,10 +181,10 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 3:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = more verbose messages
                Level 3 is useful for testing only, when only one device
-               is used at the same time. It also shows some more informations
+               is used at the same time. It also shows some information
                about the hardware being detected. This module parameter can be
                changed at runtime thanks to the /sys filesystem interface.
 Default:        2
@@ -261,7 +261,7 @@ the fingerprint is: '88E8 F32F 7244 68BA 3958  5D40 99DA 5D2A FCE6 35A4'.
 
 11. Credits
 ===========
-- Informations about the chip internals needed to enable the I2C protocol have
+- Information about the chip internals needed to enable the I2C protocol have
   been taken from the documentation of the ZC030x Video4Linux1 driver written
   by Andrew Birkett <andy@nobugs.org>;
 - The initialization values of the ZC0301 controller connected to the PAS202BCB
index 4ee1f643d8979322696103f8d2a7b7ea1ba1f9b9..dbf45817405f8fbe8dc986e349d2e7caae3f0542 100644 (file)
@@ -74,7 +74,7 @@ we have a user context", and is generally done by the page fault handler
 and things like that).
 
 Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago,
-because it slightly changes the interfaces to accomodate the alpha (who
+because it slightly changes the interfaces to accommodate the alpha (who
 would have thought it, but the alpha actually ends up having one of the
 ugliest context switch codes - unlike the other architectures where the MM
 and register state is separate, the alpha PALcode joins the two, and you
index 457634c1e03e391e84be31a64da6cd9a995aaeba..f8551b3879f8442350a94b9f88377961ed8e8abd 100644 (file)
@@ -72,7 +72,7 @@ number of huge pages requested.  This is the most reliable method of
 allocating huge pages as memory has not yet become fragmented.
 
 Some platforms support multiple huge page sizes.  To allocate huge pages
-of a specific size, one must preceed the huge pages boot command parameters
+of a specific size, one must precede the huge pages boot command parameters
 with a huge page size selection parameter "hugepagesz=<size>".  <size> must
 be specified in bytes with optional scale suffix [kKmMgG].  The default huge
 page size may be selected with the "default_hugepagesz=<size>" boot parameter.
index 21c7b1f8f32b2881d8835f0d0164939ac48b3b93..706d7ed9d8d2a7b6a4d91aacf2e4bf449f14b713 100644 (file)
@@ -4,7 +4,7 @@ The Linux kernel supports the following overcommit handling modes
                address space are refused. Used for a typical system. It
                ensures a seriously wild allocation fails while allowing
                overcommit to reduce swap usage.  root is allowed to 
-               allocate slighly more memory in this mode. This is the 
+               allocate slightly more memory in this mode. This is the 
                default.
 
 1      -       Always overcommit. Appropriate for some scientific
index 90a65d23cf59c52ed366a5ecfd0466ca012daf7b..3f98b505a0ee6855931a5fef560ba1a3c7699cd0 100644 (file)
@@ -21,8 +21,8 @@ value and associated ram buffer is outpputed to own line.
 
 Each lines will contain the values of 42 bytes read from the counter and
 memory page along the crc=YES or NO for indicating whether the read operation
-was successfull and CRC matched.
-If the operation was successfull, there is also in the end of each line
+was successful and CRC matched.
+If the operation was successful, there is also in the end of each line
 a counter value expressed as an integer after c=
 
 Meaning of 42 bytes represented is following:
@@ -34,7 +34,7 @@ Meaning of 42 bytes represented is following:
  - crc=YES/NO indicating whether read was ok and crc matched
  - c=<int> current counter value
 
-example from the successfull read:
+example from the successful read:
 00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
 00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
 00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
index 804445f745ed4bcd900fb9ef8962fca6c4742415..f59a31965d50a38221ecd305e039d0f6319a03c7 100644 (file)
@@ -81,7 +81,7 @@ which will contain list of all registered master ids in the following
 format:
 
        cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct
-       w1_netlink_msg) plus number of masters multipled by 4)
+       w1_netlink_msg) plus number of masters multiplied by 4)
        w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to
                number of masters multiplied by 4 (u32 size))
        id0 ... idN
index 9c24d5ffbb06be90460b055fd434f5e58dd9a661..9488078900e0c44bdf90ae502e4a114e5919b98d 100644 (file)
@@ -8,7 +8,7 @@ Last reviewed: 06/02/2009
  The HP iLO2 NMI Watchdog driver is a kernel module that provides basic
  watchdog functionality and the added benefit of NMI sourcing. Both the
  watchdog functionality and the NMI sourcing capability need to be enabled
- by the user. Remember that the two modes are not dependant on one another.
+ by the user. Remember that the two modes are not dependent on one another.
  A user can have the NMI sourcing without the watchdog timer and vice-versa.
 
  Watchdog functionality is enabled like any other common watchdog driver. That
index 01c513fac40ece66b73a1709f6df496b5aade8d2..a0b577de918f7cd3fcdec46f06b72f7de074d6d8 100644 (file)
@@ -12,6 +12,7 @@ CONTENTS
 4. Application Programming Interface (API)
 5. Example Execution Scenarios
 6. Guidelines
+7. Debugging
 
 
 1. Introduction
@@ -379,3 +380,42 @@ If q1 has WQ_CPU_INTENSIVE set,
 * Unless work items are expected to consume a huge amount of CPU
   cycles, using a bound wq is usually beneficial due to the increased
   level of locality in wq operations and work item execution.
+
+
+7. Debugging
+
+Because the work functions are executed by generic worker threads
+there are a few tricks needed to shed some light on misbehaving
+workqueue users.
+
+Worker threads show up in the process list as:
+
+root      5671  0.0  0.0      0     0 ?        S    12:07   0:00 [kworker/0:1]
+root      5672  0.0  0.0      0     0 ?        S    12:07   0:00 [kworker/1:2]
+root      5673  0.0  0.0      0     0 ?        S    12:12   0:00 [kworker/0:0]
+root      5674  0.0  0.0      0     0 ?        S    12:13   0:00 [kworker/1:0]
+
+If kworkers are going crazy (using too much cpu), there are two types
+of possible problems:
+
+       1. Something beeing scheduled in rapid succession
+       2. A single work item that consumes lots of cpu cycles
+
+The first one can be tracked using tracing:
+
+       $ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
+       $ cat /sys/kernel/debug/tracing/trace_pipe > out.txt
+       (wait a few secs)
+       ^C
+
+If something is busy looping on work queueing, it would be dominating
+the output and the offender can be determined with the work item
+function.
+
+For the second type of problems it should be possible to just check
+the stack trace of the offending worker thread.
+
+       $ cat /proc/THE_OFFENDING_KWORKER/stack
+
+The work item's function should be trivially visible in the stack
+trace.
index 6b4b9cdec370fef4f83ed5449329dc8339347f71..16a5c5f2c6a633a593820060f9e9df813e7acb06 100644 (file)
@@ -151,6 +151,7 @@ S:  Maintained
 F:     drivers/net/hamradio/6pack.c
 
 8169 10/100/1000 GIGABIT ETHERNET DRIVER
+M:     Realtek linux nic maintainers <nic_swsd@realtek.com>
 M:     Francois Romieu <romieu@fr.zoreil.com>
 L:     netdev@vger.kernel.org
 S:     Maintained
@@ -184,10 +185,9 @@ F: Documentation/filesystems/9p.txt
 F:     fs/9p/
 
 A2232 SERIAL BOARD DRIVER
-M:     Enver Haase <A2232@gmx.net>
 L:     linux-m68k@lists.linux-m68k.org
-S:     Maintained
-F:     drivers/char/ser_a2232*
+S:     Orphan
+F:     drivers/staging/generic_serial/ser_a2232*
 
 AACRAID SCSI RAID DRIVER
 M:     Adaptec OEM Raid Solutions <aacraid@adaptec.com>
@@ -877,6 +877,13 @@ F: arch/arm/mach-mv78xx0/
 F:     arch/arm/mach-orion5x/
 F:     arch/arm/plat-orion/
 
+ARM/Orion SoC/Technologic Systems TS-78xx platform support
+M:     Alexander Clouter <alex@digriz.org.uk>
+L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
+W:     http://www.digriz.org.uk/ts78xx/kernel
+S:     Maintained
+F:     arch/arm/mach-orion5x/ts78xx-*
+
 ARM/MIOA701 MACHINE SUPPORT
 M:     Robert Jarzmik <robert.jarzmik@free.fr>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -1025,12 +1032,13 @@ W:      http://www.fluff.org/ben/linux/
 S:     Maintained
 F:     arch/arm/mach-s3c64xx/
 
-ARM/S5P ARM ARCHITECTURES
+ARM/S5P EXYNOS ARM ARCHITECTURES
 M:     Kukjin Kim <kgene.kim@samsung.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:     linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 S:     Maintained
 F:     arch/arm/mach-s5p*/
+F:     arch/arm/mach-exynos*/
 
 ARM/SAMSUNG MOBILE MACHINE SUPPORT
 M:     Kyungmin Park <kyungmin.park@samsung.com>
@@ -1063,7 +1071,7 @@ F:        arch/arm/mach-shmobile/
 F:     drivers/sh/
 
 ARM/TELECHIPS ARM ARCHITECTURE
-M:     "Hans J. Koch" <hjk@linutronix.de>
+M:     "Hans J. Koch" <hjk@hansjkoch.de>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
 F:     arch/arm/plat-tcc/
@@ -1823,11 +1831,10 @@ S:      Maintained
 F:     drivers/platform/x86/compal-laptop.c
 
 COMPUTONE INTELLIPORT MULTIPORT CARD
-M:     "Michael H. Warfield" <mhw@wittsend.com>
 W:     http://www.wittsend.com/computone.html
-S:     Maintained
+S:     Orphan
 F:     Documentation/serial/computone.txt
-F:     drivers/char/ip2/
+F:     drivers/staging/tty/ip2/
 
 CONEXANT ACCESSRUNNER USB DRIVER
 M:     Simon Arlott <cxacru@fire.lp0.eu>
@@ -2010,7 +2017,7 @@ F:        drivers/net/wan/cycx*
 CYCLADES ASYNC MUX DRIVER
 W:     http://www.cyclades.com/
 S:     Orphan
-F:     drivers/char/cyclades.c
+F:     drivers/tty/cyclades.c
 F:     include/linux/cyclades.h
 
 CYCLADES PC300 DRIVER
@@ -2124,8 +2131,8 @@ L:        Eng.Linux@digi.com
 W:     http://www.digi.com
 S:     Orphan
 F:     Documentation/serial/digiepca.txt
-F:     drivers/char/epca*
-F:     drivers/char/digi*
+F:     drivers/staging/tty/epca*
+F:     drivers/staging/tty/digi*
 
 DIOLAN U2C-12 I2C DRIVER
 M:     Guenter Roeck <guenter.roeck@ericsson.com>
@@ -2802,7 +2809,7 @@ GPIO SUBSYSTEM
 M:     Grant Likely <grant.likely@secretlab.ca>
 S:     Maintained
 T:     git git://git.secretlab.ca/git/linux-2.6.git
-F:     Documentation/gpio/gpio.txt
+F:     Documentation/gpio.txt
 F:     drivers/gpio/
 F:     include/linux/gpio*
 
@@ -4077,7 +4084,7 @@ F:        drivers/video/matrox/matroxfb_*
 F:     include/linux/matroxfb.h
 
 MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
-M:     "Hans J. Koch" <hjk@linutronix.de>
+M:     "Hans J. Koch" <hjk@hansjkoch.de>
 L:     lm-sensors@lm-sensors.org
 S:     Maintained
 F:     Documentation/hwmon/max6650
@@ -4192,7 +4199,7 @@ MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
 M:     Jiri Slaby <jirislaby@gmail.com>
 S:     Maintained
 F:     Documentation/serial/moxa-smartio
-F:     drivers/char/mxser.*
+F:     drivers/tty/mxser.*
 
 MSI LAPTOP SUPPORT
 M:     "Lee, Chun-Yi" <jlee@novell.com>
@@ -4234,7 +4241,7 @@ F:        sound/oss/msnd*
 
 MULTITECH MULTIPORT CARD (ISICOM)
 S:     Orphan
-F:     drivers/char/isicom.c
+F:     drivers/tty/isicom.c
 F:     include/linux/isicom.h
 
 MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
@@ -5273,14 +5280,14 @@ F:      drivers/memstick/host/r592.*
 RISCOM8 DRIVER
 S:     Orphan
 F:     Documentation/serial/riscom8.txt
-F:     drivers/char/riscom8*
+F:     drivers/staging/tty/riscom8*
 
 ROCKETPORT DRIVER
 P:     Comtrol Corp.
 W:     http://www.comtrol.com
 S:     Maintained
 F:     Documentation/serial/rocket.txt
-F:     drivers/char/rocket*
+F:     drivers/tty/rocket*
 
 ROSE NETWORK LAYER
 M:     Ralf Baechle <ralf@linux-mips.org>
@@ -5390,7 +5397,7 @@ F:        drivers/media/video/*7146*
 F:     include/media/*7146*
 
 SAMSUNG AUDIO (ASoC) DRIVERS
-M:     Jassi Brar <jassi.brar@samsung.com>
+M:     Jassi Brar <jassisinghbrar@gmail.com>
 L:     alsa-devel@alsa-project.org (moderated for non-subscribers)
 S:     Supported
 F:     sound/soc/samsung
@@ -5916,10 +5923,9 @@ F:       arch/arm/mach-spear6xx/spear600.c
 F:     arch/arm/mach-spear6xx/spear600_evb.c
 
 SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
-M:     Roger Wolff <R.E.Wolff@BitWizard.nl>
-S:     Supported
+S:     Orphan
 F:     Documentation/serial/specialix.txt
-F:     drivers/char/specialix*
+F:     drivers/staging/tty/specialix*
 
 SPI SUBSYSTEM
 M:     David Brownell <dbrownell@users.sourceforge.net>
@@ -5964,7 +5970,6 @@ F:        arch/alpha/kernel/srm_env.c
 
 STABLE BRANCH
 M:     Greg Kroah-Hartman <greg@kroah.com>
-M:     Chris Wright <chrisw@sous-sol.org>
 L:     stable@kernel.org
 S:     Maintained
 
@@ -6248,7 +6253,8 @@ M:        Greg Ungerer <gerg@uclinux.org>
 W:     http://www.uclinux.org/
 L:     uclinux-dev@uclinux.org  (subscribers-only)
 S:     Maintained
-F:     arch/m68knommu/
+F:     arch/m68k/*/*_no.*
+F:     arch/m68k/include/asm/*_no.*
 
 UCLINUX FOR RENESAS H8/300 (H8300)
 M:     Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -6550,7 +6556,7 @@ S:        Maintained
 F:     drivers/usb/host/uhci*
 
 USB "USBNET" DRIVER FRAMEWORK
-M:     David Brownell <dbrownell@users.sourceforge.net>
+M:     Oliver Neukum <oneukum@suse.de>
 L:     netdev@vger.kernel.org
 W:     http://www.linux-usb.org/usbnet
 S:     Maintained
@@ -6618,7 +6624,7 @@ F:        fs/hostfs/
 F:     fs/hppfs/
 
 USERSPACE I/O (UIO)
-M:     "Hans J. Koch" <hjk@linutronix.de>
+M:     "Hans J. Koch" <hjk@hansjkoch.de>
 M:     Greg Kroah-Hartman <gregkh@suse.de>
 S:     Maintained
 F:     Documentation/DocBook/uio-howto.tmpl
@@ -6916,6 +6922,25 @@ T:       git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.
 S:     Maintained
 F:     drivers/platform/x86
 
+XEN HYPERVISOR INTERFACE
+M:     Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
+M:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+L:     xen-devel@lists.xensource.com (moderated for non-subscribers)
+L:     virtualization@lists.linux-foundation.org
+S:     Supported
+F:     arch/x86/xen/
+F:     drivers/*/xen-*front.c
+F:     drivers/xen/
+F:     arch/x86/include/asm/xen/
+F:     include/xen/
+
+XEN NETWORK BACKEND DRIVER
+M:     Ian Campbell <ian.campbell@citrix.com>
+L:     xen-devel@lists.xensource.com (moderated for non-subscribers)
+L:     netdev@vger.kernel.org
+S:     Supported
+F:     drivers/net/xen-netback/*
+
 XEN PCI SUBSYSTEM
 M:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 L:     xen-devel@lists.xensource.com (moderated for non-subscribers)
@@ -6930,18 +6955,6 @@ S:       Supported
 F:     arch/x86/xen/*swiotlb*
 F:     drivers/xen/*swiotlb*
 
-XEN HYPERVISOR INTERFACE
-M:     Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-M:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-L:     xen-devel@lists.xensource.com (moderated for non-subscribers)
-L:     virtualization@lists.linux-foundation.org
-S:     Supported
-F:     arch/x86/xen/
-F:     drivers/*/xen-*front.c
-F:     drivers/xen/
-F:     arch/x86/include/asm/xen/
-F:     include/xen/
-
 XFS FILESYSTEM
 P:     Silicon Graphics Inc
 M:     Alex Elder <aelder@sgi.com>
index ba7a55ccd890858f5771793616f5bf164a620ad3..28820f7ddf0aa71777a8771b47949fa6676a90f5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 39
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc6
 NAME = Flesh-Eating Bats with Fangs
 
 # *DOCUMENTATION*
index 9baae8afe8a372d20e88537691fc555d8dd6bb6d..da5449e22175235e1f91fe5150bf5289ccde55ba 100644 (file)
@@ -101,7 +101,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
 
 #define ELF_PLAT_INIT(_r, load_addr)   _r->r0 = 0
 
-/* The registers are layed out in pt_regs for PAL and syscall
+/* The registers are laid out in pt_regs for PAL and syscall
    convenience.  Re-order them for the linear elf_gregset_t.  */
 
 struct pt_regs;
index 9bb7b858ed239ef4e590732a75fe250bbf934eaf..7a6d908bb865c2e83a5cc51dcd975830f8cdfc4a 100644 (file)
@@ -4,7 +4,7 @@
 
 extra-y                := head.o vmlinux.lds
 asflags-y      := $(KBUILD_CFLAGS)
-ccflags-y      := -Werror -Wno-sign-compare
+ccflags-y      := -Wno-sign-compare
 
 obj-y    := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
            irq_alpha.o signal.o setup.o ptrace.o time.o \
index 4843f6ec9f3a1c1f92ac83a31ef89f3a90d0a1b1..cb2801cfd3df5578c3caea9159ba8486bfbe14fe 100644 (file)
@@ -133,7 +133,7 @@ conf_read(unsigned long addr)
 
        local_irq_save(flags);
 
-       /* Reset status register to avoid loosing errors.  */
+       /* Reset status register to avoid losing errors.  */
        stat0 = *(vulp)LCA_IOC_STAT0;
        *(vulp)LCA_IOC_STAT0 = stat0;
        mb();
@@ -170,7 +170,7 @@ conf_write(unsigned long addr, unsigned int value)
 
        local_irq_save(flags);  /* avoid getting hit by machine check */
 
-       /* Reset status register to avoid loosing errors.  */
+       /* Reset status register to avoid losing errors.  */
        stat0 = *(vulp)LCA_IOC_STAT0;
        *(vulp)LCA_IOC_STAT0 = stat0;
        mb();
index 381fec0af52e35a6262586059ccdacbcfd863148..da7bcc372f16c50f6cc3f048b6a6956df748aec4 100644 (file)
@@ -88,7 +88,7 @@ conf_read(unsigned long addr, unsigned char type1,
 {
        unsigned long flags;
        unsigned long mid = MCPCIA_HOSE2MID(hose->index);
-       unsigned int stat0, value, temp, cpu;
+       unsigned int stat0, value, cpu;
 
        cpu = smp_processor_id();
 
@@ -101,7 +101,7 @@ conf_read(unsigned long addr, unsigned char type1,
        stat0 = *(vuip)MCPCIA_CAP_ERR(mid);
        *(vuip)MCPCIA_CAP_ERR(mid) = stat0;
        mb();
-       temp = *(vuip)MCPCIA_CAP_ERR(mid);
+       *(vuip)MCPCIA_CAP_ERR(mid);
        DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0));
 
        mb();
@@ -136,7 +136,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
 {
        unsigned long flags;
        unsigned long mid = MCPCIA_HOSE2MID(hose->index);
-       unsigned int stat0, temp, cpu;
+       unsigned int stat0, cpu;
 
        cpu = smp_processor_id();
 
@@ -145,7 +145,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
        /* Reset status register to avoid losing errors.  */
        stat0 = *(vuip)MCPCIA_CAP_ERR(mid);
        *(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb();
-       temp = *(vuip)MCPCIA_CAP_ERR(mid);
+       *(vuip)MCPCIA_CAP_ERR(mid);
        DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0));
 
        draina();
@@ -157,7 +157,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
        *((vuip)addr) = value;
        mb();
        mb();  /* magic */
-       temp = *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */
+       *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */
        mcheck_expected(cpu) = 0;
        mb();
 
@@ -572,12 +572,10 @@ mcpcia_print_system_area(unsigned long la_ptr)
 void
 mcpcia_machine_check(unsigned long vector, unsigned long la_ptr)
 {
-       struct el_common *mchk_header;
        struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
        unsigned int cpu = smp_processor_id();
        int expected;
 
-       mchk_header = (struct el_common *)la_ptr;
        mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr;
        expected = mcheck_expected(cpu);
 
index 648ae88aeb8ae0cce7dcedbe215bf56417e5eebc..ae54ad91e18f97c15d826047860998fb692b9a89 100644 (file)
@@ -1027,7 +1027,7 @@ marvel_process_logout_frame(struct ev7_lf_subpackets *lf_subpackets, int print)
         * normal operation, dismiss them.
         *
         * Dismiss if:
-        *      C_STAT          = 0x14          (Error Reponse)
+        *      C_STAT          = 0x14          (Error Response)
         *      C_STS<3>        = 0             (C_ADDR valid)
         *      C_ADDR<42>      = 1             (I/O)
         *      C_ADDR<31:22>   = 111110xxb     (PCI Config space)
index c3b3781a03de01045ebd270319173ae2b5d347ee..14b26c466c8996cc1e4f7e03ff4391bcbb2bc3c8 100644 (file)
@@ -533,8 +533,6 @@ static struct el_subpacket_annotation el_titan_annotations[] = {
 static struct el_subpacket *
 el_process_regatta_subpacket(struct el_subpacket *header)
 {
-       int status;
-
        if (header->class != EL_CLASS__REGATTA_FAMILY) {
                printk("%s  ** Unexpected header CLASS %d TYPE %d, aborting\n",
                       err_print_prefix,
@@ -551,7 +549,7 @@ el_process_regatta_subpacket(struct el_subpacket *header)
                printk("%s  ** Occurred on CPU %d:\n", 
                       err_print_prefix,
                       (int)header->by_type.regatta_frame.cpuid);
-               status = privateer_process_logout_frame((struct el_common *)
+               privateer_process_logout_frame((struct el_common *)
                        header->by_type.regatta_frame.data_start, 1);
                break;
        default:
index 1479dc6ebd97a4288ee6d0dd0334ea17dbf02049..51b7fbd9e4c11406ce8950f6cecc64f1ebd7556a 100644 (file)
@@ -228,7 +228,7 @@ struct irqaction timer_irqaction = {
 void __init
 init_rtc_irq(void)
 {
-       irq_set_chip_and_handler_name(RTC_IRQ, &no_irq_chip,
+       irq_set_chip_and_handler_name(RTC_IRQ, &dummy_irq_chip,
                                      handle_simple_irq, "RTC");
        setup_irq(RTC_IRQ, &timer_irqaction);
 }
index d2634e4476b4589f03831f575ec00751b0434ca9..edbddcbd5bc654692fbfc98572ed8277303d49db 100644 (file)
@@ -1404,8 +1404,6 @@ determine_cpu_caches (unsigned int cpu_type)
        case PCA56_CPU:
        case PCA57_CPU:
          {
-               unsigned long cbox_config, size;
-
                if (cpu_type == PCA56_CPU) {
                        L1I = CSHAPE(16*1024, 6, 1);
                        L1D = CSHAPE(8*1024, 5, 1);
@@ -1415,10 +1413,12 @@ determine_cpu_caches (unsigned int cpu_type)
                }
                L3 = -1;
 
+#if 0
+               unsigned long cbox_config, size;
+
                cbox_config = *(vulp) phys_to_virt (0xfffff00008UL);
                size = 512*1024 * (1 << ((cbox_config >> 12) & 3));
 
-#if 0
                L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1);
 #else
                L2 = external_cache_probe(512*1024, 6);
index 3e6a2893af9f6e87122ca0e872ec95282cdf3fde..6886b834f4871f54c6eb6fd7a232a20ca12d0d0b 100644 (file)
@@ -79,7 +79,6 @@
 static unsigned long __init SMCConfigState(unsigned long baseAddr)
 {
        unsigned char devId;
-       unsigned char devRev;
 
        unsigned long configPort;
        unsigned long indexPort;
@@ -100,7 +99,7 @@ static unsigned long __init SMCConfigState(unsigned long baseAddr)
                devId = inb(dataPort);
                if (devId == VALID_DEVICE_ID) {
                        outb(DEVICE_REV, indexPort);
-                       devRev = inb(dataPort);
+                       /* unsigned char devRev = */ inb(dataPort);
                        break;
                }
                else
index d3cb28bb8eb0e450fcd4298698b944264d7b1fc0..d92cdc715c6530150563259e6fbc4c859f3e1d9f 100644 (file)
@@ -156,7 +156,6 @@ static void __init
 wildfire_init_irq_per_pca(int qbbno, int pcano)
 {
        int i, irq_bias;
-       unsigned long io_bias;
        static struct irqaction isa_enable = {
                .handler        = no_action,
                .name           = "isa_enable",
@@ -165,10 +164,12 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
        irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA)
                 + pcano * WILDFIRE_IRQ_PER_PCA;
 
+#if 0
+       unsigned long io_bias;
+
        /* Only need the following for first PCI bus per PCA. */
        io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS;
 
-#if 0
        outb(0, DMA1_RESET_REG + io_bias);
        outb(0, DMA2_RESET_REG + io_bias);
        outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias);
index a58e84f1a63b76cc3e96856d10736a1c03ba6872..918e8e0b72ff1e3220845ea410277a83ff326517 100644 (file)
@@ -153,6 +153,7 @@ void read_persistent_clock(struct timespec *ts)
                year += 100;
 
        ts->tv_sec = mktime(year, mon, day, hour, min, sec);
+       ts->tv_nsec = 0;
 }
 
 
index 3fd8bf414c7ba4f2e89e4f37928cb752aaf83ac8..dd0d8c6b9f59ffdf92d8a0bfe40aa3fdd0bbe29d 100644 (file)
@@ -82,7 +82,7 @@ $loop:
 $eos:
        negq    t1, t4          # E : isolate first null byte match
        and     t1, t4, t4      # E :
-       subq    t4, 1, t5       # E : build a mask of the bytes upto...
+       subq    t4, 1, t5       # E : build a mask of the bytes up to...
        or      t4, t5, t4      # E : ... and including the null
 
        and     t3, t4, t3      # E : mask out char matches after null
index 32afaa3fa6860e65762a06bcf6b13c961739b12f..ddd048c0d825a0fd7597f2b82096f383368ff859 100644 (file)
@@ -6,7 +6,7 @@
 #include <linux/bitops.h>
 
 /* This is fls(x)-1, except zero is held to zero.  This allows most
-   efficent input into extbl, plus it allows easy handling of fls(0)=0.  */
+   efficient input into extbl, plus it allows easy handling of fls(0)=0.  */
 
 const unsigned char __flsm1_tab[256] = 
 {
index 82cfd0ac907be7efe2960e466ffebbe4c65994b1..1970dc07cfd1248147bc17da538196fcb9cd9e84 100644 (file)
@@ -54,7 +54,7 @@ $loop:
 $eos:
        negq    t1, t4          # e0    : isolate first null byte match
        and     t1, t4, t4      # e1    :
-       subq    t4, 1, t5       # e0    : build a mask of the bytes upto...
+       subq    t4, 1, t5       # e0    : build a mask of the bytes up to...
        or      t4, t5, t4      # e1    : ... and including the null
 
        and     t3, t4, t3      # e0    : mask out char matches after null
index 70302086283c637ddb976c4769ed169a9e3c9582..5b9d178e0228e5b702fd1487c875511cb3c91715 100644 (file)
@@ -192,7 +192,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs,
                case TRAP_INVALID1:
                case TRAP_INVALID2:
                case TRAP_INVALID3:
-                       /* Pipeline redirection ocurred. PMPC points
+                       /* Pipeline redirection occurred. PMPC points
                           to PALcode. Recognize ITB miss by PALcode
                           offset address, and get actual PC from
                           EXC_ADDR.  */
index 5b9f78b570e85c2f959c3d7fb1cda1bd70b2ac55..377a7a595b08041fdacb1dfd43d8be206578bda8 100644 (file)
@@ -694,7 +694,7 @@ config ARCH_S3C2410
          the Samsung SMDK2410 development board (and derivatives).
 
          Note, the S3C2416 and the S3C2450 are so close that they even share
-         the same SoC ID code. This means that there is no seperate machine
+         the same SoC ID code. This means that there is no separate machine
          directory (no arch/arm/mach-s3c2450) as the S3C2416 was first.
 
 config ARCH_S3C64XX
@@ -1540,7 +1540,6 @@ config HIGHMEM
 config HIGHPTE
        bool "Allocate 2nd-level pagetables from highmem"
        depends on HIGHMEM
-       depends on !OUTER_CACHE
 
 config HW_PERF_EVENTS
        bool "Enable hardware performance counter support for perf events"
@@ -2012,6 +2011,8 @@ source "kernel/power/Kconfig"
 
 config ARCH_SUSPEND_POSSIBLE
        depends on !ARCH_S5P64X0 && !ARCH_S5P6442
+       depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
+               CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
        def_bool y
 
 endmenu
index 901e6dff8437c947cfc2783129502235e2474fb4..2cef8e13f9f83012c224c23802c383e4715a135f 100644 (file)
@@ -34,7 +34,7 @@ config PROCESSOR_ID
          used instead of the auto-probing which utilizes the register.
 
 config REMAP_VECTORS_TO_RAM
-       bool 'Install vectors to the begining of RAM' if DRAM_BASE
+       bool 'Install vectors to the beginning of RAM' if DRAM_BASE
        depends on DRAM_BASE
        help
          The kernel needs to change the hardware exception vectors.
index 494224a9b459060f94f39aafeeae8389111d50a0..03d01d783e3bf95c72f28259aad1550b97c5cc68 100644 (file)
@@ -63,17 +63,6 @@ config DEBUG_USER
              8 - SIGSEGV faults
             16 - SIGBUS faults
 
-config DEBUG_ERRORS
-       bool "Verbose kernel error messages"
-       depends on DEBUG_KERNEL
-       help
-         This option controls verbose debugging information which can be
-         printed when the kernel detects an internal error. This debugging
-         information is useful to kernel hackers when tracking down problems,
-         but mostly meaningless to other people. It's safe to say Y unless
-         you are concerned with the code size or don't want to see these
-         messages.
-
 config DEBUG_STACK_USAGE
        bool "Enable stack utilization instrumentation"
        depends on DEBUG_KERNEL
index e7521bca2c3564eaf3d21663fbf4ae3721e43461..6ea9b6f3607af35121e2e117e1580b1d841b520d 100644 (file)
@@ -16,5 +16,4 @@ obj-$(CONFIG_SHARP_SCOOP)     += scoop.o
 obj-$(CONFIG_ARCH_IXP2000)     += uengine.o
 obj-$(CONFIG_ARCH_IXP23XX)     += uengine.o
 obj-$(CONFIG_PCI_HOST_ITE8152)  += it8152.o
-obj-$(CONFIG_COMMON_CLKDEV)    += clkdev.o
 obj-$(CONFIG_ARM_TIMER_SP804)  += timer-sp.o
index 8f0f86db36024e885778f9ddd864fab69eed1c27..97912fa48782563527a3b56cc9b60c1acee008f3 100644 (file)
@@ -1045,7 +1045,7 @@ static inline int _loop(unsigned dry_run, u8 buf[],
        unsigned lcnt0, lcnt1, ljmp0, ljmp1;
        struct _arg_LPEND lpend;
 
-       /* Max iterations possibile in DMALP is 256 */
+       /* Max iterations possible in DMALP is 256 */
        if (*bursts >= 256*256) {
                lcnt1 = 256;
                lcnt0 = 256;
@@ -1446,7 +1446,7 @@ int pl330_update(const struct pl330_info *pi)
        }
 
        for (ev = 0; ev < pi->pcfg.num_events; ev++) {
-               if (val & (1 << ev)) { /* Event occured */
+               if (val & (1 << ev)) { /* Event occurred */
                        struct pl330_thread *thrd;
                        u32 inten = readl(regs + INTEN);
                        int active;
index ed5bc9e05a4e176e0c86c89762afeb770efc998c..cd4458f64171e5e40720b991e8df5ad72099b0c5 100644 (file)
@@ -2,6 +2,7 @@
 #define __ASM_ARM_CPUTYPE_H
 
 #include <linux/stringify.h>
+#include <linux/kernel.h>
 
 #define CPUID_ID       0
 #define CPUID_CACHETYPE        1
index ee5e03efc1bbe3dff88c2acc8313ab08136cd98b..3ad4c10d0d84f6200e6e9a2078088c02d2b6313c 100644 (file)
@@ -18,7 +18,7 @@
  * VFP storage area has:
  *  - FPEXC, FPSCR, FPINST and FPINST2.
  *  - 16 or 32 double precision data registers
- *  - an implementation-dependant word of state for FLDMX/FSTMX (pre-ARMv6)
+ *  - an implementation-dependent word of state for FLDMX/FSTMX (pre-ARMv6)
  * 
  *  FPEXC will always be non-zero once the VFP has been used in this process.
  */
index c7afbc552c7fcaef4aceb8750382ff9ef9a40359..7e30874377e67bede33d1f4a047bfc4f1de65fc0 100644 (file)
 #endif
 
 #if !defined(_CACHE) && !defined(MULTI_CACHE)
-#error Unknown cache maintainence model
+#error Unknown cache maintenance model
 #endif
 
 #ifndef MULTI_CACHE
index 0ec35d1698aacb7d96203f64563ba746dfa3018b..fbf71d75ec83b5c447aea22a6d3a27d3876e89fb 100644 (file)
@@ -10,8 +10,8 @@
  *
  *  This file provides the glue to stick the processor-specific bits
  *  into the kernel in an efficient manner.  The idea is to use branches
- *  when we're only targetting one class of TLB, or indirect calls
- *  when we're targetting multiple classes of TLBs.
+ *  when we're only targeting one class of TLB, or indirect calls
+ *  when we're targeting multiple classes of TLBs.
  */
 #ifdef __KERNEL__
 
index f35b86e68dd59d92bcc9d5375b0a1a1b11d58080..e4a04e4e5627e998d7f3ff9a8fac4fb1ade84f95 100644 (file)
@@ -16,7 +16,7 @@
  * make it not entierly compatible with the PL080 specification from
  * ARM. When in doubt, check the Samsung documentation first.
  *
- * The Samsung defines are PL080S, and add an extra controll register,
+ * The Samsung defines are PL080S, and add an extra control register,
  * the ability to move more than 2^11 counts of data and some extra
  * OneNAND features.
 */
index bb8a19bd58225a3ce39bf39443cfd5b74b6409fd..e46bdd0097ebd9125f7382f76048d5fc20bbbb22 100644 (file)
@@ -39,10 +39,13 @@ typedef u32 kprobe_opcode_t;
 struct kprobe;
 typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *);
 
+typedef unsigned long (kprobe_check_cc)(unsigned long);
+
 /* Architecture specific copy of original instruction. */
 struct arch_specific_insn {
        kprobe_opcode_t         *insn;
        kprobe_insn_handler_t   *insn_handler;
+       kprobe_check_cc         *insn_check_cc;
 };
 
 struct prev_kprobe {
index 9a87823642d0add07afdf9f3c7f54f03fa056b5a..885be097769d108d9ff9c5d39dd0cd94af55fbb9 100644 (file)
@@ -249,7 +249,7 @@ do {                                                                        \
  * cache totally.  This means that the cache becomes inconsistent, and,
  * since we use normal loads/stores as well, this is really bad.
  * Typically, this causes oopsen in filp_close, but could have other,
- * more disasterous effects.  There are two work-arounds:
+ * more disastrous effects.  There are two work-arounds:
  *  1. Disable interrupts and emulate the atomic swap
  *  2. Clean the cache, perform atomic swap, flush the cache
  *
index c4391ba203507a2b1c34a9634ad6fb9c4ff7eb64..1dc98067589412a8ecc42e72e5b21a5f161b4f2a 100644 (file)
@@ -43,6 +43,7 @@ static inline void thread_notify(unsigned long rc, struct thread_info *thread)
 #define THREAD_NOTIFY_FLUSH    0
 #define THREAD_NOTIFY_EXIT     1
 #define THREAD_NOTIFY_SWITCH   2
+#define THREAD_NOTIFY_COPY     3
 
 #endif
 #endif
index 47f023aa849587d89dc194f1aed5365cf7d81a92..14749aec94bf3847148d3e6532f6507d06a2e15a 100644 (file)
@@ -47,7 +47,7 @@ struct crunch_sigframe {
 #endif
 
 #ifdef CONFIG_IWMMXT
-/* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */
+/* iwmmxt_area is 0x98 bytes long, preceded by 8 bytes of signature */
 #define IWMMXT_MAGIC           0x12ef842a
 #define IWMMXT_STORAGE_SIZE    (IWMMXT_SIZE + 8)
 
index c891eb76c0e313406847e7b9fbe968bb1b8fa459..87dbe3e21970c224391e4f2e29e08c34157821f7 100644 (file)
 #define __NR_fanotify_init             (__NR_SYSCALL_BASE+367)
 #define __NR_fanotify_mark             (__NR_SYSCALL_BASE+368)
 #define __NR_prlimit64                 (__NR_SYSCALL_BASE+369)
+#define __NR_name_to_handle_at         (__NR_SYSCALL_BASE+370)
+#define __NR_open_by_handle_at         (__NR_SYSCALL_BASE+371)
+#define __NR_clock_adjtime             (__NR_SYSCALL_BASE+372)
+#define __NR_syncfs                    (__NR_SYSCALL_BASE+373)
 
 /*
  * The following SWIs are ARM private.
index 74554f1742d72efd2c01a639e5fd0e3460221f94..8d95446150a3e7ed0ad8fd5782f7f918529bc3d7 100644 (file)
@@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES)         += armksyms.o module.o
 obj-$(CONFIG_ARTHUR)           += arthur.o
 obj-$(CONFIG_ISA_DMA)          += dma-isa.o
 obj-$(CONFIG_PCI)              += bios32.o isa.o
-obj-$(CONFIG_PM)               += sleep.o
+obj-$(CONFIG_PM_SLEEP)         += sleep.o
 obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o
 obj-$(CONFIG_SMP)              += smp.o smp_tlb.o
 obj-$(CONFIG_HAVE_ARM_SCU)     += smp_scu.o
index 5c26eccef9982665b1e1672416b9bc996f3b2dae..7fbf28c35bb2b438469894bb6bc80797fd8a3cf6 100644 (file)
                CALL(sys_fanotify_init)
                CALL(sys_fanotify_mark)
                CALL(sys_prlimit64)
+/* 370 */      CALL(sys_name_to_handle_at)
+               CALL(sys_open_by_handle_at)
+               CALL(sys_clock_adjtime)
+               CALL(sys_syncfs)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
index d4a0da1e48f40988bb7f92ce34664d86adb74a32..9b05c6a0dceac54615e1dfa472bf28ca946616ac 100644 (file)
@@ -40,15 +40,22 @@ EXPORT_SYMBOL(elf_check_arch);
 void elf_set_personality(const struct elf32_hdr *x)
 {
        unsigned int eflags = x->e_flags;
-       unsigned int personality = PER_LINUX_32BIT;
+       unsigned int personality = current->personality & ~PER_MASK;
+
+       /*
+        * We only support Linux ELF executables, so always set the
+        * personality to LINUX.
+        */
+       personality |= PER_LINUX;
 
        /*
         * APCS-26 is only valid for OABI executables
         */
-       if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) {
-               if (eflags & EF_ARM_APCS_26)
-                       personality = PER_LINUX;
-       }
+       if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN &&
+           (eflags & EF_ARM_APCS_26))
+               personality &= ~ADDR_LIMIT_32BIT;
+       else
+               personality |= ADDR_LIMIT_32BIT;
 
        set_personality(personality);
 
index 8dbc126f7152d992472898a639801239d49a40ac..87acc25d7a3e203646f2ee71f1d7c711304d52f2 100644 (file)
@@ -868,6 +868,13 @@ static void reset_ctrl_regs(void *info)
                 */
                asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0));
                isb();
+
+               /*
+                * Clear any configured vector-catch events before
+                * enabling monitor mode.
+                */
+               asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0));
+               isb();
        }
 
        if (enable_monitor_mode())
index 23891317dc4be73d083f497291525feefaf015c6..15eeff6aea0e8185d9d4b7111da60afad3ea7967 100644 (file)
@@ -34,9 +34,6 @@
  *
  *   *) If the PC is written to by the instruction, the
  *      instruction must be fully simulated in software.
- *      If it is a conditional instruction, the handler
- *      will use insn[0] to copy its condition code to
- *     set r0 to 1 and insn[1] to "mov pc, lr" to return.
  *
  *   *) Otherwise, a modified form of the instruction is
  *      directly executed.  Its handler calls the
 
 #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25)
 
+#define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos))
+
+/*
+ * Test if load/store instructions writeback the address register.
+ * if P (bit 24) == 0 or W (bit 21) == 1
+ */
+#define is_writeback(insn) ((insn ^ 0x01000000) & 0x01200000)
+
 #define PSR_fs (PSR_f|PSR_s)
 
 #define KPROBE_RETURN_INSTRUCTION      0xe1a0f00e      /* mov pc, lr */
-#define SET_R0_TRUE_INSTRUCTION                0xe3a00001      /* mov  r0, #1 */
-
-#define        truecc_insn(insn)       (((insn) & 0xf0000000) | \
-                                (SET_R0_TRUE_INSTRUCTION & 0x0fffffff))
 
 typedef long (insn_0arg_fn_t)(void);
 typedef long (insn_1arg_fn_t)(long);
@@ -419,14 +420,10 @@ insnslot_llret_4arg_rwflags(long r0, long r1, long r2, long r3, long *cpsr,
 
 static void __kprobes simulate_bbl(struct kprobe *p, struct pt_regs *regs)
 {
-       insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
        long iaddr = (long)p->addr;
        int disp  = branch_displacement(insn);
 
-       if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn))
-               return;
-
        if (insn & (1 << 24))
                regs->ARM_lr = iaddr + 4;
 
@@ -446,14 +443,10 @@ static void __kprobes simulate_blx1(struct kprobe *p, struct pt_regs *regs)
 
 static void __kprobes simulate_blx2bx(struct kprobe *p, struct pt_regs *regs)
 {
-       insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
        int rm = insn & 0xf;
        long rmv = regs->uregs[rm];
 
-       if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn))
-               return;
-
        if (insn & (1 << 5))
                regs->ARM_lr = (long)p->addr + 4;
 
@@ -463,9 +456,16 @@ static void __kprobes simulate_blx2bx(struct kprobe *p, struct pt_regs *regs)
                regs->ARM_cpsr |= PSR_T_BIT;
 }
 
+static void __kprobes simulate_mrs(struct kprobe *p, struct pt_regs *regs)
+{
+       kprobe_opcode_t insn = p->opcode;
+       int rd = (insn >> 12) & 0xf;
+       unsigned long mask = 0xf8ff03df; /* Mask out execution state */
+       regs->uregs[rd] = regs->ARM_cpsr & mask;
+}
+
 static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
 {
-       insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
        int rn = (insn >> 16) & 0xf;
        int lbit = insn & (1 << 20);
@@ -476,9 +476,6 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
        int reg_bit_vector;
        int reg_count;
 
-       if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn))
-               return;
-
        reg_count = 0;
        reg_bit_vector = insn & 0xffff;
        while (reg_bit_vector) {
@@ -510,11 +507,6 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
 
 static void __kprobes simulate_stm1_pc(struct kprobe *p, struct pt_regs *regs)
 {
-       insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
-
-       if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn))
-               return;
-
        regs->ARM_pc = (long)p->addr + str_pc_offset;
        simulate_ldm1stm1(p, regs);
        regs->ARM_pc = (long)p->addr + 4;
@@ -525,24 +517,16 @@ static void __kprobes simulate_mov_ipsp(struct kprobe *p, struct pt_regs *regs)
        regs->uregs[12] = regs->uregs[13];
 }
 
-static void __kprobes emulate_ldcstc(struct kprobe *p, struct pt_regs *regs)
-{
-       insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
-       kprobe_opcode_t insn = p->opcode;
-       int rn = (insn >> 16) & 0xf;
-       long rnv = regs->uregs[rn];
-
-       /* Save Rn in case of writeback. */
-       regs->uregs[rn] = insnslot_1arg_rflags(rnv, regs->ARM_cpsr, i_fn);
-}
-
 static void __kprobes emulate_ldrd(struct kprobe *p, struct pt_regs *regs)
 {
        insn_2arg_fn_t *i_fn = (insn_2arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
+       long ppc = (long)p->addr + 8;
        int rd = (insn >> 12) & 0xf;
        int rn = (insn >> 16) & 0xf;
        int rm = insn & 0xf;  /* rm may be invalid, don't care. */
+       long rmv = (rm == 15) ? ppc : regs->uregs[rm];
+       long rnv = (rn == 15) ? ppc : regs->uregs[rn];
 
        /* Not following the C calling convention here, so need asm(). */
        __asm__ __volatile__ (
@@ -554,29 +538,36 @@ static void __kprobes emulate_ldrd(struct kprobe *p, struct pt_regs *regs)
                "str    r0, %[rn]       \n\t"   /* in case of writeback */
                "str    r2, %[rd0]      \n\t"
                "str    r3, %[rd1]      \n\t"
-               : [rn]  "+m" (regs->uregs[rn]),
+               : [rn]  "+m" (rnv),
                  [rd0] "=m" (regs->uregs[rd]),
                  [rd1] "=m" (regs->uregs[rd+1])
-               : [rm]   "m" (regs->uregs[rm]),
+               : [rm]   "m" (rmv),
                  [cpsr] "r" (regs->ARM_cpsr),
                  [i_fn] "r" (i_fn)
                : "r0", "r1", "r2", "r3", "lr", "cc"
        );
+       if (is_writeback(insn))
+               regs->uregs[rn] = rnv;
 }
 
 static void __kprobes emulate_strd(struct kprobe *p, struct pt_regs *regs)
 {
        insn_4arg_fn_t *i_fn = (insn_4arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
+       long ppc = (long)p->addr + 8;
        int rd = (insn >> 12) & 0xf;
        int rn = (insn >> 16) & 0xf;
        int rm  = insn & 0xf;
-       long rnv = regs->uregs[rn];
-       long rmv = regs->uregs[rm];  /* rm/rmv may be invalid, don't care. */
+       long rnv = (rn == 15) ? ppc : regs->uregs[rn];
+       /* rm/rmv may be invalid, don't care. */
+       long rmv = (rm == 15) ? ppc : regs->uregs[rm];
+       long rnv_wb;
 
-       regs->uregs[rn] = insnslot_4arg_rflags(rnv, rmv, regs->uregs[rd],
+       rnv_wb = insnslot_4arg_rflags(rnv, rmv, regs->uregs[rd],
                                               regs->uregs[rd+1],
                                               regs->ARM_cpsr, i_fn);
+       if (is_writeback(insn))
+               regs->uregs[rn] = rnv_wb;
 }
 
 static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs)
@@ -630,31 +621,6 @@ static void __kprobes emulate_str(struct kprobe *p, struct pt_regs *regs)
                regs->uregs[rn] = rnv_wb;  /* Save Rn in case of writeback. */
 }
 
-static void __kprobes emulate_mrrc(struct kprobe *p, struct pt_regs *regs)
-{
-       insn_llret_0arg_fn_t *i_fn = (insn_llret_0arg_fn_t *)&p->ainsn.insn[0];
-       kprobe_opcode_t insn = p->opcode;
-       union reg_pair fnr;
-       int rd = (insn >> 12) & 0xf;
-       int rn = (insn >> 16) & 0xf;
-
-       fnr.dr = insnslot_llret_0arg_rflags(regs->ARM_cpsr, i_fn);
-       regs->uregs[rn] = fnr.r0;
-       regs->uregs[rd] = fnr.r1;
-}
-
-static void __kprobes emulate_mcrr(struct kprobe *p, struct pt_regs *regs)
-{
-       insn_2arg_fn_t *i_fn = (insn_2arg_fn_t *)&p->ainsn.insn[0];
-       kprobe_opcode_t insn = p->opcode;
-       int rd = (insn >> 12) & 0xf;
-       int rn = (insn >> 16) & 0xf;
-       long rnv = regs->uregs[rn];
-       long rdv = regs->uregs[rd];
-
-       insnslot_2arg_rflags(rnv, rdv, regs->ARM_cpsr, i_fn);
-}
-
 static void __kprobes emulate_sat(struct kprobe *p, struct pt_regs *regs)
 {
        insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
@@ -688,32 +654,32 @@ static void __kprobes emulate_none(struct kprobe *p, struct pt_regs *regs)
        insnslot_0arg_rflags(regs->ARM_cpsr, i_fn);
 }
 
-static void __kprobes emulate_rd12(struct kprobe *p, struct pt_regs *regs)
+static void __kprobes emulate_nop(struct kprobe *p, struct pt_regs *regs)
 {
-       insn_0arg_fn_t *i_fn = (insn_0arg_fn_t *)&p->ainsn.insn[0];
-       kprobe_opcode_t insn = p->opcode;
-       int rd = (insn >> 12) & 0xf;
-
-       regs->uregs[rd] = insnslot_0arg_rflags(regs->ARM_cpsr, i_fn);
 }
 
-static void __kprobes emulate_ird12(struct kprobe *p, struct pt_regs *regs)
+static void __kprobes
+emulate_rd12_modify(struct kprobe *p, struct pt_regs *regs)
 {
        insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
-       int ird = (insn >> 12) & 0xf;
+       int rd = (insn >> 12) & 0xf;
+       long rdv = regs->uregs[rd];
 
-       insnslot_1arg_rflags(regs->uregs[ird], regs->ARM_cpsr, i_fn);
+       regs->uregs[rd] = insnslot_1arg_rflags(rdv, regs->ARM_cpsr, i_fn);
 }
 
-static void __kprobes emulate_rn16(struct kprobe *p, struct pt_regs *regs)
+static void __kprobes
+emulate_rd12rn0_modify(struct kprobe *p, struct pt_regs *regs)
 {
-       insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
+       insn_2arg_fn_t *i_fn = (insn_2arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
-       int rn = (insn >> 16) & 0xf;
+       int rd = (insn >> 12) & 0xf;
+       int rn = insn & 0xf;
+       long rdv = regs->uregs[rd];
        long rnv = regs->uregs[rn];
 
-       insnslot_1arg_rflags(rnv, regs->ARM_cpsr, i_fn);
+       regs->uregs[rd] = insnslot_2arg_rflags(rdv, rnv, regs->ARM_cpsr, i_fn);
 }
 
 static void __kprobes emulate_rd12rm0(struct kprobe *p, struct pt_regs *regs)
@@ -818,6 +784,17 @@ emulate_alu_imm_rwflags(struct kprobe *p, struct pt_regs *regs)
        regs->uregs[rd] = insnslot_1arg_rwflags(rnv, &regs->ARM_cpsr, i_fn);
 }
 
+static void __kprobes
+emulate_alu_tests_imm(struct kprobe *p, struct pt_regs *regs)
+{
+       insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0];
+       kprobe_opcode_t insn = p->opcode;
+       int rn = (insn >> 16) & 0xf;
+       long rnv = (rn == 15) ? (long)p->addr + 8 : regs->uregs[rn];
+
+       insnslot_1arg_rwflags(rnv, &regs->ARM_cpsr, i_fn);
+}
+
 static void __kprobes
 emulate_alu_rflags(struct kprobe *p, struct pt_regs *regs)
 {
@@ -854,14 +831,34 @@ emulate_alu_rwflags(struct kprobe *p, struct pt_regs *regs)
                insnslot_3arg_rwflags(rnv, rmv, rsv, &regs->ARM_cpsr, i_fn);
 }
 
+static void __kprobes
+emulate_alu_tests(struct kprobe *p, struct pt_regs *regs)
+{
+       insn_3arg_fn_t *i_fn = (insn_3arg_fn_t *)&p->ainsn.insn[0];
+       kprobe_opcode_t insn = p->opcode;
+       long ppc = (long)p->addr + 8;
+       int rn = (insn >> 16) & 0xf;
+       int rs = (insn >> 8) & 0xf;     /* rs/rsv may be invalid, don't care. */
+       int rm = insn & 0xf;
+       long rnv = (rn == 15) ? ppc : regs->uregs[rn];
+       long rmv = (rm == 15) ? ppc : regs->uregs[rm];
+       long rsv = regs->uregs[rs];
+
+       insnslot_3arg_rwflags(rnv, rmv, rsv, &regs->ARM_cpsr, i_fn);
+}
+
 static enum kprobe_insn __kprobes
 prep_emulate_ldr_str(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
-       int ibit = (insn & (1 << 26)) ? 25 : 22;
+       int not_imm = (insn & (1 << 26)) ? (insn & (1 << 25))
+                                        : (~insn & (1 << 22));
+
+       if (is_writeback(insn) && is_r15(insn, 16))
+               return INSN_REJECTED;   /* Writeback to PC */
 
        insn &= 0xfff00fff;
        insn |= 0x00001000;     /* Rn = r0, Rd = r1 */
-       if (insn & (1 << ibit)) {
+       if (not_imm) {
                insn &= ~0xf;
                insn |= 2;      /* Rm = r2 */
        }
@@ -871,20 +868,40 @@ prep_emulate_ldr_str(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 }
 
 static enum kprobe_insn __kprobes
-prep_emulate_rd12rm0(kprobe_opcode_t insn, struct arch_specific_insn *asi)
+prep_emulate_rd12_modify(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
-       insn &= 0xffff0ff0;     /* Rd = r0, Rm = r0 */
+       if (is_r15(insn, 12))
+               return INSN_REJECTED;   /* Rd is PC */
+
+       insn &= 0xffff0fff;     /* Rd = r0 */
        asi->insn[0] = insn;
-       asi->insn_handler = emulate_rd12rm0;
+       asi->insn_handler = emulate_rd12_modify;
        return INSN_GOOD;
 }
 
 static enum kprobe_insn __kprobes
-prep_emulate_rd12(kprobe_opcode_t insn, struct arch_specific_insn *asi)
+prep_emulate_rd12rn0_modify(kprobe_opcode_t insn,
+                           struct arch_specific_insn *asi)
 {
-       insn &= 0xffff0fff;     /* Rd = r0 */
+       if (is_r15(insn, 12))
+               return INSN_REJECTED;   /* Rd is PC */
+
+       insn &= 0xffff0ff0;     /* Rd = r0 */
+       insn |= 0x00000001;     /* Rn = r1 */
+       asi->insn[0] = insn;
+       asi->insn_handler = emulate_rd12rn0_modify;
+       return INSN_GOOD;
+}
+
+static enum kprobe_insn __kprobes
+prep_emulate_rd12rm0(kprobe_opcode_t insn, struct arch_specific_insn *asi)
+{
+       if (is_r15(insn, 12))
+               return INSN_REJECTED;   /* Rd is PC */
+
+       insn &= 0xffff0ff0;     /* Rd = r0, Rm = r0 */
        asi->insn[0] = insn;
-       asi->insn_handler = emulate_rd12;
+       asi->insn_handler = emulate_rd12rm0;
        return INSN_GOOD;
 }
 
@@ -892,6 +909,9 @@ static enum kprobe_insn __kprobes
 prep_emulate_rd12rn16rm0_wflags(kprobe_opcode_t insn,
                                struct arch_specific_insn *asi)
 {
+       if (is_r15(insn, 12))
+               return INSN_REJECTED;   /* Rd is PC */
+
        insn &= 0xfff00ff0;     /* Rd = r0, Rn = r0 */
        insn |= 0x00000001;     /* Rm = r1 */
        asi->insn[0] = insn;
@@ -903,6 +923,9 @@ static enum kprobe_insn __kprobes
 prep_emulate_rd16rs8rm0_wflags(kprobe_opcode_t insn,
                               struct arch_specific_insn *asi)
 {
+       if (is_r15(insn, 16))
+               return INSN_REJECTED;   /* Rd is PC */
+
        insn &= 0xfff0f0f0;     /* Rd = r0, Rs = r0 */
        insn |= 0x00000001;     /* Rm = r1          */
        asi->insn[0] = insn;
@@ -914,6 +937,9 @@ static enum kprobe_insn __kprobes
 prep_emulate_rd16rn12rs8rm0_wflags(kprobe_opcode_t insn,
                                   struct arch_specific_insn *asi)
 {
+       if (is_r15(insn, 16))
+               return INSN_REJECTED;   /* Rd is PC */
+
        insn &= 0xfff000f0;     /* Rd = r0, Rn = r0 */
        insn |= 0x00000102;     /* Rs = r1, Rm = r2 */
        asi->insn[0] = insn;
@@ -925,6 +951,9 @@ static enum kprobe_insn __kprobes
 prep_emulate_rdhi16rdlo12rs8rm0_wflags(kprobe_opcode_t insn,
                                       struct arch_specific_insn *asi)
 {
+       if (is_r15(insn, 16) || is_r15(insn, 12))
+               return INSN_REJECTED;   /* RdHi or RdLo is PC */
+
        insn &= 0xfff000f0;     /* RdHi = r0, RdLo = r1 */
        insn |= 0x00001203;     /* Rs = r2, Rm = r3 */
        asi->insn[0] = insn;
@@ -945,20 +974,13 @@ prep_emulate_rdhi16rdlo12rs8rm0_wflags(kprobe_opcode_t insn,
 static enum kprobe_insn __kprobes
 space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
-       /* CPS mmod == 1 : 1111 0001 0000 xx10 xxxx xxxx xx0x xxxx */
-       /* RFE           : 1111 100x x0x1 xxxx xxxx 1010 xxxx xxxx */
-       /* SRS           : 1111 100x x1x0 1101 xxxx 0101 xxxx xxxx */
-       if ((insn & 0xfff30020) == 0xf1020000 ||
-           (insn & 0xfe500f00) == 0xf8100a00 ||
-           (insn & 0xfe5f0f00) == 0xf84d0500)
-               return INSN_REJECTED;
-
-       /* PLD : 1111 01x1 x101 xxxx xxxx xxxx xxxx xxxx : */
-       if ((insn & 0xfd700000) == 0xf4500000) {
-               insn &= 0xfff0ffff;     /* Rn = r0 */
-               asi->insn[0] = insn;
-               asi->insn_handler = emulate_rn16;
-               return INSN_GOOD;
+       /* memory hint : 1111 0100 x001 xxxx xxxx xxxx xxxx xxxx : */
+       /* PLDI        : 1111 0100 x101 xxxx xxxx xxxx xxxx xxxx : */
+       /* PLDW        : 1111 0101 x001 xxxx xxxx xxxx xxxx xxxx : */
+       /* PLD         : 1111 0101 x101 xxxx xxxx xxxx xxxx xxxx : */
+       if ((insn & 0xfe300000) == 0xf4100000) {
+               asi->insn_handler = emulate_nop;
+               return INSN_GOOD_NO_SLOT;
        }
 
        /* BLX(1) : 1111 101x xxxx xxxx xxxx xxxx xxxx xxxx : */
@@ -967,41 +989,22 @@ space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi)
                return INSN_GOOD_NO_SLOT;
        }
 
-       /* SETEND : 1111 0001 0000 0001 xxxx xxxx 0000 xxxx */
-       /* CDP2   : 1111 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */
-       if ((insn & 0xffff00f0) == 0xf1010000 ||
-           (insn & 0xff000010) == 0xfe000000) {
-               asi->insn[0] = insn;
-               asi->insn_handler = emulate_none;
-               return INSN_GOOD;
-       }
+       /* CPS   : 1111 0001 0000 xxx0 xxxx xxxx xx0x xxxx */
+       /* SETEND: 1111 0001 0000 0001 xxxx xxxx 0000 xxxx */
 
+       /* SRS   : 1111 100x x1x0 xxxx xxxx xxxx xxxx xxxx */
+       /* RFE   : 1111 100x x0x1 xxxx xxxx xxxx xxxx xxxx */
+
+       /* Coprocessor instructions... */
        /* MCRR2 : 1111 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */
        /* MRRC2 : 1111 1100 0101 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */
-       if ((insn & 0xffe00000) == 0xfc400000) {
-               insn &= 0xfff00fff;     /* Rn = r0 */
-               insn |= 0x00001000;     /* Rd = r1 */
-               asi->insn[0] = insn;
-               asi->insn_handler =
-                       (insn & (1 << 20)) ? emulate_mrrc : emulate_mcrr;
-               return INSN_GOOD;
-       }
+       /* LDC2  : 1111 110x xxx1 xxxx xxxx xxxx xxxx xxxx */
+       /* STC2  : 1111 110x xxx0 xxxx xxxx xxxx xxxx xxxx */
+       /* CDP2  : 1111 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */
+       /* MCR2  : 1111 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */
+       /* MRC2  : 1111 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */
 
-       /* LDC2 : 1111 110x xxx1 xxxx xxxx xxxx xxxx xxxx */
-       /* STC2 : 1111 110x xxx0 xxxx xxxx xxxx xxxx xxxx */
-       if ((insn & 0xfe000000) == 0xfc000000) {
-               insn &= 0xfff0ffff;      /* Rn = r0 */
-               asi->insn[0] = insn;
-               asi->insn_handler = emulate_ldcstc;
-               return INSN_GOOD;
-       }
-
-       /* MCR2 : 1111 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */
-       /* MRC2 : 1111 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */
-       insn &= 0xffff0fff;     /* Rd = r0 */
-       asi->insn[0]      = insn;
-       asi->insn_handler = (insn & (1 << 20)) ? emulate_rd12 : emulate_ird12;
-       return INSN_GOOD;
+       return INSN_REJECTED;
 }
 
 static enum kprobe_insn __kprobes
@@ -1010,19 +1013,18 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
        /* cccc 0001 0xx0 xxxx xxxx xxxx xxxx xxx0 xxxx */
        if ((insn & 0x0f900010) == 0x01000000) {
 
-               /* BXJ  : cccc 0001 0010 xxxx xxxx xxxx 0010 xxxx */
-               /* MSR  : cccc 0001 0x10 xxxx xxxx xxxx 0000 xxxx */
-               if ((insn & 0x0ff000f0) == 0x01200020 ||
-                   (insn & 0x0fb000f0) == 0x01200000)
-                       return INSN_REJECTED;
-
-               /* MRS : cccc 0001 0x00 xxxx xxxx xxxx 0000 xxxx */
-               if ((insn & 0x0fb00010) == 0x01000000)
-                       return prep_emulate_rd12(insn, asi);
+               /* MRS cpsr : cccc 0001 0000 xxxx xxxx xxxx 0000 xxxx */
+               if ((insn & 0x0ff000f0) == 0x01000000) {
+                       if (is_r15(insn, 12))
+                               return INSN_REJECTED;   /* Rd is PC */
+                       asi->insn_handler = simulate_mrs;
+                       return INSN_GOOD_NO_SLOT;
+               }
 
                /* SMLALxy : cccc 0001 0100 xxxx xxxx xxxx 1xx0 xxxx */
                if ((insn & 0x0ff00090) == 0x01400080)
-                       return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi);
+                       return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn,
+                                                                       asi);
 
                /* SMULWy : cccc 0001 0010 xxxx xxxx xxxx 1x10 xxxx */
                /* SMULxy : cccc 0001 0110 xxxx xxxx xxxx 1xx0 xxxx */
@@ -1031,24 +1033,29 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
                        return prep_emulate_rd16rs8rm0_wflags(insn, asi);
 
                /* SMLAxy : cccc 0001 0000 xxxx xxxx xxxx 1xx0 xxxx : Q */
-               /* SMLAWy : cccc 0001 0010 xxxx xxxx xxxx 0x00 xxxx : Q */
-               return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
+               /* SMLAWy : cccc 0001 0010 xxxx xxxx xxxx 1x00 xxxx : Q */
+               if ((insn & 0x0ff00090) == 0x01000080 ||
+                   (insn & 0x0ff000b0) == 0x01200080)
+                       return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
+
+               /* BXJ      : cccc 0001 0010 xxxx xxxx xxxx 0010 xxxx */
+               /* MSR      : cccc 0001 0x10 xxxx xxxx xxxx 0000 xxxx */
+               /* MRS spsr : cccc 0001 0100 xxxx xxxx xxxx 0000 xxxx */
 
+               /* Other instruction encodings aren't yet defined */
+               return INSN_REJECTED;
        }
 
        /* cccc 0001 0xx0 xxxx xxxx xxxx xxxx 0xx1 xxxx */
        else if ((insn & 0x0f900090) == 0x01000010) {
 
-               /* BKPT : 1110 0001 0010 xxxx xxxx xxxx 0111 xxxx */
-               if ((insn & 0xfff000f0) == 0xe1200070)
-                       return INSN_REJECTED;
-
                /* BLX(2) : cccc 0001 0010 xxxx xxxx xxxx 0011 xxxx */
                /* BX     : cccc 0001 0010 xxxx xxxx xxxx 0001 xxxx */
                if ((insn & 0x0ff000d0) == 0x01200010) {
-                       asi->insn[0] = truecc_insn(insn);
+                       if ((insn & 0x0ff000ff) == 0x0120003f)
+                               return INSN_REJECTED; /* BLX pc */
                        asi->insn_handler = simulate_blx2bx;
-                       return INSN_GOOD;
+                       return INSN_GOOD_NO_SLOT;
                }
 
                /* CLZ : cccc 0001 0110 xxxx xxxx xxxx 0001 xxxx */
@@ -1059,17 +1066,27 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
                /* QSUB    : cccc 0001 0010 xxxx xxxx xxxx 0101 xxxx :Q */
                /* QDADD   : cccc 0001 0100 xxxx xxxx xxxx 0101 xxxx :Q */
                /* QDSUB   : cccc 0001 0110 xxxx xxxx xxxx 0101 xxxx :Q */
-               return prep_emulate_rd12rn16rm0_wflags(insn, asi);
+               if ((insn & 0x0f9000f0) == 0x01000050)
+                       return prep_emulate_rd12rn16rm0_wflags(insn, asi);
+
+               /* BKPT : 1110 0001 0010 xxxx xxxx xxxx 0111 xxxx */
+               /* SMC  : cccc 0001 0110 xxxx xxxx xxxx 0111 xxxx */
+
+               /* Other instruction encodings aren't yet defined */
+               return INSN_REJECTED;
        }
 
        /* cccc 0000 xxxx xxxx xxxx xxxx xxxx 1001 xxxx */
-       else if ((insn & 0x0f000090) == 0x00000090) {
+       else if ((insn & 0x0f0000f0) == 0x00000090) {
 
                /* MUL    : cccc 0000 0000 xxxx xxxx xxxx 1001 xxxx :   */
                /* MULS   : cccc 0000 0001 xxxx xxxx xxxx 1001 xxxx :cc */
                /* MLA    : cccc 0000 0010 xxxx xxxx xxxx 1001 xxxx :   */
                /* MLAS   : cccc 0000 0011 xxxx xxxx xxxx 1001 xxxx :cc */
                /* UMAAL  : cccc 0000 0100 xxxx xxxx xxxx 1001 xxxx :   */
+               /* undef  : cccc 0000 0101 xxxx xxxx xxxx 1001 xxxx :   */
+               /* MLS    : cccc 0000 0110 xxxx xxxx xxxx 1001 xxxx :   */
+               /* undef  : cccc 0000 0111 xxxx xxxx xxxx 1001 xxxx :   */
                /* UMULL  : cccc 0000 1000 xxxx xxxx xxxx 1001 xxxx :   */
                /* UMULLS : cccc 0000 1001 xxxx xxxx xxxx 1001 xxxx :cc */
                /* UMLAL  : cccc 0000 1010 xxxx xxxx xxxx 1001 xxxx :   */
@@ -1078,13 +1095,15 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
                /* SMULLS : cccc 0000 1101 xxxx xxxx xxxx 1001 xxxx :cc */
                /* SMLAL  : cccc 0000 1110 xxxx xxxx xxxx 1001 xxxx :   */
                /* SMLALS : cccc 0000 1111 xxxx xxxx xxxx 1001 xxxx :cc */
-               if ((insn & 0x0fe000f0) == 0x00000090) {
-                      return prep_emulate_rd16rs8rm0_wflags(insn, asi);
-               } else if  ((insn & 0x0fe000f0) == 0x00200090) {
-                      return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
-               } else {
-                      return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi);
-               }
+               if ((insn & 0x00d00000) == 0x00500000)
+                       return INSN_REJECTED;
+               else if ((insn & 0x00e00000) == 0x00000000)
+                       return prep_emulate_rd16rs8rm0_wflags(insn, asi);
+               else if ((insn & 0x00a00000) == 0x00200000)
+                       return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
+               else
+                       return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn,
+                                                                       asi);
        }
 
        /* cccc 000x xxxx xxxx xxxx xxxx xxxx 1xx1 xxxx */
@@ -1092,23 +1111,45 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 
                /* SWP   : cccc 0001 0000 xxxx xxxx xxxx 1001 xxxx */
                /* SWPB  : cccc 0001 0100 xxxx xxxx xxxx 1001 xxxx */
-               /* LDRD  : cccc 000x xxx0 xxxx xxxx xxxx 1101 xxxx */
-               /* STRD  : cccc 000x xxx0 xxxx xxxx xxxx 1111 xxxx */
+               /* ???   : cccc 0001 0x01 xxxx xxxx xxxx 1001 xxxx */
+               /* ???   : cccc 0001 0x10 xxxx xxxx xxxx 1001 xxxx */
+               /* ???   : cccc 0001 0x11 xxxx xxxx xxxx 1001 xxxx */
                /* STREX : cccc 0001 1000 xxxx xxxx xxxx 1001 xxxx */
                /* LDREX : cccc 0001 1001 xxxx xxxx xxxx 1001 xxxx */
+               /* STREXD: cccc 0001 1010 xxxx xxxx xxxx 1001 xxxx */
+               /* LDREXD: cccc 0001 1011 xxxx xxxx xxxx 1001 xxxx */
+               /* STREXB: cccc 0001 1100 xxxx xxxx xxxx 1001 xxxx */
+               /* LDREXB: cccc 0001 1101 xxxx xxxx xxxx 1001 xxxx */
+               /* STREXH: cccc 0001 1110 xxxx xxxx xxxx 1001 xxxx */
+               /* LDREXH: cccc 0001 1111 xxxx xxxx xxxx 1001 xxxx */
+
+               /* LDRD  : cccc 000x xxx0 xxxx xxxx xxxx 1101 xxxx */
+               /* STRD  : cccc 000x xxx0 xxxx xxxx xxxx 1111 xxxx */
                /* LDRH  : cccc 000x xxx1 xxxx xxxx xxxx 1011 xxxx */
                /* STRH  : cccc 000x xxx0 xxxx xxxx xxxx 1011 xxxx */
                /* LDRSB : cccc 000x xxx1 xxxx xxxx xxxx 1101 xxxx */
                /* LDRSH : cccc 000x xxx1 xxxx xxxx xxxx 1111 xxxx */
-               if ((insn & 0x0fb000f0) == 0x01000090) {
-                       /* SWP/SWPB */
-                       return prep_emulate_rd12rn16rm0_wflags(insn, asi);
+               if ((insn & 0x0f0000f0) == 0x01000090) {
+                       if ((insn & 0x0fb000f0) == 0x01000090) {
+                               /* SWP/SWPB */
+                               return prep_emulate_rd12rn16rm0_wflags(insn,
+                                                                       asi);
+                       } else {
+                               /* STREX/LDREX variants and unallocaed space */
+                               return INSN_REJECTED;
+                       }
+
                } else if ((insn & 0x0e1000d0) == 0x00000d0) {
                        /* STRD/LDRD */
+                       if ((insn & 0x0000e000) == 0x0000e000)
+                               return INSN_REJECTED;   /* Rd is LR or PC */
+                       if (is_writeback(insn) && is_r15(insn, 16))
+                               return INSN_REJECTED;   /* Writeback to PC */
+
                        insn &= 0xfff00fff;
                        insn |= 0x00002000;     /* Rn = r0, Rd = r2 */
-                       if (insn & (1 << 22)) {
-                               /* I bit */
+                       if (!(insn & (1 << 22))) {
+                               /* Register index */
                                insn &= ~0xf;
                                insn |= 1;      /* Rm = r1 */
                        }
@@ -1118,6 +1159,9 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
                        return INSN_GOOD;
                }
 
+               /* LDRH/STRH/LDRSB/LDRSH */
+               if (is_r15(insn, 12))
+                       return INSN_REJECTED;   /* Rd is PC */
                return prep_emulate_ldr_str(insn, asi);
        }
 
@@ -1125,7 +1169,7 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 
        /*
         * ALU op with S bit and Rd == 15 :
-        *      cccc 000x xxx1 xxxx 1111 xxxx xxxx xxxx
+        *      cccc 000x xxx1 xxxx 1111 xxxx xxxx xxxx
         */
        if ((insn & 0x0e10f000) == 0x0010f000)
                return INSN_REJECTED;
@@ -1154,22 +1198,61 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
                insn |= 0x00000200;     /* Rs = r2 */
        }
        asi->insn[0] = insn;
-       asi->insn_handler = (insn & (1 << 20)) ?  /* S-bit */
+
+       if ((insn & 0x0f900000) == 0x01100000) {
+               /*
+                * TST : cccc 0001 0001 xxxx xxxx xxxx xxxx xxxx
+                * TEQ : cccc 0001 0011 xxxx xxxx xxxx xxxx xxxx
+                * CMP : cccc 0001 0101 xxxx xxxx xxxx xxxx xxxx
+                * CMN : cccc 0001 0111 xxxx xxxx xxxx xxxx xxxx
+                */
+               asi->insn_handler = emulate_alu_tests;
+       } else {
+               /* ALU ops which write to Rd */
+               asi->insn_handler = (insn & (1 << 20)) ?  /* S-bit */
                                emulate_alu_rwflags : emulate_alu_rflags;
+       }
        return INSN_GOOD;
 }
 
 static enum kprobe_insn __kprobes
 space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
+       /* MOVW  : cccc 0011 0000 xxxx xxxx xxxx xxxx xxxx */
+       /* MOVT  : cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx */
+       if ((insn & 0x0fb00000) == 0x03000000)
+               return prep_emulate_rd12_modify(insn, asi);
+
+       /* hints : cccc 0011 0010 0000 xxxx xxxx xxxx xxxx */
+       if ((insn & 0x0fff0000) == 0x03200000) {
+               unsigned op2 = insn & 0x000000ff;
+               if (op2 == 0x01 || op2 == 0x04) {
+                       /* YIELD : cccc 0011 0010 0000 xxxx xxxx 0000 0001 */
+                       /* SEV   : cccc 0011 0010 0000 xxxx xxxx 0000 0100 */
+                       asi->insn[0] = insn;
+                       asi->insn_handler = emulate_none;
+                       return INSN_GOOD;
+               } else if (op2 <= 0x03) {
+                       /* NOP   : cccc 0011 0010 0000 xxxx xxxx 0000 0000 */
+                       /* WFE   : cccc 0011 0010 0000 xxxx xxxx 0000 0010 */
+                       /* WFI   : cccc 0011 0010 0000 xxxx xxxx 0000 0011 */
+                       /*
+                        * We make WFE and WFI true NOPs to avoid stalls due
+                        * to missing events whilst processing the probe.
+                        */
+                       asi->insn_handler = emulate_nop;
+                       return INSN_GOOD_NO_SLOT;
+               }
+               /* For DBG and unallocated hints it's safest to reject them */
+               return INSN_REJECTED;
+       }
+
        /*
         * MSR   : cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx
-        * Undef : cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx
         * ALU op with S bit and Rd == 15 :
         *         cccc 001x xxx1 xxxx 1111 xxxx xxxx xxxx
         */
        if ((insn & 0x0fb00000) == 0x03200000 ||        /* MSR */
-           (insn & 0x0ff00000) == 0x03400000 ||        /* Undef */
            (insn & 0x0e10f000) == 0x0210f000)          /* ALU s-bit, R15  */
                return INSN_REJECTED;
 
@@ -1180,10 +1263,22 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
         * *S (bit 20) updates condition codes
         * ADC/SBC/RSC reads the C flag
         */
-       insn &= 0xffff0fff;     /* Rd = r0 */
+       insn &= 0xfff00fff;     /* Rn = r0 and Rd = r0 */
        asi->insn[0] = insn;
-       asi->insn_handler = (insn & (1 << 20)) ?  /* S-bit */
+
+       if ((insn & 0x0f900000) == 0x03100000) {
+               /*
+                * TST : cccc 0011 0001 xxxx xxxx xxxx xxxx xxxx
+                * TEQ : cccc 0011 0011 xxxx xxxx xxxx xxxx xxxx
+                * CMP : cccc 0011 0101 xxxx xxxx xxxx xxxx xxxx
+                * CMN : cccc 0011 0111 xxxx xxxx xxxx xxxx xxxx
+                */
+               asi->insn_handler = emulate_alu_tests_imm;
+       } else {
+               /* ALU ops which write to Rd */
+               asi->insn_handler = (insn & (1 << 20)) ?  /* S-bit */
                        emulate_alu_imm_rwflags : emulate_alu_imm_rflags;
+       }
        return INSN_GOOD;
 }
 
@@ -1192,6 +1287,8 @@ space_cccc_0110__1(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
        /* SEL : cccc 0110 1000 xxxx xxxx xxxx 1011 xxxx GE: !!! */
        if ((insn & 0x0ff000f0) == 0x068000b0) {
+               if (is_r15(insn, 12))
+                       return INSN_REJECTED;   /* Rd is PC */
                insn &= 0xfff00ff0;     /* Rd = r0, Rn = r0 */
                insn |= 0x00000001;     /* Rm = r1 */
                asi->insn[0] = insn;
@@ -1205,6 +1302,8 @@ space_cccc_0110__1(kprobe_opcode_t insn, struct arch_specific_insn *asi)
        /* USAT16 : cccc 0110 1110 xxxx xxxx xxxx 0011 xxxx :Q */
        if ((insn & 0x0fa00030) == 0x06a00010 ||
            (insn & 0x0fb000f0) == 0x06a00030) {
+               if (is_r15(insn, 12))
+                       return INSN_REJECTED;   /* Rd is PC */
                insn &= 0xffff0ff0;     /* Rd = r0, Rm = r0 */
                asi->insn[0] = insn;
                asi->insn_handler = emulate_sat;
@@ -1213,57 +1312,101 @@ space_cccc_0110__1(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 
        /* REV    : cccc 0110 1011 xxxx xxxx xxxx 0011 xxxx */
        /* REV16  : cccc 0110 1011 xxxx xxxx xxxx 1011 xxxx */
+       /* RBIT   : cccc 0110 1111 xxxx xxxx xxxx 0011 xxxx */
        /* REVSH  : cccc 0110 1111 xxxx xxxx xxxx 1011 xxxx */
        if ((insn & 0x0ff00070) == 0x06b00030 ||
-           (insn & 0x0ff000f0) == 0x06f000b0)
+           (insn & 0x0ff00070) == 0x06f00030)
                return prep_emulate_rd12rm0(insn, asi);
 
+       /* ???       : cccc 0110 0000 xxxx xxxx xxxx xxx1 xxxx :   */
        /* SADD16    : cccc 0110 0001 xxxx xxxx xxxx 0001 xxxx :GE */
        /* SADDSUBX  : cccc 0110 0001 xxxx xxxx xxxx 0011 xxxx :GE */
        /* SSUBADDX  : cccc 0110 0001 xxxx xxxx xxxx 0101 xxxx :GE */
        /* SSUB16    : cccc 0110 0001 xxxx xxxx xxxx 0111 xxxx :GE */
        /* SADD8     : cccc 0110 0001 xxxx xxxx xxxx 1001 xxxx :GE */
+       /* ???       : cccc 0110 0001 xxxx xxxx xxxx 1011 xxxx :   */
+       /* ???       : cccc 0110 0001 xxxx xxxx xxxx 1101 xxxx :   */
        /* SSUB8     : cccc 0110 0001 xxxx xxxx xxxx 1111 xxxx :GE */
        /* QADD16    : cccc 0110 0010 xxxx xxxx xxxx 0001 xxxx :   */
        /* QADDSUBX  : cccc 0110 0010 xxxx xxxx xxxx 0011 xxxx :   */
        /* QSUBADDX  : cccc 0110 0010 xxxx xxxx xxxx 0101 xxxx :   */
        /* QSUB16    : cccc 0110 0010 xxxx xxxx xxxx 0111 xxxx :   */
        /* QADD8     : cccc 0110 0010 xxxx xxxx xxxx 1001 xxxx :   */
+       /* ???       : cccc 0110 0010 xxxx xxxx xxxx 1011 xxxx :   */
+       /* ???       : cccc 0110 0010 xxxx xxxx xxxx 1101 xxxx :   */
        /* QSUB8     : cccc 0110 0010 xxxx xxxx xxxx 1111 xxxx :   */
        /* SHADD16   : cccc 0110 0011 xxxx xxxx xxxx 0001 xxxx :   */
        /* SHADDSUBX : cccc 0110 0011 xxxx xxxx xxxx 0011 xxxx :   */
        /* SHSUBADDX : cccc 0110 0011 xxxx xxxx xxxx 0101 xxxx :   */
        /* SHSUB16   : cccc 0110 0011 xxxx xxxx xxxx 0111 xxxx :   */
        /* SHADD8    : cccc 0110 0011 xxxx xxxx xxxx 1001 xxxx :   */
+       /* ???       : cccc 0110 0011 xxxx xxxx xxxx 1011 xxxx :   */
+       /* ???       : cccc 0110 0011 xxxx xxxx xxxx 1101 xxxx :   */
        /* SHSUB8    : cccc 0110 0011 xxxx xxxx xxxx 1111 xxxx :   */
+       /* ???       : cccc 0110 0100 xxxx xxxx xxxx xxx1 xxxx :   */
        /* UADD16    : cccc 0110 0101 xxxx xxxx xxxx 0001 xxxx :GE */
        /* UADDSUBX  : cccc 0110 0101 xxxx xxxx xxxx 0011 xxxx :GE */
        /* USUBADDX  : cccc 0110 0101 xxxx xxxx xxxx 0101 xxxx :GE */
        /* USUB16    : cccc 0110 0101 xxxx xxxx xxxx 0111 xxxx :GE */
        /* UADD8     : cccc 0110 0101 xxxx xxxx xxxx 1001 xxxx :GE */
+       /* ???       : cccc 0110 0101 xxxx xxxx xxxx 1011 xxxx :   */
+       /* ???       : cccc 0110 0101 xxxx xxxx xxxx 1101 xxxx :   */
        /* USUB8     : cccc 0110 0101 xxxx xxxx xxxx 1111 xxxx :GE */
        /* UQADD16   : cccc 0110 0110 xxxx xxxx xxxx 0001 xxxx :   */
        /* UQADDSUBX : cccc 0110 0110 xxxx xxxx xxxx 0011 xxxx :   */
        /* UQSUBADDX : cccc 0110 0110 xxxx xxxx xxxx 0101 xxxx :   */
        /* UQSUB16   : cccc 0110 0110 xxxx xxxx xxxx 0111 xxxx :   */
        /* UQADD8    : cccc 0110 0110 xxxx xxxx xxxx 1001 xxxx :   */
+       /* ???       : cccc 0110 0110 xxxx xxxx xxxx 1011 xxxx :   */
+       /* ???       : cccc 0110 0110 xxxx xxxx xxxx 1101 xxxx :   */
        /* UQSUB8    : cccc 0110 0110 xxxx xxxx xxxx 1111 xxxx :   */
        /* UHADD16   : cccc 0110 0111 xxxx xxxx xxxx 0001 xxxx :   */
        /* UHADDSUBX : cccc 0110 0111 xxxx xxxx xxxx 0011 xxxx :   */
        /* UHSUBADDX : cccc 0110 0111 xxxx xxxx xxxx 0101 xxxx :   */
        /* UHSUB16   : cccc 0110 0111 xxxx xxxx xxxx 0111 xxxx :   */
        /* UHADD8    : cccc 0110 0111 xxxx xxxx xxxx 1001 xxxx :   */
+       /* ???       : cccc 0110 0111 xxxx xxxx xxxx 1011 xxxx :   */
+       /* ???       : cccc 0110 0111 xxxx xxxx xxxx 1101 xxxx :   */
        /* UHSUB8    : cccc 0110 0111 xxxx xxxx xxxx 1111 xxxx :   */
+       if ((insn & 0x0f800010) == 0x06000010) {
+               if ((insn & 0x00300000) == 0x00000000 ||
+                   (insn & 0x000000e0) == 0x000000a0 ||
+                   (insn & 0x000000e0) == 0x000000c0)
+                       return INSN_REJECTED;   /* Unallocated space */
+               return prep_emulate_rd12rn16rm0_wflags(insn, asi);
+       }
+
        /* PKHBT     : cccc 0110 1000 xxxx xxxx xxxx x001 xxxx :   */
        /* PKHTB     : cccc 0110 1000 xxxx xxxx xxxx x101 xxxx :   */
+       if ((insn & 0x0ff00030) == 0x06800010)
+               return prep_emulate_rd12rn16rm0_wflags(insn, asi);
+
        /* SXTAB16   : cccc 0110 1000 xxxx xxxx xxxx 0111 xxxx :   */
-       /* SXTB      : cccc 0110 1010 xxxx xxxx xxxx 0111 xxxx :   */
+       /* SXTB16    : cccc 0110 1000 1111 xxxx xxxx 0111 xxxx :   */
+       /* ???       : cccc 0110 1001 xxxx xxxx xxxx 0111 xxxx :   */
        /* SXTAB     : cccc 0110 1010 xxxx xxxx xxxx 0111 xxxx :   */
+       /* SXTB      : cccc 0110 1010 1111 xxxx xxxx 0111 xxxx :   */
        /* SXTAH     : cccc 0110 1011 xxxx xxxx xxxx 0111 xxxx :   */
+       /* SXTH      : cccc 0110 1011 1111 xxxx xxxx 0111 xxxx :   */
        /* UXTAB16   : cccc 0110 1100 xxxx xxxx xxxx 0111 xxxx :   */
+       /* UXTB16    : cccc 0110 1100 1111 xxxx xxxx 0111 xxxx :   */
+       /* ???       : cccc 0110 1101 xxxx xxxx xxxx 0111 xxxx :   */
        /* UXTAB     : cccc 0110 1110 xxxx xxxx xxxx 0111 xxxx :   */
+       /* UXTB      : cccc 0110 1110 1111 xxxx xxxx 0111 xxxx :   */
        /* UXTAH     : cccc 0110 1111 xxxx xxxx xxxx 0111 xxxx :   */
-       return prep_emulate_rd12rn16rm0_wflags(insn, asi);
+       /* UXTH      : cccc 0110 1111 1111 xxxx xxxx 0111 xxxx :   */
+       if ((insn & 0x0f8000f0) == 0x06800070) {
+               if ((insn & 0x00300000) == 0x00100000)
+                       return INSN_REJECTED;   /* Unallocated space */
+
+               if ((insn & 0x000f0000) == 0x000f0000)
+                       return prep_emulate_rd12rm0(insn, asi);
+               else
+                       return prep_emulate_rd12rn16rm0_wflags(insn, asi);
+       }
+
+       /* Other instruction encodings aren't yet defined */
+       return INSN_REJECTED;
 }
 
 static enum kprobe_insn __kprobes
@@ -1273,29 +1416,49 @@ space_cccc_0111__1(kprobe_opcode_t insn, struct arch_specific_insn *asi)
        if ((insn & 0x0ff000f0) == 0x03f000f0)
                return INSN_REJECTED;
 
-       /* USADA8 : cccc 0111 1000 xxxx xxxx xxxx 0001 xxxx */
-       /* USAD8  : cccc 0111 1000 xxxx 1111 xxxx 0001 xxxx */
-       if ((insn & 0x0ff000f0) == 0x07800010)
-                return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
-
        /* SMLALD : cccc 0111 0100 xxxx xxxx xxxx 00x1 xxxx */
        /* SMLSLD : cccc 0111 0100 xxxx xxxx xxxx 01x1 xxxx */
        if ((insn & 0x0ff00090) == 0x07400010)
                return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi);
 
        /* SMLAD  : cccc 0111 0000 xxxx xxxx xxxx 00x1 xxxx :Q */
+       /* SMUAD  : cccc 0111 0000 xxxx 1111 xxxx 00x1 xxxx :Q */
        /* SMLSD  : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx :Q */
+       /* SMUSD  : cccc 0111 0000 xxxx 1111 xxxx 01x1 xxxx :  */
        /* SMMLA  : cccc 0111 0101 xxxx xxxx xxxx 00x1 xxxx :  */
-       /* SMMLS  : cccc 0111 0101 xxxx xxxx xxxx 11x1 xxxx :  */
+       /* SMMUL  : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx :  */
+       /* USADA8 : cccc 0111 1000 xxxx xxxx xxxx 0001 xxxx :  */
+       /* USAD8  : cccc 0111 1000 xxxx 1111 xxxx 0001 xxxx :  */
        if ((insn & 0x0ff00090) == 0x07000010 ||
            (insn & 0x0ff000d0) == 0x07500010 ||
-           (insn & 0x0ff000d0) == 0x075000d0)
+           (insn & 0x0ff000f0) == 0x07800010) {
+
+               if ((insn & 0x0000f000) == 0x0000f000)
+                       return prep_emulate_rd16rs8rm0_wflags(insn, asi);
+               else
+                       return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
+       }
+
+       /* SMMLS  : cccc 0111 0101 xxxx xxxx xxxx 11x1 xxxx :  */
+       if ((insn & 0x0ff000d0) == 0x075000d0)
                return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
 
-       /* SMUSD  : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx :  */
-       /* SMUAD  : cccc 0111 0000 xxxx 1111 xxxx 00x1 xxxx :Q */
-       /* SMMUL  : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx :  */
-       return prep_emulate_rd16rs8rm0_wflags(insn, asi);
+       /* SBFX   : cccc 0111 101x xxxx xxxx xxxx x101 xxxx :  */
+       /* UBFX   : cccc 0111 111x xxxx xxxx xxxx x101 xxxx :  */
+       if ((insn & 0x0fa00070) == 0x07a00050)
+               return prep_emulate_rd12rm0(insn, asi);
+
+       /* BFI    : cccc 0111 110x xxxx xxxx xxxx x001 xxxx :  */
+       /* BFC    : cccc 0111 110x xxxx xxxx xxxx x001 1111 :  */
+       if ((insn & 0x0fe00070) == 0x07c00010) {
+
+               if ((insn & 0x0000000f) == 0x0000000f)
+                       return prep_emulate_rd12_modify(insn, asi);
+               else
+                       return prep_emulate_rd12rn0_modify(insn, asi);
+       }
+
+       return INSN_REJECTED;
 }
 
 static enum kprobe_insn __kprobes
@@ -1309,6 +1472,10 @@ space_cccc_01xx(kprobe_opcode_t insn, struct arch_specific_insn *asi)
        /* STRB  : cccc 01xx x1x0 xxxx xxxx xxxx xxxx xxxx */
        /* STRBT : cccc 01x0 x110 xxxx xxxx xxxx xxxx xxxx */
        /* STRT  : cccc 01x0 x010 xxxx xxxx xxxx xxxx xxxx */
+
+       if ((insn & 0x00500000) == 0x00500000 && is_r15(insn, 12))
+               return INSN_REJECTED;   /* LDRB into PC */
+
        return prep_emulate_ldr_str(insn, asi);
 }
 
@@ -1323,10 +1490,9 @@ space_cccc_100x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 
        /* LDM(1) : cccc 100x x0x1 xxxx xxxx xxxx xxxx xxxx */
        /* STM(1) : cccc 100x x0x0 xxxx xxxx xxxx xxxx xxxx */
-       asi->insn[0] = truecc_insn(insn);
        asi->insn_handler = ((insn & 0x108000) == 0x008000) ? /* STM & R15 */
                                simulate_stm1_pc : simulate_ldm1stm1;
-       return INSN_GOOD;
+       return INSN_GOOD_NO_SLOT;
 }
 
 static enum kprobe_insn __kprobes
@@ -1334,58 +1500,117 @@ space_cccc_101x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
        /* B  : cccc 1010 xxxx xxxx xxxx xxxx xxxx xxxx */
        /* BL : cccc 1011 xxxx xxxx xxxx xxxx xxxx xxxx */
-       asi->insn[0] = truecc_insn(insn);
        asi->insn_handler = simulate_bbl;
-       return INSN_GOOD;
+       return INSN_GOOD_NO_SLOT;
 }
 
 static enum kprobe_insn __kprobes
-space_cccc_1100_010x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
+space_cccc_11xx(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
+       /* Coprocessor instructions... */
        /* MCRR : cccc 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd!=Rn) */
        /* MRRC : cccc 1100 0101 xxxx xxxx xxxx xxxx xxxx : (Rd!=Rn) */
-       insn &= 0xfff00fff;
-       insn |= 0x00001000;     /* Rn = r0, Rd = r1 */
-       asi->insn[0] = insn;
-       asi->insn_handler = (insn & (1 << 20)) ? emulate_mrrc : emulate_mcrr;
-       return INSN_GOOD;
+       /* LDC  : cccc 110x xxx1 xxxx xxxx xxxx xxxx xxxx */
+       /* STC  : cccc 110x xxx0 xxxx xxxx xxxx xxxx xxxx */
+       /* CDP  : cccc 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */
+       /* MCR  : cccc 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */
+       /* MRC  : cccc 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */
+
+       /* SVC  : cccc 1111 xxxx xxxx xxxx xxxx xxxx xxxx */
+
+       return INSN_REJECTED;
 }
 
-static enum kprobe_insn __kprobes
-space_cccc_110x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
+static unsigned long __kprobes __check_eq(unsigned long cpsr)
 {
-       /* LDC : cccc 110x xxx1 xxxx xxxx xxxx xxxx xxxx */
-       /* STC : cccc 110x xxx0 xxxx xxxx xxxx xxxx xxxx */
-       insn &= 0xfff0ffff;     /* Rn = r0 */
-       asi->insn[0] = insn;
-       asi->insn_handler = emulate_ldcstc;
-       return INSN_GOOD;
+       return cpsr & PSR_Z_BIT;
 }
 
-static enum kprobe_insn __kprobes
-space_cccc_111x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
+static unsigned long __kprobes __check_ne(unsigned long cpsr)
 {
-       /* BKPT : 1110 0001 0010 xxxx xxxx xxxx 0111 xxxx */
-       /* SWI  : cccc 1111 xxxx xxxx xxxx xxxx xxxx xxxx */
-       if ((insn & 0xfff000f0) == 0xe1200070 ||
-           (insn & 0x0f000000) == 0x0f000000)
-               return INSN_REJECTED;
+       return (~cpsr) & PSR_Z_BIT;
+}
 
-       /* CDP : cccc 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */
-       if ((insn & 0x0f000010) == 0x0e000000) {
-               asi->insn[0] = insn;
-               asi->insn_handler = emulate_none;
-               return INSN_GOOD;
-       }
+static unsigned long __kprobes __check_cs(unsigned long cpsr)
+{
+       return cpsr & PSR_C_BIT;
+}
 
-       /* MCR : cccc 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */
-       /* MRC : cccc 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */
-       insn &= 0xffff0fff;     /* Rd = r0 */
-       asi->insn[0] = insn;
-       asi->insn_handler = (insn & (1 << 20)) ? emulate_rd12 : emulate_ird12;
-       return INSN_GOOD;
+static unsigned long __kprobes __check_cc(unsigned long cpsr)
+{
+       return (~cpsr) & PSR_C_BIT;
+}
+
+static unsigned long __kprobes __check_mi(unsigned long cpsr)
+{
+       return cpsr & PSR_N_BIT;
+}
+
+static unsigned long __kprobes __check_pl(unsigned long cpsr)
+{
+       return (~cpsr) & PSR_N_BIT;
+}
+
+static unsigned long __kprobes __check_vs(unsigned long cpsr)
+{
+       return cpsr & PSR_V_BIT;
+}
+
+static unsigned long __kprobes __check_vc(unsigned long cpsr)
+{
+       return (~cpsr) & PSR_V_BIT;
+}
+
+static unsigned long __kprobes __check_hi(unsigned long cpsr)
+{
+       cpsr &= ~(cpsr >> 1); /* PSR_C_BIT &= ~PSR_Z_BIT */
+       return cpsr & PSR_C_BIT;
 }
 
+static unsigned long __kprobes __check_ls(unsigned long cpsr)
+{
+       cpsr &= ~(cpsr >> 1); /* PSR_C_BIT &= ~PSR_Z_BIT */
+       return (~cpsr) & PSR_C_BIT;
+}
+
+static unsigned long __kprobes __check_ge(unsigned long cpsr)
+{
+       cpsr ^= (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */
+       return (~cpsr) & PSR_N_BIT;
+}
+
+static unsigned long __kprobes __check_lt(unsigned long cpsr)
+{
+       cpsr ^= (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */
+       return cpsr & PSR_N_BIT;
+}
+
+static unsigned long __kprobes __check_gt(unsigned long cpsr)
+{
+       unsigned long temp = cpsr ^ (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */
+       temp |= (cpsr << 1);                     /* PSR_N_BIT |= PSR_Z_BIT */
+       return (~temp) & PSR_N_BIT;
+}
+
+static unsigned long __kprobes __check_le(unsigned long cpsr)
+{
+       unsigned long temp = cpsr ^ (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */
+       temp |= (cpsr << 1);                     /* PSR_N_BIT |= PSR_Z_BIT */
+       return temp & PSR_N_BIT;
+}
+
+static unsigned long __kprobes __check_al(unsigned long cpsr)
+{
+       return true;
+}
+
+static kprobe_check_cc * const condition_checks[16] = {
+       &__check_eq, &__check_ne, &__check_cs, &__check_cc,
+       &__check_mi, &__check_pl, &__check_vs, &__check_vc,
+       &__check_hi, &__check_ls, &__check_ge, &__check_lt,
+       &__check_gt, &__check_le, &__check_al, &__check_al
+};
+
 /* Return:
  *   INSN_REJECTED     If instruction is one not allowed to kprobe,
  *   INSN_GOOD         If instruction is supported and uses instruction slot,
@@ -1401,133 +1626,45 @@ space_cccc_111x(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 enum kprobe_insn __kprobes
 arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi)
 {
+       asi->insn_check_cc = condition_checks[insn>>28];
        asi->insn[1] = KPROBE_RETURN_INSTRUCTION;
 
-       if ((insn & 0xf0000000) == 0xf0000000) {
+       if ((insn & 0xf0000000) == 0xf0000000)
 
                return space_1111(insn, asi);
 
-       } else if ((insn & 0x0e000000) == 0x00000000) {
+       else if ((insn & 0x0e000000) == 0x00000000)
 
                return space_cccc_000x(insn, asi);
 
-       } else if ((insn & 0x0e000000) == 0x02000000) {
+       else if ((insn & 0x0e000000) == 0x02000000)
 
                return space_cccc_001x(insn, asi);
 
-       } else if ((insn & 0x0f000010) == 0x06000010) {
+       else if ((insn & 0x0f000010) == 0x06000010)
 
                return space_cccc_0110__1(insn, asi);
 
-       } else if ((insn & 0x0f000010) == 0x07000010) {
+       else if ((insn & 0x0f000010) == 0x07000010)
 
                return space_cccc_0111__1(insn, asi);
 
-       } else if ((insn & 0x0c000000) == 0x04000000) {
+       else if ((insn & 0x0c000000) == 0x04000000)
 
                return space_cccc_01xx(insn, asi);
 
-       } else if ((insn & 0x0e000000) == 0x08000000) {
+       else if ((insn & 0x0e000000) == 0x08000000)
 
                return space_cccc_100x(insn, asi);
 
-       } else if ((insn & 0x0e000000) == 0x0a000000) {
+       else if ((insn & 0x0e000000) == 0x0a000000)
 
                return space_cccc_101x(insn, asi);
 
-       } else if ((insn & 0x0fe00000) == 0x0c400000) {
-
-               return space_cccc_1100_010x(insn, asi);
-
-       } else if ((insn & 0x0e000000) == 0x0c000000) {
-
-               return space_cccc_110x(insn, asi);
-
-       }
-
-       return space_cccc_111x(insn, asi);
+       return space_cccc_11xx(insn, asi);
 }
 
 void __init arm_kprobe_decode_init(void)
 {
        find_str_pc_offset();
 }
-
-
-/*
- * All ARM instructions listed below.
- *
- * Instructions and their general purpose registers are given.
- * If a particular register may not use R15, it is prefixed with a "!".
- * If marked with a "*" means the value returned by reading R15
- * is implementation defined.
- *
- * ADC/ADD/AND/BIC/CMN/CMP/EOR/MOV/MVN/ORR/RSB/RSC/SBC/SUB/TEQ
- *     TST: Rd, Rn, Rm, !Rs
- * BX: Rm
- * BLX(2): !Rm
- * BX: Rm (R15 legal, but discouraged)
- * BXJ: !Rm,
- * CLZ: !Rd, !Rm
- * CPY: Rd, Rm
- * LDC/2,STC/2 immediate offset & unindex: Rn
- * LDC/2,STC/2 immediate pre/post-indexed: !Rn
- * LDM(1/3): !Rn, register_list
- * LDM(2): !Rn, !register_list
- * LDR,STR,PLD immediate offset: Rd, Rn
- * LDR,STR,PLD register offset: Rd, Rn, !Rm
- * LDR,STR,PLD scaled register offset: Rd, !Rn, !Rm
- * LDR,STR immediate pre/post-indexed: Rd, !Rn
- * LDR,STR register pre/post-indexed: Rd, !Rn, !Rm
- * LDR,STR scaled register pre/post-indexed: Rd, !Rn, !Rm
- * LDRB,STRB immediate offset: !Rd, Rn
- * LDRB,STRB register offset: !Rd, Rn, !Rm
- * LDRB,STRB scaled register offset: !Rd, !Rn, !Rm
- * LDRB,STRB immediate pre/post-indexed: !Rd, !Rn
- * LDRB,STRB register pre/post-indexed: !Rd, !Rn, !Rm
- * LDRB,STRB scaled register pre/post-indexed: !Rd, !Rn, !Rm
- * LDRT,LDRBT,STRBT immediate pre/post-indexed: !Rd, !Rn
- * LDRT,LDRBT,STRBT register pre/post-indexed: !Rd, !Rn, !Rm
- * LDRT,LDRBT,STRBT scaled register pre/post-indexed: !Rd, !Rn, !Rm
- * LDRH/SH/SB/D,STRH/SH/SB/D immediate offset: !Rd, Rn
- * LDRH/SH/SB/D,STRH/SH/SB/D register offset: !Rd, Rn, !Rm
- * LDRH/SH/SB/D,STRH/SH/SB/D immediate pre/post-indexed: !Rd, !Rn
- * LDRH/SH/SB/D,STRH/SH/SB/D register pre/post-indexed: !Rd, !Rn, !Rm
- * LDREX: !Rd, !Rn
- * MCR/2: !Rd
- * MCRR/2,MRRC/2: !Rd, !Rn
- * MLA: !Rd, !Rn, !Rm, !Rs
- * MOV: Rd
- * MRC/2: !Rd (if Rd==15, only changes cond codes, not the register)
- * MRS,MSR: !Rd
- * MUL: !Rd, !Rm, !Rs
- * PKH{BT,TB}: !Rd, !Rn, !Rm
- * QDADD,[U]QADD/16/8/SUBX: !Rd, !Rm, !Rn
- * QDSUB,[U]QSUB/16/8/ADDX: !Rd, !Rm, !Rn
- * REV/16/SH: !Rd, !Rm
- * RFE: !Rn
- * {S,U}[H]ADD{16,8,SUBX},{S,U}[H]SUB{16,8,ADDX}: !Rd, !Rn, !Rm
- * SEL: !Rd, !Rn, !Rm
- * SMLA<x><y>,SMLA{D,W<y>},SMLSD,SMML{A,S}: !Rd, !Rn, !Rm, !Rs
- * SMLAL<x><y>,SMLA{D,LD},SMLSLD,SMMULL,SMULW<y>: !RdHi, !RdLo, !Rm, !Rs
- * SMMUL,SMUAD,SMUL<x><y>,SMUSD: !Rd, !Rm, !Rs
- * SSAT/16: !Rd, !Rm
- * STM(1/2): !Rn, register_list* (R15 in reg list not recommended)
- * STRT immediate pre/post-indexed: Rd*, !Rn
- * STRT register pre/post-indexed: Rd*, !Rn, !Rm
- * STRT scaled register pre/post-indexed: Rd*, !Rn, !Rm
- * STREX: !Rd, !Rn, !Rm
- * SWP/B: !Rd, !Rn, !Rm
- * {S,U}XTA{B,B16,H}: !Rd, !Rn, !Rm
- * {S,U}XT{B,B16,H}: !Rd, !Rm
- * UM{AA,LA,UL}L: !RdHi, !RdLo, !Rm, !Rs
- * USA{D8,A8,T,T16}: !Rd, !Rm, !Rs
- *
- * May transfer control by writing R15 (possible mode changes or alternate
- * mode accesses marked by "*"):
- * ALU op (* with s-bit), B, BL, BKPT, BLX(1/2), BX, BXJ, CPS*, CPY,
- * LDM(1), LDM(2/3)*, LDR, MOV, RFE*, SWI*
- *
- * Instructions that do not take general registers, nor transfer control:
- * CDP/2, SETEND, SRS*
- */
index 2ba7deb3072e5962c6cd3de55d4a2ed2594c1589..1656c87501c0f5bee77ebaab931e8249d70ce451 100644 (file)
@@ -134,7 +134,8 @@ static void __kprobes singlestep(struct kprobe *p, struct pt_regs *regs,
                                 struct kprobe_ctlblk *kcb)
 {
        regs->ARM_pc += 4;
-       p->ainsn.insn_handler(p, regs);
+       if (p->ainsn.insn_check_cc(regs->ARM_cpsr))
+               p->ainsn.insn_handler(p, regs);
 }
 
 /*
index 69cfee0fe00f1cbc38eb7f789ef23aae51688dd6..139e3c8273696198fa0995a761a5368875961b51 100644 (file)
@@ -221,7 +221,7 @@ again:
        prev_raw_count &= armpmu->max_period;
 
        if (overflow)
-               delta = armpmu->max_period - prev_raw_count + new_raw_count;
+               delta = armpmu->max_period - prev_raw_count + new_raw_count + 1;
        else
                delta = new_raw_count - prev_raw_count;
 
@@ -746,7 +746,8 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
 
        tail = (struct frame_tail __user *)regs->ARM_fp - 1;
 
-       while (tail && !((unsigned long)tail & 0x3))
+       while ((entry->nr < PERF_MAX_STACK_DEPTH) &&
+              tail && !((unsigned long)tail & 0x3))
                tail = user_backtrace(tail, entry);
 }
 
index 94bbedbed6394cf147e2b73bce3b6629d0dbbd9f..5e1e541972277f38a123d7964fca081629584d50 100644 (file)
@@ -372,6 +372,8 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
        if (clone_flags & CLONE_SETTLS)
                thread->tp_value = regs->ARM_r3;
 
+       thread_notify(THREAD_NOTIFY_COPY, thread);
+
        return 0;
 }
 
index 8fe05ad932e4bd0b113c11c19f7e816650ace696..f29b8a29b17436f80f3b960a8be0337aa91811c7 100644 (file)
@@ -479,7 +479,7 @@ static void broadcast_timer_set_mode(enum clock_event_mode mode,
 {
 }
 
-static void broadcast_timer_setup(struct clock_event_device *evt)
+static void __cpuinit broadcast_timer_setup(struct clock_event_device *evt)
 {
        evt->name       = "dummy_timer";
        evt->features   = CLOCK_EVT_FEAT_ONESHOT |
index 7a57609229141dac056ef910d6fa1b60d9bcbd79..40ee7e5045e40f7a1f78cd8bd9d632b9130175b3 100644 (file)
@@ -158,7 +158,7 @@ static int emulate_swpX(unsigned int address, unsigned int *data,
 
        if (res == 0) {
                /*
-                * Barrier also required between aquiring a lock for a
+                * Barrier also required between acquiring a lock for a
                 * protected resource and accessing the resource. Inserted for
                 * same reason as above.
                 */
index 4ad8da15ef2b3972f4412631ceb1a5cf1d63eba2..af0aaebf4de62e16e70fcfcad8ccafece2879217 100644 (file)
@@ -311,7 +311,7 @@ asmlinkage long sys_oabi_semtimedop(int semid,
        long err;
        int i;
 
-       if (nsops < 1)
+       if (nsops < 1 || nsops > SEMOPM)
                return -EINVAL;
        sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
        if (!sops)
index f0000e188c8c8c5a14be6f21c37b961739ecfad6..3b54ad19d4890c40752905af84a345b21ba56b62 100644 (file)
@@ -410,8 +410,7 @@ static int bad_syscall(int n, struct pt_regs *regs)
        struct thread_info *thread = current_thread_info();
        siginfo_t info;
 
-       if (current->personality != PER_LINUX &&
-           current->personality != PER_LINUX_32BIT &&
+       if ((current->personality & PER_MASK) != PER_LINUX &&
            thread->exec_domain->handler) {
                thread->exec_domain->handler(n, regs);
                return regs->ARM_r0;
index 2e74a19874d11a955d90909dbfec1983508896f8..295e1e77fa60cc3106a17b685df37be064428f81 100644 (file)
@@ -76,7 +76,7 @@ static struct at91_udc_data __initdata carmeva_udc_data = {
        .pullup_pin     = AT91_PIN_PD9,
 };
 
-/* FIXME: user dependant */
+/* FIXME: user dependent */
 // static struct at91_cf_data __initdata carmeva_cf_data = {
 //     .det_pin        = AT91_PIN_PB0,
 //     .rst_pin        = AT91_PIN_PC5,
index 27ac6f550fe36eb686e8c180a727c8bf29d2c286..02182c16a022a96bc2072be76e12dc3007d42bf1 100644 (file)
 #define                AT91_MCI_RDIRE          (1 << 17)       /* Response Direction Error */
 #define                AT91_MCI_RCRCE          (1 << 18)       /* Response CRC Error */
 #define                AT91_MCI_RENDE          (1 << 19)       /* Response End Bit Error */
-#define                AT91_MCI_RTOE           (1 << 20)       /* Reponse Time-out Error */
+#define                AT91_MCI_RTOE           (1 << 20)       /* Response Time-out Error */
 #define                AT91_MCI_DCRCE          (1 << 21)       /* Data CRC Error */
 #define                AT91_MCI_DTOE           (1 << 22)       /* Data Time-out Error */
 #define                AT91_MCI_OVRE           (1 << 30)       /* Overrun */
index ddeb6453675692d8dc3831920d5e96f8b7961e9c..056dc6674b6bf74c649cabe60204ebbf01ff9a03 100644 (file)
@@ -208,7 +208,7 @@ extern void at91_gpio_resume(void);
 
 /*-------------------------------------------------------------------------*/
 
-/* wrappers for "new style" GPIO calls. the old AT91-specfic ones should
+/* wrappers for "new style" GPIO calls. the old AT91-specific ones should
  * eventually be removed (along with this errno.h inclusion), and the
  * gpio request/free calls should probably be implemented.
  */
index 77f84b40dda9f7c74f9dd7bc10489bf907037f5e..a1f328357aa4b91b0f0d49f7b1b944de01cc6e8a 100644 (file)
@@ -551,7 +551,7 @@ int dmacHw_calculateDescriptorCount(dmacHw_CONFIG_t *pConfig,       /*   [ IN ] Config
 
 /****************************************************************************/
 /**
-*  @brief   Check the existance of pending descriptor
+*  @brief   Check the existence of pending descriptor
 *
 *  This function confirmes if there is any pending descriptor in the chain
 *  to program the channel
@@ -775,7 +775,7 @@ int dmacHw_setVariableDataDescriptor(dmacHw_HANDLE_t handle,        /*   [ IN ] DMA Cha
 /**
 *  @brief   Read data DMAed to memory
 *
-*  This function will read data that has been DMAed to memory while transfering from:
+*  This function will read data that has been DMAed to memory while transferring from:
 *          - Memory to memory
 *          - Peripheral to memory
 *
@@ -941,7 +941,7 @@ int dmacHw_setControlDescriptor(dmacHw_CONFIG_t *pConfig,   /*   [ IN ] Configurat
 /**
 *  @brief   Sets channel specific user data
 *
-*  This function associates user data to a specif DMA channel
+*  This function associates user data to a specific DMA channel
 *
 */
 /****************************************************************************/
index 8d1baf3f4683f9cfe8f95d3443d11ef4ccda2c0f..d87ad30dda35a8c2ed5689e3c50590b2320e7b5a 100644 (file)
@@ -629,7 +629,7 @@ EXPORT_SYMBOL(dma_get_device_descriptor_ring);
 *   Configures a DMA channel.
 *
 *   @return
-*       >= 0    - Initialization was successfull.
+*       >= 0    - Initialization was successful.
 *
 *       -EBUSY  - Device is currently being used.
 *       -ENODEV - Device handed in is invalid.
@@ -673,7 +673,7 @@ static int ConfigChannel(DMA_Handle_t handle)
 /**
 *   Initializes all of the data structures associated with the DMA.
 *   @return
-*       >= 0    - Initialization was successfull.
+*       >= 0    - Initialization was successful.
 *
 *       -EBUSY  - Device is currently being used.
 *       -ENODEV - Device handed in is invalid.
index 6c8da2b9fc1f38f515dd0ce23c8bd43d69dd259d..e6a1dc484ca728f761a1a57c7cc73b0448371750 100644 (file)
@@ -362,7 +362,7 @@ int dmacHw_setControlDescriptor(dmacHw_CONFIG_t *pConfig,   /*  [ IN ] Configurati
 /**
 *  @brief   Read data DMA transferred to memory
 *
-*  This function will read data that has been DMAed to memory while transfering from:
+*  This function will read data that has been DMAed to memory while transferring from:
 *          - Memory to memory
 *          - Peripheral to memory
 *
@@ -446,7 +446,7 @@ void dmacHw_stopTransfer(dmacHw_HANDLE_t handle     /*   [ IN ] DMA Channel handle *
 
 /****************************************************************************/
 /**
-*  @brief   Check the existance of pending descriptor
+*  @brief   Check the existence of pending descriptor
 *
 *  This function confirmes if there is any pending descriptor in the chain
 *  to program the channel
@@ -542,7 +542,7 @@ dmacHw_HANDLE_t dmacHw_getInterruptSource(void);
 /**
 *  @brief   Sets channel specific user data
 *
-*  This function associates user data to a specif DMA channel
+*  This function associates user data to a specific DMA channel
 *
 */
 /****************************************************************************/
index 70eaea866cfeeff7dd3fff92595e419cf044be34..161973385faf51ac2c98f80d46ab11dd9eed9d7d 100644 (file)
@@ -180,7 +180,7 @@ typedef enum {
 
 #define chipcHw_XTAL_FREQ_Hz                    25000000       /* Reference clock frequency in Hz */
 
-/* Programable pin defines */
+/* Programmable pin defines */
 #define chipcHw_PIN_GPIO(n)                     ((((n) >= 0) && ((n) < (chipcHw_GPIO_COUNT))) ? (n) : 0xFFFFFFFF)
                                                                             /* GPIO pin 0 - 60 */
 #define chipcHw_PIN_UARTTXD                     (chipcHw_GPIO_COUNT + 0)       /* UART Transmit */
index c78833acb37aa473fa0ca977d8e942f6a35cfc17..03238c299001a9893dffc80561cca43664a4d404 100644 (file)
@@ -832,7 +832,7 @@ static inline void chipcHw_setUsbDevice(void)
 
 /****************************************************************************/
 /**
-*  @brief   Lower layer funtion to enable/disable a clock of a certain device
+*  @brief   Lower layer function to enable/disable a clock of a certain device
 *
 *  This function enables/disables a core clock
 *
index e01fc4607c913a3cc3e7d69c088b99d7c7a70cad..0aeb6a6fe7f8917b206993364455947564a78778 100644 (file)
 #define INTCHW_INTC0_DMA0C0               (1<<INTCHW_INTC0_DMA0C0_BITNUM)
 
 /* INTC1 - interrupt controller 1 */
-#define INTCHW_INTC1_DDRVPMP_BITNUM       27   /* DDR and VPM PLL clock phase relationship interupt (Not for A0) */
+#define INTCHW_INTC1_DDRVPMP_BITNUM       27   /* DDR and VPM PLL clock phase relationship interrupt (Not for A0) */
 #define INTCHW_INTC1_DDRVPMT_BITNUM       26   /* DDR and VPM HW phase align timeout interrupt (Not for A0) */
-#define INTCHW_INTC1_DDRP_BITNUM          26   /* DDR and PLL clock phase relationship interupt (For A0 only)) */
+#define INTCHW_INTC1_DDRP_BITNUM          26   /* DDR and PLL clock phase relationship interrupt (For A0 only)) */
 #define INTCHW_INTC1_RTC2_BITNUM          25   /* Real time clock tamper interrupt */
 #define INTCHW_INTC1_VDEC_BITNUM          24   /* Hantro Video Decoder interrupt */
 /* Bits 13-23 are non-secure versions of the corresponding secure bits in SINTC bits 0-10. */
index 06a355481ea6a62544ccc356a7e37fad811f466c..0992842caa77fc919e81f21dfbc66a68a2b9c2b4 100644 (file)
@@ -88,7 +88,7 @@
 /* REG_UMI_FLASH0/1/2_TCR, REG_UMI_SRAM0/1_TCR bits */
 /* Enable wait pin during burst write or read */
 #define REG_UMI_TCR_WAITEN              0x80000000
-/* Enable mem ctrlr to work iwth ext mem of lower freq than AHB clk */
+/* Enable mem ctrlr to work with ext mem of lower freq than AHB clk */
 #define REG_UMI_TCR_LOWFREQ             0x40000000
 /* 1=synch write, 0=async write */
 #define REG_UMI_TCR_MEMTYPE_SYNCWRITE   0x20000000
index 32f147998cd9536b7daf47236da1b75e9029087f..c0deacae778d28c3ef8ff50c004ac65f01ef3ce6 100644 (file)
@@ -63,6 +63,7 @@ config MACH_DAVINCI_EVM
        depends on ARCH_DAVINCI_DM644x
        select MISC_DEVICES
        select EEPROM_AT24
+       select I2C
        help
          Configure this option to specify the whether the board used
          for development is a DM644x EVM
@@ -72,6 +73,7 @@ config MACH_SFFSDR
        depends on ARCH_DAVINCI_DM644x
        select MISC_DEVICES
        select EEPROM_AT24
+       select I2C
        help
          Say Y here to select the Lyrtech Small Form Factor
          Software Defined Radio (SFFSDR) board.
@@ -105,6 +107,7 @@ config MACH_DAVINCI_DM6467_EVM
        select MACH_DAVINCI_DM6467TEVM
        select MISC_DEVICES
        select EEPROM_AT24
+       select I2C
        help
          Configure this option to specify the whether the board used
          for development is a DM6467 EVM
@@ -118,6 +121,7 @@ config MACH_DAVINCI_DM365_EVM
        depends on ARCH_DAVINCI_DM365
        select MISC_DEVICES
        select EEPROM_AT24
+       select I2C
        help
          Configure this option to specify whether the board used
          for development is a DM365 EVM
@@ -129,6 +133,7 @@ config MACH_DAVINCI_DA830_EVM
        select GPIO_PCF857X
        select MISC_DEVICES
        select EEPROM_AT24
+       select I2C
        help
          Say Y here to select the TI DA830/OMAP-L137/AM17x Evaluation Module.
 
@@ -205,6 +210,7 @@ config MACH_MITYOMAPL138
        depends on ARCH_DAVINCI_DA850
        select MISC_DEVICES
        select EEPROM_AT24
+       select I2C
        help
          Say Y here to select the Critical Link MityDSP-L138/MityARM-1808
          System on Module.  Information on this SoM may be found at
index 2aa79c54f98e664d5a48701fdf0cec553090c9aa..606a6f27ed6c20e4e38034c180e592a407e68eea 100644 (file)
@@ -29,7 +29,7 @@
 #include <mach/mux.h>
 #include <mach/spi.h>
 
-#define MITYOMAPL138_PHY_ID            "0:03"
+#define MITYOMAPL138_PHY_ID            ""
 
 #define FACTORY_CONFIG_MAGIC   0x012C0138
 #define FACTORY_CONFIG_VERSION 0x00010001
@@ -414,7 +414,7 @@ static struct resource mityomapl138_nandflash_resource[] = {
 
 static struct platform_device mityomapl138_nandflash_device = {
        .name           = "davinci_nand",
-       .id             = 0,
+       .id             = 1,
        .dev            = {
                .platform_data  = &mityomapl138_nandflash_data,
        },
index 6c389ff1020ef30d0434309a05b626ce565d0496..3e7be2de96deff4caba4bdbdfffc82601983a284 100644 (file)
@@ -11,7 +11,7 @@
  * DM644X-EVM board. It has:
  *     DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC,
  *     USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video.
- *     Additionaly realtime clock, IR remote control receiver,
+ *     Additionally realtime clock, IR remote control receiver,
  *     IR Blaster based on MSP430 (firmware although is different
  *     from used in DM644X-EVM), internal ATA-6 3.5” HDD drive
  *     with PATA interface, two muxed red-green leds.
index 4a68c2b1ec11f7f809b9f54eadf3f7f5595f2417..0a95be1512bbfd5044cea277bffe9bf4646905f6 100644 (file)
@@ -167,7 +167,7 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
        /*
         * Time measurement across the target() function yields ~1500-1800us
         * time taken with no drivers on notification list.
-        * Setting the latency to 2000 us to accomodate addition of drivers
+        * Setting the latency to 2000 us to accommodate addition of drivers
         * to pre/post change notification list.
         */
        policy->cpuinfo.transition_latency = 2000 * 1000;
index 68fe4c289d77b32d1395a347f38c2a6cfc768cd3..b95b9196deed9edc99605cdf6768a761f94dd967 100644 (file)
@@ -1123,7 +1123,7 @@ void __init da850_init(void)
         * This helps keeping the peripherals on this domain insulated
         * from CPU frequency changes caused by DVFS. The firmware sets
         * both PLL0 and PLL1 to the same frequency so, there should not
-        * be any noticible change even in non-DVFS use cases.
+        * be any noticeable change even in non-DVFS use cases.
         */
        da850_set_async3_src(1);
 
index 625d4b66718ba89bc3062c8b9b7b9189b13cc0c5..58a02dc7b15a5b76f8deb2f540e55f030d484d55 100644 (file)
@@ -39,7 +39,8 @@
 #define DA8XX_GPIO_BASE                        0x01e26000
 #define DA8XX_I2C1_BASE                        0x01e28000
 #define DA8XX_SPI0_BASE                        0x01c41000
-#define DA8XX_SPI1_BASE                        0x01f0e000
+#define DA830_SPI1_BASE                        0x01e12000
+#define DA850_SPI1_BASE                        0x01f0e000
 
 #define DA8XX_EMAC_CTRL_REG_OFFSET     0x3000
 #define DA8XX_EMAC_MOD_REG_OFFSET      0x2000
@@ -762,8 +763,8 @@ static struct resource da8xx_spi0_resources[] = {
 
 static struct resource da8xx_spi1_resources[] = {
        [0] = {
-               .start  = DA8XX_SPI1_BASE,
-               .end    = DA8XX_SPI1_BASE + SZ_4K - 1,
+               .start  = DA830_SPI1_BASE,
+               .end    = DA830_SPI1_BASE + SZ_4K - 1,
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
@@ -832,5 +833,10 @@ int __init da8xx_register_spi(int instance, struct spi_board_info *info,
 
        da8xx_spi_pdata[instance].num_chipselect = len;
 
+       if (instance == 1 && cpu_is_davinci_da850()) {
+               da8xx_spi1_resources[0].start = DA850_SPI1_BASE;
+               da8xx_spi1_resources[0].end = DA850_SPI1_BASE + SZ_4K - 1;
+       }
+
        return platform_device_register(&da8xx_spi_device[instance]);
 }
index 76364d1345df3fe24ec23dd26a75746211b3cbb0..a3a94e9c93784b10a6d98c3b379a680def7641e2 100644 (file)
@@ -314,7 +314,7 @@ static struct clk timer2_clk = {
        .name = "timer2",
        .parent = &pll1_aux_clk,
        .lpsc = DAVINCI_LPSC_TIMER2,
-       .usecount = 1,              /* REVISIT: why cant' this be disabled? */
+       .usecount = 1,              /* REVISIT: why can't this be disabled? */
 };
 
 static struct clk timer3_clk = {
index 9a2376b3137ccd57532d0d5d6c1432d3e7c23801..4c82c2716293a6e750f242c128fb14e66c2ce636 100644 (file)
@@ -274,7 +274,7 @@ static struct clk timer2_clk = {
        .name = "timer2",
        .parent = &pll1_aux_clk,
        .lpsc = DAVINCI_LPSC_TIMER2,
-       .usecount = 1,              /* REVISIT: why cant' this be disabled? */
+       .usecount = 1,              /* REVISIT: why can't this be disabled? */
 };
 
 static struct clk_lookup dm644x_clks[] = {
index cea6b8972043d6aaec2c6980dc0ea3e28a588696..957fb87e832e5da741f0ac2067347bacd6008dd6 100644 (file)
@@ -4,7 +4,7 @@
  * Author: Kevin Hilman, Deep Root Systems, LLC
  *
  * Defines the cpu_is_*() macros for runtime detection of DaVinci
- * device type.  In addtion, if support for a given device is not
+ * device type.  In addition, if support for a given device is not
  * compiled in to the kernel, the macros return 0 so that
  * resulting code can be optimized out.
  *
index 9f1befc5ac387d2d0124c080c88458a67dc0b30f..f8b7ea4f6235f6f5dc66aa15d9bfe203523f4486 100644 (file)
@@ -24,6 +24,9 @@
 
 #define UART_SHIFT     2
 
+#define davinci_uart_v2p(x)    ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET)
+#define davinci_uart_p2v(x)    ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET)
+
                .pushsection .data
 davinci_uart_phys:     .word   0
 davinci_uart_virt:     .word   0
@@ -34,7 +37,7 @@ davinci_uart_virt:    .word   0
                /* Use davinci_uart_phys/virt if already configured */
 10:            mrc     p15, 0, \rp, c1, c0
                tst     \rp, #1                 @ MMU enabled?
-               ldreq   \rp, =__virt_to_phys(davinci_uart_phys)
+               ldreq   \rp, =davinci_uart_v2p(davinci_uart_phys)
                ldrne   \rp, =davinci_uart_phys
                add     \rv, \rp, #4            @ davinci_uart_virt
                ldr     \rp, [\rp, #0]
@@ -48,18 +51,18 @@ davinci_uart_virt:  .word   0
                tst     \rp, #1                 @ MMU enabled?
 
                /* Copy uart phys address from decompressor uart info */
-               ldreq   \rv, =__virt_to_phys(davinci_uart_phys)
+               ldreq   \rv, =davinci_uart_v2p(davinci_uart_phys)
                ldrne   \rv, =davinci_uart_phys
                ldreq   \rp, =DAVINCI_UART_INFO
-               ldrne   \rp, =__phys_to_virt(DAVINCI_UART_INFO)
+               ldrne   \rp, =davinci_uart_p2v(DAVINCI_UART_INFO)
                ldr     \rp, [\rp, #0]
                str     \rp, [\rv]
 
                /* Copy uart virt address from decompressor uart info */
-               ldreq   \rv, =__virt_to_phys(davinci_uart_virt)
+               ldreq   \rv, =davinci_uart_v2p(davinci_uart_virt)
                ldrne   \rv, =davinci_uart_virt
                ldreq   \rp, =DAVINCI_UART_INFO
-               ldrne   \rp, =__phys_to_virt(DAVINCI_UART_INFO)
+               ldrne   \rp, =davinci_uart_p2v(DAVINCI_UART_INFO)
                ldr     \rp, [\rp, #4]
                str     \rp, [\rv]
 
index 8051110b8ac3417cf2817878204f9f1f1e28da42..c9e6ce185a66fa62a6a028613413e582894d6896 100644 (file)
@@ -22,7 +22,7 @@
  *
  * This area sits just below the page tables (see arch/arm/kernel/head.S).
  */
-#define DAVINCI_UART_INFO      (PHYS_OFFSET + 0x3ff8)
+#define DAVINCI_UART_INFO      (PLAT_PHYS_OFFSET + 0x3ff8)
 
 #define DAVINCI_UART0_BASE     (IO_PHYS + 0x20000)
 #define DAVINCI_UART1_BASE     (IO_PHYS + 0x20400)
index 180b8a9d0d2154ef60e680d278e05456f3b67dd4..a5a9ff70b198b6ca9e767a42ebd653f71d53a7c1 100644 (file)
@@ -101,7 +101,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
 static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
        /*
-        * map discontiguous hw irq range to continous sw irq range:
+        * map discontiguous hw irq range to continuous sw irq range:
         *
         *  IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7})
         */
index 939728b38d48df98b95c93c4d98aab6b3ca7d348..be9266b10fdb66b2a5e0deb6896e8d1b50328fcc 100644 (file)
@@ -18,7 +18,7 @@
 #define gpio_cansleep  __gpio_cansleep
 #define gpio_to_irq    __gpio_to_irq
 
-/* Practically, GPIO banks upto GPZ are the configurable gpio banks */
+/* Practically, GPIO banks up to GPZ are the configurable gpio banks */
 
 /* GPIO bank sizes */
 #define EXYNOS4_GPIO_A0_NR     (8)
index af82a8fbb68bda8d2d88c57acfd047b1da7baf41..14ac10b7ec022d37f698883aad2abe170006902b 100644 (file)
@@ -276,7 +276,7 @@ static void exynos4_mct_tick_start(unsigned long cycles,
        /* update interrupt count buffer */
        exynos4_mct_write(tmp, mevt->base + MCT_L_ICNTB_OFFSET);
 
-       /* enable MCT tick interupt */
+       /* enable MCT tick interrupt */
        exynos4_mct_write(0x1, mevt->base + MCT_L_INT_ENB_OFFSET);
 
        tmp = __raw_readl(mevt->base + MCT_L_TCON_OFFSET);
index 1b3d3a2de95c9ba65c152aa0fd698021c381c72b..e8d08bf8965aa7bdff8935173fcb1549dcbab815 100644 (file)
@@ -38,14 +38,14 @@ void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
        switch (width) {
        case 8:
                for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6); gpio++) {
-                       /* Data pin GPK1[3:6] to special-funtion 3 */
+                       /* Data pin GPK1[3:6] to special-function 3 */
                        s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
                        s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
                        s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
                }
        case 4:
                for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6); gpio++) {
-                       /* Data pin GPK0[3:6] to special-funtion 2 */
+                       /* Data pin GPK0[3:6] to special-function 2 */
                        s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
                        s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
                        s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
index 85f9433d48367f7e9dbb9335556395303fb46ad8..1e83f8cf236d2e00617bef464a2968709774910a 100644 (file)
@@ -35,7 +35,7 @@ void exynos4_setup_sdhci_cfg_card(struct platform_device *dev, void __iomem *r,
 {
        u32 ctrl2, ctrl3;
 
-       /* don't need to alter anything acording to card-type */
+       /* don't need to alter anything according to card-type */
 
        ctrl2 = readl(r + S3C_SDHCI_CONTROL2);
 
index 773ea0c95b9f6fc91d8c9c57f3a3bd0f714b306d..ba3dae352a2de22a781777c928a264129204e63b 100644 (file)
@@ -225,7 +225,7 @@ static u32 iop13xx_atue_cfg_address(struct pci_bus *bus, int devfn, int where)
 /* This routine checks the status of the last configuration cycle.  If an error
  * was detected it returns >0, else it returns a 0.  The errors being checked
  * are parity, master abort, target abort (master and target).  These types of
- * errors occure during a config cycle where there is no device, like during
+ * errors occur during a config cycle where there is no device, like during
  * the discovery stage.
  */
 static int iop13xx_atux_pci_status(int clear)
@@ -332,7 +332,7 @@ static struct pci_ops iop13xx_atux_ops = {
 /* This routine checks the status of the last configuration cycle.  If an error
  * was detected it returns >0, else it returns a 0.  The errors being checked
  * are parity, master abort, target abort (master and target).  These types of
- * errors occure during a config cycle where there is no device, like during
+ * errors occur during a config cycle where there is no device, like during
  * the discovery stage.
  */
 static int iop13xx_atue_pci_status(int clear)
index f781164e623fc89e7a4362b3d039f9e58688fd0d..24294b2bc4690365b8092d6ee702738cab1c3cc5 100644 (file)
@@ -15,7 +15,7 @@
 
 /****************************************************************************
  * 16 MiB NOR flash. The struct mtd_partition is not in the same order as the
- *     partitions on the device because we want to keep compatability with
+ *     partitions on the device because we want to keep compatibility with
  *     the QNAP firmware.
  * Layout as used by QNAP:
  *  0x00000000-0x00080000 : "U-Boot"
index e76d41bb7056ee199895a1ea251903b0c9f8d853..b9c80597b7bf231841e572befd9fb83f1ba53fde 100644 (file)
@@ -41,7 +41,7 @@
  * DRAM clocking and refresh are slightly different for systems with DDR
  * DRAM or regular SDRAM devices. If SDRAM is used in the system, the
  * SDRAM will still be accessible in direct-run mode. In DDR based systems,
- * a transistion to direct-run mode will stop all DDR accesses (no clocks).
+ * a transition to direct-run mode will stop all DDR accesses (no clocks).
  * Because of this, the code to switch power modes and the code to enter
  * and exit DRAM self-refresh modes must not be executed in DRAM. A small
  * section of IRAM is used instead for this.
index ee8b02ed8011dfa615603045a22c5a98956635e4..7bfb827f3fe36a8d71fc874b1a45e446be1d3bac 100644 (file)
@@ -10,7 +10,7 @@
 #define BANK_OFF(n)    (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
 #define GPIO_REG(x)    (*((volatile u32 *)(GPIO_REGS_VIRT + (x))))
 
-#define NR_BUILTIN_GPIO        (192)
+#define NR_BUILTIN_GPIO                IRQ_GPIO_NUM
 
 #define gpio_to_bank(gpio)     ((gpio) >> 5)
 #define gpio_to_irq(gpio)      (IRQ_GPIO_START + (gpio))
index 4621067c7720f457b311faff80e19dddc87ecd3e..713be155a44d716df91aeb74c2d043630f543564 100644 (file)
@@ -8,6 +8,15 @@
 #define MFP_DRIVE_MEDIUM       (0x2 << 13)
 #define MFP_DRIVE_FAST         (0x3 << 13)
 
+#undef MFP_CFG
+#undef MFP_CFG_DRV
+
+#define MFP_CFG(pin, af)               \
+       (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
+
+#define MFP_CFG_DRV(pin, af, drv)      \
+       (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
+
 /* GPIO */
 #define GPIO0_GPIO             MFP_CFG(GPIO0, AF5)
 #define GPIO1_GPIO             MFP_CFG(GPIO1, AF5)
index aeb9ae23e6cef69acca858f229920027c13ef7cc..99833b9485cf15fc464f5ed1ab4f5d2bd4288f6e 100644 (file)
@@ -9,7 +9,7 @@
  *   2008-04-11: Jason Chagas <Jason.chagas@marvell.com>
  *   2008-10-08: Bin Yang <bin.yang@marvell.com>
  *
- * The timers module actually includes three timers, each timer with upto
+ * The timers module actually includes three timers, each timer with up to
  * three match comparators. Timer #0 is used here in free-running mode as
  * the clock source, and match comparator #1 used as clock event device.
  *
index 7ffbd987eb5d848e82e38a2975eb7c1be405b5d3..805d4ee53f7e1f7ef2a43f2d60f9a226175574b8 100644 (file)
@@ -343,7 +343,7 @@ int acpuclk_set_rate(unsigned long rate, int for_power_collapse)
                }
        }
 
-       /* Set wait states for CPU inbetween frequency changes */
+       /* Set wait states for CPU between frequency changes */
        reg_clkctl = readl(A11S_CLK_CNTL_ADDR);
        reg_clkctl |= (100 << 16); /* set WT_ST_CNT */
        writel(reg_clkctl, A11S_CLK_CNTL_ADDR);
index 7f568611547e94d5343db7d174712dc732ea0f2c..6a96911b0ad508cdde70e79359a8e3480ce10c16 100644 (file)
@@ -160,10 +160,7 @@ static struct msm_mmc_platform_data qsd8x50_sdc1_data = {
 
 static void __init qsd8x50_init_mmc(void)
 {
-       if (machine_is_qsd8x50_ffa() || machine_is_qsd8x50a_ffa())
-               vreg_mmc = vreg_get(NULL, "gp6");
-       else
-               vreg_mmc = vreg_get(NULL, "gp5");
+       vreg_mmc = vreg_get(NULL, "gp5");
 
        if (IS_ERR(vreg_mmc)) {
                pr_err("vreg get for vreg_mmc failed (%ld)\n",
index cfa808dd489787834b28bdcb93e7f1f34e7f0fae..232f97a045041cdd98e53e9f04dc6c2aaebc7f36 100644 (file)
@@ -46,7 +46,7 @@ static DEFINE_MUTEX(scm_lock);
  * @id: command to be executed
  * @buf: buffer returned from scm_get_command_buffer()
  *
- * An SCM command is layed out in memory as follows:
+ * An SCM command is laid out in memory as follows:
  *
  *     ------------------- <--- struct scm_command
  *     | command header  |
index 56f920c55b6aaaaa45737aeeddffadfa1b1a12d2..38b95e949d13b0a87d83a3274b0369e98c8321ed 100644 (file)
@@ -269,7 +269,7 @@ int __cpuinit local_timer_setup(struct clock_event_device *evt)
 
        /* Use existing clock_event for cpu 0 */
        if (!smp_processor_id())
-               return;
+               return 0;
 
        writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL);
 
index 2cf390fbd9809876a55a2b9dd6687e40cea41d60..47a69cbc31a873dbc19fc9f69d4b231095f3d356 100644 (file)
@@ -257,11 +257,16 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
        .workaround     = FLS_USB2_WORKAROUND_ENGCM09152,
 };
 
+static int vpr200_usbh_init(struct platform_device *pdev)
+{
+       return mx35_initialize_usb_hw(pdev->id,
+                       MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY);
+}
+
 /* USB HOST config */
 static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
-       .portsc         = MXC_EHCI_MODE_SERIAL,
-       .flags          = MXC_EHCI_INTERFACE_SINGLE_UNI |
-                         MXC_EHCI_INTERNAL_PHY,
+       .init = vpr200_usbh_init,
+       .portsc = MXC_EHCI_MODE_SERIAL,
 };
 
 static struct platform_device *devices[] __initdata = {
index 10a1bea1054888ecfe0a24689722090a2bc778c0..6206b1191fe8e574efe7c480864fd8201060244c 100644 (file)
@@ -193,7 +193,7 @@ static iomux_v3_cfg_t mx53_loco_pads[] = {
        .wakeup         = wake,                                 \
 }
 
-static const struct gpio_keys_button loco_buttons[] __initconst = {
+static struct gpio_keys_button loco_buttons[] = {
        GPIO_BUTTON(MX53_LOCO_POWER, KEY_POWER, 1, "power", 0),
        GPIO_BUTTON(MX53_LOCO_UI1, KEY_VOLUMEUP, 1, "volume-up", 0),
        GPIO_BUTTON(MX53_LOCO_UI2, KEY_VOLUMEDOWN, 1, "volume-down", 0),
index 1ad97fed1e948ccecf16db4562ad54c80252fadb..5dcc59d5b9ec9feab991fc34302273702388b21e 100644 (file)
@@ -295,11 +295,11 @@ static int name##_set_rate(struct clk *clk, unsigned long rate)           \
        unsigned long diff, parent_rate, calc_rate;                     \
        int i;                                                          \
                                                                        \
-       parent_rate = clk_get_rate(clk->parent);                        \
        div_max = BM_CLKCTRL_##dr##_DIV >> BP_CLKCTRL_##dr##_DIV;       \
        bm_busy = BM_CLKCTRL_##dr##_BUSY;                               \
                                                                        \
        if (clk->parent == &ref_xtal_clk) {                             \
+               parent_rate = clk_get_rate(clk->parent);                \
                div = DIV_ROUND_UP(parent_rate, rate);                  \
                if (clk == &cpu_clk) {                                  \
                        div_max = BM_CLKCTRL_CPU_DIV_XTAL >>            \
@@ -309,6 +309,11 @@ static int name##_set_rate(struct clk *clk, unsigned long rate)            \
                if (div == 0 || div > div_max)                          \
                        return -EINVAL;                                 \
        } else {                                                        \
+               /*                                                      \
+                * hack alert: this block modifies clk->parent, too,    \
+                * so the base to use it the grand parent.              \
+                */                                                     \
+               parent_rate = clk_get_rate(clk->parent->parent);        \
                rate >>= PARENT_RATE_SHIFT;                             \
                parent_rate >>= PARENT_RATE_SHIFT;                      \
                diff = parent_rate;                                     \
index 927d5a1817601f8920194f9961ab039266e4a3cb..c1c5fb6a5b4c511531775d0fff1dc2c69930e0f8 100644 (file)
@@ -79,7 +79,7 @@
 
 
 /*
- * Register useage
+ * Register usage
  * r8  - temporary
  * r9  - the driver buffer
  * r10 - temporary
index d41fe2d0616adeef602d08e785f4681e5963bb52..0ad781db4e66d0bb0a2581323e6ec761ca0b6db8 100644 (file)
@@ -399,7 +399,7 @@ static void __init omap_sx1_init(void)
        sx1_mmc_init();
 
        /* turn on USB power */
-       /* sx1_setusbpower(1); cant do it here because i2c is not ready */
+       /* sx1_setusbpower(1); can't do it here because i2c is not ready */
        gpio_request(1, "A_IRDA_OFF");
        gpio_request(11, "A_SWITCH");
        gpio_request(15, "A_USB_ON");
index b0f4c231595f58225d022d9317293fe38c11637b..36f26c3fa25ee5dc83291012718e8f2f5ea53aae 100644 (file)
@@ -281,7 +281,7 @@ static inline void omap_init_audio(void) {}
  * Claiming GPIOs, and setting their direction and initial values, is the
  * responsibility of the device drivers.  So is responding to probe().
  *
- * Board-specific knowlege like creating devices or pin setup is to be
+ * Board-specific knowledge like creating devices or pin setup is to be
  * kept out of drivers as much as possible.  In particular, pin setup
  * may be handled by the boot loader, and drivers should expect it will
  * normally have been done by the time they're probed.
index 7a2df29400cac5105acebc22657f036a6f3de828..23eed0035ed847345207a805fe7d50307d3ad6cd 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 /*
- * These are the offsets from the begining of the fiq_buffer. They are put here
+ * These are the offsets from the beginning of the fiq_buffer. They are put here
  * since the buffer and header need to be accessed by drivers servicing devices
  * which generate GPIO interrupts - e.g. keyboard, modem, hook switch.
  */
index a45cd6409686f7eadfd6cc85e24e010c628c6d0d..512b15204450417c88a7040b0302eccb3f8fdfdc 100644 (file)
@@ -68,7 +68,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX)          += sr_device.o smartreflex.o
 obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3)  += smartreflex-class3.o
 
 AFLAGS_sleep24xx.o                     :=-Wa,-march=armv6
-AFLAGS_sleep34xx.o                     :=-Wa,-march=armv7-a
+AFLAGS_sleep34xx.o                     :=-Wa,-march=armv7-a$(plus_sec)
 
 ifeq ($(CONFIG_PM_VERBOSE),y)
 CFLAGS_pm_bus.o                                += -DDEBUG
index 5f8a2fd0633720f67b535b362d9c673ce2bedbe6..34cf982b96798edf3e24fd3816d0248b034c75e4 100644 (file)
@@ -696,7 +696,7 @@ static void __init igep2_init(void)
        igep2_init_smsc911x();
 
        /*
-        * WLAN-BT combo module from MuRata wich has a Marvell WLAN
+        * WLAN-BT combo module from MuRata which has a Marvell WLAN
         * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.
         */
        igep2_wlan_bt_init();
index b10db0e6ee62d897bce811b0279e1985a74cc901..2cf86c3cb1a3f4124974324bcfa59b33d875bb23 100644 (file)
@@ -440,7 +440,7 @@ static void __init igep3_init(void)
        igep3_leds_init();
 
        /*
-        * WLAN-BT combo module from MuRata wich has a Marvell WLAN
+        * WLAN-BT combo module from MuRata which has a Marvell WLAN
         * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.
         */
        igep3_wifi_bt_init();
index e964895b80e8f95bbf8544a840e4598062c96a88..f8ba20a14e625554f95fded51abc2177e7326b96 100644 (file)
@@ -141,14 +141,19 @@ static void __init rx51_init(void)
 static void __init rx51_map_io(void)
 {
        omap2_set_globals_3xxx();
-       rx51_video_mem_init();
        omap34xx_map_common_io();
 }
 
+static void __init rx51_reserve(void)
+{
+       rx51_video_mem_init();
+       omap_reserve();
+}
+
 MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
        /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
        .boot_params    = 0x80000100,
-       .reserve        = omap_reserve,
+       .reserve        = rx51_reserve,
        .map_io         = rx51_map_io,
        .init_early     = rx51_init_early,
        .init_irq       = omap_init_irq,
index 276992d3b7fba19b8873e2ff3cae068424b441e0..8c965671b4d486aae235439483204ccef4d2fbe7 100644 (file)
@@ -3116,14 +3116,9 @@ static struct omap_clk omap44xx_clks[] = {
        CLK(NULL,       "dsp_fck",                      &dsp_fck,       CK_443X),
        CLK("omapdss_dss",      "sys_clk",                      &dss_sys_clk,   CK_443X),
        CLK("omapdss_dss",      "tv_clk",                       &dss_tv_clk,    CK_443X),
-       CLK("omapdss_dss",      "dss_clk",                      &dss_dss_clk,   CK_443X),
        CLK("omapdss_dss",      "video_clk",                    &dss_48mhz_clk, CK_443X),
-       CLK("omapdss_dss",      "fck",                          &dss_fck,       CK_443X),
-       /*
-        * On OMAP4, DSS ick is a dummy clock; this is needed for compatibility
-        * with OMAP2/3.
-        */
-       CLK("omapdss_dss",      "ick",                          &dummy_ck,      CK_443X),
+       CLK("omapdss_dss",      "fck",                          &dss_dss_clk,   CK_443X),
+       CLK("omapdss_dss",      "ick",                          &dss_fck,       CK_443X),
        CLK(NULL,       "efuse_ctrl_cust_fck",          &efuse_ctrl_cust_fck,   CK_443X),
        CLK(NULL,       "emif1_fck",                    &emif1_fck,     CK_443X),
        CLK(NULL,       "emif2_fck",                    &emif2_fck,     CK_443X),
index ab878545bd9bc31e61b4c792cf9a3ad960d2fb51..6cb6c03293df98030ed356c958ba501a90f76fbc 100644 (file)
@@ -258,7 +258,7 @@ static void _resolve_clkdm_deps(struct clockdomain *clkdm,
  * clkdm_init - set up the clockdomain layer
  * @clkdms: optional pointer to an array of clockdomains to register
  * @init_autodeps: optional pointer to an array of autodeps to register
- * @custom_funcs: func pointers for arch specfic implementations
+ * @custom_funcs: func pointers for arch specific implementations
  *
  * Set up internal state.  If a pointer to an array of clockdomains
  * @clkdms was supplied, loop through the list of clockdomains,
index 85b3dce65640620c51238a9b099df0f081ede36f..5823584d9cd75086b53f20f33f60ece273c8e906 100644 (file)
@@ -125,7 +125,7 @@ struct clockdomain {
 };
 
 /**
- * struct clkdm_ops - Arch specfic function implementations
+ * struct clkdm_ops - Arch specific function implementations
  * @clkdm_add_wkdep: Add a wakeup dependency between clk domains
  * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains
  * @clkdm_read_wkdep: Read wakeup dependency state between clk domains
index 9d0dec806e9294e721294149550a8746960e4d4f..38830d8d47835d30db060b77c49d4beb385ded4a 100644 (file)
@@ -247,6 +247,7 @@ struct omap3_cm_regs {
        u32 per_cm_clksel;
        u32 emu_cm_clksel;
        u32 emu_cm_clkstctrl;
+       u32 pll_cm_autoidle;
        u32 pll_cm_autoidle2;
        u32 pll_cm_clksel4;
        u32 pll_cm_clksel5;
@@ -319,6 +320,15 @@ void omap3_cm_save_context(void)
                omap2_cm_read_mod_reg(OMAP3430_EMU_MOD, CM_CLKSEL1);
        cm_context.emu_cm_clkstctrl =
                omap2_cm_read_mod_reg(OMAP3430_EMU_MOD, OMAP2_CM_CLKSTCTRL);
+       /*
+        * As per erratum i671, ROM code does not respect the PER DPLL
+        * programming scheme if CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL == 1.
+        * In this case, even though this register has been saved in
+        * scratchpad contents, we need to restore AUTO_PERIPH_DPLL
+        * by ourselves. So, we need to save it anyway.
+        */
+       cm_context.pll_cm_autoidle =
+               omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE);
        cm_context.pll_cm_autoidle2 =
                omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE2);
        cm_context.pll_cm_clksel4 =
@@ -441,6 +451,13 @@ void omap3_cm_restore_context(void)
                               CM_CLKSEL1);
        omap2_cm_write_mod_reg(cm_context.emu_cm_clkstctrl, OMAP3430_EMU_MOD,
                               OMAP2_CM_CLKSTCTRL);
+       /*
+        * As per erratum i671, ROM code does not respect the PER DPLL
+        * programming scheme if CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL == 1.
+        * In this case, we need to restore AUTO_PERIPH_DPLL by ourselves.
+        */
+       omap2_cm_write_mod_reg(cm_context.pll_cm_autoidle, PLL_MOD,
+                              CM_AUTOIDLE);
        omap2_cm_write_mod_reg(cm_context.pll_cm_autoidle2, PLL_MOD,
                               CM_AUTOIDLE2);
        omap2_cm_write_mod_reg(cm_context.pll_cm_clksel4, PLL_MOD,
index 695279419020372cf16d2be18465734308d2c5c4..da53ba3917cae5df365b34bcb8f314e4142a2471 100644 (file)
@@ -316,8 +316,14 @@ void omap3_save_scratchpad_contents(void)
                        omap2_cm_read_mod_reg(WKUP_MOD, CM_CLKSEL);
        prcm_block_contents.cm_clken_pll =
                        omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN);
+       /*
+        * As per erratum i671, ROM code does not respect the PER DPLL
+        * programming scheme if CM_AUTOIDLE_PLL..AUTO_PERIPH_DPLL == 1.
+        * Then,  in anycase, clear these bits to avoid extra latencies.
+        */
        prcm_block_contents.cm_autoidle_pll =
-                       omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_AUTOIDLE_PLL);
+                       omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE) &
+                       ~OMAP3430_AUTO_PERIPH_DPLL_MASK;
        prcm_block_contents.cm_clksel1_pll =
                        omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL1_PLL);
        prcm_block_contents.cm_clksel2_pll =
index a44c52303405c26113373fce426e765185fb2f44..1c240eff3918c08161243279e62206b4eed5caa4 100644 (file)
@@ -297,8 +297,8 @@ DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
 
 /**
  * omap3_cpuidle_update_states() - Update the cpuidle states
- * @mpu_deepest_state: Enable states upto and including this for mpu domain
- * @core_deepest_state:        Enable states upto and including this for core domain
+ * @mpu_deepest_state: Enable states up to and including this for mpu domain
+ * @core_deepest_state:        Enable states up to and including this for core domain
  *
  * This goes through the list of states available and enables and disables the
  * validity of C states based on deepest state that can be achieved for the
index 84d1b735fe80d47d2150f7b3f4bd1a2a79af2ba6..7b855856459143a6cfaa8c20ab597d661c5213a5 100644 (file)
@@ -253,7 +253,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
                        ARRAY_SIZE(omap_keyboard_latency), 0);
 
        if (IS_ERR(od)) {
-               WARN(1, "Cant build omap_device for %s:%s.\n",
+               WARN(1, "Can't build omap_device for %s:%s.\n",
                                                name, oh->name);
                return PTR_ERR(od);
        }
@@ -373,7 +373,7 @@ static int omap_mcspi_init(struct omap_hwmod *oh, void *unused)
        od = omap_device_build(name, spi_num, oh, pdata,
                                sizeof(*pdata), omap_mcspi_latency,
                                ARRAY_SIZE(omap_mcspi_latency), 0);
-       WARN(IS_ERR(od), "Cant build omap_device for %s:%s\n",
+       WARN(IS_ERR(od), "Can't build omap_device for %s:%s\n",
                                name, oh->name);
        kfree(pdata);
        return 0;
@@ -725,7 +725,7 @@ static int __init omap_init_wdt(void)
        od = omap_device_build(dev_name, id, oh, NULL, 0,
                                omap_wdt_latency,
                                ARRAY_SIZE(omap_wdt_latency), 0);
-       WARN(IS_ERR(od), "Cant build omap_device for %s:%s.\n",
+       WARN(IS_ERR(od), "Can't build omap_device for %s:%s.\n",
                                dev_name, oh->name);
        return 0;
 }
index 34922b2d2e3fac135de325cb39af662ab1c7296e..c9ff0e79703d43d233c4533e3bf120aec1b19b14 100644 (file)
@@ -262,7 +262,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
                        omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0);
        kfree(p);
        if (IS_ERR(od)) {
-               pr_err("%s: Cant build omap_device for %s:%s.\n",
+               pr_err("%s: Can't build omap_device for %s:%s.\n",
                        __func__, name, oh->name);
                return PTR_ERR(od);
        }
index 413de18c1d2b41b16017a1796d74a796f271d40d..9529842ae054a72b869e9884b2ca11a27d11bde4 100644 (file)
@@ -82,7 +82,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
        kfree(pdata);
 
        if (IS_ERR(od)) {
-               WARN(1, "Cant build omap_device for %s:%s.\n",
+               WARN(1, "Can't build omap_device for %s:%s.\n",
                                        name, oh->name);
                return PTR_ERR(od);
        }
index 137e1a5f3d85835794d5caa875ba85ef8e0358ed..b2f30bed5a2041d5e27a7b3ce24a172eb8d966e1 100644 (file)
@@ -465,7 +465,7 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
        od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data,
                sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false);
        if (IS_ERR(od)) {
-               WARN(1, "Cant build omap_device for %s:%s.\n", name, oh->name);
+               WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name);
                kfree(mmc_data->slots[0].name);
                goto done;
        }
index 565b9064a32814c1b8dc873ae60c1327bf8ee451..4a6ef6ab845841b1bcf1d1cbd8674f30bfd23053 100644 (file)
@@ -149,7 +149,7 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
                                ARRAY_SIZE(omap2_mcbsp_latency), false);
        kfree(pdata);
        if (IS_ERR(od))  {
-               pr_err("%s: Cant build omap_device for %s:%s.\n", __func__,
+               pr_err("%s: Can't build omap_device for %s:%s.\n", __func__,
                                        name, oh->name);
                return PTR_ERR(od);
        }
index bb043cbb3886add2ca194cc1b2aa2190aaf3dd27..a4ab1e364313693dcdef6292e3310a8afa9fe6be 100644 (file)
@@ -518,7 +518,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused)
                        seq_printf(s, "/* %s */\n", m->muxnames[mode]);
 
                /*
-                * XXX: Might be revisited to support differences accross
+                * XXX: Might be revisited to support differences across
                 * same OMAP generation.
                 */
                seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def);
index adbea0d03e084d5f4384545641f3dfdb541e0f2a..9fd93149ebd99952801c76050ecf0206b006fc99 100644 (file)
@@ -22,7 +22,7 @@
  * absolute addresses.  The name in the macro is the mode-0 name of
  * the pin.  NOTE: These registers are 8-bits wide.
  *
- * Note that these defines use SDMMC instead of MMC for compability
+ * Note that these defines use SDMMC instead of MMC for compatibility
  * with signal names used in 3630.
  */
 #define OMAP2430_CONTROL_PADCONF_GPMC_CLK_OFFSET               0x000
index 8eb3ce1bbfbe3b26ab9612fb015ca366ffd6bdb0..c4d0ae87d62a98596475c74853a6ed0503d6df7f 100644 (file)
@@ -1639,6 +1639,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio1_hwmod = {
        .name           = "gpio1",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap242x_gpio1_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio1_irqs),
        .main_clk       = "gpios_fck",
@@ -1669,6 +1670,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio2_hwmod = {
        .name           = "gpio2",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap242x_gpio2_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio2_irqs),
        .main_clk       = "gpios_fck",
@@ -1699,6 +1701,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio3_hwmod = {
        .name           = "gpio3",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap242x_gpio3_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio3_irqs),
        .main_clk       = "gpios_fck",
@@ -1729,6 +1732,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
 
 static struct omap_hwmod omap2420_gpio4_hwmod = {
        .name           = "gpio4",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap242x_gpio4_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio4_irqs),
        .main_clk       = "gpios_fck",
@@ -1782,7 +1786,7 @@ static struct omap_hwmod_irq_info omap2420_dma_system_irqs[] = {
 static struct omap_hwmod_addr_space omap2420_dma_system_addrs[] = {
        {
                .pa_start       = 0x48056000,
-               .pa_end         = 0x4a0560ff,
+               .pa_end         = 0x48056fff,
                .flags          = ADDR_TYPE_RT
        },
 };
index a860fb5024c2f602a1573d05d4a11160f06353d6..9682dd519f8dd9d1dd0e84a788212c778672cf30 100644 (file)
@@ -1559,7 +1559,7 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
                         * I2CHS IP's do not follow the usual pattern.
                         * prcm_reg_id alone cannot be used to program
                         * the iclk and fclk. Needs to be handled using
-                        * additonal flags when clk handling is moved
+                        * additional flags when clk handling is moved
                         * to hwmod framework.
                         */
                        .module_offs = CORE_MOD,
@@ -1742,6 +1742,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio1_hwmod = {
        .name           = "gpio1",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap243x_gpio1_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio1_irqs),
        .main_clk       = "gpios_fck",
@@ -1772,6 +1773,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio2_hwmod = {
        .name           = "gpio2",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap243x_gpio2_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio2_irqs),
        .main_clk       = "gpios_fck",
@@ -1802,6 +1804,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio3_hwmod = {
        .name           = "gpio3",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap243x_gpio3_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio3_irqs),
        .main_clk       = "gpios_fck",
@@ -1832,6 +1835,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio4_hwmod = {
        .name           = "gpio4",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap243x_gpio4_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio4_irqs),
        .main_clk       = "gpios_fck",
@@ -1862,6 +1866,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
 
 static struct omap_hwmod omap2430_gpio5_hwmod = {
        .name           = "gpio5",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap243x_gpio5_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio5_irqs),
        .main_clk       = "gpio5_fck",
@@ -1915,7 +1920,7 @@ static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
 static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
        {
                .pa_start       = 0x48056000,
-               .pa_end         = 0x4a0560ff,
+               .pa_end         = 0x48056fff,
                .flags          = ADDR_TYPE_RT
        },
 };
index b98e2dfcba28c8b7a57f228472205b9266f4464b..909a84de6682d8673d7f04d1fbe47bc745a77b14 100644 (file)
@@ -2141,6 +2141,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio1_hwmod = {
        .name           = "gpio1",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio1_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio1_irqs),
        .main_clk       = "gpio1_ick",
@@ -2177,6 +2178,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio2_hwmod = {
        .name           = "gpio2",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio2_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio2_irqs),
        .main_clk       = "gpio2_ick",
@@ -2213,6 +2215,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio3_hwmod = {
        .name           = "gpio3",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio3_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio3_irqs),
        .main_clk       = "gpio3_ick",
@@ -2249,6 +2252,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio4_hwmod = {
        .name           = "gpio4",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio4_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio4_irqs),
        .main_clk       = "gpio4_ick",
@@ -2285,6 +2289,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio5_hwmod = {
        .name           = "gpio5",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio5_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio5_irqs),
        .main_clk       = "gpio5_ick",
@@ -2321,6 +2326,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
 
 static struct omap_hwmod omap3xxx_gpio6_hwmod = {
        .name           = "gpio6",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio6_irqs,
        .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio6_irqs),
        .main_clk       = "gpio6_ick",
@@ -2386,7 +2392,7 @@ static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
 static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
        {
                .pa_start       = 0x48056000,
-               .pa_end         = 0x4a0560ff,
+               .pa_end         = 0x48056fff,
                .flags          = ADDR_TYPE_RT
        },
 };
index 3e88dd3f8ef3f452f814b617d35274a1490a38cb..abc548a0c98dacae4bd6c5fc7d8eb615dde9b4c5 100644 (file)
@@ -885,7 +885,7 @@ static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
 static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
        {
                .pa_start       = 0x4a056000,
-               .pa_end         = 0x4a0560ff,
+               .pa_end         = 0x4a056fff,
                .flags          = ADDR_TYPE_RT
        },
 };
index 5f2da7565b68b917dd439c4574ab98402ed1790c..4321e79389291c9695e4695d91132f64b48cc803 100644 (file)
@@ -196,11 +196,11 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
                /* No timeout error for debug sources */
        }
 
-       base = ((l3->rt) + (*(omap3_l3_bases[int_type] + err_source)));
-
        /* identify the error source */
        for (err_source = 0; !(status & (1 << err_source)); err_source++)
                                                                        ;
+
+       base = l3->rt + *(omap3_l3_bases[int_type] + err_source);
        error = omap3_l3_readll(base, L3_ERROR_LOG);
 
        if (error) {
index e2e605fe91386c652840285bd2c6cbcd1244dedf..05f6abc96b0d6032edfb3e2b21f85bc90099ba5d 100644 (file)
@@ -112,12 +112,12 @@ int omap4430_phy_power(struct device *dev, int ID, int on)
                else
                        /*
                         * Enable VBUS Valid, AValid and IDDIG
-                        * high impedence
+                        * high impedance
                         */
                        __raw_writel(IDDIG | AVALID | VBUSVALID,
                                                ctrl_base + USBOTGHS_CONTROL);
        } else {
-               /* Enable session END and IDIG to high impedence. */
+               /* Enable session END and IDIG to high impedance. */
                __raw_writel(SESSEND | IDDIG, ctrl_base +
                                        USBOTGHS_CONTROL);
        }
index 0a8e74e3e811a99a59b0876ce2cae26e42df5ac3..07d6140baa9d605cf6af4c34265701f36648d101 100644 (file)
@@ -308,7 +308,7 @@ int __init omap3_twl_init(void)
  * Strategy Software Scaling Mode (ENABLE_VMODE=0), for setting the voltages,
  * in those scenarios this bit is to be cleared (enable = false).
  *
- * Returns 0 on sucess, error is returned if I2C read/write fails.
+ * Returns 0 on success, error is returned if I2C read/write fails.
  */
 int __init omap3_twl_set_sr_bit(bool enable)
 {
index 30af3351c2d68d4f42df644696dbe478cb2dc8f1..49486f522dca55b05fc55f74523a2053f8df54e0 100644 (file)
@@ -89,6 +89,7 @@ static void omap2_init_processor_devices(void)
        if (cpu_is_omap44xx()) {
                _init_omap_device("l3_main_1", &l3_dev);
                _init_omap_device("dsp", &dsp_dev);
+               _init_omap_device("iva", &iva_dev);
        } else {
                _init_omap_device("l3_main", &l3_dev);
        }
index 49c6513e90d80efc7ca999a37722c15e6e85b64a..9af08473bf1033c6019d82e36dd503184c3c6b93 100644 (file)
@@ -196,7 +196,7 @@ static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused)
 /**
  * pwrdm_init - set up the powerdomain layer
  * @pwrdm_list: array of struct powerdomain pointers to register
- * @custom_funcs: func pointers for arch specfic implementations
+ * @custom_funcs: func pointers for arch specific implementations
  *
  * Loop through the array of powerdomains @pwrdm_list, registering all
  * that are available on the current CPU. If pwrdm_list is supplied
index 027f40bd235db1cd87ac70c2e2641d418fa8656f..d23d979b9c34ef9fd11c7163224f59dd8e0b0368 100644 (file)
@@ -121,7 +121,7 @@ struct powerdomain {
 };
 
 /**
- * struct pwrdm_ops - Arch specfic function implementations
+ * struct pwrdm_ops - Arch specific function implementations
  * @pwrdm_set_next_pwrst: Set the target power state for a pd
  * @pwrdm_read_next_pwrst: Read the target power state set for a pd
  * @pwrdm_read_pwrst: Read the current power state of a pd
index 9c9c113788b9c674cbb6e6d6535b197fbbab2405..469a920a74dc42c9692c77e94e33c37a900aa429 100644 (file)
@@ -72,7 +72,7 @@ static struct powerdomain mpu_3xxx_pwrdm = {
 
 /*
  * The USBTLL Save-and-Restore mechanism is broken on
- * 3430s upto ES3.0 and 3630ES1.0. Hence this feature
+ * 3430s up to ES3.0 and 3630ES1.0. Hence this feature
  * needs to be disabled on these chips.
  * Refer: 3430 errata ID i459 and 3630 errata ID i579
  *
index 8f674c9442bfc6ea07501197a4c73546c922e4fb..13e24f913dd4044199faebbfcb9bd462ad6fc22d 100644 (file)
@@ -247,7 +247,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr)
  * driver register and sr device intializtion API's. Only one call
  * will ultimately succeed.
  *
- * Currenly this function registers interrrupt handler for a particular SR
+ * Currently this function registers interrrupt handler for a particular SR
  * if smartreflex class driver is already registered and has
  * requested for interrupts and the SR interrupt line in present.
  */
index c6facf7becf8ca773bb4cbf43ef7e2e77450a4ce..0c1552d9d99508c3bc0d2a3aaf4ae5038becc089 100644 (file)
@@ -114,7 +114,6 @@ static int __init _config_common_vdd_data(struct omap_vdd_info *vdd)
        sys_clk_speed /= 1000;
 
        /* Generic voltage parameters */
-       vdd->curr_volt = 1200000;
        vdd->volt_scale = vp_forceupdate_scale_voltage;
        vdd->vp_enabled = false;
 
@@ -851,7 +850,7 @@ int omap_voltage_scale_vdd(struct voltagedomain *voltdm,
  * @voltdm:    pointer to the VDD whose voltage is to be reset.
  *
  * This API finds out the correct voltage the voltage domain is supposed
- * to be at and resets the voltage to that level. Should be used expecially
+ * to be at and resets the voltage to that level. Should be used especially
  * while disabling any voltage compensation modules.
  */
 void omap_voltage_reset(struct voltagedomain *voltdm)
@@ -912,7 +911,7 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm,
  * This API searches only through the non-compensated voltages int the
  * voltage table.
  * Returns pointer to the voltage table entry corresponding to volt on
- * sucess. Returns -ENODATA if no voltage table exisits for the passed voltage
+ * success. Returns -ENODATA if no voltage table exisits for the passed voltage
  * domain or if there is no matching entry.
  */
 struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
index 1a5d6a0e26026f4927495dc04a7f403d10155359..5ceafdccc45613ea1b38a2439bce95724876fa62 100644 (file)
@@ -19,7 +19,7 @@
 #include "common.h"
 
 /*
- * The Orion has fully programable address map. There's a separate address
+ * The Orion has fully programmable address map. There's a separate address
  * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB,
  * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own
  * address decode windows that allow it to access any of the Orion resources.
index 429ecafe9fdd8ef081f3faef1b712c691d46527e..a5930f83958b615f9c1944c71aa0e7fb868548cd 100644 (file)
@@ -190,7 +190,7 @@ err_free_1:
  * The power front LEDs (blue and red) and SATA red LEDs are controlled via a
  * single GPIO line and are compatible with the leds-gpio driver.
  *
- * The SATA blue LEDs have some hardware blink capabilities which are detailled
+ * The SATA blue LEDs have some hardware blink capabilities which are detailed
  * in the following array:
  *
  * SATAx blue LED | SATAx activity | LED state
index f0f43e13ac873a4f3375e0215721d73e01d901c6..e6d64494d3de40bdc1078cf2ae71ac6db8a8d809 100644 (file)
@@ -36,7 +36,7 @@
 
 /****************************************************************************
  * 8MiB NOR flash. The struct mtd_partition is not in the same order as the
- *     partitions on the device because we want to keep compatability with
+ *     partitions on the device because we want to keep compatibility with
  *     existing QNAP firmware.
  *
  * Layout as used by QNAP:
index 92f393f08fa4ce556fb611eaa50f0a5d0559ac3f..9eac8192d923377b06d592a9da50404e57dc2a2c 100644 (file)
@@ -56,7 +56,7 @@
 
 /****************************************************************************
  * 8MiB NOR flash. The struct mtd_partition is not in the same order as the
- *     partitions on the device because we want to keep compatability with
+ *     partitions on the device because we want to keep compatibility with
  *     existing QNAP firmware.
  *
  * Layout as used by QNAP:
index 6de0ad0eea654f7c5ef4148005b69ead76871f7b..9cdcca59792455ede51f2046fcf66df898561779 100644 (file)
@@ -711,7 +711,7 @@ static struct regulator_consumer_supply bq24022_consumers[] = {
 static struct regulator_init_data bq24022_init_data = {
        .constraints = {
                .max_uA         = 500000,
-               .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+               .valid_ops_mask = REGULATOR_CHANGE_CURRENT|REGULATOR_CHANGE_STATUS,
        },
        .num_consumer_supplies  = ARRAY_SIZE(bq24022_consumers),
        .consumer_supplies      = bq24022_consumers,
index b024a8b374394ac2731596ba39bba462309f04a6..c4639502efcac4d236f5752172bfe2f29f7af27f 100644 (file)
 #define GAFR(x)                GPIO_REG(0x54 + (((x) & 0x70) >> 2))
 
 
-#define NR_BUILTIN_GPIO 128
+#define NR_BUILTIN_GPIO                PXA_GPIO_IRQ_NUM
 
 #define gpio_to_bank(gpio)     ((gpio) >> 5)
 #define gpio_to_irq(gpio)      IRQ_GPIO(gpio)
-#define irq_to_gpio(irq)       IRQ_TO_GPIO(irq)
+
+static inline int irq_to_gpio(unsigned int irq)
+{
+       int gpio;
+
+       if (irq == IRQ_GPIO0 || irq == IRQ_GPIO1)
+               return irq - IRQ_GPIO0;
+
+       gpio = irq - PXA_GPIO_IRQ_BASE;
+       if (gpio >= 2 && gpio < NR_BUILTIN_GPIO)
+               return gpio;
+
+       return -1;
+}
 
 #ifdef CONFIG_CPU_PXA26x
 /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,
index a4285fc0087841ad0c48902a2ae5d664f1205745..038402404e3932e78c702181c6d62cd4e4d145a7 100644 (file)
@@ -93,9 +93,6 @@
 #define GPIO_2_x_TO_IRQ(x)     (PXA_GPIO_IRQ_BASE + (x))
 #define IRQ_GPIO(x)    (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
 
-#define IRQ_TO_GPIO_2_x(i)     ((i) - PXA_GPIO_IRQ_BASE)
-#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
-
 /*
  * The following interrupts are for board specific purposes. Since
  * the kernel can only run on one machine at a time, we can re-use
index e4fb4668c26e92646119eea5181ad25d5ec746bb..207ecb49a61b9ec7ce816b8fdc370c0e0b17fe8b 100644 (file)
@@ -38,7 +38,7 @@
 #define PCMD(x)                __REG(0x40F50110 + ((x) << 2))
 
 /*
- * Slave Power Managment Unit
+ * Slave Power Management Unit
  */
 #define ASCR           __REG(0x40f40000)       /* Application Subsystem Power Status/Configuration */
 #define ARSR           __REG(0x40f40004)       /* Application Subsystem Reset Status */
index faa408ab7ad72f38c6951849008c86397b866c99..0641f31a56b746d3e950d8e13fdd99412ee305a0 100644 (file)
@@ -64,7 +64,7 @@
 
 /*
  * CPLD registers:
- * Only 4 registers, but spreaded over a 32MB address space.
+ * Only 4 registers, but spread over a 32MB address space.
  * Be gentle, and remap that over 32kB...
  */
 
index a72993dde2b301f301a9c4caab8d98dd2f3e1388..9984ef70bd794ff8e5a97ffff07ebc08eebb0988 100644 (file)
@@ -599,7 +599,7 @@ static struct regulator_consumer_supply bq24022_consumers[] = {
 static struct regulator_init_data bq24022_init_data = {
        .constraints = {
                .max_uA         = 500000,
-               .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+               .valid_ops_mask = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS,
        },
        .num_consumer_supplies  = ARRAY_SIZE(bq24022_consumers),
        .consumer_supplies      = bq24022_consumers,
index dd13bb63259b706747c206ee816110e216ff42e0..23925db8ff74fe8dff4b3ea229bae7e178322676 100644 (file)
@@ -458,7 +458,7 @@ static struct platform_device strataflash = {
 /*
  * Suspend/Resume bootstrap management
  *
- * MIO A701 reboot sequence is highly ROM dependant. From the one dissassembled,
+ * MIO A701 reboot sequence is highly ROM dependent. From the one dissassembled,
  * this sequence is as follows :
  *   - disables interrupts
  *   - initialize SDRAM (self refresh RAM into active RAM)
index 6bde5956358d88ceef7c23641bb92c77e3a44154..a4af8c52d7ee297b49246be5246aa0e055e1c970 100644 (file)
@@ -285,7 +285,7 @@ static inline void pxa25x_init_pm(void) {}
 
 static int pxa25x_set_wake(struct irq_data *d, unsigned int on)
 {
-       int gpio = IRQ_TO_GPIO(d->irq);
+       int gpio = irq_to_gpio(d->irq);
        uint32_t mask = 0;
 
        if (gpio >= 0 && gpio < 85)
index 1cb5d0f9723fb28ea9c5c1dabe441646c3dfcf25..909756eaf4b72a3b32a36f444517d1748604767a 100644 (file)
@@ -345,7 +345,7 @@ static inline void pxa27x_init_pm(void) {}
  */
 static int pxa27x_set_wake(struct irq_data *d, unsigned int on)
 {
-       int gpio = IRQ_TO_GPIO(d->irq);
+       int gpio = irq_to_gpio(d->irq);
        uint32_t mask;
 
        if (gpio >= 0 && gpio < 128)
index cf68136cc66800d4287d0f47746df321d8a66a48..b2b2a5bb275e2d6aa8ac405ba6a50ed418fa26c1 100644 (file)
@@ -19,7 +19,7 @@
 #define MAX_DMA_TRANSFER_SIZE   0x100000 /* Data Unit is half word  */
 
 /* We use `virtual` dma channels to hide the fact we have only a limited
- * number of DMA channels, and not of all of them (dependant on the device)
+ * number of DMA channels, and not of all of them (dependent on the device)
  * can be attached to any DMA source. We therefore let the DMA core handle
  * the allocation of hardware channels to clients.
 */
index 7f7c52947963fe04467061ebf7adad61972f6343..988a6863e54b8d1c328b426cf5841c6f25f3c59d 100644 (file)
 #define S3C2410_BANKCON_PMC16          (0x03)
 
 /* bank configurations for banks 0..7, note banks
- * 6 and 7 have differnt configurations depending on
+ * 6 and 7 have different configurations depending on
  * the memory type bits */
 
 #define S3C2410_BANKCON_Tacp2          (0x0 << 2)
index 66f44440d5d38f35e1b0ee677c7654a085f0e811..079dcaa602d398c3964cf53aff34bb9eb4fdfe25 100644 (file)
@@ -252,7 +252,7 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = {
        .def_trigger    = "",
 };
 
-/* This is the blue LED on the device. Originaly used to indicate GPS activity
+/* This is the blue LED on the device. Originally used to indicate GPS activity
  * by flashing. */
 static struct s3c24xx_led_platdata n35_blue_led_pdata = {
        .name           = "blue_led",
index 0db2411ef4bba7e608a5670fe6268cba194648bd..716662008ce29a2d52edec2f9716c3bf4f282b3c 100644 (file)
@@ -409,6 +409,10 @@ struct platform_device s3c24xx_pwm_device = {
        .num_resources  = 0,
 };
 
+static struct platform_device gta02_dfbmcs320_device = {
+       .name = "dfbmcs320",
+};
+
 static struct i2c_board_info gta02_i2c_devs[] __initdata = {
        {
                I2C_BOARD_INFO("pcf50633", 0x73),
@@ -523,6 +527,7 @@ static struct platform_device *gta02_devices[] __initdata = {
        &s3c_device_iis,
        &samsung_asoc_dma,
        &s3c_device_i2c0,
+       &gta02_dfbmcs320_device,
        &gta02_buttons_device,
        &s3c_device_adc,
        &s3c_device_ts,
index dfedc9c9e0054db295e8a7815c3eb257b1e093d5..dd3120df09fe3299ca78f74945d0ff446ada8db8 100644 (file)
@@ -155,7 +155,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
         * the same timings, however, anything smaller than 1024x768
         * will only be displayed in the top left corner of a 1024x768
         * XGA output unless you add optional dip switches to the shield.
-        * Therefore timings for other resolutions have been ommited here.
+        * Therefore timings for other resolutions have been omitted here.
         */
        [2] = {
                _LCD_DECLARE(
index c35585cf8c4f516ef234651c304ea508bfa0e464..b197171e7d03c8219c34a126e90c78f13501a6d1 100644 (file)
@@ -315,7 +315,7 @@ int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)
        case S3C2410_DMAOP_FLUSH:
                return s3c64xx_dma_flush(chan);
 
-       /* belive PAUSE/RESUME are no-ops */
+       /* believe PAUSE/RESUME are no-ops */
        case S3C2410_DMAOP_PAUSE:
        case S3C2410_DMAOP_RESUME:
        case S3C2410_DMAOP_STARTED:
index 4be4cc9abf758b297ce637449e4c9216d85bfd7d..07aa4d6054fe7040bb15638649a48bc1b4934525 100644 (file)
@@ -29,7 +29,7 @@
 #define WPALCON_H                                      (0x19c)
 #define WPALCON_L                                      (0x1a0)
 
-/* Pallete contro for WPAL0 and WPAL1 is the same as in S3C64xx, but
+/* Palette control for WPAL0 and WPAL1 is the same as in S3C64xx, but
  * different for WPAL2-4
  */
 /* In WPALCON_L (aka WPALCON) */
index f16946e456e916e9b4c0729bc52be368c0f1a853..be25879bb2eeee6de46d9d3f76fc78d075388978 100644 (file)
@@ -40,7 +40,7 @@ void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev,
 {
        u32 ctrl2, ctrl3;
 
-       /* don't need to alter anything acording to card-type */
+       /* don't need to alter anything according to card-type */
 
        writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4);
 
index 1f4b595534c2e0141187d391ec8fb12a5c3bd34e..a5a1e331f8ed2214f27ada9fa702cbab55c50813 100644 (file)
@@ -18,7 +18,7 @@
 #define gpio_cansleep  __gpio_cansleep
 #define gpio_to_irq    __gpio_to_irq
 
-/* Practically, GPIO banks upto MP03 are the configurable gpio banks */
+/* Practically, GPIO banks up to MP03 are the configurable gpio banks */
 
 /* GPIO bank sizes */
 #define S5PV210_GPIO_A0_NR     (8)
index 746777d56df95ab51e817227cf3c97ce4db34b62..3e3ac05bb7b15d5f61dee876d4804dfb1a65391d 100644 (file)
@@ -32,10 +32,10 @@ void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
 
        switch (width) {
        case 8:
-               /* GPG1[3:6] special-funtion 3 */
+               /* GPG1[3:6] special-function 3 */
                s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(3));
        case 4:
-               /* GPG0[3:6] special-funtion 2 */
+               /* GPG0[3:6] special-function 2 */
                s3c_gpio_cfgrange_nopull(S5PV210_GPG0(3), 4, S3C_GPIO_SFN(2));
        default:
                break;
index c32e202731c16abf3b67613696ae0068207d0e42..a83b6c909f6b16a3fc371428dffc82619fa63d84 100644 (file)
@@ -38,7 +38,7 @@ void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev,
 {
        u32 ctrl2, ctrl3;
 
-       /* don't need to alter anything acording to card-type */
+       /* don't need to alter anything according to card-type */
 
        writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4);
 
index e697691eed283bfd1a81681c8a784328d4aa6ba5..41252d22e6591d437e274d967126ed86dee0112a 100644 (file)
@@ -50,7 +50,7 @@ led-$(CONFIG_SA1100_SIMPAD)           += leds-simpad.o
 # LEDs support
 obj-$(CONFIG_LEDS) += $(led-y)
 
-# Miscelaneous functions
+# Miscellaneous functions
 obj-$(CONFIG_PM)                       += pm.o sleep.o
 obj-$(CONFIG_SA1100_SSP)               += ssp.o
 
index 07d4e8ba37191606f980ed2bc6dbf03def722c9a..aaa8acf76b7b551e29af1e1d04f38f6bba970b2c 100644 (file)
@@ -68,7 +68,7 @@
  * clock change in ROM and jump to that code from the kernel. The main
  * disadvantage is that the ROM has to be modified, which is not
  * possible on all SA-1100 platforms. Another disadvantage is that
- * jumping to ROM makes clock switching unecessary complicated.
+ * jumping to ROM makes clock switching unnecessary complicated.
  *
  * The idea behind this driver is that the memory configuration can be
  * changed while running from DRAM (even with interrupts turned on!)
index 4f7ea012e1e57e3f676db5f832579d9ed98e3f81..bae8296f5dbf6afc30d6d169222d1a274d47bde8 100644 (file)
                        (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \
                         DDAR_Ser4SSPRc + DDAR_DevAdd (__PREG(Ser4SSDR)))
 
-#define DCSR_RUN       0x00000001      /* DMA RUNing                      */
+#define DCSR_RUN       0x00000001      /* DMA running                     */
 #define DCSR_IE        0x00000002      /* DMA Interrupt Enable            */
 #define DCSR_ERROR     0x00000004      /* DMA ERROR                       */
 #define DCSR_DONEA     0x00000008      /* DONE DMA transfer buffer A      */
index 9d490c66891cfb0209e4a27646a758a9b2993428..f50b00bd18a053603f98b77a5e25678b11f25b96 100644 (file)
@@ -29,7 +29,7 @@ static unsigned long jornada_ssp_flags;
 /**
  * jornada_ssp_reverse - reverses input byte
  *
- * we need to reverse all data we recieve from the mcu due to its physical location
+ * we need to reverse all data we receive from the mcu due to its physical location
  * returns : 01110111 -> 11101110
  */
 u8 inline jornada_ssp_reverse(u8 byte)
@@ -179,7 +179,7 @@ static int __devinit jornada_ssp_probe(struct platform_device *dev)
 
 static int jornada_ssp_remove(struct platform_device *dev)
 {
-       /* Note that this doesnt actually remove the driver, since theres nothing to remove
+       /* Note that this doesn't actually remove the driver, since theres nothing to remove
         * It just makes sure everything is turned off */
        GPSR = GPIO_GPIO25;
        ssp_exit();
index 783b66fa95fb03427c1844de5102bb8a8ae02e87..1e35fa976d6450064e6a6b616d95864a7e73103b 100644 (file)
@@ -947,7 +947,7 @@ static struct platform_device *ap4evb_devices[] __initdata = {
        &ap4evb_camera,
 };
 
-static int __init hdmi_init_pm_clock(void)
+static void __init hdmi_init_pm_clock(void)
 {
        struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
        int ret;
@@ -988,20 +988,15 @@ static int __init hdmi_init_pm_clock(void)
        pr_debug("PLLC2 set frequency %lu\n", rate);
 
        ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk);
-       if (ret < 0) {
+       if (ret < 0)
                pr_err("Cannot set HDMI parent: %d\n", ret);
-               goto out;
-       }
 
 out:
        if (!IS_ERR(hdmi_ick))
                clk_put(hdmi_ick);
-       return ret;
 }
 
-device_initcall(hdmi_init_pm_clock);
-
-static int __init fsi_init_pm_clock(void)
+static void __init fsi_init_pm_clock(void)
 {
        struct clk *fsia_ick;
        int ret;
@@ -1010,7 +1005,7 @@ static int __init fsi_init_pm_clock(void)
        if (IS_ERR(fsia_ick)) {
                ret = PTR_ERR(fsia_ick);
                pr_err("Cannot get FSI ICK: %d\n", ret);
-               return ret;
+               return;
        }
 
        ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk);
@@ -1018,10 +1013,7 @@ static int __init fsi_init_pm_clock(void)
                pr_err("Cannot set FSI-A parent: %d\n", ret);
 
        clk_put(fsia_ick);
-
-       return ret;
 }
-device_initcall(fsi_init_pm_clock);
 
 /*
  * FIXME !!
@@ -1348,6 +1340,9 @@ static void __init ap4evb_init(void)
        __raw_writel(srcr4 & ~(1 << 13), SRCR4);
 
        platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
+
+       hdmi_init_pm_clock();
+       fsi_init_pm_clock();
 }
 
 static void __init ap4evb_timer_init(void)
index 8184d4d4f234dddd7cf219114a1d57787332391b..7da2ca24229dc296f41795cd788c5f989451abb1 100644 (file)
@@ -423,7 +423,7 @@ static struct platform_device fsi_hdmi_device = {
        .name           = "sh_fsi2_b_hdmi",
 };
 
-static int __init hdmi_init_pm_clock(void)
+static void __init hdmi_init_pm_clock(void)
 {
        struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
        int ret;
@@ -467,17 +467,13 @@ static int __init hdmi_init_pm_clock(void)
        pr_debug("PLLC2 set frequency %lu\n", rate);
 
        ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk);
-       if (ret < 0) {
+       if (ret < 0)
                pr_err("Cannot set HDMI parent: %d\n", ret);
-               goto out;
-       }
 
 out:
        if (!IS_ERR(hdmi_ick))
                clk_put(hdmi_ick);
-       return ret;
 }
-device_initcall(hdmi_init_pm_clock);
 
 /* USB1 (Host) */
 static void usb1_host_port_power(int port, int power)
@@ -1218,6 +1214,8 @@ static void __init mackerel_init(void)
        sh7372_add_standard_devices();
 
        platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices));
+
+       hdmi_init_pm_clock();
 }
 
 static void __init mackerel_timer_init(void)
index e11560a525a1a11ac1efd3d1cb71a1545b7e8145..21a59db638bb0cde58592b0bb6d99036439f24f4 100644 (file)
@@ -9,7 +9,7 @@
 
 #ifdef CONFIG_MACH_AP4EVB
 #include "mach/mmc-ap4eb.h"
-#elif CONFIG_MACH_MACKEREL
+#elif defined(CONFIG_MACH_MACKEREL)
 #include "mach/mmc-mackerel.h"
 #else
 #error "unsupported board."
index 6d6a205bcf90091aec506b6cae8d0af2c2d09767..9320aff0a20f7521518291a101e6ff5710424ce8 100644 (file)
@@ -13,7 +13,7 @@
 #ifdef CONFIG_MACH_AP4EVB
 #define MACH_TYPE      MACH_TYPE_AP4EVB
 #include "mach/head-ap4evb.txt"
-#elif CONFIG_MACH_MACKEREL
+#elif defined(CONFIG_MACH_MACKEREL)
 #define MACH_TYPE      MACH_TYPE_MACKEREL
 #include "mach/head-mackerel.txt"
 #else
index e945ae28ee773f0f1063b6d239387d0dc638d68e..f4ef5eb317bd4311eaa0f67f15842d450d00b991 100644 (file)
@@ -223,7 +223,7 @@ int tegra_dma_dequeue_req(struct tegra_dma_channel *ch,
         *  - Change the source selector to invalid to stop the DMA from
         *    FIFO to memory.
         *  - Read the status register to know the number of pending
-        *    bytes to be transfered.
+        *    bytes to be transferred.
         *  - Finally stop or program the DMA to the next buffer in the
         *    list.
         */
@@ -244,7 +244,7 @@ int tegra_dma_dequeue_req(struct tegra_dma_channel *ch,
        if (status & STA_BUSY)
                req->bytes_transferred -= to_transfer;
 
-       /* In continous transfer mode, DMA only tracks the count of the
+       /* In continuous transfer mode, DMA only tracks the count of the
         * half DMA buffer. So, if the DMA already finished half the DMA
         * then add the half buffer to the completed count.
         *
index 76a3f654220f2f012b842b9e2794811fba2a4710..65a1aba6823db6be97b9b87115be7caab4e8f2f9 100644 (file)
@@ -257,7 +257,8 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 void tegra_gpio_resume(void)
 {
        unsigned long flags;
-       int b, p, i;
+       int b;
+       int p;
 
        local_irq_save(flags);
 
@@ -280,7 +281,8 @@ void tegra_gpio_resume(void)
 void tegra_gpio_suspend(void)
 {
        unsigned long flags;
-       int b, p, i;
+       int b;
+       int p;
 
        local_irq_save(flags);
        for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) {
index 39011bd9a925f547d190a51cb8db710553dc3772..d0132e8031a1fca5e874403d5343fc05ce293a9b 100644 (file)
@@ -92,11 +92,11 @@ struct tegra_dma_req {
        /*  This is a called from the DMA ISR context when the DMA is still in
         *  progress and is actively filling same buffer.
         *
-        *  In case of continous mode receive, this threshold is 1/2 the buffer
+        *  In case of continuous mode receive, this threshold is 1/2 the buffer
         *  size. In other cases, this will not even be called as there is no
         *  hardware support for it.
         *
-        * In the case of continous mode receive, if there is next req already
+        * In the case of continuous mode receive, if there is next req already
         * queued, DMA programs the HW to use that req when this req is
         * completed. If there is no "next req" queued, then DMA ISR doesn't do
         * anything before calling this callback.
index 6d7c4eea4dcbcd95a567635667d2ccf557878808..4459470c052de3f97ea29ec138c0a2006787328b 100644 (file)
@@ -1362,14 +1362,15 @@ static int tegra_clk_shared_bus_set_rate(struct clk *c, unsigned long rate)
 {
        unsigned long flags;
        int ret;
+       long new_rate = rate;
 
-       rate = clk_round_rate(c->parent, rate);
-       if (rate < 0)
-               return rate;
+       new_rate = clk_round_rate(c->parent, new_rate);
+       if (new_rate < 0)
+               return new_rate;
 
        spin_lock_irqsave(&c->parent->spinlock, flags);
 
-       c->u.shared_bus_user.rate = rate;
+       c->u.shared_bus_user.rate = new_rate;
        ret = tegra_clk_shared_bus_update(c->parent);
 
        spin_unlock_irqrestore(&c->parent->spinlock, flags);
index fabcc49abe80c7e63bbec3cedc275d60ad6c4728..5535dd0a78c9832572e02951770eb7e462149de4 100644 (file)
@@ -263,7 +263,7 @@ static void disable_i2s0_vcxo(void)
        val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR);
        val &= ~U300_SYSCON_CCR_I2S0_USE_VCXO;
        writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR);
-       /* Deactivate VCXO if noone else is using VCXO */
+       /* Deactivate VCXO if no one else is using VCXO */
        if (!(val & U300_SYSCON_CCR_I2S1_USE_VCXO))
                val &= ~U300_SYSCON_CCR_TURN_VCXO_ON;
        writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR);
@@ -283,7 +283,7 @@ static void disable_i2s1_vcxo(void)
        val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR);
        val &= ~U300_SYSCON_CCR_I2S1_USE_VCXO;
        writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR);
-       /* Deactivate VCXO if noone else is using VCXO */
+       /* Deactivate VCXO if no one else is using VCXO */
        if (!(val & U300_SYSCON_CCR_I2S0_USE_VCXO))
                val &= ~U300_SYSCON_CCR_TURN_VCXO_ON;
        writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR);
@@ -649,7 +649,7 @@ static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate)
  */
 long clk_round_rate(struct clk *clk, unsigned long rate)
 {
-       /* TODO: get apropriate switches for EMIFCLK, AHBCLK and MCLK */
+       /* TODO: get appropriate switches for EMIFCLK, AHBCLK and MCLK */
        /* Else default to fixed value */
 
        if (clk->round_rate) {
index dc8746d7826ebd52407aa8a04d0f14edf7fa7af9..6e1907fa94f0405a788acd8896b9202a8a4c67c0 100644 (file)
@@ -52,7 +52,7 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
         * on value present in GpioSel1 to GpioSel6 and AlternatFunction
         * register. This is the array of 7 configuration settings.
         * One has to compile time decide these settings. Below is the
-        * explaination of these setting
+        * explanation of these setting
         * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO
         * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO
         * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO
@@ -178,16 +178,15 @@ static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
                .irq            = NOMADIK_GPIO_TO_IRQ(217),
                .platform_data  = &mop500_tc35892_data,
        },
-};
-
-/* I2C0 devices only available prior to HREFv60 */
-static struct i2c_board_info __initdata mop500_i2c0_old_devices[] = {
+       /* I2C0 devices only available prior to HREFv60 */
        {
                I2C_BOARD_INFO("tps61052", 0x33),
                .platform_data  = &mop500_tps61052_data,
        },
 };
 
+#define NUM_PRE_V60_I2C0_DEVICES 1
+
 static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
        {
                /* lp5521 LED driver, 1st device */
@@ -425,6 +424,8 @@ static void __init mop500_uart_init(void)
 
 static void __init mop500_init_machine(void)
 {
+       int i2c0_devs;
+
        /*
         * The HREFv60 board removed a GPIO expander and routed
         * all these GPIO pins to the internal GPIO controller
@@ -448,11 +449,11 @@ static void __init mop500_init_machine(void)
 
        platform_device_register(&ab8500_device);
 
-       i2c_register_board_info(0, mop500_i2c0_devices,
-                               ARRAY_SIZE(mop500_i2c0_devices));
-       if (!machine_is_hrefv60())
-               i2c_register_board_info(0, mop500_i2c0_old_devices,
-                                       ARRAY_SIZE(mop500_i2c0_old_devices));
+       i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
+       if (machine_is_hrefv60())
+               i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
+
+       i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
        i2c_register_board_info(2, mop500_i2c2_devices,
                                ARRAY_SIZE(mop500_i2c2_devices));
 }
index 0fefb34c11e4b89d7705051e3cb44c9d06fa4c3e..16647b2553786d11b17654e336dd5df6cefa54cb 100644 (file)
@@ -58,7 +58,7 @@
 #define U8500_GPIO2_BASE       (U8500_PER2_BASE + 0xE000)
 #define U8500_GPIO3_BASE       (U8500_PER5_BASE + 0x1E000)
 
-/* per7 base addressess */
+/* per7 base addresses */
 #define U8500_CR_BASE_ED       (U8500_PER7_BASE_ED + 0x8000)
 #define U8500_MTU0_BASE_ED     (U8500_PER7_BASE_ED + 0xa000)
 #define U8500_MTU1_BASE_ED     (U8500_PER7_BASE_ED + 0xb000)
@@ -68,7 +68,7 @@
 #define U8500_UART0_BASE       (U8500_PER1_BASE + 0x0000)
 #define U8500_UART1_BASE       (U8500_PER1_BASE + 0x1000)
 
-/* per6 base addressess */
+/* per6 base addresses */
 #define U8500_RNG_BASE         (U8500_PER6_BASE + 0x0000)
 #define U8500_PKA_BASE         (U8500_PER6_BASE + 0x1000)
 #define U8500_PKAM_BASE                (U8500_PER6_BASE + 0x2000)
 #define U8500_CRYPTO1_BASE     (U8500_PER6_BASE + 0xb000)
 #define U8500_CLKRST6_BASE     (U8500_PER6_BASE + 0xf000)
 
-/* per5 base addressess */
+/* per5 base addresses */
 #define U8500_USBOTG_BASE      (U8500_PER5_BASE + 0x00000)
 #define U8500_CLKRST5_BASE     (U8500_PER5_BASE + 0x1f000)
 
-/* per4 base addressess */
+/* per4 base addresses */
 #define U8500_BACKUPRAM0_BASE  (U8500_PER4_BASE + 0x00000)
 #define U8500_BACKUPRAM1_BASE  (U8500_PER4_BASE + 0x01000)
 #define U8500_RTT0_BASE                (U8500_PER4_BASE + 0x02000)
 #define U8500_SDI5_BASE                (U8500_PER3_BASE + 0x8000)
 #define U8500_CLKRST3_BASE     (U8500_PER3_BASE + 0xf000)
 
-/* per2 base addressess */
+/* per2 base addresses */
 #define U8500_I2C3_BASE                (U8500_PER2_BASE + 0x0000)
 #define U8500_SPI2_BASE                (U8500_PER2_BASE + 0x1000)
 #define U8500_SPI1_BASE                (U8500_PER2_BASE + 0x2000)
index d3644db467b74af63a701a9e34d1335a0905e06d..f40c69656d8dc2f79d0fa26b91b885b0a2d97e0d 100644 (file)
@@ -32,7 +32,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  *
  *  Size  Clean (ticks) Dirty (ticks)
  *   4096   21  20  21    53  55  54
index 49c2b66cf3dd6913b7fcdb42bcd877b8a8fa833a..a7b276dbda11e020aeb104dc8643d7e20982efe9 100644 (file)
@@ -34,7 +34,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  *
  * *** This needs benchmarking
  */
index 6136e68ce953d038ef0fa92b8211a3c477ef8e83..dc18d81ef8ce5d94e8f7e9c62515bf8624cd79c8 100644 (file)
@@ -96,7 +96,7 @@ ENDPROC(v7_flush_dcache_all)
  *     Flush the entire cache system.
  *  The data cache flush is now achieved using atomic clean / invalidates
  *  working outwards from L1 cache. This is done using Set/Way based cache
- *  maintainance instructions.
+ *  maintenance instructions.
  *  The instruction cache can still be invalidated back to the point of
  *  unification in a single instruction.
  *
index afe209e1e1f85fb299e9822ea07a49b13cc29ecf..74be05f3e03ac58be921aff208c6f6aa460ab683 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/shm.h>
 #include <linux/sched.h>
 #include <linux/io.h>
+#include <linux/personality.h>
 #include <linux/random.h>
 #include <asm/cputype.h>
 #include <asm/system.h>
@@ -82,7 +83,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
                mm->cached_hole_size = 0;
        }
        /* 8 bits of randomness in 20 address space bits */
-       if (current->flags & PF_RANDOMIZE)
+       if ((current->flags & PF_RANDOMIZE) &&
+           !(current->personality & ADDR_NO_RANDOMIZE))
                addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT;
 
 full_search:
index 226e3d8351c2538a11ad231d4fdb0430ebdd8cc6..6c4e7fd6c8afbe4650f2d2a79015ce87a128d3fc 100644 (file)
@@ -64,7 +64,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  */
 #define CACHE_DLIMIT   32768
 
index 86d9c2cf0bce374e9fa437fb9f4e8b64ef55b378..4ce947c19623d34733393f5fadccb1327e220440 100644 (file)
@@ -64,7 +64,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  */
 #define CACHE_DLIMIT   32768
 
index 83d3dd34f84629f4bc7a05a61b4a567ce5db4edb..c8884c5413a223620d08b42f701442137e2ff5bc 100644 (file)
@@ -53,7 +53,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  */
 #define CACHE_DLIMIT   32768
 
index 686043ee7281782065b4ed668f7e1b8dc4406e5c..413684660aad22d4d94f1ceffe1c6ca43be20f74 100644 (file)
@@ -53,7 +53,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  */
 #define CACHE_DLIMIT   32768
 
index 665266da143cfe7dc283fb437002eb354bae1337..7a06e5964f59a316e56368cec216d9c5d9df138a 100644 (file)
@@ -63,7 +63,7 @@ ENTRY(cpu_arm720_proc_fin)
 /*
  * Function: arm720_proc_do_idle(void)
  * Params  : r0 = unused
- * Purpose : put the processer in proper idle mode
+ * Purpose : put the processor in proper idle mode
  */
 ENTRY(cpu_arm720_do_idle)
                mov     pc, lr
index 219980ec8b6e6b8065d4a58ff2d743334c31b8e8..bf8a1d1cccb6c33b26412264a2f05228657e49aa 100644 (file)
@@ -53,7 +53,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  */
 #define CACHE_DLIMIT   65536
 
@@ -390,7 +390,7 @@ ENTRY(cpu_arm920_set_pte_ext)
 /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
 .globl cpu_arm920_suspend_size
 .equ   cpu_arm920_suspend_size, 4 * 3
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_arm920_do_suspend)
        stmfd   sp!, {r4 - r7, lr}
        mrc     p15, 0, r4, c13, c0, 0  @ PID
index 36154b1e792a53dcb800006c94da61b088b5d972..95ba1fc56e4d325a7d4f1772210837112f8ef0f5 100644 (file)
@@ -54,7 +54,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.  (I think this should
+ * cache line maintenance instructions.  (I think this should
  * be 32768).
  */
 #define CACHE_DLIMIT   8192
index 89c5e0009c4cc4117b3a583395adffa1887e5ab6..541e4774eea13cdbb80fadbb496dc300d5ae0140 100644 (file)
@@ -77,7 +77,7 @@
 /*
  * This is the size at which it becomes more efficient to
  * clean the whole cache, rather than using the individual
- * cache line maintainence instructions.
+ * cache line maintenance instructions.
  */
 #define CACHE_DLIMIT   8192
 
index 6a4bdb2c94a7ba0f856bf06c00f95049ab638dc1..0ed85d930c095e3280f7f029973e1530a7fcd4aa 100644 (file)
@@ -404,7 +404,7 @@ ENTRY(cpu_arm926_set_pte_ext)
 /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
 .globl cpu_arm926_suspend_size
 .equ   cpu_arm926_suspend_size, 4 * 3
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_arm926_do_suspend)
        stmfd   sp!, {r4 - r7, lr}
        mrc     p15, 0, r4, c13, c0, 0  @ PID
index e32fa499194ca717b27a3391bf0c71879ad4a352..34261f9486b9236e96804820ee7e83dff4c7151e 100644 (file)
@@ -85,7 +85,7 @@
 
 /*
  * Sanity check the PTE configuration for the code below - which makes
- * certain assumptions about how these bits are layed out.
+ * certain assumptions about how these bits are laid out.
  */
 #ifdef CONFIG_MMU
 #if L_PTE_SHARED != PTE_EXT_SHARED
index 74483d1977fe788ac2b4b8d42e32952da9e7ed0e..184a9c997e36616dcc6819418d380f9d9e439291 100644 (file)
@@ -171,7 +171,7 @@ ENTRY(cpu_sa1100_set_pte_ext)
 
 .globl cpu_sa1100_suspend_size
 .equ   cpu_sa1100_suspend_size, 4*4
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_sa1100_do_suspend)
        stmfd   sp!, {r4 - r7, lr}
        mrc     p15, 0, r4, c3, c0, 0           @ domain ID
index 832b6bdc192c6bb3cb6da2d5482e7afa4d563cc7..7c99cb4c8e4fb8663158caf9832d6df6e9e27ef4 100644 (file)
@@ -124,7 +124,7 @@ ENTRY(cpu_v6_set_pte_ext)
 /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */
 .globl cpu_v6_suspend_size
 .equ   cpu_v6_suspend_size, 4 * 8
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_v6_do_suspend)
        stmfd   sp!, {r4 - r11, lr}
        mrc     p15, 0, r4, c13, c0, 0  @ FCSE/PID
@@ -132,7 +132,7 @@ ENTRY(cpu_v6_do_suspend)
        mrc     p15, 0, r6, c3, c0, 0   @ Domain ID
        mrc     p15, 0, r7, c2, c0, 0   @ Translation table base 0
        mrc     p15, 0, r8, c2, c0, 1   @ Translation table base 1
-       mrc     p15, 0, r9, c1, c0, 1   @ auxillary control register
+       mrc     p15, 0, r9, c1, c0, 1   @ auxiliary control register
        mrc     p15, 0, r10, c1, c0, 2  @ co-processor access control
        mrc     p15, 0, r11, c1, c0, 0  @ control register
        stmia   r0, {r4 - r11}
@@ -151,7 +151,7 @@ ENTRY(cpu_v6_do_resume)
        mcr     p15, 0, r6, c3, c0, 0   @ Domain ID
        mcr     p15, 0, r7, c2, c0, 0   @ Translation table base 0
        mcr     p15, 0, r8, c2, c0, 1   @ Translation table base 1
-       mcr     p15, 0, r9, c1, c0, 1   @ auxillary control register
+       mcr     p15, 0, r9, c1, c0, 1   @ auxiliary control register
        mcr     p15, 0, r10, c1, c0, 2  @ co-processor access control
        mcr     p15, 0, ip, c2, c0, 2   @ TTB control register
        mcr     p15, 0, ip, c7, c5, 4   @ ISB
index 262fa88a7439b4f0adb4ed76d8bd3b15f57cce17..babfba09c89ff390deb7ddfd0496e813f442e047 100644 (file)
@@ -211,7 +211,7 @@ cpu_v7_name:
 /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */
 .globl cpu_v7_suspend_size
 .equ   cpu_v7_suspend_size, 4 * 8
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_v7_do_suspend)
        stmfd   sp!, {r4 - r11, lr}
        mrc     p15, 0, r4, c13, c0, 0  @ FCSE/PID
@@ -237,7 +237,7 @@ ENTRY(cpu_v7_do_resume)
        mcr     p15, 0, r7, c2, c0, 0   @ TTB 0
        mcr     p15, 0, r8, c2, c0, 1   @ TTB 1
        mcr     p15, 0, ip, c2, c0, 2   @ TTB control register
-       mcr     p15, 0, r10, c1, c0, 1  @ Auxillary control register
+       mcr     p15, 0, r10, c1, c0, 1  @ Auxiliary control register
        mcr     p15, 0, r11, c1, c0, 2  @ Co-processor access control
        ldr     r4, =PRRR               @ PRRR
        ldr     r5, =NMRR               @ NMRR
index 63d8b2044e84114c4401c7851e14b659a39821f2..596213699f37ac8a52d580ae70df8303bc344c94 100644 (file)
@@ -417,7 +417,7 @@ ENTRY(cpu_xsc3_set_pte_ext)
 
 .globl cpu_xsc3_suspend_size
 .equ   cpu_xsc3_suspend_size, 4 * 8
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_xsc3_do_suspend)
        stmfd   sp!, {r4 - r10, lr}
        mrc     p14, 0, r4, c6, c0, 0   @ clock configuration, for turbo mode
index 086038cd86abc1e32ffb0c6552d8fdc85c5a3bd2..42af97664c9d844f156789f23a8c1fac7a643b68 100644 (file)
@@ -395,7 +395,7 @@ ENTRY(xscale_dma_a0_map_area)
        teq     r2, #DMA_TO_DEVICE
        beq     xscale_dma_clean_range
        b       xscale_dma_flush_range
-ENDPROC(xscsale_dma_a0_map_area)
+ENDPROC(xscale_dma_a0_map_area)
 
 /*
  *     dma_unmap_area(start, size, dir)
@@ -518,7 +518,7 @@ ENTRY(cpu_xscale_set_pte_ext)
 
 .globl cpu_xscale_suspend_size
 .equ   cpu_xscale_suspend_size, 4 * 7
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_xscale_do_suspend)
        stmfd   sp!, {r4 - r10, lr}
        mrc     p14, 0, r4, c6, c0, 0   @ clock configuration, for turbo mode
index ce81481becf16e5addcc54a7ca3acdc6b78154af..4268a2bdf1457ee77c37c03e5526c2cafec9b178 100644 (file)
@@ -13,7 +13,7 @@
 
 /*
  * A driver for the Freescale Semiconductor i.MXC CPUfreq module.
- * The CPUFREQ driver is for controling CPU frequency. It allows you to change
+ * The CPUFREQ driver is for controlling CPU frequency. It allows you to change
  * the CPU clock speed on the fly.
  */
 
index 7a107246fd98849b6f8efe34316d977629f4bef8..6cd6d7f686f639623da2c10b0bcc6e9213d4b4a1 100644 (file)
@@ -295,6 +295,12 @@ static int mxc_gpio_direction_output(struct gpio_chip *chip,
        return 0;
 }
 
+/*
+ * This lock class tells lockdep that GPIO irqs are in a different
+ * category than their parents, so it won't report false recursion.
+ */
+static struct lock_class_key gpio_lock_class;
+
 int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
 {
        int i, j;
@@ -311,6 +317,7 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
                __raw_writel(~0, port[i].base + GPIO_ISR);
                for (j = port[i].virtual_irq_start;
                        j < port[i].virtual_irq_start + 32; j++) {
+                       irq_set_lockdep_class(j, &gpio_lock_class);
                        irq_set_chip_and_handler(j, &gpio_irq_chip,
                                                 handle_level_irq);
                        set_irq_flags(j, IRQF_VALID);
index bd9bb9799141c380b4a83f44c022141c4ece9a86..2e49e71b1b98bfaeb754d79d5905ac98df08cf05 100644 (file)
@@ -33,9 +33,9 @@
        .macro  arch_ret_to_user, tmp1, tmp2
        .endm
 
-       @ this macro checks which interrupt occured
+       @ this macro checks which interrupt occurred
        @ and returns its number in irqnr
-       @ and returns if an interrupt occured in irqstat
+       @ and returns if an interrupt occurred in irqstat
        .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 #ifndef CONFIG_MXC_TZIC
        @ Load offset & priority of the highest priority
index 04c0d060d8143ae4c60d526a6198178f2e02bccb..6bb96ef1600bc7ac384fec802d53018b78f6823c 100644 (file)
@@ -24,7 +24,7 @@
 
 struct mxc_nand_platform_data {
        unsigned int width;     /* data bus width in bytes */
-       unsigned int hw_ecc:1;  /* 0 if supress hardware ECC */
+       unsigned int hw_ecc:1;  /* 0 if suppress hardware ECC */
        unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */
        struct mtd_partition *parts;    /* partition table */
        int nr_parts;                   /* size of parts */
index 4ddce565b353745d32f31b0023ff1df1ad93f02d..8397a2dd19f2d6caad2adb5824ca13537c8d19fd 100644 (file)
@@ -124,6 +124,8 @@ imx_ssi_fiq_start:
 1:
                @ return from FIQ
                subs    pc, lr, #4
+
+               .align
 imx_ssi_fiq_base:
                .word 0x0
 imx_ssi_fiq_rx_buffer:
index 7d9f815cedec87819cb7900d9327d5de3d3afd09..ea28f98d5d6a63da2ab5ede0327ec9188f5caf97 100644 (file)
@@ -280,7 +280,7 @@ EXPORT_SYMBOL(omap_dsp_get_mempool_base);
  * Claiming GPIOs, and setting their direction and initial values, is the
  * responsibility of the device drivers.  So is responding to probe().
  *
- * Board-specific knowlege like creating devices or pin setup is to be
+ * Board-specific knowledge like creating devices or pin setup is to be
  * kept out of drivers as much as possible.  In particular, pin setup
  * may be handled by the boot loader, and drivers should expect it will
  * normally have been done by the time they're probed.
index 2ec3b5d9f2144d25356c5325602e25e1657d787a..c22217c2ee5f334adf95f01addd2d85ad7bdf28b 100644 (file)
@@ -1019,7 +1019,7 @@ EXPORT_SYMBOL(omap_set_dma_callback);
  * If the channel is running the caller must disable interrupts prior calling
  * this function and process the returned value before re-enabling interrupt to
  * prevent races with the interrupt handler. Note that in continuous mode there
- * is a chance for CSSA_L register overflow inbetween the two reads resulting
+ * is a chance for CSSA_L register overflow between the two reads resulting
  * in incorrect return value.
  */
 dma_addr_t omap_get_dma_src_pos(int lch)
@@ -1046,7 +1046,7 @@ EXPORT_SYMBOL(omap_get_dma_src_pos);
  * If the channel is running the caller must disable interrupts prior calling
  * this function and process the returned value before re-enabling interrupt to
  * prevent races with the interrupt handler. Note that in continuous mode there
- * is a chance for CDSA_L register overflow inbetween the two reads resulting
+ * is a chance for CDSA_L register overflow between the two reads resulting
  * in incorrect return value.
  */
 dma_addr_t omap_get_dma_dst_pos(int lch)
index d6f9fa0f62af3887fb02cf54f4dd765136fea1b8..cac2e8ac696821f3c3d30304f41796a8a58dfd47 100644 (file)
@@ -93,7 +93,7 @@ extern void omap_gpio_restore_context(void);
 /* Wrappers for "new style" GPIO calls, using the new infrastructure
  * which lets us plug in FPGA, I2C, and other implementations.
  * *
- * The original OMAP-specfic calls should eventually be removed.
+ * The original OMAP-specific calls should eventually be removed.
  */
 
 #include <linux/errno.h>
index 12b316165037adf13549092734393478058e91c7..1527929b445a44a75ee8433fb26afce169048ae1 100644 (file)
@@ -90,7 +90,7 @@ enum omap_ecc {
                /* 1-bit ecc: stored at end of spare area */
        OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */
        OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */
-               /* 1-bit ecc: stored at begining of spare area as romcode */
+               /* 1-bit ecc: stored at beginning of spare area as romcode */
        OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */
 };
 
index d598d9fd65acb872e8d1f86cfed3c23dd56845c2..5587acf0eb2c3ed35657572000b20ca1d0e4bbc3 100644 (file)
@@ -1103,7 +1103,7 @@ int omap_mcbsp_pollread(unsigned int id, u16 *buf)
                /* resend */
                return -1;
        } else {
-               /* wait for recieve confirmation */
+               /* wait for receive confirmation */
                int attemps = 0;
                while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) {
                        if (attemps++ > 1000) {
index 75f6564712407feee5e3a20b585047b2519d9fd5..89e68e07b0a8be5e62bbc2b52f523b081f8f8552 100644 (file)
@@ -434,7 +434,7 @@ typedef unsigned long mfp_cfg_t;
  *
  * mfp_init_addr() - accepts a table of "mfp_addr_map" structure, which
  * represents a range of MFP pins from "start" to "end", with the offset
- * begining at "offset", to define a single pin, let "end" = -1.
+ * beginning at "offset", to define a single pin, let "end" = -1.
  *
  * use
  *
index c2064c30871926e35a3785017c4c10604e5ba3e5..0291bd6e236e832003986d6559eda8699740aba4 100644 (file)
@@ -23,7 +23,7 @@ obj-$(CONFIG_S3C24XX_DCLK)    += clock-dclk.o
 obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpu-freq.o
 obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpu-freq-debugfs.o
 
-# Architecture dependant builds
+# Architecture dependent builds
 
 obj-$(CONFIG_PM_SIMTEC)                += pm-simtec.o
 obj-$(CONFIG_PM)               += pm.o
index eea75ff81d15a7765bfb8b01a72e505f8c03a4fb..b3d3d027899718e8a73b26022e24949b9d2075bd 100644 (file)
@@ -455,7 +455,7 @@ static int s3c_cpufreq_resume(struct cpufreq_policy *policy)
 
        /* whilst we will be called later on, we try and re-set the
         * cpu frequencies as soon as possible so that we do not end
-        * up resuming devices and then immediatley having to re-set
+        * up resuming devices and then immediately having to re-set
         * a number of settings once these devices have restarted.
         *
         * as a note, it is expected devices are not used until they
index 6ad274e7593d578a23161f30eba62d88b396d5f5..27ea852e33700ac4894ed3cb50a8e5291687b5c4 100644 (file)
@@ -557,7 +557,7 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan)
                break;
 
        case S3C2410_DMALOAD_1LOADED_1RUNNING:
-               /* I belive in this case we do not have anything to do
+               /* I believe in this case we do not have anything to do
                 * until the next buffer comes along, and we turn off the
                 * reload */
                return;
index 46dd078147d8b13e0750e11bd6f047c18ac033e6..cd6d67c8382a8014fca4e8ec8b8679d24096f7fe 100644 (file)
@@ -208,7 +208,7 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip)
        }
 
        /*
-        * chained GPIO irq has been sucessfully registered, allocate new gpio
+        * chained GPIO irq has been successfully registered, allocate new gpio
         * int group and assign irq nubmers
         */
 
index d592b6304b48cf5825b22fe0298d8a2db21b4d52..d15dc47b0e3db50c2c87535aca5f5ff153e4c6b0 100644 (file)
 
 #define PFX "s5p pm: "
 
-/* s3c_pm_check_resume_pin
- *
- * check to see if the pin is configured correctly for sleep mode, and
- * make any necessary adjustments if it is not
-*/
-
-static void s3c_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs)
-{
-       /* nothing here yet */
-}
-
 /* s3c_pm_configure_extint
  *
  * configure all external interrupt pins
index 9a82b8874918d5c3fb16247d92a3cdd84623a4ad..983c578b82764d28e1a1ecf47e482aee2b7b3bc9 100644 (file)
@@ -21,7 +21,7 @@ struct clk;
  * @set_parent: set the clock's parent, see clk_set_parent().
  *
  * Group the common clock implementations together so that we
- * don't have to keep setting the same fiels again. We leave
+ * don't have to keep setting the same fields again. We leave
  * enable in struct clk.
  *
  * Adding an extra layer of indirection into the process should
index 5603db0b79bcbba9fa4f9e9d691e6b53ea2888c1..3ad8386599c3f2af4b3e64d23cd567e9ff6fbf3a 100644 (file)
@@ -114,7 +114,7 @@ extern unsigned s3c_gpio_getcfg_s3c24xx_a(struct s3c_gpio_chip *chip,
  * of control per GPIO, generally in the form of:
  *     0000 = Input
  *     0001 = Output
- *     others = Special functions (dependant on bank)
+ *     others = Special functions (dependent on bank)
  *
  * Note, since the code to deal with the case where there are two control
  * registers instead of one, we do not have a separate set of functions for
index 5e04fa6eda74ea7337739d05ab2cd4756e374d84..1762dcb4cb9e96341c5d2a2c6d4181de1aade52d 100644 (file)
@@ -125,7 +125,7 @@ extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr,
  *
  * These values control the state of the weak pull-{up,down} resistors
  * available on most pins on the S3C series. Not all chips support both
- * up or down settings, and it may be dependant on the chip that is being
+ * up or down settings, and it may be dependent on the chip that is being
  * used to whether the particular mode is available.
  */
 #define S3C_GPIO_PULL_NONE     ((__force s3c_gpio_pull_t)0x00)
@@ -138,7 +138,7 @@ extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr,
  * @pull: The configuration for the pull resistor.
  *
  * This function sets the state of the pull-{up,down} resistor for the
- * specified pin. It will return 0 if successfull, or a negative error
+ * specified pin. It will return 0 if successful, or a negative error
  * code if the pin cannot support the requested pull setting.
  *
  * @pull is one of S3C_GPIO_PULL_NONE, S3C_GPIO_PULL_DOWN or S3C_GPIO_PULL_UP.
@@ -202,7 +202,7 @@ extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin);
  * @drvstr: The new value of the driver strength
  *
  * This function sets the driver strength value for the specified pin.
- * It will return 0 if successfull, or a negative error code if the pin
+ * It will return 0 if successful, or a negative error code if the pin
  * cannot support the requested setting.
 */
 extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr);
index dac35d0a711dd41f97bf21356e61c47149463455..8cad4cf19c3c019bb81395ef2138359bad36e6d4 100644 (file)
@@ -108,7 +108,7 @@ extern void s3c_gpiolib_add(struct s3c_gpio_chip *chip);
  * of control per GPIO, generally in the form of:
  * 0000 = Input
  * 0001 = Output
- * others = Special functions (dependant on bank)
+ * others = Special functions (dependent on bank)
  *
  * Note, since the code to deal with the case where there are two control
  * registers instead of one, we do not have a separate set of function
index b0bdf16549d541e4cedb6bdc5527c11542b9cbd1..058e09654fe80bbc8112e4d47901aa273aae38fb 100644 (file)
@@ -57,7 +57,7 @@ enum clk_types {
  * @cfg_gpio: Configure the GPIO for a specific card bit-width
  * @cfg_card: Configure the interface for a specific card and speed. This
  *            is necessary the controllers and/or GPIO blocks require the
- *           changing of driver-strength and other controls dependant on
+ *           changing of driver-strength and other controls dependent on
  *           the card and speed of operation.
  *
  * Initialisation data specific to either the machine or the platform
@@ -108,7 +108,7 @@ extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
 extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata;
 extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
 
-/* Helper function availablity */
+/* Helper function availability */
 
 extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
index e4baf76f374ada34260e37dc88916207ad75abf2..6b733fafe7cda41815d88115fa866d1a6976a71b 100644 (file)
@@ -164,7 +164,6 @@ static inline int in_region(void *ptr, int size, void *what, size_t whatsz)
  */
 static u32 *s3c_pm_runcheck(struct resource *res, u32 *val)
 {
-       void *save_at = phys_to_virt(s3c_sleep_save_phys);
        unsigned long addr;
        unsigned long left;
        void *stkpage;
@@ -192,11 +191,6 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val)
                        goto skip_check;
                }
 
-               if (in_region(ptr, left, save_at, 32*4 )) {
-                       S3C_PMDBG("skipping %08lx, has save block in\n", addr);
-                       goto skip_check;
-               }
-
                /* calculate and check the checksum */
 
                calc = crc32_le(~0, ptr, left);
index d5b58d31903c740d2a0328a67e3d536adcc832d8..5c0a440d6e16741f34f547b7aa6583a16997b5c4 100644 (file)
@@ -214,8 +214,9 @@ void s3c_pm_do_restore_core(struct sleep_save *ptr, int count)
  *
  * print any IRQs asserted at resume time (ie, we woke from)
 */
-static void s3c_pm_show_resume_irqs(int start, unsigned long which,
-                                   unsigned long mask)
+static void __maybe_unused s3c_pm_show_resume_irqs(int start,
+                                                  unsigned long which,
+                                                  unsigned long mask)
 {
        int i;
 
index b4ff8d74ac40d21bc0bec763e050385938530252..f85638c6f5ae1748e2e652852dc9362f5380daa1 100644 (file)
@@ -68,7 +68,7 @@ struct s3c_pl330_xfer {
  * @req: Two requests to communicate with the PL330 engine.
  * @callback_fn: Callback function to the client.
  * @rqcfg: Channel configuration for the xfers.
- * @xfer_head: Pointer to the xfer to be next excecuted.
+ * @xfer_head: Pointer to the xfer to be next executed.
  * @dmac: Pointer to the DMAC that manages this channel, NULL if the
  *     channel is available to be acquired.
  * @client: Client of this channel. NULL if the
index 2ae6606930a60a5fa4d301516f961ea30827da2c..fcc0d0ad4a1fafa4cec784548e9b088836fad8bc 100644 (file)
@@ -89,7 +89,7 @@ struct rate_config {
  * @sibling: node for list of clocks having same parents
  * @private_data: clock specific private data
  * @node: list to maintain clocks linearly
- * @cl: clocklook up assoicated with this clock
+ * @cl: clocklook up associated with this clock
  * @dent: object for debugfs
  */
 struct clk {
index bbf3da012afdf6ab1233f7b6e0bf9eaa7c96194a..f74695075e641ec72562e1c8194a8220327e8bc8 100644 (file)
@@ -78,6 +78,14 @@ static void vfp_thread_exit(struct thread_info *thread)
        put_cpu();
 }
 
+static void vfp_thread_copy(struct thread_info *thread)
+{
+       struct thread_info *parent = current_thread_info();
+
+       vfp_sync_hwstate(parent);
+       thread->vfpstate = parent->vfpstate;
+}
+
 /*
  * When this function is called with the following 'cmd's, the following
  * is true while this function is being run:
@@ -104,12 +112,17 @@ static void vfp_thread_exit(struct thread_info *thread)
 static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
 {
        struct thread_info *thread = v;
+       u32 fpexc;
+#ifdef CONFIG_SMP
+       unsigned int cpu;
+#endif
 
-       if (likely(cmd == THREAD_NOTIFY_SWITCH)) {
-               u32 fpexc = fmrx(FPEXC);
+       switch (cmd) {
+       case THREAD_NOTIFY_SWITCH:
+               fpexc = fmrx(FPEXC);
 
 #ifdef CONFIG_SMP
-               unsigned int cpu = thread->cpu;
+               cpu = thread->cpu;
 
                /*
                 * On SMP, if VFP is enabled, save the old state in
@@ -134,13 +147,20 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
                 * old state.
                 */
                fmxr(FPEXC, fpexc & ~FPEXC_EN);
-               return NOTIFY_DONE;
-       }
+               break;
 
-       if (cmd == THREAD_NOTIFY_FLUSH)
+       case THREAD_NOTIFY_FLUSH:
                vfp_thread_flush(thread);
-       else
+               break;
+
+       case THREAD_NOTIFY_EXIT:
                vfp_thread_exit(thread);
+               break;
+
+       case THREAD_NOTIFY_COPY:
+               vfp_thread_copy(thread);
+               break;
+       }
 
        return NOTIFY_DONE;
 }
index ff5b7cf6be4dd8065bffb566065de245a3f4020e..160543dbec7eb1c9725c6edf3ba9259e5fd9bd9d 100644 (file)
@@ -94,6 +94,13 @@ struct tag_ethernet {
 
 #define ETH_INVALID_PHY        0xff
 
+/* board information */
+#define ATAG_BOARDINFO 0x54410008
+
+struct tag_boardinfo {
+       u32     board_number;
+};
+
 struct tag {
        struct tag_header hdr;
        union {
@@ -102,6 +109,7 @@ struct tag {
                struct tag_cmdline cmdline;
                struct tag_clock clock;
                struct tag_ethernet ethernet;
+               struct tag_boardinfo boardinfo;
        } u;
 };
 
@@ -128,6 +136,7 @@ extern struct tag *bootloader_tags;
 
 extern resource_size_t fbmem_start;
 extern resource_size_t fbmem_size;
+extern u32 board_number;
 
 void setup_processor(void);
 
index 5c7083916c33c14792728da5a08295476daebc17..bb0974cce4accf3c0a0d01cdfce08d7533d86ab7 100644 (file)
@@ -390,6 +390,21 @@ static int __init parse_tag_clock(struct tag *tag)
 }
 __tagtable(ATAG_CLOCK, parse_tag_clock);
 
+/*
+ * The board_number correspond to the bd->bi_board_number in U-Boot. This
+ * parameter is only available during initialisation and can be used in some
+ * kind of board identification.
+ */
+u32 __initdata board_number;
+
+static int __init parse_tag_boardinfo(struct tag *tag)
+{
+       board_number = tag->u.boardinfo.board_number;
+
+       return 0;
+}
+__tagtable(ATAG_BOARDINFO, parse_tag_boardinfo);
+
 /*
  * Scan the tag table for this tag, and call its parse function. The
  * tag table is built by the linker from all the __tagtable
index b91b2044af9c9660210bb9efd5f11ab60a08dcbc..7aa25756412f16299b69cccfcd1d1c9851aaaec7 100644 (file)
@@ -95,28 +95,6 @@ void _exception(long signr, struct pt_regs *regs, int code,
        info.si_code = code;
        info.si_addr = (void __user *)addr;
        force_sig_info(signr, &info, current);
-
-       /*
-        * Init gets no signals that it doesn't have a handler for.
-        * That's all very well, but if it has caused a synchronous
-        * exception and we ignore the resulting signal, it will just
-        * generate the same exception over and over again and we get
-        * nowhere.  Better to kill it and let the kernel panic.
-        */
-       if (is_global_init(current)) {
-               __sighandler_t handler;
-
-               spin_lock_irq(&current->sighand->siglock);
-               handler = current->sighand->action[signr-1].sa.sa_handler;
-               spin_unlock_irq(&current->sighand->siglock);
-               if (handler == SIG_DFL) {
-                       /* init has generated a synchronous exception
-                          and it doesn't have a handler for the signal */
-                       printk(KERN_CRIT "init has generated signal %ld "
-                              "but has no handler for it\n", signr);
-                       do_exit(signr);
-               }
-       }
 }
 
 asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs)
index 442f08c5e6415f198df5c7843b69d144fa336ed6..86925fd6ea5bb3daf34eb039858ff69f2bb02ec6 100644 (file)
@@ -35,22 +35,30 @@ void at32_clk_register(struct clk *clk)
        spin_unlock(&clk_list_lock);
 }
 
-struct clk *clk_get(struct device *dev, const char *id)
+static struct clk *__clk_get(struct device *dev, const char *id)
 {
        struct clk *clk;
 
-       spin_lock(&clk_list_lock);
-
        list_for_each_entry(clk, &at32_clock_list, list) {
                if (clk->dev == dev && strcmp(id, clk->name) == 0) {
-                       spin_unlock(&clk_list_lock);
                        return clk;
                }
        }
 
-       spin_unlock(&clk_list_lock);
        return ERR_PTR(-ENOENT);
 }
+
+struct clk *clk_get(struct device *dev, const char *id)
+{
+       struct clk *clk;
+
+       spin_lock(&clk_list_lock);
+       clk = __clk_get(dev, id);
+       spin_unlock(&clk_list_lock);
+
+       return clk;
+}
+
 EXPORT_SYMBOL(clk_get);
 
 void clk_put(struct clk *clk)
@@ -257,15 +265,15 @@ static int clk_show(struct seq_file *s, void *unused)
        spin_lock(&clk_list_lock);
 
        /* show clock tree as derived from the three oscillators */
-       clk = clk_get(NULL, "osc32k");
+       clk = __clk_get(NULL, "osc32k");
        dump_clock(clk, &r);
        clk_put(clk);
 
-       clk = clk_get(NULL, "osc0");
+       clk = __clk_get(NULL, "osc0");
        dump_clock(clk, &r);
        clk_put(clk);
 
-       clk = clk_get(NULL, "osc1");
+       clk = __clk_get(NULL, "osc1");
        dump_clock(clk, &r);
        clk_put(clk);
 
index 47ba4b9b6db16b5852a0f857236e3d73e5349e75..fbc2aeaebddbde6023bb4853814f2e598436a1bd 100644 (file)
@@ -61,34 +61,34 @@ struct eic {
 static struct eic *nmi_eic;
 static bool nmi_enabled;
 
-static void eic_ack_irq(struct irq_chip *d)
+static void eic_ack_irq(struct irq_data *d)
 {
-       struct eic *eic = irq_data_get_irq_chip_data(data);
+       struct eic *eic = irq_data_get_irq_chip_data(d);
        eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq));
 }
 
-static void eic_mask_irq(struct irq_chip *d)
+static void eic_mask_irq(struct irq_data *d)
 {
-       struct eic *eic = irq_data_get_irq_chip_data(data);
+       struct eic *eic = irq_data_get_irq_chip_data(d);
        eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq));
 }
 
-static void eic_mask_ack_irq(struct irq_chip *d)
+static void eic_mask_ack_irq(struct irq_data *d)
 {
-       struct eic *eic = irq_data_get_irq_chip_data(data);
+       struct eic *eic = irq_data_get_irq_chip_data(d);
        eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq));
        eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq));
 }
 
-static void eic_unmask_irq(struct irq_chip *d)
+static void eic_unmask_irq(struct irq_data *d)
 {
-       struct eic *eic = irq_data_get_irq_chip_data(data);
+       struct eic *eic = irq_data_get_irq_chip_data(d);
        eic_writel(eic, IER, 1 << (d->irq - eic->first_irq));
 }
 
-static int eic_set_irq_type(struct irq_chip *d, unsigned int flow_type)
+static int eic_set_irq_type(struct irq_data *d, unsigned int flow_type)
 {
-       struct eic *eic = irq_data_get_irq_chip_data(data);
+       struct eic *eic = irq_data_get_irq_chip_data(d);
        unsigned int irq = d->irq;
        unsigned int i = irq - eic->first_irq;
        u32 mode, edge, level;
@@ -191,7 +191,7 @@ static int __init eic_probe(struct platform_device *pdev)
 
        regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        int_irq = platform_get_irq(pdev, 0);
-       if (!regs || !int_irq) {
+       if (!regs || (int)int_irq <= 0) {
                dev_dbg(&pdev->dev, "missing regs and/or irq resource\n");
                return -ENXIO;
        }
index f308e1ddc629310ef882c04361b92ae4cef51622..2e0aa853a4bcecec88339d30b22d112114edc5be 100644 (file)
@@ -257,7 +257,7 @@ static void gpio_irq_mask(struct irq_data *d)
        pio_writel(pio, IDR, 1 << (gpio & 0x1f));
 }
 
-static void gpio_irq_unmask(struct irq_data *d))
+static void gpio_irq_unmask(struct irq_data *d)
 {
        unsigned                gpio = irq_to_gpio(d->irq);
        struct pio_device       *pio = &pio_dev[gpio >> 5];
index 17503b0ed6c9b3f5865406fb0d5f44241ce6bab7..f868f4ce761ba6f37a7b63617fba356410263ff1 100644 (file)
@@ -53,7 +53,7 @@ cpu_enter_idle:
        st.w    r8[TI_flags], r9
        unmask_interrupts
        sleep   CPU_SLEEP_IDLE
-       .size   cpu_idle_sleep, . - cpu_idle_sleep
+       .size   cpu_enter_idle, . - cpu_enter_idle
 
        /*
         * Common return path for PM functions that don't run from
index acb83799a215f89ce870493ab90976ea79cadf46..2641731f24cd12835e92da4dec18d0f61dee9f68 100644 (file)
@@ -59,7 +59,7 @@ config EXACT_HWERR
           be reported multiple cycles after the error happens. This delay
          can cause the wrong application, or even the kernel to receive a
          signal to be killed. If you are getting HW errors in your system,
-         try turning this on to ensure they are at least comming from the
+         try turning this on to ensure they are at least coming from the
          proper thread.
 
          On production systems, it is safe (and a small optimization) to say N.
index 19e2c7c3e63ac41bf62f2e55a4db10d6bf97a13f..44bd0cced7256dc1a04eb78242b8ad5fb8ca882c 100644 (file)
  * Force strict CPU ordering.
  */
 #define nop()  __asm__ __volatile__ ("nop;\n\t" : : )
-#define mb()   __asm__ __volatile__ (""   : : : "memory")
-#define rmb()  __asm__ __volatile__ (""   : : : "memory")
-#define wmb()  __asm__ __volatile__ (""   : : : "memory")
-#define set_mb(var, value) do { (void) xchg(&var, value); } while (0)
-#define read_barrier_depends()                 do { } while(0)
+#define smp_mb()  mb()
+#define smp_rmb() rmb()
+#define smp_wmb() wmb()
+#define set_mb(var, value) do { var = value; mb(); } while (0)
+#define smp_read_barrier_depends()     read_barrier_depends()
 
 #ifdef CONFIG_SMP
 asmlinkage unsigned long __raw_xchg_1_asm(volatile void *ptr, unsigned long value);
@@ -37,16 +37,16 @@ asmlinkage unsigned long __raw_cmpxchg_4_asm(volatile void *ptr,
                                        unsigned long new, unsigned long old);
 
 #ifdef __ARCH_SYNC_CORE_DCACHE
-# define smp_mb()      do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0)
-# define smp_rmb()     do { barrier(); smp_check_barrier(); } while (0)
-# define smp_wmb()     do { barrier(); smp_mark_barrier(); } while (0)
-#define smp_read_barrier_depends()     do { barrier(); smp_check_barrier(); } while (0)
-
+/* Force Core data cache coherence */
+# define mb()  do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0)
+# define rmb() do { barrier(); smp_check_barrier(); } while (0)
+# define wmb() do { barrier(); smp_mark_barrier(); } while (0)
+# define read_barrier_depends()        do { barrier(); smp_check_barrier(); } while (0)
 #else
-# define smp_mb()      barrier()
-# define smp_rmb()     barrier()
-# define smp_wmb()     barrier()
-#define smp_read_barrier_depends()     barrier()
+# define mb()  barrier()
+# define rmb() barrier()
+# define wmb() barrier()
+# define read_barrier_depends()        do { } while (0)
 #endif
 
 static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
@@ -99,10 +99,10 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
 
 #else /* !CONFIG_SMP */
 
-#define smp_mb()       barrier()
-#define smp_rmb()      barrier()
-#define smp_wmb()      barrier()
-#define smp_read_barrier_depends()     do { } while(0)
+#define mb()   barrier()
+#define rmb()  barrier()
+#define wmb()  barrier()
+#define read_barrier_depends() do { } while (0)
 
 struct __xchg_dummy {
        unsigned long a[100];
index 9fe0da612c09dbdb89bcc860b4b5bac4d78fe0bc..70c4e511cae648c4dfbbf0fc2dcf0ac04ddb37af 100644 (file)
@@ -57,7 +57,7 @@
 #define HWC_x3(level) \
        "External Memory Addressing Error\n"
 #define EXC_0x04(level) \
-       "Unimplmented exception occured\n" \
+       "Unimplmented exception occurred\n" \
        level " - Maybe you forgot to install a custom exception handler?\n"
 #define HWC_x12(level) \
        "Performance Monitor Overflow\n"
index cdbe075de1dc6841411310ef481ed26a4210c2f2..8b81dc04488aa6864aeb23236cadb65cc1cda676 100644 (file)
@@ -268,7 +268,7 @@ void disable_gptimers(uint16_t mask)
        _disable_gptimers(mask);
        for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i)
                if (mask & (1 << i))
-                       group_regs[BFIN_TIMER_OCTET(i)]->status |= trun_mask[i];
+                       group_regs[BFIN_TIMER_OCTET(i)]->status = trun_mask[i];
        SSYNC();
 }
 EXPORT_SYMBOL(disable_gptimers);
index b8cfe34989e4e01fdcb4bff88fe992d950ef347f..9b80b152435e087ee3f6b8b5ee3d6f6dfcdb57ae 100644 (file)
@@ -181,7 +181,7 @@ static int bfin_set_hw_break(unsigned long addr, int len, enum kgdb_bptype type)
                return -ENOSPC;
        }
 
-       /* Becasue hardware data watchpoint impelemented in current
+       /* Because hardware data watchpoint impelemented in current
         * Blackfin can not trigger an exception event as the hardware
         * instrction watchpoint does, we ignaore all data watch point here.
         * They can be turned on easily after future blackfin design
index 8c9a43daf80fad1f4ecaec62f25ea0778cc2be94..cdb4beb6bc8fc9507bf0531317b8b834eca9d4c8 100644 (file)
@@ -206,8 +206,14 @@ irqreturn_t bfin_gptmr0_interrupt(int irq, void *dev_id)
 {
        struct clock_event_device *evt = dev_id;
        smp_mb();
-       evt->event_handler(evt);
+       /*
+        * We want to ACK before we handle so that we can handle smaller timer
+        * intervals.  This way if the timer expires again while we're handling
+        * things, we're more likely to see that 2nd int rather than swallowing
+        * it by ACKing the int at the end of this handler.
+        */
        bfin_gptmr0_ack();
+       evt->event_handler(evt);
        return IRQ_HANDLED;
 }
 
index 59c1df75e4de9519d61070142b62f3b1eb90ef5a..655f25d139a74ee93e409477789f848f0f5062e3 100644 (file)
@@ -98,7 +98,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp)
        /* send the appropriate signal to the user program */
        switch (trapnr) {
 
-       /* This table works in conjuction with the one in ./mach-common/entry.S
+       /* This table works in conjunction with the one in ./mach-common/entry.S
         * Some exceptions are handled there (in assembly, in exception space)
         * Some are handled here, (in C, in interrupt space)
         * Some, like CPLB, are handled in both, where the normal path is
index 3edbd8db6598cacfa6bc6d6a4bf642338d4c613c..79caccea85cabddfa1f787a1f164aaeb905cb31e 100644 (file)
@@ -67,7 +67,7 @@
  *  - DMA version, which do not suffer from this issue. DMA versions have
  *      different name (prefixed by dma_ ), and are located in
  *      ../kernel/bfin_dma_5xx.c
- * Using the dma related functions are recommended for transfering large
+ * Using the dma related functions are recommended for transferring large
  * buffers in/out of FIFOs.
  */
 
index 80c240acac600a37691f73b3484c1a4c0962f620..4eca566237a42bcf307855435da381cfb8874ea4 100644 (file)
@@ -60,7 +60,7 @@ ENTRY(_memmove)
        [P0++] = R1;
 
        CC = P2 == 0;             /* any remaining bytes? */
-       P3 = I0;                  /* Ammend P3 to updated ptr. */
+       P3 = I0;                  /* Amend P3 to updated ptr. */
        IF !CC JUMP .Lbytes;
        P3 = I1;
        RTS;
index 2c69785a7bbef51ee933b383ba5a66e32db5a9cc..3fa335405b317c9926c6bfe5fac4c6a16ffcbfdb 100644 (file)
@@ -2530,7 +2530,7 @@ static struct resource bfin_pata_resources[] = {
 static struct pata_platform_info bfin_pata_platform_data = {
        .ioport_shift = 0,
 };
-/* CompactFlash Storage Card Memory Mapped Adressing
+/* CompactFlash Storage Card Memory Mapped Addressing
  * /REG = A11 = 1
  */
 static struct resource bfin_pata_resources[] = {
index 46ab45704c89e8d9f376f924ededc92dfcb3e908..f96933f48a7fd933c9fce9df72ef182cf66c5cce 100644 (file)
@@ -268,7 +268,7 @@ ENTRY(_handle_bad_cplb)
        /* To get here, we just tried and failed to change a CPLB
         * so, handle things in trap_c (C code), by lowering to
         * IRQ5, just like we normally do. Since this is not a
-        * "normal" return path, we have a do alot of stuff to
+        * "normal" return path, we have a do a lot of stuff to
         * the stack to get ready so, we can fall through - we
         * need to make a CPLB exception look like a normal exception
         */
@@ -817,7 +817,7 @@ _new_old_task:
        rets = [sp++];
 
        /*
-        * When we come out of resume, r0 carries "old" task, becuase we are
+        * When we come out of resume, r0 carries "old" task, because we are
         * in "new" task.
         */
        rts;
index 581e2b0a71ace2468cbb29e7b82ecd2f179ae3e7..76de5724c1e3a27ec2fd2d13a6a7ed0232e05e19 100644 (file)
@@ -174,7 +174,7 @@ ENTRY(__start)
        sp.l = lo(KERNEL_CLOCK_STACK);
        sp.h = hi(KERNEL_CLOCK_STACK);
        call _init_clocks;
-       sp = usp;       /* usp hasnt been touched, so restore from there */
+       sp = usp;       /* usp hasn't been touched, so restore from there */
 #endif
 
        /* This section keeps the processor in supervisor mode
index 6e17a265c4d3158761450463b3c5a66e63a39bab..8bce5ed031e448ed0a51d9e77c947864eed2e2bf 100644 (file)
@@ -109,10 +109,23 @@ static void ipi_flush_icache(void *info)
        struct blackfin_flush_data *fdata = info;
 
        /* Invalidate the memory holding the bounds of the flushed region. */
-       invalidate_dcache_range((unsigned long)fdata,
-               (unsigned long)fdata + sizeof(*fdata));
+       blackfin_dcache_invalidate_range((unsigned long)fdata,
+                                        (unsigned long)fdata + sizeof(*fdata));
+
+       /* Make sure all write buffers in the data side of the core
+        * are flushed before trying to invalidate the icache.  This
+        * needs to be after the data flush and before the icache
+        * flush so that the SSYNC does the right thing in preventing
+        * the instruction prefetcher from hitting things in cached
+        * memory at the wrong time -- it runs much further ahead than
+        * the pipeline.
+        */
+       SSYNC();
 
-       flush_icache_range(fdata->start, fdata->end);
+       /* ipi_flaush_icache is invoked by generic flush_icache_range,
+        * so call blackfin arch icache flush directly here.
+        */
+       blackfin_icache_flush_range(fdata->start, fdata->end);
 }
 
 static void ipi_call_function(unsigned int cpu, struct ipi_message *msg)
index 517d1f027fe879efc310e49aae97732bd7c7f564..67731d75cb516fa7df1832a04d3bb369b4f023f4 100644 (file)
@@ -38,7 +38,7 @@ space. We also use it to keep the user-mode virtual mapping in the same
 map during kernel-mode, so that the kernel easily can access the corresponding
 user-mode process' data.
 
-As a comparision, the Linux/i386 2.0 puts the kernel and physical RAM at
+As a comparison, the Linux/i386 2.0 puts the kernel and physical RAM at
 address 0, overlapping with the user-mode virtual space, so that descriptor
 registers are needed for each memory access to specify which MMU space to
 map through. That changed in 2.2, putting the kernel/physical RAM at 
index 399dc1ec8e6fe3c4e1ac5d3bd89bd0537a57a490..8502653736113b0c51cba3c529ec20285ea4203e 100644 (file)
@@ -31,7 +31,7 @@
 #include <asm/sync_serial.h>
 #include <arch/io_interface_mux.h>
 
-/* The receiver is a bit tricky beacuse of the continuous stream of data.*/
+/* The receiver is a bit tricky because of the continuous stream of data.*/
 /*                                                                       */
 /* Three DMA descriptors are linked together. Each DMA descriptor is     */
 /* responsible for port->bufchunk of a common buffer.                    */
index 3d751250271bee38334a41c4b63073ea4beb453d..7b155f8203b8d0d179022733825a504667cd4da8 100644 (file)
@@ -215,7 +215,7 @@ static struct mtd_partition main_partition = {
 };
 #endif
 
-/* Auxilliary partition if we find another flash */
+/* Auxiliary partition if we find another flash */
 static struct mtd_partition aux_partition = {
        .name = "aux",
        .size = 0,
index 25d6f2b3a721a568e68b133dcc00358ee418c380..f58f2c1c529526f0521448dcbe53eda6c795085e 100644 (file)
@@ -165,7 +165,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
        /* Enable the following for a flash based bad block table */
        /* this->options = NAND_USE_FLASH_BBT; */
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan(crisv32_mtd, 1)) {
                err = -ENXIO;
                goto out_mtd;
index c5a0f54763ccb4b0c8b116435eff3bc6a09bec46..d5b0cc9f976bbf15637679dbedd78f4cd57d8fc2 100644 (file)
@@ -156,7 +156,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
        /* Enable the following for a flash based bad block table */
        /* this->options = NAND_USE_FLASH_BBT; */
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan(crisv32_mtd, 1)) {
                err = -ENXIO;
                goto out_ior;
index c8637a9195eadb5bb0d8d0f9e3b658923767fbdc..a6a180bc566ff51d533cbd5ddc85fec2469381a2 100644 (file)
@@ -33,7 +33,7 @@
 #include <asm/sync_serial.h>
 
 
-/* The receiver is a bit tricky beacuse of the continuous stream of data.*/
+/* The receiver is a bit tricky because of the continuous stream of data.*/
 /*                                                                       */
 /* Three DMA descriptors are linked together. Each DMA descriptor is     */
 /* responsible for port->bufchunk of a common buffer.                    */
index 0ecb50b8f0d90372b42c5f603dd80586349cf1ea..3abf12c23e5f6ef329f3fca151402cec97643946 100644 (file)
@@ -182,7 +182,7 @@ _syscall_traced:
        move.d  $r0, [$sp]
 
        ;; The registers carrying parameters (R10-R13) are intact. The optional
-       ;; fifth and sixth parameters is in MOF and SRP respectivly. Put them
+       ;; fifth and sixth parameters is in MOF and SRP respectively. Put them
        ;; back on the stack.
        subq    4, $sp
        move    $srp, [$sp]
index 8023176e19b2015f2283f4e5d2ad030171a1feb2..68a1a5901ca5acd59dedeb64ec7f7f588c16070c 100644 (file)
@@ -374,7 +374,7 @@ crisv32_do_multiple(struct pt_regs* regs)
        irq_enter();
 
        for (i = 0; i < NBR_REGS; i++) {
-               /* Get which IRQs that happend. */
+               /* Get which IRQs that happened. */
                masked[i] = REG_RD_INT_VECT(intr_vect, irq_regs[cpu],
                        r_masked_vect, i);
 
index 6b653323d796bebc1f48951d9b763429e37c5ea5..c0343c3ea7f8e592ab4288ee6c56bf48e68ec0a7 100644 (file)
@@ -925,7 +925,7 @@ stub_is_stopped(int sigval)
 
                                        if (reg.eda >= bp_d_regs[bp * 2] &&
                                            reg.eda <= bp_d_regs[bp * 2 + 1]) {
-                                               /* EDA withing range for this BP; it must be the one
+                                               /* EDA within range for this BP; it must be the one
                                                   we're looking for. */
                                                stopped_data_address = reg.eda;
                                                break;
index 562f84718906b2de88416b1ca48e685992d0b400..0570e8ce603d1575943e24271cbb1f597d2dfe73 100644 (file)
@@ -149,7 +149,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
         childregs->r10 = 0;    /* Child returns 0 after a fork/clone. */
 
        /* Set a new TLS ?
-        * The TLS is in $mof beacuse it is the 5th argument to sys_clone.
+        * The TLS is in $mof because it is the 5th argument to sys_clone.
         */
        if (p->mm && (clone_flags & CLONE_SETTLS)) {
                task_thread_info(p)->tls = regs->mof;
index b3a05ae56214dd66ca345b11d6e7d672e5ac2fff..ce4ab1a5552cae542ab4b7234867a0926f5857c3 100644 (file)
@@ -610,7 +610,7 @@ ugdb_trap_user(struct thread_info *ti, int sig)
                user_regs(ti)->spc = 0;
        }
        /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA
-          not withing any configured h/w breakpoint range). Synchronize with
+          not within any configured h/w breakpoint range). Synchronize with
           what already exists for kernel debugging.  */
        if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) {
                /* Break 8: subtract 2 from ERP unless in a delay slot. */
index 8b924db71c9a9a7f7eb90b6b6c13a1a387504a0a..15f5c9de26399893e78d8f82e7783aa1cb8b0757 100644 (file)
@@ -568,7 +568,7 @@ crisv32_foo_arbiter_irq(int irq, void *dev_id)
        REG_WR(marb_foo_bp, watch->instance, rw_ack, ack);
        REG_WR(marb_foo, regi_marb_foo, rw_ack_intr, ack_intr);
 
-       printk(KERN_DEBUG "IRQ occured at %X\n", (unsigned)get_irq_regs());
+       printk(KERN_DEBUG "IRQ occurred at %X\n", (unsigned)get_irq_regs());
 
        if (watch->cb)
                watch->cb();
@@ -624,7 +624,7 @@ crisv32_bar_arbiter_irq(int irq, void *dev_id)
        REG_WR(marb_bar_bp, watch->instance, rw_ack, ack);
        REG_WR(marb_bar, regi_marb_bar, rw_ack_intr, ack_intr);
 
-       printk(KERN_DEBUG "IRQ occured at %X\n", (unsigned)get_irq_regs()->erp);
+       printk(KERN_DEBUG "IRQ occurred at %X\n", (unsigned)get_irq_regs()->erp);
 
        if (watch->cb)
                watch->cb();
index 82ef293c4c816bfacfe6bf3fb8df8d8892427be7..3f8ebb5c14771300e49106f78dc58acaba67d037 100644 (file)
@@ -395,7 +395,7 @@ static irqreturn_t crisv32_arbiter_irq(int irq, void *dev_id)
        REG_WR(marb_bp, watch->instance, rw_ack, ack);
        REG_WR(marb, regi_marb, rw_ack_intr, ack_intr);
 
-       printk(KERN_INFO "IRQ occured at %lX\n", get_irq_regs()->erp);
+       printk(KERN_INFO "IRQ occurred at %lX\n", get_irq_regs()->erp);
 
        if (watch->cb)
                watch->cb();
index 2fafe247a25b4695dceca0daeec9885d0ad8f73a..af55df0994b38580439c29310e8cc1495474e235 100644 (file)
@@ -7,7 +7,7 @@
  * for each partition that this code should check.
  *
  * If any of the checksums fail, we assume the flash is so
- * corrupt that we cant use it to boot into the ftp flash
+ * corrupt that we can't use it to boot into the ftp flash
  * loader, and instead we initialize the serial port to
  * receive a flash-loader and new flash image. we dont include
  * any flash code here, but just accept a certain amount of
index f9a05d2aa0618df2af028c755cdd16868566404c..b8b3f8d666e40566a7675d24ff2dda3ea4c36830 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile to generate or copy the latest register definitions
 # and related datastructures and helpermacros.
-# The offical place for these files is at:
+# The official place for these files is at:
 RELEASE ?= r1_alfa5
 OFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/
 
index a90056a095e33674a6144ea1df157a4624ce8939..0747a22e3c077b4e44993c67f66ab269cf13c9dd 100644 (file)
@@ -1,7 +1,7 @@
 # $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $
 # Makefile to generate or copy the latest register definitions
 # and related datastructures and helpermacros.
-# The offical place for these files is probably at:
+# The official place for these files is probably at:
 RELEASE ?= r1_alfa5
 IOPOFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/
 
index 9eaae217b21b755298809150cca419904bd5c944..7df4301383558410a18def3788b743d4d523251d 100644 (file)
@@ -97,7 +97,7 @@ extern unsigned long empty_zero_page;
 #define pte_clear(mm,addr,xp)  do { pte_val(*(xp)) = 0; } while (0)
 
 #define pmd_none(x)     (!pmd_val(x))
-/* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad
+/* by removing the _PAGE_KERNEL bit from the comparison, the same pmd_bad
  * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries.
  */
 #define        pmd_bad(x)      ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE)
index 541efbf09371751dc76006c6c278d1f3629a0ce9..8da53f34c7a72ffb509834f89d905b16a2575016 100644 (file)
@@ -183,7 +183,7 @@ __initcall(oops_nmi_register);
 
 /*
  * This gets called from entry.S when the watchdog has bitten. Show something
- * similiar to an Oops dump, and if the kernel is configured to be a nice
+ * similar to an Oops dump, and if the kernel is configured to be a nice
  * doggy, then halt instead of reboot.
  */
 void
index 0d5997909850259f039d13ea94cf715c00637544..ef03baf5d89de314f39fd1920f1e71755387a3f3 100644 (file)
@@ -54,7 +54,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
 #endif
 
 /*
- *     These are pretty much arbitary with the CoMEM implementation.
+ *     These are pretty much arbitrary with the CoMEM implementation.
  *     We have the whole address space to ourselves.
  */
 #define PCIBIOS_MIN_IO         0x100
index 01e6af5e99b8b6ed2e195e244dbbc3c033c0e437..d3883021f236488e392f01ced315d59f4447e577 100644 (file)
 #define MSR0_RD                        0xc0000000      /* rounding mode */
 #define MSR0_RD_NEAREST                0x00000000      /* - nearest */
 #define MSR0_RD_ZERO           0x40000000      /* - zero */
-#define MSR0_RD_POS_INF                0x80000000      /* - postive infinity */
+#define MSR0_RD_POS_INF                0x80000000      /* - positive infinity */
 #define MSR0_RD_NEG_INF                0xc0000000      /* - negative infinity */
 
 /*
index 59788fa2a8138c441a6a2eadf4c9f77acc6272f4..b26d70ab9111937f5985e1c9bce24dc4c3814a5c 100644 (file)
@@ -1,4 +1,4 @@
-/* virtconvert.h: virtual/physical/page address convertion
+/* virtconvert.h: virtual/physical/page address conversion
  *
  * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells (dhowells@redhat.com)
index bf35f33e48c99d6c18152184ee9b79af34d4d63f..06c5ae191e5974ce5dfc964e6d0dbf253862fe24 100644 (file)
@@ -86,7 +86,7 @@ __break_usertrap_fixup_table:
        .globl          __break_kerneltrap_fixup_table
 __break_kerneltrap_fixup_table:
 
-       # handler declaration for a sofware or program interrupt
+       # handler declaration for a software or program interrupt
 .macro VECTOR_SOFTPROG tbr_tt, vec
        .section .trap.user
        .org            \tbr_tt
@@ -145,7 +145,7 @@ __break_kerneltrap_fixup_table:
        .long           \vec
 .endm
 
-       # handler declaration for an MMU only sofware or program interrupt
+       # handler declaration for an MMU only software or program interrupt
 .macro VECTOR_SP_MMU tbr_tt, vec
 #ifdef CONFIG_MMU
        VECTOR_SOFTPROG \tbr_tt, \vec
index c4ea0925cdbd081c89b56d2620af906514f4c01c..e5cc56ae6ce3089129624b26ef24445592586348 100644 (file)
@@ -414,11 +414,11 @@ config PERMIT_BSP_REMOVE
        support. 
 
 config FORCE_CPEI_RETARGET
-       bool "Force assumption that CPEI can be re-targetted"
+       bool "Force assumption that CPEI can be re-targeted"
        depends on PERMIT_BSP_REMOVE
        default n
        ---help---
-       Say Y if you need to force the assumption that CPEI can be re-targetted to
+       Say Y if you need to force the assumption that CPEI can be re-targeted to
        any cpu in the system. This hint is available via ACPI 3.0 specifications.
        Tiger4 systems are capable of re-directing CPEI to any CPU other than BSP.
        This option it useful to enable this feature on older BIOS's as well.
index 6a292505b3966231bbe1bfed1b0b9bf4c38dfc0b..2e69284df8e77b8bbf7701b8a5e260aa6dee746d 100644 (file)
@@ -1669,7 +1669,7 @@ typedef union pal_vp_info_u {
 } pal_vp_info_u_t;
 
 /*
- * Returns infomation about virtual processor features
+ * Returns information about virtual processor features
  */
 static inline s64
 ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id)
index 74724b24c2b7b6754aabc9d0cf932ce610577c71..a2d560c67230d963065f2b378f9bfa44a49b931e 100644 (file)
@@ -67,8 +67,8 @@ typedef struct {
         unsigned long   ip;                     /* where did the overflow interrupt happened  */
         unsigned long   tstamp;                 /* ar.itc when entering perfmon intr. handler */
 
-        unsigned short  cpu;                    /* cpu on which the overflow occured */
-        unsigned short  set;                    /* event set active when overflow ocurred   */
+        unsigned short  cpu;                    /* cpu on which the overflow occurred */
+        unsigned short  set;                    /* event set active when overflow occurred   */
         int                    tgid;                   /* thread group id (for NPTL, this is getpid()) */
 } pfm_default_smpl_entry_t;
 
index 96798d2da7c272fe4e9417f5329702d8f4559042..cc6c4dbf53af47b3faed582db57de62d32837a46 100644 (file)
@@ -216,7 +216,7 @@ extern void bte_error_handler(unsigned long);
        bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification)
 
 /*
- * The following is the prefered way of calling bte_unaligned_copy
+ * The following is the preferred way of calling bte_unaligned_copy
  * If the copy is fully cache line aligned, then bte_copy is
  * used instead.  Since bte_copy is inlined, this saves a call
  * stack.  NOTE: bte_copy is called synchronously and does block
index 7de1d1d4b71a9b7ccb67e10b09be4304fb047da8..a84d870f42945148773c864163e58a1a95c20587 100644 (file)
 /* ==================================================================== */
 /* Some MMRs are functionally identical (or close enough) on both SHUB1 */
 /* and SHUB2 that it makes sense to define a geberic name for the MMR.  */
-/* It is acceptible to use (for example) SH_IPI_INT to reference the    */
+/* It is acceptable to use (for example) SH_IPI_INT to reference the    */
 /* the IPI MMR. The value of SH_IPI_INT is determined at runtime based  */
 /* on the type of the SHUB. Do not use these #defines in performance    */
 /* critical code  or loops - there is a small performance penalty.      */
index 6052422a22b32e71fa1137b41c13dcffc145efd6..ecb8a49476b6be9f808e709f17538e2d5bb48a10 100644 (file)
@@ -1383,7 +1383,7 @@ typedef union ii_ibcr_u {
  * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The    *
  * errant header is thereby captured, and no further spurious read      *
  * respones are captured until IXSS[VALID] is cleared by setting the    *
- * appropriate bit in IECLR.Everytime a spurious read response is       *
+ * appropriate bit in IECLR. Every time a spurious read response is     *
  * detected, the SPUR_RD bit of the PRB corresponding to the incoming   *
  * message's SIDN field is set. This always happens, regarless of       *
  * whether a header is captured. The programmer should check            *
@@ -2738,7 +2738,7 @@ typedef union ii_ippr_u {
 /************************************************************************
  *                                                                     *
  * The following defines which were not formed into structures are     *
- * probably indentical to another register, and the name of the                *
+ * probably identical to another register, and the name of the         *
  * register is provided against each of these registers. This          *
  * information needs to be checked carefully                           *
  *                                                                     *
index d52f1f78eff2ab01b126cc5ef35e2039400fddaf..1b811c61bdc618107d05bf4bc10ebf0067b86df8 100644 (file)
@@ -31,7 +31,7 @@ static struct clocksource clocksource_cyclone = {
         .rating         = 300,
         .read           = read_cyclone,
         .mask           = (1LL << 40) - 1,
-        .mult           = 0, /*to be caluclated*/
+        .mult           = 0, /*to be calculated*/
         .shift          = 16,
         .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
index 5f637bbfcccdd6f5a09bdfe6a9266859f5cc4e63..30c644ea44c9602a8ad6427182e72ca0fb0a6073 100644 (file)
@@ -150,7 +150,7 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
         * current = task running at the time of the overflow.
         *
         * per-task mode:
-        *      - this is ususally the task being monitored.
+        *      - this is usually the task being monitored.
         *        Under certain conditions, it might be a different task
         *
         * system-wide:
index 44f11ee411c001104db6b7dfa34eebd1f0c62e9a..14ec641003daf268fe58c54b0e926afdf8a3ec69 100644 (file)
@@ -703,7 +703,7 @@ int migrate_platform_irqs(unsigned int cpu)
                                data->chip->irq_disable(data);
                                data->chip->irq_set_affinity(data, mask, false);
                                data->chip->irq_enable(data);
-                               printk ("Re-targetting CPEI to cpu %d\n", new_cpei_cpu);
+                               printk ("Re-targeting CPEI to cpu %d\n", new_cpei_cpu);
                        }
                }
                if (!data) {
index 0baa1bbb65fe00894e2e284bfc39c3fa9a36e5d4..0e0e0cc9e3929c8ddd91a4062351a2fb1b63c79d 100644 (file)
@@ -43,7 +43,7 @@ int __ref arch_register_cpu(int num)
 {
 #ifdef CONFIG_ACPI
        /*
-        * If CPEI can be re-targetted or if this is not
+        * If CPEI can be re-targeted or if this is not
         * CPEI target, then it is hotpluggable
         */
        if (can_cpei_retarget() || !is_cpu_cpei_target(num))
index bb862fb224f2968df93206e37589612556988f6b..b0398740b48d83dae546cfcab657951594225579 100644 (file)
@@ -987,7 +987,7 @@ static void vmm_sanity_check(struct kvm_vcpu *vcpu)
 
 static void kvm_do_resume_op(struct kvm_vcpu *vcpu)
 {
-       vmm_sanity_check(vcpu); /*Guarantee vcpu runing on healthy vmm!*/
+       vmm_sanity_check(vcpu); /*Guarantee vcpu running on healthy vmm!*/
 
        if (test_and_clear_bit(KVM_REQ_RESUME, &vcpu->requests)) {
                vcpu_do_resume(vcpu);
index 6bec2fc9f5b294bf1980680a9545d60c8edd3f7c..1a431a5cf86ffb8d57f1b3adc417c4985818d055 100644 (file)
@@ -201,7 +201,7 @@ GLOBAL_ENTRY(do_csum)
        ;;
 (p6)   adds result1[0]=1,result1[0]
 (p9)   br.cond.sptk .do_csum_exit      // if (count == 1) exit
-       // Fall through to caluculate the checksum, feeding result1[0] as
+       // Fall through to calculate the checksum, feeding result1[0] as
        // the initial value in result1[0].
        //
        // Calculate the checksum loading two 8-byte words per loop.
index 139c018dbbf94814768ba9f18e38742d036ac8da..81a1f4e6bcd8c65f42e3f995942b02a5433da643 100644 (file)
@@ -227,7 +227,7 @@ void sn_set_err_irq_affinity(unsigned int irq)
 {
         /*
          * On systems which support CPU disabling (SHub2), all error interrupts
-         * are targetted at the boot CPU.
+         * are targeted at the boot CPU.
          */
         if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT))
                 set_irq_affinity_info(irq, cpu_physical_id(0), 0);
@@ -435,7 +435,7 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info)
        /*
         * Bridge types attached to TIO (anything but PIC) do not need this WAR
         * since they do not target Shub II interrupt registers.  If that
-        * ever changes, this check needs to accomodate.
+        * ever changes, this check needs to accommodate.
         */
        if (sn_irq_info->irq_bridge_type != PCIIO_ASIC_TYPE_PIC)
                return;
index c659ad5613a009f1fea4922275c5d83d286e3b71..33def666a6642f256726af241df2695b7a933b7c 100644 (file)
@@ -227,7 +227,7 @@ pcibr_dma_unmap(struct pci_dev *hwdev, dma_addr_t dma_handle, int direction)
  * after doing the read.  For PIC this routine then forces a fake interrupt
  * on another line, which is logically associated with the slot that the PIO
  * is addressed to.  It then spins while watching the memory location that
- * the interrupt is targetted to.  When the interrupt response arrives, we 
+ * the interrupt is targeted to.  When the interrupt response arrives, we 
  * are sure that the DMA has landed in memory and it is safe for the driver
  * to proceed. For TIOCP use the Device(x) Write Request Buffer Flush 
  * Bridge register since it ensures the data has entered the coherence domain,
index 2dc89d68b6d943b4aec5b1366825d52eb4aad565..1feae9709f24f9d2a706e9509d36d26e4df902e9 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * include/asm-m32r/m32104ut/m32104ut_pld.h
  *
- * Definitions for Programable Logic Device(PLD) on M32104UT board.
+ * Definitions for Programmable Logic Device(PLD) on M32104UT board.
  * Based on m32700ut_pld.h
  *
  * Copyright (c) 2002  Takeo Takahashi
index 57623beb44cb6a62a0b14d9cbb7769174b4e75b1..35294670b187434f331116573d4ef7dd18c0026a 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * include/asm-m32r/m32700ut/m32700ut_pld.h
  *
- * Definitions for Programable Logic Device(PLD) on M32700UT board.
+ * Definitions for Programmable Logic Device(PLD) on M32700UT board.
  *
  * Copyright (c) 2002  Takeo Takahashi
  *
index 3f11ea1aac2d3605dc854be2e596e3b2490ed719..6901401fe9eba8c4b6decee761257389541a4a47 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * include/asm-m32r/opsput/opsput_pld.h
  *
- * Definitions for Programable Logic Device(PLD) on OPSPUT board.
+ * Definitions for Programmable Logic Device(PLD) on OPSPUT board.
  *
  * Copyright (c) 2002  Takeo Takahashi
  *
index bca3475f9595753aa43672791a17a177579831e9..9cdaf7350ef6daecb10525ee82bbcdd6f127c9a4 100644 (file)
@@ -44,7 +44,7 @@ static inline int pgd_present(pgd_t pgd)      { return 1; }
 #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
 
 /*
- * (pmds are folded into pgds so this doesnt get actually called,
+ * (pmds are folded into pgds so this doesn't get actually called,
  * but the define is needed for a generic inline function.)
  */
 #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
index b8ec002aef8e321349f17b9255b70762b4b029ce..2c9aeb453847e2c33d899c195f1645a1d434e1e0 100644 (file)
@@ -120,7 +120,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
 
        /* When running in the kernel we expect faults to occur only to
         * addresses in user space.  All other faults represent errors in the
-        * kernel and should generate an OOPS.  Unfortunatly, in the case of an
+        * kernel and should generate an OOPS.  Unfortunately, in the case of an
         * erroneous fault occurring in a code path which already holds mmap_sem
         * we will deadlock attempting to validate the fault against the
         * address space.  Luckily the kernel only validly references user
@@ -128,7 +128,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
         * exceptions table.
         *
         * As the vast majority of faults will be valid we will only perform
-        * the source reference check when there is a possibilty of a deadlock.
+        * the source reference check when there is a possibility of a deadlock.
         * Attempt to lock the address space, if we cannot we then validate the
         * source.  If this is invalid we can skip the address space check,
         * thus avoiding the deadlock.
index 5890897d28bfab782534aa48161529dcade620a1..b995513d527fd1323b2edbdd85f439a04bb0e4c1 100644 (file)
@@ -130,7 +130,7 @@ KEYBOARD_STATE kb_state;
  * it's really hard to decide whether they're mouse or keyboard bytes. Since
  * overruns usually occur when moving the Atari mouse rapidly, they're seen as
  * mouse bytes here. If this is wrong, only a make code of the keyboard gets
- * lost, which isn't too bad. Loosing a break code would be disastrous,
+ * lost, which isn't too bad. Losing a break code would be disastrous,
  * because then the keyboard repeat strikes...
  */
 
index 72f1159cb804cdef7bc2e819afa605bb9f5c226c..f2e795231046049bd41950bd642178f81065c819 100644 (file)
@@ -609,7 +609,7 @@ do_fint:
 |      A6.  This test occurs only on the first pass.  If the
 |      result is exactly 10^LEN, decrement ILOG and divide
 |      the mantissa by 10.  The calculation of 10^LEN cannot
-|      be inexact, since all powers of ten upto 10^27 are exact
+|      be inexact, since all powers of ten up to 10^27 are exact
 |      in extended precision, so the use of a previous power-of-ten
 |      table will introduce no error.
 |
index 26e85e2b7a5e65341c809caaa5c2598a6783517a..78cb60f5bb4dda18b28276c4b8b79c787e948590 100644 (file)
@@ -11813,7 +11813,7 @@ fmul_unfl_ena:
        bne.b           fmul_unfl_ena_sd        # no, sgl or dbl
 
 # if the rnd mode is anything but RZ, then we have to re-do the above
-# multiplication becuase we used RZ for all.
+# multiplication because we used RZ for all.
        fmov.l          L_SCR3(%a6),%fpcr       # set FPCR
 
 fmul_unfl_ena_cont:
@@ -18095,7 +18095,7 @@ fscc_mem_op:
 
        rts
 
-# addresing mode is post-increment. write the result byte. if the write
+# addressing mode is post-increment. write the result byte. if the write
 # fails then don't update the address register. if write passes then
 # call inc_areg() to update the address register.
 fscc_mem_inc:
@@ -20876,7 +20876,7 @@ dst_get_dupper:
        swap            %d0                     # d0 now in upper word
        lsl.l           &0x4,%d0                # d0 in proper place for dbl prec exp
        tst.b           FTEMP_EX(%a0)           # test sign
-       bpl.b           dst_get_dman            # if postive, go process mantissa
+       bpl.b           dst_get_dman            # if positive, go process mantissa
        bset            &0x1f,%d0               # if negative, set sign
 dst_get_dman:
        mov.l           FTEMP_HI(%a0),%d1       # get ms mantissa
@@ -22943,7 +22943,7 @@ tbl_ovfl_result:
 #      FP_SRC(a6) = packed operand now as a binary FP number           #
 #                                                                      #
 # ALGORITHM ***********************************************************        #
-#      Get the correct <ea> whihc is the value on the exception stack  #
+#      Get the correct <ea> which is the value on the exception stack  #
 # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+.    #
 # Then, fetch the operand from memory. If the fetch fails, exit                #
 # through facc_in_x().                                                 #
@@ -24096,7 +24096,7 @@ do_fint12:
 #      A6.  This test occurs only on the first pass.  If the
 #      result is exactly 10^LEN, decrement ILOG and divide
 #      the mantissa by 10.  The calculation of 10^LEN cannot
-#      be inexact, since all powers of ten upto 10^27 are exact
+#      be inexact, since all powers of ten up to 10^27 are exact
 #      in extended precision, so the use of a previous power-of-ten
 #      table will introduce no error.
 #
index e71ba0ab013cbdb1d074f1134d1aba2a7d5fa793..4aedef973cf6fbd02cc67ea65bcbcede0da21c68 100644 (file)
@@ -7777,7 +7777,7 @@ dst_get_dupper:
        swap            %d0                     # d0 now in upper word
        lsl.l           &0x4,%d0                # d0 in proper place for dbl prec exp
        tst.b           FTEMP_EX(%a0)           # test sign
-       bpl.b           dst_get_dman            # if postive, go process mantissa
+       bpl.b           dst_get_dman            # if positive, go process mantissa
        bset            &0x1f,%d0               # if negative, set sign
 dst_get_dman:
        mov.l           FTEMP_HI(%a0),%d1       # get ms mantissa
@@ -8244,7 +8244,7 @@ fmul_unfl_ena:
        bne.b           fmul_unfl_ena_sd        # no, sgl or dbl
 
 # if the rnd mode is anything but RZ, then we have to re-do the above
-# multiplication becuase we used RZ for all.
+# multiplication because we used RZ for all.
        fmov.l          L_SCR3(%a6),%fpcr       # set FPCR
 
 fmul_unfl_ena_cont:
@@ -12903,7 +12903,7 @@ store_fpreg_7:
 #      FP_SRC(a6) = packed operand now as a binary FP number           #
 #                                                                      #
 # ALGORITHM ***********************************************************        #
-#      Get the correct <ea> whihc is the value on the exception stack  #
+#      Get the correct <ea> which is the value on the exception stack  #
 # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+.    #
 # Then, fetch the operand from memory. If the fetch fails, exit                #
 # through facc_in_x().                                                 #
@@ -14056,7 +14056,7 @@ do_fint12:
 #      A6.  This test occurs only on the first pass.  If the
 #      result is exactly 10^LEN, decrement ILOG and divide
 #      the mantissa by 10.  The calculation of 10^LEN cannot
-#      be inexact, since all powers of ten upto 10^27 are exact
+#      be inexact, since all powers of ten up to 10^27 are exact
 #      in extended precision, so the use of a previous power-of-ten
 #      table will introduce no error.
 #
index f597892e43a00a6699219298dca76e6f081c9161..656bbbf5a6ff7e2940b0c573473c5b7b2885c355 100644 (file)
@@ -146,7 +146,7 @@ static inline void clear_mfp_bit( unsigned irq, int type )
 
 /*
  * {en,dis}able_irq have the usual semantics of temporary blocking the
- * interrupt, but not loosing requests that happen between disabling and
+ * interrupt, but not losing requests that happen between disabling and
  * enabling. This is done with the MFP mask registers.
  */
 
index bdc1a4ac4fe956ebdfdfe12746c3a0932a844214..e518f5a575b73aa42ed0e73298944b3798d4480b 100644 (file)
@@ -31,7 +31,7 @@
 #define __BN_flash_write_range         20
 
 /* Calling conventions compatible to (uC)linux/68k
- * We use simmilar macros to call into the bootloader as for uClinux
+ * We use similar macros to call into the bootloader as for uClinux
  */
 
 #define __bsc_return(type, res) \
index edf5eb6c08d2bbe4fbac29223392215173bb28a4..a73998528d26dddbc8db3b10979a5156d8a25dca 100644 (file)
@@ -88,7 +88,7 @@ typedef struct cpm_buf_desc {
 
 
 /* rx bd status/control bits */
-#define BD_SC_EMPTY    ((ushort)0x8000)        /* Recieve is empty */
+#define BD_SC_EMPTY    ((ushort)0x8000)        /* Receive is empty */
 #define BD_SC_WRAP     ((ushort)0x2000)        /* Last buffer descriptor in table */
 #define BD_SC_INTRPT   ((ushort)0x1000)        /* Interrupt on change */
 #define BD_SC_LAST     ((ushort)0x0800)        /* Last buffer in frame OR control char */
@@ -96,7 +96,7 @@ typedef struct cpm_buf_desc {
 #define BD_SC_FIRST    ((ushort)0x0400)        /* 1st buffer in an HDLC frame */
 #define BD_SC_ADDR     ((ushort)0x0400)        /* 1st byte is a multidrop address */
 
-#define BD_SC_CM       ((ushort)0x0200)        /* Continous mode */
+#define BD_SC_CM       ((ushort)0x0200)        /* Continuous mode */
 #define BD_SC_ID       ((ushort)0x0100)        /* Received too many idles */
 
 #define BD_SC_AM       ((ushort)0x0080)        /* Multidrop address match */
index 55cbd6294ab68508492d3143fa49c2d6a306611c..c3a0edc90f21eee77be46334ee600fe03f1a3d2a 100644 (file)
@@ -16,7 +16,7 @@ static inline void __delay(unsigned long loops)
         * long word alignment which is the faster version.
         * The 0x4a8e is of course a 'tstl %fp' instruction.  This is better
         * than using a NOP (0x4e71) instruction because it executes in one
-        * cycle not three and doesn't allow for an arbitary delay waiting
+        * cycle not three and doesn't allow for an arbitrary delay waiting
         * for bus cycles to finish.  Also fp/a6 isn't likely to cause a
         * stall waiting for the register to become valid if such is added
         * to the coldfire at some stage.
index c64c7b74cf86819a42d670ca47b191e53d729006..b2046839f4b253dc4254115f548c87b81dc5a83d 100644 (file)
@@ -31,7 +31,7 @@
  * GPIOs in a single control area, others have some GPIOs implemented in
  * different modules.
  *
- * This implementation attempts accomodate the differences while presenting
+ * This implementation attempts accommodate the differences while presenting
  * a generic interface that will optimize to as few instructions as possible.
  */
 #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \
index 55d5a4c5fe0bab427739ea15f3603deae736c76c..b6bf2c518baccd4314dd7aee3aa1053a092ef669 100644 (file)
 #define        MCFFEC_SIZE             0x800           /* Register set size */
 
 /*
- *  Reset Controll Unit.
+ *  Reset Control Unit.
  */
 #define        MCF_RCR                 0xFC0A0000
 #define        MCF_RSR                 0xFC0A0001
index 8996df62ede411ca464e6ec8db827ce209de2cfb..6235921eca4ea83aabecb8bc75d0ef4740497502 100644 (file)
@@ -48,7 +48,7 @@
 #define        MCFSIM_DMR1             (MCF_IPSBAR + 0x54)     /* Address mask 1 */
 
 /*
- *  Reset Controll Unit (relative to IPSBAR).
+ *  Reset Control Unit (relative to IPSBAR).
  */
 #define        MCF_RCR                 0x110000
 #define        MCF_RSR                 0x110001
index 74855a66c05054d98dd7f11b70b337470f920b78..758810ef91ec349f9f2cdf6894e99de1297d5933 100644 (file)
 #endif
 
 /*
- *  Reset Controll Unit (relative to IPSBAR).
+ *  Reset Control Unit (relative to IPSBAR).
  */
 #define        MCF_RCR                 0x110000
 #define        MCF_RSR                 0x110001
index 4c94c01f36c4d76b9fe2325200257b1d5474f523..8f8609fcc9b8eb87ff0a28ecb1aa5e8017a24020 100644 (file)
@@ -29,7 +29,7 @@
 #define        MCFSIM_SWSR             0x03            /* SW Watchdog service (r/w) */
 #define        MCFSIM_PAR              0x04            /* Pin Assignment reg (r/w) */
 #define        MCFSIM_IRQPAR           0x06            /* Interrupt Assignment reg (r/w) */
-#define        MCFSIM_PLLCR            0x08            /* PLL Controll Reg*/
+#define        MCFSIM_PLLCR            0x08            /* PLL Control Reg*/
 #define        MCFSIM_MPARK            0x0C            /* BUS Master Control Reg*/
 #define        MCFSIM_IPR              0x40            /* Interrupt Pend reg (r/w) */
 #define        MCFSIM_IMR              0x44            /* Interrupt Mask reg (r/w) */
index 762c58c89050379dba783adbcedbef8c6f9664bd..51e00b00b8a6a93e2e5af1496716d2326523be71 100644 (file)
@@ -29,7 +29,7 @@
 #define        MCFSIM_SWSR             0x03            /* SW Watchdog service (r/w) */
 #define        MCFSIM_PAR              0x04            /* Pin Assignment reg (r/w) */
 #define        MCFSIM_IRQPAR           0x06            /* Interrupt Assignment reg (r/w) */
-#define        MCFSIM_PLLCR            0x08            /* PLL Controll Reg*/
+#define        MCFSIM_PLLCR            0x08            /* PLL Control Reg*/
 #define        MCFSIM_MPARK            0x0C            /* BUS Master Control Reg*/
 #define        MCFSIM_IPR              0x40            /* Interrupt Pend reg (r/w) */
 #define        MCFSIM_IMR              0x44            /* Interrupt Mask reg (r/w) */
index 6d40f4d18e109e5a19aad9e3522b874c365ca806..59414cc108d378a44ec57bed514e2419bd703aef 100644 (file)
@@ -32,7 +32,7 @@ struct user_data {
     /* BASE + 0x000: user data memory */
     volatile unsigned char      udata_bd_ucode[0x400]; /*user data bd's Ucode*/
     volatile unsigned char      udata_bd[0x200];       /*user data Ucode     */
-    volatile unsigned char      ucode_ext[0x100];      /*Ucode Extention ram */
+    volatile unsigned char      ucode_ext[0x100];      /*Ucode Extension ram */
     volatile unsigned char      RESERVED1[0x500];      /* Reserved area      */
 };
 #else
index 7221f7251934b996c817ac11636241478cb24bf8..3cf2b6ed685ab6e6d041c4375cdf55abbcdd9ae4 100644 (file)
@@ -61,7 +61,7 @@
 /*
  * OSS Interrupt levels for various sub-systems
  *
- * This mapping is layed out with two things in mind: first, we try to keep
+ * This mapping is laid out with two things in mind: first, we try to keep
  * things on their own levels to avoid having to do double-dispatches. Second,
  * the levels match as closely as possible the alternate IRQ mapping mode (aka
  * "A/UX mode") available on some VIA machines.
index 39afb438b656c21f00dd0a2c02c7a48bd5340551..a59665e1d41be7d0b4e595672a4a009886d66ea5 100644 (file)
 #define vT2CL  0x1000  /* [VIA only] Timer two counter low. */
 #define vT2CH  0x1200  /* [VIA only] Timer two counter high. */
 #define vSR    0x1400  /* [VIA only] Shift register. */
-#define vACR   0x1600  /* [VIA only] Auxilary control register. */
+#define vACR   0x1600  /* [VIA only] Auxiliary control register. */
 #define vPCR   0x1800  /* [VIA only] Peripheral control register. */
                         /*            CHRP sez never ever to *write* this.
                         *            Mac family says never to *change* this.
index 50db3591ca15194c629a9aa3030122b6eb74946b..c2a1c5eac1a636367b0b59437fe478ae2d4a0aca 100644 (file)
@@ -14,7 +14,7 @@ extern void mac_init_IRQ(void);
 extern int mac_irq_pending(unsigned int);
 
 /*
- *     Floppy driver magic hook - probably shouldnt be here
+ *     Floppy driver magic hook - probably shouldn't be here
  */
 
 extern void via1_set_head(int);
index 92b276fe8240a790f2ef43c8c364b3be32747c24..351c272378745bfdfa47113afb04da4a67895eea 100644 (file)
@@ -27,7 +27,7 @@
 
 /*
  *     Bit definitions for the Timer Mode Register (TMR).
- *     Register bit flags are common accross ColdFires.
+ *     Register bit flags are common across ColdFires.
  */
 #define        MCFTIMER_TMR_PREMASK    0xff00          /* Prescalar mask */
 #define        MCFTIMER_TMR_DISCE      0x0000          /* Disable capture */
index 26d851d385bb190a81f271f49fe89c74778e3c06..29e17907d9f2c2af079df6e5b8e0b032de792562 100644 (file)
 #define __NR_fanotify_init     337
 #define __NR_fanotify_mark     338
 #define __NR_prlimit64         339
+#define __NR_name_to_handle_at 340
+#define __NR_open_by_handle_at 341
+#define __NR_clock_adjtime     342
+#define __NR_syncfs            343
 
 #ifdef __KERNEL__
 
-#define NR_syscalls            340
+#define NR_syscalls            344
 
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
index 1559dea36e5581f62bf2d8b4b1fe6c6da37308f4..1359ee659574135d440deea4495728c1cbb872d2 100644 (file)
@@ -750,4 +750,8 @@ sys_call_table:
        .long sys_fanotify_init
        .long sys_fanotify_mark
        .long sys_prlimit64
+       .long sys_name_to_handle_at     /* 340 */
+       .long sys_open_by_handle_at
+       .long sys_clock_adjtime
+       .long sys_syncfs
 
index ef54128baa0b66cac9017df92ac9eb64f51d27de..27622b3273c1b1b9d54567435c4996f7a6580e8e 100644 (file)
  *     Thanks to a small helping routine enabling the mmu got quite simple
  * and there is only one way left. mmu_engage makes a complete a new mapping
  * that only includes the absolute necessary to be able to jump to the final
- * postion and to restore the original mapping.
+ * position and to restore the original mapping.
  * As this code doesn't need a transparent translation register anymore this
  * means all registers are free to be used by machines that needs them for
  * other purposes.
@@ -969,7 +969,7 @@ L(mmu_init_amiga):
        is_not_040_or_060(1f)
 
        /*
-        * 040: Map the 16Meg range physical 0x0 upto logical 0x8000.0000
+        * 040: Map the 16Meg range physical 0x0 up to logical 0x8000.0000
         */
        mmu_map         #0x80000000,#0,#0x01000000,#_PAGE_NOCACHE_S
        /*
@@ -982,7 +982,7 @@ L(mmu_init_amiga):
 
 1:
        /*
-        * 030: Map the 32Meg range physical 0x0 upto logical 0x8000.0000
+        * 030: Map the 32Meg range physical 0x0 up to logical 0x8000.0000
         */
        mmu_map         #0x80000000,#0,#0x02000000,#_PAGE_NOCACHE030
        mmu_map_tt      #1,#0x40000000,#0x20000000,#_PAGE_NOCACHE030
@@ -1074,7 +1074,7 @@ L(notq40):
        is_040(1f)
 
        /*
-        * 030: Map the 32Meg range physical 0x0 upto logical 0xf000.0000
+        * 030: Map the 32Meg range physical 0x0 up to logical 0xf000.0000
         */
        mmu_map #0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030
 
@@ -1082,7 +1082,7 @@ L(notq40):
 
 1:
        /*
-        * 040: Map the 16Meg range physical 0x0 upto logical 0xf000.0000
+        * 040: Map the 16Meg range physical 0x0 up to logical 0xf000.0000
         */
        mmu_map #0xf0000000,#0,#0x01000000,#_PAGE_NOCACHE_S
 
@@ -3078,7 +3078,7 @@ func_start        serial_putc,%d0/%d1/%a0/%a1
        /*
         * If the loader gave us a board type then we can use that to
         * select an appropriate output routine; otherwise we just use
-        * the Bug code.  If we haev to use the Bug that means the Bug
+        * the Bug code.  If we have to use the Bug that means the Bug
         * workspace has to be valid, which means the Bug has to use
         * the SRAM, which is non-standard.
         */
index 79b1ed198c070dd40dbb3cf4f03dd6f24b79cb71..9b8393d8adb89dae4ada43f66c6d63c8670589f6 100644 (file)
@@ -358,6 +358,10 @@ ENTRY(sys_call_table)
        .long sys_fanotify_init
        .long sys_fanotify_mark
        .long sys_prlimit64
+       .long sys_name_to_handle_at     /* 340 */
+       .long sys_open_by_handle_at
+       .long sys_clock_adjtime
+       .long sys_syncfs
 
        .rept NR_syscalls-(.-sys_call_table)/4
                .long sys_ni_syscall
index 47e15ebfd893ec167e8841e8c048f150d8bac1ae..f4d715cdca0e7d5dca002943d88a8aeafa255ea3 100644 (file)
@@ -3,7 +3,7 @@
  *
  *     (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
  *
- *     This linker script is equiped to build either ROM loaded or RAM
+ *     This linker script is equipped to build either ROM loaded or RAM
  *     run kernels.
  */
 
index 02b7a03e422681032b1a62ebf45183e1ed629b21..8b3db1c587fcad15de15d585d33d66534ca4b00a 100644 (file)
@@ -300,6 +300,8 @@ void __init paging_init(void)
                zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT;
                free_area_init_node(i, zones_size,
                                    m68k_memory[i].addr >> PAGE_SHIFT, NULL);
+               if (node_present_pages(i))
+                       node_set_state(i, N_NORMAL_MEMORY);
        }
 }
 
index 418a76feb1e3aa24993187b703a3320bc8950031..71f4436ec8098c883ad65f06aa39037b85463ec1 100644 (file)
@@ -3,7 +3,7 @@
 /*
  *     linux/arch/m68knommu/platform/523x/config.c
  *
- *     Sub-architcture dependant initialization code for the Freescale
+ *     Sub-architcture dependent initialization code for the Freescale
  *     523x CPUs.
  *
  *     Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com)
index 43e6e96f087f618005d60161be489c589dc956a2..7e715dfe2819df9464ab3da83e129e06a8675eef 100644 (file)
@@ -33,7 +33,7 @@
  *
  * Note that the external interrupts are edge triggered (unlike the
  * internal interrupt sources which are level triggered). Which means
- * they also need acknowledgeing via acknowledge bits.
+ * they also need acknowledging via acknowledge bits.
  */
 struct irqmap {
        unsigned char   icr;
index fa359593b613d002306aeb6ac7df76f5caa4ba4c..3ebc769cefda9f44ffadd4ce08eae0b8eb593ab9 100644 (file)
@@ -3,7 +3,7 @@
 /*
  *     linux/arch/m68knommu/platform/527x/config.c
  *
- *     Sub-architcture dependant initialization code for the Freescale
+ *     Sub-architcture dependent initialization code for the Freescale
  *     5270/5271 CPUs.
  *
  *     Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com)
index ac39fc661219092a354643e577f69efc29d00b1e..7abe77a2f3e3c2b8f42264dd99824b2e9d9b4d71 100644 (file)
@@ -3,7 +3,7 @@
 /*
  *     linux/arch/m68knommu/platform/528x/config.c
  *
- *     Sub-architcture dependant initialization code for the Freescale
+ *     Sub-architcture dependent initialization code for the Freescale
  *     5280, 5281 and 5282 CPUs.
  *
  *     Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com)
index 235d3c4f4f0f9f5b9fcfb0a1f3b8a1322e6c5e8d..71beeaf0c5c4663210d8f0dab0a7b4c449187a3b 100644 (file)
@@ -1,7 +1,7 @@
 /***************************************************************************/
 
 /*
- *     cache.c -- general ColdFire Cache maintainence code
+ *     cache.c -- general ColdFire Cache maintenance code
  *
  *     Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com)
  */
index 5837cf080b6d7064d39c4553ccbcfa3a1cbdb34c..eab63f09965b0593db1bfb67a08dbd12db21562b 100644 (file)
@@ -163,7 +163,7 @@ Lsignal_return:
 
 /*
  * This is the generic interrupt handler (for all hardware interrupt
- * sources). Calls upto high level code to do all the work.
+ * sources). Calls up to high level code to do all the work.
  */
 ENTRY(inthandler)
        SAVE_ALL
index 129bff4956b56fb3af5000b4e091b23a1f431d3e..6ae91a4991842466a3d86ae47cde14b6c2d31db1 100644 (file)
@@ -20,7 +20,7 @@
 
 /*
  *     If we don't have a fixed memory size, then lets build in code
- *     to auto detect the DRAM size. Obviously this is the prefered
+ *     to auto detect the DRAM size. Obviously this is the preferred
  *     method, and should work for most boards. It won't work for those
  *     that do not have their RAM starting at address 0, and it only
  *     works on SDRAM (not boards fitted with SRAM).
index c28a6ed6cb234b4e3d3f20e419d915e5920817f8..0bbb414856eb14c879cc1e3d847ebf4658caad92 100644 (file)
@@ -37,7 +37,7 @@ unsigned char mcf_irq2imr[NR_IRQS];
 /*
  * In the early version 2 core ColdFire parts the IMR register was 16 bits
  * in size. Version 3 (and later version 2) core parts have a 32 bit
- * sized IMR register. Provide some size independant methods to access the
+ * sized IMR register. Provide some size independent methods to access the
  * IMR register.
  */
 #ifdef MCFSIM_IMR_IS_16BITS
index 0a1b937c3e184a9c19b814f5fd1735e78014d3a5..6a85daf9a7fd5a2b3dfc7ed9cde4a487cc92500d 100644 (file)
@@ -106,7 +106,7 @@ static cycle_t mcfslt_read_clk(struct clocksource *cs)
        cycles = mcfslt_cnt;
        local_irq_restore(flags);
 
-       /* substract because slice timers count down */
+       /* subtract because slice timers count down */
        return cycles - scnt;
 }
 
index f877b72497903de2a5b6e62e53b869de5965b3ab..b26d5f55e91dc49beceb51623849845dd6ad7c18 100644 (file)
@@ -89,7 +89,7 @@ The main interrupt register IIRQ_REG will indicate whether an IRQ was internal
 or from some ISA devices, EIRQ_REG can distinguish up to 8 ISA IRQs.
 
 The Q40 custom chip is programmable to provide 2 periodic timers:
-       - 50 or 200 Hz - level 2, !!THIS CANT BE DISABLED!!
+       - 50 or 200 Hz - level 2, !!THIS CAN'T BE DISABLED!!
        - 10 or 20 KHz - level 4, used for dma-sound
 
 Linux uses the 200 Hz interrupt for timer and beep by default.
index 851b3bf6e962eb3b6e95d5459645f5dfc4ea80b6..eccdefe70d4e4ba1b4874df00228faff583e948b 100644 (file)
@@ -6,7 +6,6 @@ config MICROBLAZE
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FTRACE_MCOUNT_RECORD
-       select USB_ARCH_HAS_EHCI
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select HAVE_OPROFILE
        select HAVE_ARCH_KGDB
index 6f432e6df9afc405276514a8806fb10b0d4abeae..b23c40eb7a52151a08e61ed1eaafdb462b21403e 100644 (file)
@@ -18,7 +18,7 @@ export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV
 # rather than bools y/n
 
 # Work out HW multipler support. This is tricky.
-# 1. Spartan2 has no HW multiplers.
+# 1. Spartan2 has no HW multipliers.
 # 2. MicroBlaze v3.x always uses them, except in Spartan 2
 # 3. All other FPGa/CPU ver combos, we can trust the CONFIG_ settings
 ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY)))
index eae32220f44782d089a6a5bd1d0ca687442f49de..8cdac14b55b071b4b6889bed5be83bc58d406266 100644 (file)
@@ -70,7 +70,7 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr)
 
 /*
  * read (readb, readw, readl, readq) and write (writeb, writew,
- * writel, writeq) accessors are for PCI and thus littel endian.
+ * writel, writeq) accessors are for PCI and thus little endian.
  * Linux 2.4 for Microblaze had this wrong.
  */
 static inline unsigned char readb(const volatile void __iomem *addr)
index 10717669e0c2eca271a67ee032532d8ee0311e20..746df91e57967822754597c9a939f2abba38236a 100644 (file)
@@ -76,7 +76,7 @@ struct pci_controller {
         * Used for variants of PCI indirect handling and possible quirks:
         *  SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1
         *  EXT_REG - provides access to PCI-e extended registers
-        *  SURPRESS_PRIMARY_BUS - we surpress the setting of PCI_PRIMARY_BUS
+        *  SURPRESS_PRIMARY_BUS - we suppress the setting of PCI_PRIMARY_BUS
         *   on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS
         *   to determine which bus number to match on when generating type0
         *   config cycles
index 2232ff942ba9e58b2b0d657d3e92260cc9875fe8..ba65cf472544683499f19633a24ff019473131b3 100644 (file)
@@ -158,7 +158,7 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
 extern void pcibios_setup_bus_devices(struct pci_bus *bus);
 extern void pcibios_setup_bus_self(struct pci_bus *bus);
 
-/* This part of code was originaly in xilinx-pci.h */
+/* This part of code was originally in xilinx-pci.h */
 #ifdef CONFIG_PCI_XILINX
 extern void __init xilinx_pci_init(void);
 #else
index d770b00ec6b1d6137699298cc36580912995b63a..30edd61a6b8fe4d5bbd0a52c9dc687e1f5901896 100644 (file)
 #define __NR_fanotify_init     368
 #define __NR_fanotify_mark     369
 #define __NR_prlimit64         370
+#define __NR_name_to_handle_at 371
+#define __NR_open_by_handle_at 372
+#define __NR_clock_adjtime     373
+#define __NR_syncfs            374
 
-#define __NR_syscalls          371
+#define __NR_syscalls          375
 
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
index f0cb5c26c81c2567d10646d596a9e864ee88b632..494b63b72dd7c9ae1879945de3fa398229d5c88b 100644 (file)
@@ -10,6 +10,7 @@ CFLAGS_REMOVE_early_printk.o = -pg
 CFLAGS_REMOVE_selfmod.o = -pg
 CFLAGS_REMOVE_heartbeat.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
+CFLAGS_REMOVE_process.o = -pg
 endif
 
 extra-y := head.o vmlinux.lds
index cf0afd90a2c06071638cec3a78f315dfb1ee2172..4b7d8a3f4aef453570a1a0b9aea6c02122ecb0ed 100644 (file)
@@ -129,7 +129,7 @@ do {                                                                        \
  * to use for simple wdc or wic.
  *
  * start address is cache aligned
- * end address is not aligned, if end is aligned then I have to substract
+ * end address is not aligned, if end is aligned then I have to subtract
  * cacheline length because I can't flush/invalidate the next cacheline.
  * If is not, I align it because I will flush/invalidate whole line.
  */
index 515feb404555c6a3b690cea1e80024040691c043..357d56abe24ae7e212816b3c4d9a14ef0323617e 100644 (file)
@@ -51,6 +51,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
                        : "r" (parent), "r" (return_hooker)
        );
 
+       flush_dcache_range((u32)parent, (u32)parent + 4);
+       flush_icache_range((u32)parent, (u32)parent + 4);
+
        if (unlikely(faulted)) {
                ftrace_graph_stop();
                WARN_ON(1);
@@ -95,6 +98,9 @@ static int ftrace_modify_code(unsigned long addr, unsigned int value)
        if (unlikely(faulted))
                return -EFAULT;
 
+       flush_dcache_range(addr, addr + 4);
+       flush_icache_range(addr, addr + 4);
+
        return 0;
 }
 
@@ -195,8 +201,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
        ret += ftrace_modify_code((unsigned long)&ftrace_caller,
                                  MICROBLAZE_NOP);
 
-       /* All changes are done - lets do caches consistent */
-       flush_icache();
        return ret;
 }
 
@@ -210,7 +214,6 @@ int ftrace_enable_ftrace_graph_caller(void)
 
        old_jump = *(unsigned int *)ip; /* save jump over instruction */
        ret = ftrace_modify_code(ip, MICROBLAZE_NOP);
-       flush_icache();
 
        pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump);
        return ret;
@@ -222,7 +225,6 @@ int ftrace_disable_ftrace_graph_caller(void)
        unsigned long ip = (unsigned long)(&ftrace_call_graph);
 
        ret = ftrace_modify_code(ip, old_jump);
-       flush_icache();
 
        pr_debug("%s\n", __func__);
        return ret;
index 5ba7e162833b61f653671c9d7b2861ea524c69f6..c88f066f41bda9bfc0e9a323fb15b8a279c75e5f 100644 (file)
@@ -158,11 +158,11 @@ void __init init_IRQ(void)
        for (i = 0; i < nr_irq; ++i) {
                if (intr_type & (0x00000001 << i)) {
                        irq_set_chip_and_handler_name(i, &intc_dev,
-                               handle_edge_irq, intc_dev.name);
+                               handle_edge_irq, "edge");
                        irq_clear_status_flags(i, IRQ_LEVEL);
                } else {
                        irq_set_chip_and_handler_name(i, &intc_dev,
-                               handle_level_irq, intc_dev.name);
+                               handle_level_irq, "level");
                        irq_set_status_flags(i, IRQ_LEVEL);
                }
        }
index e88a930fd1e393cad4847035918098072adb1d36..85cea81d1ca15c35cab526a104d71c5fa65b16d1 100644 (file)
@@ -375,3 +375,7 @@ ENTRY(sys_call_table)
        .long sys_fanotify_init
        .long sys_fanotify_mark
        .long sys_prlimit64     /* 370 */
+       .long sys_name_to_handle_at
+       .long sys_open_by_handle_at
+       .long sys_clock_adjtime
+       .long sys_syncfs
index f1fcbff3da257af9569d577c97b6aabbb8fc94dc..10c320aa908b2325963264271c3673175feb931f 100644 (file)
@@ -2,6 +2,12 @@
 # Makefile
 #
 
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_ashldi3.o = -pg
+CFLAGS_REMOVE_ashrdi3.o = -pg
+CFLAGS_REMOVE_lshrdi3.o = -pg
+endif
+
 lib-y :=  memset.o
 
 ifeq ($(CONFIG_OPT_LIB_ASM),y)
index cc495d7d99cc7ab142c5d9a9c950982e28d52b30..52746e718dfa2c0e1f40e7954446e503ddb59952 100644 (file)
@@ -63,8 +63,8 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c)
        if (likely(c >= 4)) {
                unsigned  value, buf_hold;
 
-               /* Align the dstination to a word boundry. */
-               /* This is done in an endian independant manner. */
+               /* Align the destination to a word boundary. */
+               /* This is done in an endian independent manner. */
                switch ((unsigned long)dst & 3) {
                case 1:
                        *dst++ = *src++;
@@ -80,7 +80,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c)
                i_dst = (void *)dst;
 
                /* Choose a copy scheme based on the source */
-               /* alignment relative to dstination. */
+               /* alignment relative to destination. */
                switch ((unsigned long)src & 3) {
                case 0x0:       /* Both byte offsets are aligned */
                        i_src  = (const void *)src;
@@ -173,7 +173,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c)
        }
 
        /* Finish off any remaining bytes */
-       /* simple fast copy, ... unless a cache boundry is crossed */
+       /* simple fast copy, ... unless a cache boundary is crossed */
        switch (c) {
        case 3:
                *dst++ = *src++;
index 810fd68775e3e5abc323ab3d3c939b3e770524f4..2146c3752a80bc01dcffd4a00554f9d5d20be1d9 100644 (file)
@@ -83,8 +83,8 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c)
        if (c >= 4) {
                unsigned  value, buf_hold;
 
-               /* Align the destination to a word boundry. */
-               /* This is done in an endian independant manner. */
+               /* Align the destination to a word boundary. */
+               /* This is done in an endian independent manner. */
 
                switch ((unsigned long)dst & 3) {
                case 3:
@@ -193,7 +193,7 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c)
                dst = (void *)i_dst;
        }
 
-       /* simple fast copy, ... unless a cache boundry is crossed */
+       /* simple fast copy, ... unless a cache boundary is crossed */
        /* Finish off any remaining bytes */
        switch (c) {
        case 4:
index 834565d1607e8670cd1c6fb9e21499d224f1fb1e..ddf67939576dd1358254cdcbc81d0c417b6c4294 100644 (file)
@@ -64,7 +64,7 @@ void *memset(void *v_src, int c, __kernel_size_t n)
 
        if (likely(n >= 4)) {
                /* Align the destination to a word boundary */
-               /* This is done in an endian independant manner */
+               /* This is done in an endian independent manner */
                switch ((unsigned) src & 3) {
                case 1:
                        *src++ = c;
index 25f18f017f212754a6f43e423a647c7629007464..4196eb6bd7648af78e5ba0dce4f9fa8d17187314 100644 (file)
@@ -108,7 +108,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
                out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) |
                         (devfn << 8) | reg | cfg_type));
 
-       /* surpress setting of PCI_PRIMARY_BUS */
+       /* suppress setting of PCI_PRIMARY_BUS */
        if (hose->indirect_type & INDIRECT_TYPE_SURPRESS_PRIMARY_BUS)
                if ((offset == PCI_PRIMARY_BUS) &&
                        (bus->number == hose->first_busno))
index 5d86fc19029d412ed068ecff73c4010dde9841d0..25a6f019e94d5d9a1c884dfef9e906435685f980 100644 (file)
@@ -29,7 +29,7 @@ config KERNEL_BASE_ADDR
          BASE Address for kernel
 
 config XILINX_MICROBLAZE0_FAMILY
-       string "Targetted FPGA family"
+       string "Targeted FPGA family"
        default "virtex5"
 
 config XILINX_MICROBLAZE0_USE_MSR_INSTR
index 83aa5fb8e8f147e8f956ef462b22c79964ce0bd2..8e256cc5dcd9a8e18e843cc671b1f47979f0d8e8 100644 (file)
@@ -1135,7 +1135,7 @@ config CPU_LOONGSON2E
          The Loongson 2E processor implements the MIPS III instruction set
          with many extensions.
 
-         It has an internal FPGA northbridge, which is compatiable to
+         It has an internal FPGA northbridge, which is compatible to
          bonito64.
 
 config CPU_LOONGSON2F
index ac1d5b611a27d2ea08d34cf983bbef5f94f1776e..53e3514ba10e93c249d837f460fb86fbe3879f52 100644 (file)
@@ -101,7 +101,7 @@ cflags-y += -ffreestanding
 # carefully avoid to add it redundantly because gcc 3.3/3.4 complains
 # when fed the toolchain default!
 #
-# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
+# Certain gcc versions up to gcc 4.1.1 (probably 4.2-subversion as of
 # 2006-10-10 don't properly change the predefined symbols if -EB / -EL
 # are used, so we kludge that here.  A bug has been filed at
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
@@ -314,5 +314,5 @@ define archhelp
        echo '  vmlinuz.bin          - Raw binary zboot image'
        echo '  vmlinuz.srec         - SREC zboot image'
        echo
-       echo '  These will be default as apropriate for a configured platform.'
+       echo '  These will be default as appropriate for a configured platform.'
 endef
index af0fe41055af7eb421bf08fabc2959d282842f53..f38298a8b98ce6c4f33dfa071a302912b3c0cdd0 100644 (file)
@@ -75,7 +75,7 @@ void set_au1x00_uart_baud_base(unsigned long new_baud_base)
  * counter, if it exists.  If we don't have an accurate processor
  * speed, all of the peripherals that derive their clocks based on
  * this advertised speed will introduce error and sometimes not work
- * properly.  This function is futher convoluted to still allow configurations
+ * properly.  This function is further convoluted to still allow configurations
  * to do that in case they have really, really old silicon with a
  * write-only PLL register.                    -- Dan
  */
index 9afc3794ed1be742f8d7bc58a40a944bfb0a320e..c8d35684504e87860074694e876d214d6c932072 100644 (file)
@@ -75,7 +75,7 @@ const char *octeon_model_get_string_buffer(uint32_t chip_id, char *buffer)
 
        num_cores = cvmx_octeon_num_cores();
 
-       /* Make sure the non existant devices look disabled */
+       /* Make sure the non existent devices look disabled */
        switch ((chip_id >> 8) & 0xff) {
        case 6:         /* CN50XX */
        case 2:         /* CN30XX */
index cecaf62aef32c59322553983003c34dc71a98fa0..cd61d7281d9162c9e759a28772ec49ee3ef98707 100644 (file)
@@ -75,7 +75,7 @@ static int __init octeon_cf_device_init(void)
                 * zero.
                 */
 
-               /* Asume that CS1 immediately follows. */
+               /* Assume that CS1 immediately follows. */
                mio_boot_reg_cfg.u64 =
                        cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i + 1));
                region_base = mio_boot_reg_cfg.s.base << 16;
index 8b139bf4a1b5d9aaf24653eb97cc373a31cd4fb9..0707fae3f0eeaf28526cef8f7d5baa5fbb7b0b8f 100644 (file)
@@ -662,7 +662,7 @@ void __init plat_mem_setup(void)
         * some memory vectors. When SPARSEMEM is in use, it doesn't
         * verify that the size is big enough for the final
         * vectors. Making the smallest chuck 4MB seems to be enough
-        * to consistantly work.
+        * to consistently work.
         */
        mem_alloc_size = 4 << 20;
        if (mem_alloc_size > MAX_MEMORY)
index c508c00dbb641fbae39519552422491909e89bea..b7f9dd3c93c672cc67d897efd12c36c31cc914f5 100644 (file)
@@ -4,7 +4,7 @@
  * for more details.
  *
  * Copyright (C) 1996 David S. Miller (dm@sgi.com)
- * Compability with board caches, Ulf Carlsson
+ * Compatibility with board caches, Ulf Carlsson
  */
 #include <linux/kernel.h>
 #include <asm/sgialib.h>
index b9c8203688d5cd3ac8e1fc8a865f5f194fd98439..c0ead63138453c04d3b20918fbcfb1e1c02c5c3c 100644 (file)
@@ -108,7 +108,7 @@ extern int (*__pmax_close)(int);
 
 /*
  * On MIPS64 we have to call PROM functions via a helper
- * dispatcher to accomodate ABI incompatibilities.
+ * dispatcher to accommodate ABI incompatibilities.
  */
 #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \
                                 __asm__(#fun " = call_o32")
index 992d232adc8383bb95dc988fa53ec068b86bc292..c5c7c0e6064c509b92c4c965bab3264a2318beab 100644 (file)
@@ -24,7 +24,7 @@ static inline void fd_cacheflush(char * addr, long size)
  * And on Mips's the CMOS info fails also ...
  *
  * FIXME: This information should come from the ARC configuration tree
- *        or whereever a particular machine has stored this ...
+ *        or wherever a particular machine has stored this ...
  */
 #define FLOPPY0_TYPE           fd_drive_type(0)
 #define FLOPPY1_TYPE           fd_drive_type(1)
index aca05a43a97bffc0cb0260b8237150041355a3b3..77adda297ad9811b20b71e22af13d11707100044 100644 (file)
@@ -13,7 +13,7 @@
 extern atomic_t irq_err_count;
 
 /*
- * interrupt-retrigger: NOP for now. This may not be apropriate for all
+ * interrupt-retrigger: NOP for now. This may not be appropriate for all
  * machines, we'll see ...
  */
 
index 5b017f23e243d71b195cfea786c70ef389da7810..b04e4de5dd2e0a2cf39074cd82b8d67f3eb81cce 100644 (file)
@@ -242,7 +242,7 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
  * This version of ioremap ensures that the memory is marked uncachable
  * on the CPU as well as honouring existing caching rules from things like
  * the PCI bus. Note that there are other caches and buffers on many
- * busses. In paticular driver authors should read up on PCI writes
+ * busses. In particular driver authors should read up on PCI writes
  *
  * It's useful if some control registers are in such an area and
  * write combining or read caching is not desirable:
index 9ef3b0d178962e92cf4ac27efc77f564b50667df..309cbcd6909cd808b92941e53deea0e3e3a5a756 100644 (file)
@@ -174,7 +174,7 @@ __asm__(
        "mtc0   \\flags, $2, 1                                          \n"
 #elif defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU)
        /*
-        * Slow, but doesn't suffer from a relativly unlikely race
+        * Slow, but doesn't suffer from a relatively unlikely race
         * condition we're having since days 1.
         */
        "       beqz    \\flags, 1f                                     \n"
index 5325084d5c480f50410221f5310d3151e69e090b..32978d32561a035810cf4e8e90fb6516510c99c0 100644 (file)
@@ -4,7 +4,7 @@
 #define TAGVER_LEN             4       /* Length of Tag Version */
 #define TAGLAYOUT_LEN          4       /* Length of FlashLayoutVer */
 #define SIG1_LEN               20      /* Company Signature 1 Length */
-#define SIG2_LEN               14      /* Company Signature 2 Lenght */
+#define SIG2_LEN               14      /* Company Signature 2 Length */
 #define BOARDID_LEN            16      /* Length of BoardId */
 #define ENDIANFLAG_LEN         2       /* Endian Flag Length */
 #define CHIPID_LEN             6       /* Chip Id Length */
index c28ba8d840760193b697c32280c0c1cd9fcd47c2..6b6bab43d5c18537542887daaeaa799aa73adcbd 100644 (file)
@@ -26,7 +26,7 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
 }
 
 /*
- * FIXME: Do it right. For now just assume that noone lives in 20th century
+ * FIXME: Do it right. For now just assume that no one lives in 20th century
  * and no O2 user in 22th century ;-)
  */
 #define mc146818_decode_year(year) ((year) + 2000)
index 021f77ca59ec816ba606025bf81f7ca1f5992738..2a8e2bb5d53989a4311547fafb25fd2cac35bba9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * The header file of cs5536 sourth bridge.
+ * The header file of cs5536 south bridge.
  *
  * Copyright (C) 2007 Lemote, Inc.
  * Author : jlliu <liujl@lemote.com>
index 6d1ff9060e4486d049d85ee66996436c58f6bfd0..65059255dc1ea84e8da0a2fd17a6dfcc6b8b7060 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Alchemy Semi Pb1000 Referrence Board
+ * Alchemy Semi Pb1000 Reference Board
  *
  * Copyright 2001, 2008 MontaVista Software Inc.
  * Author: MontaVista Software, Inc. <source@mvista.com>
index 962eb55dc88039cd93c13f222d564063d3ab9b14..fce4332ebb7fc2ff1ea3380b059774c941bd5b72 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * AMD Alchemy Pb1200 Referrence Board
+ * AMD Alchemy Pb1200 Reference Board
  * Board Registers defines.
  *
  * ########################################################################
index fc4d766641ce180b6b9a8422ef8e05d96a367f6a..f835c88e95930616e7b02fb9e979ad944306106a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * AMD Alchemy Semi PB1550 Referrence Board
+ * AMD Alchemy Semi PB1550 Reference Board
  * Board Registers defines.
  *
  * Copyright 2004 Embedded Edge LLC.
index f76029c2406e6e33acae1edb2db73a3d0efb0344..a8e72cf1214202519971c31a7da0d17e374d0ab1 100644 (file)
@@ -48,7 +48,7 @@ static inline unsigned long virt_to_phys_from_pte(void *addr)
                                /* check for a valid page */
                                if (pte_present(pte)) {
                                        /* get the physical address the page is
-                                        * refering to */
+                                        * referring to */
                                        phys_addr = (unsigned long)
                                                page_to_phys(pte_page(pte));
                                        /* add the offset within the page */
index 4d9870975382be738893a92bcb2a68ca96fe3181..6a6f8a8f542dfb2516f4f5e3de8f13d9d810327f 100644 (file)
@@ -922,7 +922,7 @@ do {                                                                        \
 #define write_c0_config7(val)  __write_32bit_c0_register($16, 7, val)
 
 /*
- * The WatchLo register.  There may be upto 8 of them.
+ * The WatchLo register.  There may be up to 8 of them.
  */
 #define read_c0_watchlo0()     __read_ulong_c0_register($18, 0)
 #define read_c0_watchlo1()     __read_ulong_c0_register($18, 1)
@@ -942,7 +942,7 @@ do {                                                                        \
 #define write_c0_watchlo7(val) __write_ulong_c0_register($18, 7, val)
 
 /*
- * The WatchHi register.  There may be upto 8 of them.
+ * The WatchHi register.  There may be up to 8 of them.
  */
 #define read_c0_watchhi0()     __read_32bit_c0_register($19, 0)
 #define read_c0_watchhi1()     __read_32bit_c0_register($19, 1)
index f3c23a43f845140e946d6af2a386811541ebb346..4e4c3a8282d624575d39a335348bd920c29fb86d 100644 (file)
@@ -200,7 +200,7 @@ enum cvmx_chip_types_enum {
        CVMX_CHIP_TYPE_MAX,
 };
 
-/* Compatability alias for NAC38 name change, planned to be removed
+/* Compatibility alias for NAC38 name change, planned to be removed
  * from SDK 1.7 */
 #define CVMX_BOARD_TYPE_NAO38  CVMX_BOARD_TYPE_NAC38
 
index 8e708bdb43f7ada6d45c8155e2c7e0e5c8e4733d..877845b84b141588e17c23354ff0387cd9a0969c 100644 (file)
@@ -67,7 +67,7 @@ struct cvmx_bootmem_block_header {
 
 /*
  * Structure for named memory blocks.  Number of descriptors available
- * can be changed without affecting compatiblity, but name length
+ * can be changed without affecting compatibility, but name length
  * changes require a bump in the bootmem descriptor version Note: This
  * structure must be naturally 64 bit aligned, as a single memory
  * image will be used by both 32 and 64 bit programs.
index 0b32c5b118e2b907abc8d7f83ebc00afb4d24875..2c8ff9e33ec3856282a923a597e9edce65cf5913 100644 (file)
@@ -157,7 +157,7 @@ enum cvmx_l2c_tad_event {
 
 /**
  * Configure one of the four L2 Cache performance counters to capture event
- * occurences.
+ * occurrences.
  *
  * @counter:        The counter to configure. Range 0..3.
  * @event:          The type of L2 Cache event occurrence to count.
index 9d9381e2e3d890c9e82a62cd56acfee2319fb306..7e1286706d4644e8b6393bc063d157ef142e8c68 100644 (file)
@@ -151,7 +151,7 @@ enum cvmx_mips_space {
 #endif
 
 /**
- * Convert a memory pointer (void*) into a hardware compatable
+ * Convert a memory pointer (void*) into a hardware compatible
  * memory address (uint64_t). Octeon hardware widgets don't
  * understand logical addresses.
  *
index c2394f8b0fe131b896ba0898094cb25ed7c9a24d..9ce5a1e7e14ce5e965bb61af520267f70fdbdaf6 100644 (file)
@@ -7,7 +7,7 @@
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  *
  * Protected memory access.  Used for everything that might take revenge
- * by sending a DBE error like accessing possibly non-existant memory or
+ * by sending a DBE error like accessing possibly non-existent memory or
  * devices.
  */
 #ifndef _ASM_PACCESS_H
index f1f508e4f97117743e392ee8a59fe47238989f9f..be44fb0266daa12eda72132b89207d47fda4eb68 100644 (file)
@@ -262,7 +262,7 @@ typedef volatile struct bridge_s {
 } bridge_t;
 
 /*
- * Field formats for Error Command Word and Auxillary Error Command Word
+ * Field formats for Error Command Word and Auxiliary Error Command Word
  * of bridge.
  */
 typedef struct bridge_err_cmdword_s {
index 60a5a38dd5b2dfc8b2a24fe6ceff635d3dd8c56c..7d41474e54882af62d9d70b870a02581184ffd71 100644 (file)
@@ -205,7 +205,7 @@ static inline u32 blocking_read_reg32(volatile u32 *const addr)
  *   custom_read_reg32(address, tmp);  <-- Reads the address and put the value
  *                                             in the 'tmp' variable given
  *
- *     From here on out, you are (basicly) atomic, so don't do anything too
+ *     From here on out, you are (basically) atomic, so don't do anything too
  *     fancy!
  *     Also, this code may loop if the end of this block fails to write
  *     everything back safely due do the other CPU, so do NOT do anything
index ead6928fa6b822f7671ddec1859bbd217e799b88..c104f1039a691b6338eee30a89a6c5c0bebec9db 100644 (file)
@@ -337,7 +337,7 @@ unsigned long get_wchan(struct task_struct *p);
 /*
  * Return_address is a replacement for __builtin_return_address(count)
  * which on certain architectures cannot reasonably be implemented in GCC
- * (MIPS, Alpha) or is unuseable with -fomit-frame-pointer (i386).
+ * (MIPS, Alpha) or is unusable with -fomit-frame-pointer (i386).
  * Note that __builtin_return_address(x>=1) is forbidden because GCC
  * aborts compilation on some CPUs.  It's simply not possible to unwind
  * some CPU's stackframes.
index 57a971904cfe25d7573454e2ea33a0b351553f66..380347b648e2fdda38239a6a1152e73ba876bdc4 100644 (file)
@@ -17,7 +17,7 @@
 #include <asm/sgi/pi1.h>
 
 /*
- * All registers are 8-bit wide alligned on 32-bit boundary. Bad things
+ * All registers are 8-bit wide aligned on 32-bit boundary. Bad things
  * happen if you try word access them. You have been warned.
  */
 
index 591b9061fd8efb0e0a498390ce77c008e88803ae..77f7872842359a869de0466347c49a48b8fa04d3 100644 (file)
 #define G_MAC_RX_EOP_COUNTER(x)     _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER)
 
 /*
- * MAC Recieve Address Filter Exact Match Registers (Table 9-21)
+ * MAC Receive Address Filter Exact Match Registers (Table 9-21)
  * Registers: MAC_ADDR0_0 through MAC_ADDR7_0
  * Registers: MAC_ADDR0_1 through MAC_ADDR7_1
  * Registers: MAC_ADDR0_2 through MAC_ADDR7_2
 /* No bitfields */
 
 /*
- * MAC Recieve Address Filter Hash Match Registers (Table 9-22)
+ * MAC Receive Address Filter Hash Match Registers (Table 9-22)
  * Registers: MAC_HASH0_0 through MAC_HASH7_0
  * Registers: MAC_HASH0_1 through MAC_HASH7_1
  * Registers: MAC_HASH0_2 through MAC_HASH7_2
index 1ca64b4d33d96844da375d3df443246f781e564a..20ebeb875ee6250938f883598b0cbf73da4dc31b 100644 (file)
@@ -101,7 +101,7 @@ typedef struct siginfo {
 
 /*
  * si_code values
- * Again these have been choosen to be IRIX compatible.
+ * Again these have been chosen to be IRIX compatible.
  */
 #undef SI_ASYNCIO
 #undef SI_TIMER
index 09e590daca17c36b5e157c93c4cc66fa4a0d2ef2..fe02900b930d51ba3ee85cc6d7ade0743ff4885f 100644 (file)
@@ -78,7 +78,7 @@ typedef s32 klconf_off_t;
  */
 #define MAX_SLOTS_PER_NODE     (1 + 2 + 6 + 2)
 
-/* XXX if each node is guranteed to have some memory */
+/* XXX if each node is guaranteed to have some memory */
 
 #define MAX_PCI_DEVS           8
 
@@ -539,7 +539,7 @@ typedef struct klinfo_s {                  /* Generic info */
 #define KLSTRUCT_IOC3_TTY      24
 
 /* Early Access IO proms are compatible
-   only with KLSTRUCT values upto 24. */
+   only with KLSTRUCT values up to 24. */
 
 #define KLSTRUCT_FIBERCHANNEL  25
 #define KLSTRUCT_MOD_SERIAL_NUM 26
index 31c76c021bb65ed449c156aadcdbd6a24378ef25..46286d8302a791765641b2f9b71e1103734016fc 100644 (file)
@@ -622,7 +622,7 @@ typedef union h1_icrbb_u {
  */
 #define        IIO_ICRB_PROC0          0       /* Source of request is Proc 0 */
 #define        IIO_ICRB_PROC1          1       /* Source of request is Proc 1 */
-#define        IIO_ICRB_GB_REQ         2       /* Source is Guranteed BW request */
+#define        IIO_ICRB_GB_REQ         2       /* Source is Guaranteed BW request */
 #define        IIO_ICRB_IO_REQ         3       /* Source is Normal IO request  */
 
 /*
index 58730c5ce4bfd6ac47b4e62fd0ea4d4c164db60d..b4ba2449444b33101c33d4e9d7fd17b968db8466 100644 (file)
                 * we can't dispatch it directly without trashing
                 * some registers, so we'll try to detect this unlikely
                 * case and program a software interrupt in the VPE,
-                * as would be done for a cross-VPE IPI.  To accomodate
+                * as would be done for a cross-VPE IPI.  To accommodate
                 * the handling of that case, we're doing a DVPE instead
                 * of just a DMT here to protect against other threads.
                 * This is a lot of cruft to cover a tiny window.
index 22361d5e3bf00d25ee5a04ff5c6d98b879b6afd0..fa133c1bc1f962796d88ab99ff695a13a3956303 100644 (file)
 #endif
 
 /*
- * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that
+ * On the R10000 up to version 2.6 (not sure about 2.7) there is a bug that
  * may cause ll / sc and lld / scd sequences to execute non-atomically.
  */
 #ifndef R10000_LLSC_WAR
index bc18daaa8f84ea092257fa893328c75a8d08bc80..c3b04be3fb2bb4c056e2cb531b5c473d53d23c9f 100644 (file)
@@ -65,7 +65,7 @@ static struct nand_ecclayout qi_lb60_ecclayout_1gb = {
 };
 
 /* Early prototypes of the QI LB60 had only 1GB of NAND.
- * In order to support these devices aswell the partition and ecc layout is
+ * In order to support these devices as well the partition and ecc layout is
  * initialized depending on the NAND size */
 static struct mtd_partition qi_lb60_partitions_1gb[] = {
        {
@@ -439,7 +439,7 @@ static struct platform_device *jz_platform_devices[] __initdata = {
 static void __init board_gpio_setup(void)
 {
        /* We only need to enable/disable pullup here for pins used in generic
-        * drivers. Everything else is done by the drivers themselfs. */
+        * drivers. Everything else is done by the drivers themselves. */
        jz_gpio_disable_pullup(QI_LB60_GPIO_SD_VCC_EN_N);
        jz_gpio_disable_pullup(QI_LB60_GPIO_SD_CD);
 }
index b8bb8ba608696a0483a64e5b4fb14a7d82f27261..f305ca14351b77a10977a87ad5e9ec017f0e9148 100644 (file)
@@ -73,7 +73,7 @@ static inline void mult_sh_align_mod(long *v1, long *v2, long *w,
                : "0" (5), "1" (8), "2" (5));
        align_mod(align, mod);
        /*
-        * The trailing nop is needed to fullfill the two-instruction
+        * The trailing nop is needed to fulfill the two-instruction
         * requirement between reading hi/lo and staring a mult/div.
         * Leaving it out may cause gas insert a nop itself breaking
         * the desired alignment of the next chunk.
index d9a7db78ed62bd1b38bf9401eacdb3c7332ae6f2..75266ff4cc3317e332c124bce569533f15485f04 100644 (file)
@@ -721,7 +721,7 @@ static void mipsxx_pmu_start(void)
 
 /*
  * MIPS performance counters can be per-TC. The control registers can
- * not be directly accessed accross CPUs. Hence if we want to do global
+ * not be directly accessed across CPUs. Hence if we want to do global
  * control, we need cross CPU calls. on_each_cpu() can help us, but we
  * can not make sure this function is called with interrupts enabled. So
  * here we pause local counters and then grab a rwlock and leave the
index ae167df73dddf2df41a2158050c164cb4fb346d4..d2112d3cf115b85cce3bc1643e61d560673bb338 100644 (file)
@@ -410,7 +410,7 @@ unsigned long unwind_stack(struct task_struct *task, unsigned long *sp,
        if (!kallsyms_lookup_size_offset(pc, &size, &ofs))
                return 0;
        /*
-        * Return ra if an exception occured at the first instruction
+        * Return ra if an exception occurred at the first instruction
         */
        if (unlikely(ofs == 0)) {
                pc = *ra;
index c0e81418ba21281ea4f3b5cedff5e564f947c1a1..1ec56e635d04a480905d1913cd89457eef2be607 100644 (file)
@@ -120,7 +120,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
 
        local_irq_save(flags);
 
-       vpflags = dvpe();       /* cant access the other CPU's registers whilst MVPE enabled */
+       vpflags = dvpe();       /* can't access the other CPU's registers whilst MVPE enabled */
 
        switch (action) {
        case SMP_CALL_FUNCTION:
index fb749740551090577c8a7e044275640763ed5e74..1083ad4e1017be924f5a6922807971dc75853825 100644 (file)
@@ -102,7 +102,7 @@ static __init int cpu_has_mfc0_count_bug(void)
        case CPU_R4400SC:
        case CPU_R4400MC:
                /*
-                * The published errata for the R4400 upto 3.0 say the CPU
+                * The published errata for the R4400 up to 3.0 say the CPU
                 * has the mfc0 from count bug.
                 */
                if ((current_cpu_data.processor_id & 0xff) <= 0x30)
index ab52b7cf3b6bcc007cfda63bce5c028be665bbfa..dbb6b408f00151972605313c4bfbeaa42bf19bb6 100644 (file)
@@ -19,7 +19,7 @@
  * VPE support module
  *
  * Provides support for loading a MIPS SP program on VPE1.
- * The SP enviroment is rather simple, no tlb's.  It needs to be relocatable
+ * The SP environment is rather simple, no tlb's.  It needs to be relocatable
  * (or partially linked). You should initialise your stack in the startup
  * code. This loader looks for the symbol __start and sets up
  * execution to resume from there. The MIPS SDE kit contains suitable examples.
index c768e3000616eba1959299a0ea04e8286fac5984..64457162f7e0c1a564fd19140d3ce88d9f7ae121 100644 (file)
@@ -17,7 +17,7 @@
        .previous
 
 /*
- * Return the size of a string including the ending NUL character upto a
+ * Return the size of a string including the ending NUL character up to a
  * maximum of a1 or 0 in case of error.
  *
  * Note: for performance reasons we deliberately accept that a user may
index 1dfbd92ba9d0eb37d3cfa3ba63918da6b5325f34..daed6834dc153bbd543d2783a161003a699070b0 100644 (file)
@@ -62,7 +62,7 @@ ieee754dp ieee754dp_fsp(ieee754sp x)
                break;
        }
 
-       /* CANT possibly overflow,underflow, or need rounding
+       /* CAN'T possibly overflow,underflow, or need rounding
         */
 
        /* drop the hidden bit */
index aa566e785f5a138d86050247e7beb66574827437..09175f461920c0a41bbd0d29a57745feab9afd6a 100644 (file)
@@ -104,7 +104,7 @@ ieee754dp ieee754dp_mul(ieee754dp x, ieee754dp y)
        case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM):
                break;
        }
-       /* rm = xm * ym, re = xe+ye basicly */
+       /* rm = xm * ym, re = xe+ye basically */
        assert(xm & DP_HIDDEN_BIT);
        assert(ym & DP_HIDDEN_BIT);
        {
index 36d975ae08f8d6677324c7fa7dfc4ea990cce019..3c4a8c5ba7f2d3c95809e034d5a6ea45eb6a4f4e 100644 (file)
@@ -32,7 +32,7 @@
  * not change cp0_epc due to the instruction
  *
  * According to the spec:
- * 1) it shouldnt be a branch :-)
+ * 1) it shouldn't be a branch :-)
  * 2) it can be a COP instruction :-(
  * 3) if we are tring to run a protected memory space we must take
  *    special care on memory access instructions :-(
index c06bb4022be5d742878f29159d5a7ee7e878f227..2722a2570ea4f7b4e4952163a47977563994a0f1 100644 (file)
@@ -104,7 +104,7 @@ ieee754sp ieee754sp_mul(ieee754sp x, ieee754sp y)
        case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM):
                break;
        }
-       /* rm = xm * ym, re = xe+ye basicly */
+       /* rm = xm * ym, re = xe+ye basically */
        assert(xm & SP_HIDDEN_BIT);
        assert(ym & SP_HIDDEN_BIT);
 
index 2d08268bb705f19f29c2a708f5a25a8f6d571369..89c412bc4b640ee3ce7418d80a6f559be5e9f53e 100644 (file)
@@ -79,7 +79,7 @@ LEAF(except_vec2_sb1)
 recovered_dcache:
        /*
         * Unlock CacheErr-D (which in turn unlocks CacheErr-DPA).
-        * Ought to log the occurence of this recovered dcache error.
+        * Ought to log the occurrence of this recovered dcache error.
         */
        b       recovered
         mtc0   $0,C0_CERR_D
index 04f9e17db9d0dfbadda95b9f9751c798667529a6..5ef294fbb6e7e118684c3913183cbcfb089dd0aa 100644 (file)
@@ -352,7 +352,7 @@ static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p)
 
 /*
  * Write random or indexed TLB entry, and care about the hazards from
- * the preceeding mtc0 and for the following eret.
+ * the preceding mtc0 and for the following eret.
  */
 enum tlb_write_entry { tlb_random, tlb_indexed };
 
index e67891521ac1ffe801a17dfc57485f4fd900a586..49a38b09a4883513a22c7a328488cd306ef7f1ad 100644 (file)
@@ -130,7 +130,7 @@ int plat_set_irq_affinity(struct irq_data *d, const struct cpumask *affinity,
         * cleared in the affinity mask, there will never be any
         * interrupt forwarding.  But as soon as a program or operator
         * sets affinity for one of the related IRQs, we need to make
-        * sure that we don't ever try to forward across the VPE boundry,
+        * sure that we don't ever try to forward across the VPE boundary,
         * at least not until we engineer a system where the interrupt
         * _ack() or _end() function can somehow know that it corresponds
         * to an interrupt taken on another VPE, and perform the appropriate
index 68798f869c0f7dda2236988ac517949c25c60bc8..8fbfbf2b931c66134491b48c57beb8a1481a05a2 100644 (file)
@@ -344,7 +344,7 @@ static irqreturn_t bpci_interrupt(int irq, void *dev_id)
  *                              PCI_ACCESS_WRITE and PCI_ACCESS_READ.
  *
  *               bus          - pointer to the bus number of the device to
- *                              be targetted for the configuration cycle.
+ *                              be targeted for the configuration cycle.
  *                              The only element of the pci_bus structure
  *                              used is bus->number. This argument determines
  *                              if the configuration access will be Type 0 or
@@ -354,7 +354,7 @@ static irqreturn_t bpci_interrupt(int irq, void *dev_id)
  *
  *               devfn        - this is an 8-bit field. The lower three bits
  *                              specify the function number of the device to
- *                              be targetted for the configuration cycle, with
+ *                              be targeted for the configuration cycle, with
  *                              all three-bit combinations being legal. The
  *                              upper five bits specify the device number,
  *                              with legal values being 10 to 31.
index 6f5e24c6ae67261188c76dcba648033307415e08..af8c319969656e9e77e7337b48b28d9f4c82b56c 100644 (file)
@@ -210,7 +210,7 @@ static int __init bcm1480_pcibios_init(void)
        PCIBIOS_MIN_IO = 0x00008000UL;
        PCIBIOS_MIN_MEM = 0x01000000UL;
 
-       /* Set I/O resource limits. - unlimited for now to accomodate HT */
+       /* Set I/O resource limits. - unlimited for now to accommodate HT */
        ioport_resource.end = 0xffffffffUL;
        iomem_resource.end = 0xffffffffUL;
 
index 2d74fc9ae3bae7c4bfb430639b6bf817a6789607..ed1c54284b8f27feb9966c7fea4b55c77d5997de 100644 (file)
@@ -441,7 +441,7 @@ static void octeon_pci_initialize(void)
 
        /*
         * TDOMC must be set to one in PCI mode. TDOMC should be set to 4
-        * in PCI-X mode to allow four oustanding splits. Otherwise,
+        * in PCI-X mode to allow four outstanding splits. Otherwise,
         * should not change from its reset value. Don't write PCI_CFG19
         * in PCI mode (0x82000001 reset value), write it to 0x82000004
         * after PCI-X mode is known. MRBCI,MDWE,MDRE -> must be zero.
@@ -515,7 +515,7 @@ static void octeon_pci_initialize(void)
 #endif /* USE_OCTEON_INTERNAL_ARBITER */
 
        /*
-        * Preferrably written to 1 to set MLTD. [RDSATI,TRTAE,
+        * Preferably written to 1 to set MLTD. [RDSATI,TRTAE,
         * TWTAE,TMAE,DPPMR -> must be zero. TILT -> must not be set to
         * 1..7.
         */
index 38bc28005b4a47f7166af021b35d619234df7519..33bba7bff25840dd8e034083239dc4c49839f1c5 100644 (file)
@@ -125,7 +125,7 @@ void __devinit register_pci_controller(struct pci_controller *hose)
        hose_tail = &hose->next;
 
        /*
-        * Do not panic here but later - this might hapen before console init.
+        * Do not panic here but later - this might happen before console init.
         */
        if (!hose->io_map_base) {
                printk(KERN_WARNING
index fb37a10e0309b033c32a260bcfedc2937c6568c5..2413ea67877ede061a3874008e9604552e337c15 100644 (file)
@@ -239,7 +239,7 @@ void __init prom_init(void)
 #ifdef CONFIG_PMCTWILED
        /*
         * Setup LED states before the subsys_initcall loads other
-        * dependant drivers/modules.
+        * dependent drivers/modules.
         */
        pmctwiled_setup();
 #endif
index ce45df17fd097d949c6ed7cccac487689f0e97d0..87167dcc79fa24bf694a9e2d7bc69890a4eab2ef 100644 (file)
@@ -165,7 +165,7 @@ static struct i2c_pnx0105_dev pnx833x_i2c_dev[] = {
        {
                .base = PNX833X_I2C0_PORTS_START,
                .irq = -1, /* should be PNX833X_PIC_I2C0_INT but polling is faster */
-               .clock = 6,     /* 0 == 400 kHz, 4 == 100 kHz(Maximum HDMI), 6 = 50kHz(Prefered HDCP) */
+               .clock = 6,     /* 0 == 400 kHz, 4 == 100 kHz(Maximum HDMI), 6 = 50kHz(Preferred HDCP) */
                .bus_addr = 0,  /* no slave support */
        },
        {
index 5e960ae9735afcea622e4e848a1a13645cfd329c..bc5e9769bb73fa2de796b0f67ad5647637ea0f66 100644 (file)
@@ -1,7 +1,7 @@
 #config SGI_SN0_XXL
 #      bool "IP27 XXL"
 #      depends on SGI_IP27
-#        This options adds support for userspace processes upto 16TB size.
+#        This options adds support for userspace processes up to 16TB size.
 #        Normally the limit is just .5TB.
 
 choice
index 19f1512c8f2e3934a649d48d80e0630f93e96a48..160857ff1483236fa7c547ac46fec4da70f473f7 100644 (file)
@@ -13,7 +13,7 @@ being invoked on all nodes in ip27-memory.c.
 9. start_thread must turn off UX64 ... and define tlb_refill_debug.
 10. Need a bad pmd table, bad pte table. __bad_pmd_table/__bad_pagetable
 does not agree with pgd_bad/pmd_bad.
-11. All intrs (ip27_do_irq handlers) are targetted at cpu A on the node.
+11. All intrs (ip27_do_irq handlers) are targeted at cpu A on the node.
 This might need to change later. Only the timer intr is set up to be
 received on both Cpu A and B. (ip27_do_irq()/bridge_startup())
 13. Cache flushing (specially the SMP version) has to be investigated.
index 51d3a4f2d7e1bed2df4a85071b4b435399ff9f9d..923c080f77bdf7ef9452cf3063e334cf196010b7 100644 (file)
@@ -93,7 +93,7 @@ static void __cpuinit per_hub_init(cnodeid_t cnode)
 
        /*
         * Some interrupts are reserved by hardware or by software convention.
-        * Mark these as reserved right away so they won't be used accidently
+        * Mark these as reserved right away so they won't be used accidentally
         * later.
         */
        for (i = 0; i <= BASE_PCI_IRQ; i++) {
index 11488719dd9747d491765e262956ff9f770d23b0..0a04603d577c840f6e70c8a9876987535054150d 100644 (file)
@@ -41,7 +41,7 @@
  * Linux has a controller-independent x86 interrupt architecture.
  * every controller has a 'controller-template', that is used
  * by the main code to do the right thing. Each driver-visible
- * interrupt source is transparently wired to the apropriate
+ * interrupt source is transparently wired to the appropriate
  * controller. Thus drivers need not be aware of the
  * interrupt-controller.
  *
index 90ed4a365c97cb57c0a2d071ecd1357ca453b48b..c54effae2202e83691d163aad4c42cd7cb6243f0 100644 (file)
@@ -49,7 +49,7 @@ asm(" .am33_2\n");
 #define EPSW_IM_6              0x00000600      /* interrupt mode 6 */
 #define EPSW_IM_7              0x00000700      /* interrupt mode 7 */
 #define EPSW_IE                        0x00000800      /* interrupt enable */
-#define EPSW_S                 0x00003000      /* software auxilliary bits */
+#define EPSW_S                 0x00003000      /* software auxiliary bits */
 #define EPSW_T                 0x00008000      /* trace enable */
 #define EPSW_nSL               0x00010000      /* not supervisor level */
 #define EPSW_NMID              0x00020000      /* nonmaskable interrupt disable */
index 9c9da980402a11c69982a9f5b616e784ac99bd2b..8ce8b85ca588411c469ebb4527db83bfe0a48f35 100644 (file)
@@ -27,7 +27,7 @@ struct eeprom_header
        u_int8_t  ver_maj;
        u_int8_t  ver_min;
        u_int8_t  num_slots;        /* number of EISA slots in system */
-       u_int16_t csum;             /* checksum, I don't know how to calulate this */
+       u_int16_t csum;             /* checksum, I don't know how to calculate this */
        u_int8_t  pad[10];
 } __attribute__ ((packed));
 
index e5477092a5d4cde2cde30c2b11c79a6ffd58b18e..ead8d2a1034c534dfecfdea7b1748e4e73ceafe9 100644 (file)
 
        /* Register definitions for tlb miss handler macros */
 
-       va  = r8        /* virtual address for which the trap occured */
-       spc = r24       /* space for which the trap occured */
+       va  = r8        /* virtual address for which the trap occurred */
+       spc = r24       /* space for which the trap occurred */
 
 #ifndef CONFIG_64BIT
 
@@ -882,7 +882,7 @@ ENTRY(syscall_exit_rfi)
         * (we don't store them in the sigcontext), so set them
         * to "proper" values now (otherwise we'll wind up restoring
         * whatever was last stored in the task structure, which might
-        * be inconsistent if an interrupt occured while on the gateway
+        * be inconsistent if an interrupt occurred while on the gateway
         * page). Note that we may be "trashing" values the user put in
         * them, but we don't support the user changing them.
         */
@@ -1156,11 +1156,11 @@ ENDPROC(intr_save)
         */
 
        t0 = r1         /* temporary register 0 */
-       va = r8         /* virtual address for which the trap occured */
+       va = r8         /* virtual address for which the trap occurred */
        t1 = r9         /* temporary register 1 */
        pte  = r16      /* pte/phys page # */
        prot = r17      /* prot bits */
-       spc  = r24      /* space for which the trap occured */
+       spc  = r24      /* space for which the trap occurred */
        ptp = r25       /* page directory/page table pointer */
 
 #ifdef CONFIG_64BIT
index 4dbdf0ed6fa0f08b37bd4ac77e205c9d7e6af2ad..145c5e4caaa05974467e22eb1a6b87c2c0691953 100644 (file)
@@ -131,7 +131,7 @@ $pgt_fill_loop:
        ldo             THREAD_SZ_ALGN(%r6),%sp
 
 #ifdef CONFIG_SMP
-       /* Set the smp rendevous address into page zero.
+       /* Set the smp rendezvous address into page zero.
        ** It would be safer to do this in init_smp_config() but
        ** it's just way easier to deal with here because
        ** of 64-bit function ptrs and the address is local to this file.
index d228d823787991f138cea6651bbb6787701b7db5..08324aac354418e82c0a968135f31f56d3c1ddcb 100644 (file)
@@ -93,7 +93,7 @@ void __init setup_pdc(void)
        case 0x6:               /* 705, 710 */
        case 0x7:               /* 715, 725 */
        case 0x8:               /* 745, 747, 742 */
-       case 0xA:               /* 712 and similiar */
+       case 0xA:               /* 712 and similar */
        case 0xC:               /* 715/64, at least */
 
                pdc_type = PDC_TYPE_SNAKE;
index 609a331878e72e172fecc2e85c9695d2c36cad60..12c1ed33dc18b92f1bc4b0f1eaa4b5ee54b0cfc8 100644 (file)
@@ -291,7 +291,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
                DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc);
                DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext);
                err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall);
-               /* FIXME: Should probably be converted aswell for the compat case */
+               /* FIXME: Should probably be converted as well for the compat case */
                err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
        }
        
index 68e75ce838d6dd05d4101ba0dd7e707896e0612b..82a52b2fb13f296ef65726afc51b38f12e420047 100644 (file)
@@ -605,7 +605,7 @@ cas_action:
        copy    %r0, %r21
 
 3:             
-       /* Error occured on load or store */
+       /* Error occurred on load or store */
        /* Free lock */
        stw     %r20, 0(%sr2,%r20)
 #if ENABLE_LWS_DEBUG
index 74867dfdabe572c4e4758605091aa1aaf4db4881..4be85ee10b85dbdb0115f5d5bda2b2f789483abf 100644 (file)
@@ -34,7 +34,7 @@
 /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
  * narrow palinux.  Use ENTRY_DIFF for those where a 32-bit specific
  * implementation is required on wide palinux.  Use ENTRY_COMP where
- * the compatability layer has a useful 32-bit implementation.
+ * the compatibility layer has a useful 32-bit implementation.
  */
 #define ENTRY_SAME(_name_) .dword sys_##_name_
 #define ENTRY_DIFF(_name_) .dword sys32_##_name_
index e147d7d3b0f45e9131ef27de9ec79e12ef2617b3..d37e2d2cb6fe25a72af87cfad955bde28e270566 100644 (file)
@@ -303,7 +303,7 @@ dbl_fadd(
        if(Dbl_iszero_hidden(resultp1))
            {
            /* Handle normalization */
-           /* A straight foward algorithm would now shift the result
+           /* A straight forward algorithm would now shift the result
             * and extension left until the hidden bit becomes one.  Not
             * all of the extension bits need participate in the shift.
             * Only the two most significant bits (round and guard) are
index 87ebc60d465bcfa22ef72d03825b2e34b674eda8..2e8b5a79bff7c890a47b956e09db23f33271ae42 100644 (file)
@@ -306,7 +306,7 @@ dbl_fsub(
        if(Dbl_iszero_hidden(resultp1))
            {
            /* Handle normalization */
-           /* A straight foward algorithm would now shift the result
+           /* A straight forward algorithm would now shift the result
             * and extension left until the hidden bit becomes one.  Not
             * all of the extension bits need participate in the shift.
             * Only the two most significant bits (round and guard) are
index 5dd7f93a89be5b39d5a3e6fcf497f0ada9b436bc..b067c45c872d4fac64142b1784162ca3154bc78b 100644 (file)
@@ -531,7 +531,7 @@ dbl_fmpyfadd(
                sign_save = Dbl_signextendedsign(resultp1);
                if (Dbl_iszero_hidden(resultp1)) {
                        /* Handle normalization */
-               /* A straight foward algorithm would now shift the
+               /* A straightforward algorithm would now shift the
                 * result and extension left until the hidden bit
                 * becomes one.  Not all of the extension bits need
                 * participate in the shift.  Only the two most 
@@ -1191,7 +1191,7 @@ unsigned int *status;
                sign_save = Dbl_signextendedsign(resultp1);
                if (Dbl_iszero_hidden(resultp1)) {
                        /* Handle normalization */
-               /* A straight foward algorithm would now shift the
+               /* A straightforward algorithm would now shift the
                 * result and extension left until the hidden bit
                 * becomes one.  Not all of the extension bits need
                 * participate in the shift.  Only the two most 
@@ -1841,7 +1841,7 @@ unsigned int *status;
                sign_save = Sgl_signextendedsign(resultp1);
                if (Sgl_iszero_hidden(resultp1)) {
                        /* Handle normalization */
-               /* A straight foward algorithm would now shift the
+               /* A straightforward algorithm would now shift the
                 * result and extension left until the hidden bit
                 * becomes one.  Not all of the extension bits need
                 * participate in the shift.  Only the two most 
@@ -2483,7 +2483,7 @@ unsigned int *status;
                sign_save = Sgl_signextendedsign(resultp1);
                if (Sgl_iszero_hidden(resultp1)) {
                        /* Handle normalization */
-               /* A straight foward algorithm would now shift the
+               /* A straightforward algorithm would now shift the
                 * result and extension left until the hidden bit
                 * becomes one.  Not all of the extension bits need
                 * participate in the shift.  Only the two most 
index 008d721b5d2270a595f244e80c37c99532edf87b..f802cd6c7869d8e8f9e9aebe0b9e5dfd4a6007b6 100644 (file)
@@ -298,7 +298,7 @@ sgl_fadd(
        if(Sgl_iszero_hidden(result))
            {
            /* Handle normalization */
-           /* A straight foward algorithm would now shift the result
+           /* A straightforward algorithm would now shift the result
             * and extension left until the hidden bit becomes one.  Not
             * all of the extension bits need participate in the shift.
             * Only the two most significant bits (round and guard) are
index 24eef61c8e3b890249c4764839584eb0012b6c37..5f90d0f31a525157cdb56f0ba0dca2a64e1496ee 100644 (file)
@@ -301,7 +301,7 @@ sgl_fsub(
        if(Sgl_iszero_hidden(result))
            {
            /* Handle normalization */
-           /* A straight foward algorithm would now shift the result
+           /* A straightforward algorithm would now shift the result
             * and extension left until the hidden bit becomes one.  Not
             * all of the extension bits need participate in the shift.
             * Only the two most significant bits (round and guard) are
index b7ed8d7a9b33a10e784722a3fa5b8a55f7eabbcb..b1d126258dee10612054ac3bb1a472c562b37cbc 100644 (file)
@@ -266,8 +266,10 @@ static void __init setup_bootmem(void)
        }
        memset(pfnnid_map, 0xff, sizeof(pfnnid_map));
 
-       for (i = 0; i < npmem_ranges; i++)
+       for (i = 0; i < npmem_ranges; i++) {
+               node_set_state(i, N_NORMAL_MEMORY);
                node_set_online(i);
+       }
 #endif
 
        /*
index b6ff882f695bbac53e95b2f6b1a1a00a9bf97ac6..8f4d50b0adfa9ce21bf8dd68158df455ef242af3 100644 (file)
@@ -209,7 +209,7 @@ config ARCH_HIBERNATION_POSSIBLE
 config ARCH_SUSPEND_POSSIBLE
        def_bool y
        depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
-                  PPC_85xx || PPC_86xx || PPC_PSERIES || 44x || 40x
+                  (PPC_85xx && !SMP) || PPC_86xx || PPC_PSERIES || 44x || 40x
 
 config PPC_DCR_NATIVE
        bool
index 22f64b62d7f64039020013ab317da0429416f9f9..e0668f87779499775df3b9390869233a002563c1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * P1020 RDB Device Tree Source
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                reg = <0 0xffe09000 0 0x1000>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>;
+                         0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <16 2>;
                #address-cells = <3>;
                reg = <0 0xffe0a000 0 0x1000>;
                bus-range = <0 255>;
-               ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
+               ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+                         0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <16 2>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       ranges = <0x2000000 0x0 0xc0000000
-                                 0x2000000 0x0 0xc0000000
+                       ranges = <0x2000000 0x0 0x80000000
+                                 0x2000000 0x0 0x80000000
                                  0x0 0x20000000
 
                                  0x1000000 0x0 0x0
index da4cb0d8d215b9ba7865d9814617d0c4b53623d5..e2d48fd4416ef5a6b9237869fce4db4b3b991388 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * P2020 RDB Device Tree Source
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                reg = <0 0xffe09000 0 0x1000>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>;
+                         0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <25 2>;
                #address-cells = <3>;
                reg = <0 0xffe0a000 0 0x1000>;
                bus-range = <0 255>;
-               ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
+               ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+                         0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <26 2>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       ranges = <0x2000000 0x0 0xc0000000
-                                 0x2000000 0x0 0xc0000000
+                       ranges = <0x2000000 0x0 0x80000000
+                                 0x2000000 0x0 0x80000000
                                  0x0 0x20000000
 
                                  0x1000000 0x0 0x0
index 0fe93d0c8b2e853d2a33a51ab3bb8efe05dbfa97..b69c3a5dc8580706e8348d4bc4a33f8b329d9f8f 100644 (file)
@@ -6,7 +6,7 @@
  * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb,
  * eth1, eth2, sdhc, crypto, global-util, pci0.
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                reg = <0 0xffe09000 0 0x1000>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>;
+                         0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <25 2>;
index e95a51285328706c71621b0fbde402c71f2f83d2..7a31d46c01b011bdee300b3dfe713983db2fe1b9 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Please note to add "-b 1" for core1's dts compiling.
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                #address-cells = <3>;
                reg = <0 0xffe0a000 0 0x1000>;
                bus-range = <0 255>;
-               ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
+               ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+                         0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <26 2>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       ranges = <0x2000000 0x0 0xc0000000
-                                 0x2000000 0x0 0xc0000000
+                       ranges = <0x2000000 0x0 0x80000000
+                                 0x2000000 0x0 0x80000000
                                  0x0 0x20000000
 
                                  0x1000000 0x0 0x0
index 6b6dc20b0bebab9b1154e7cd5bab13ebd669c85a..bdf0563ba423886a5cde9ff2a63a47e8a3365604 100644 (file)
@@ -393,8 +393,8 @@ typedef struct fec {
        uint    fec_addr_low;           /* lower 32 bits of station address     */
        ushort  fec_addr_high;          /* upper 16 bits of station address     */
        ushort  res1;                   /* reserved                             */
-       uint    fec_hash_table_high;    /* upper 32-bits of hash table          */
-       uint    fec_hash_table_low;     /* lower 32-bits of hash table          */
+       uint    fec_grp_hash_table_high;        /* upper 32-bits of hash table          */
+       uint    fec_grp_hash_table_low; /* lower 32-bits of hash table          */
        uint    fec_r_des_start;        /* beginning of Rx descriptor ring      */
        uint    fec_x_des_start;        /* beginning of Tx descriptor ring      */
        uint    fec_r_buff_size;        /* Rx buffer size                       */
index 2e561876fc899166d0c411cb77ae2f7f899eb096..f18c6d9b9510aad8049fe0fb791bc5c9931a7499 100644 (file)
@@ -209,8 +209,8 @@ static __inline__ unsigned long ffz(unsigned long x)
                return BITS_PER_LONG;
 
        /*
-        * Calculate the bit position of the least signficant '1' bit in x
-        * (since x has been changed this will actually be the least signficant
+        * Calculate the bit position of the least significant '1' bit in x
+        * (since x has been changed this will actually be the least significant
         * '0' bit in * the original x).  Note: (x & -x) gives us a mask that
         * is the least significant * (RIGHT-most) 1-bit of the value in x.
         */
index 2296112e247befe8050526420f6fa8db2a42d693..91010e8f8479a13fbdf18860d8108d4ac4345379 100644 (file)
@@ -140,7 +140,7 @@ static inline void __user *arch_compat_alloc_user_space(long len)
        unsigned long usp = regs->gpr[1];
 
        /*
-        * We cant access below the stack pointer in the 32bit ABI and
+        * We can't access below the stack pointer in the 32bit ABI and
         * can access 288 bytes in the 64bit ABI
         */
        if (!is_32bit_task())
index e50323fe941f96d92e68ce246dad172fa58507c3..4398a6cdcf53cb886527c263c6c13c10accda195 100644 (file)
@@ -98,7 +98,7 @@ typedef struct cpm_buf_desc {
 #define BD_SC_INTRPT   (0x1000)        /* Interrupt on change */
 #define BD_SC_LAST     (0x0800)        /* Last buffer in frame */
 #define BD_SC_TC       (0x0400)        /* Transmit CRC */
-#define BD_SC_CM       (0x0200)        /* Continous mode */
+#define BD_SC_CM       (0x0200)        /* Continuous mode */
 #define BD_SC_ID       (0x0100)        /* Rec'd too many idles */
 #define BD_SC_P                (0x0100)        /* xmt preamble */
 #define BD_SC_BR       (0x0020)        /* Break received */
index bd07650dca56b0489b5518ccaaaa6eaf5f6de73a..8ee4211ca0c6fb107cbf693c05fac5a987532822 100644 (file)
@@ -4,7 +4,7 @@
  *
  * This file contains structures and information for the communication
  * processor channels.  Some CPM control and status is available
- * throught the MPC8xx internal memory map.  See immap.h for details.
+ * through the MPC8xx internal memory map.  See immap.h for details.
  * This file only contains what I need for the moment, not the total
  * CPM capabilities.  I (or someone else) will add definitions as they
  * are needed.  -- Dan
index be3cdf9134ce8727b9a7787250fb6ba3dfdb8e44..1833d1a07e797eab6c9f174585b42e456d19f559 100644 (file)
@@ -382,10 +382,12 @@ extern const char *powerpc_base_platform;
 #define CPU_FTRS_E500_2        (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \
            CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | \
            CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
-#define CPU_FTRS_E500MC        (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \
-           CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN | \
+#define CPU_FTRS_E500MC        (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \
            CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \
            CPU_FTR_DBELL)
+#define CPU_FTRS_E5500 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \
+           CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \
+           CPU_FTR_DBELL | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD)
 #define CPU_FTRS_GENERIC_32    (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN)
 
 /* 64-bit CPUs */
@@ -435,11 +437,15 @@ extern const char *powerpc_base_platform;
 #define CPU_FTRS_COMPATIBLE    (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2)
 
 #ifdef __powerpc64__
+#ifdef CONFIG_PPC_BOOK3E
+#define CPU_FTRS_POSSIBLE      (CPU_FTRS_E5500)
+#else
 #define CPU_FTRS_POSSIBLE      \
            (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 |        \
            CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 |       \
            CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T |           \
            CPU_FTR_1T_SEGMENT | CPU_FTR_VSX)
+#endif
 #else
 enum {
        CPU_FTRS_POSSIBLE =
@@ -473,16 +479,21 @@ enum {
 #endif
 #ifdef CONFIG_E500
            CPU_FTRS_E500 | CPU_FTRS_E500_2 | CPU_FTRS_E500MC |
+           CPU_FTRS_E5500 |
 #endif
            0,
 };
 #endif /* __powerpc64__ */
 
 #ifdef __powerpc64__
+#ifdef CONFIG_PPC_BOOK3E
+#define CPU_FTRS_ALWAYS                (CPU_FTRS_E5500)
+#else
 #define CPU_FTRS_ALWAYS                \
            (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 &        \
            CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 &       \
            CPU_FTRS_POWER7 & CPU_FTRS_CELL & CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE)
+#endif
 #else
 enum {
        CPU_FTRS_ALWAYS =
@@ -513,6 +524,7 @@ enum {
 #endif
 #ifdef CONFIG_E500
            CPU_FTRS_E500 & CPU_FTRS_E500_2 & CPU_FTRS_E500MC &
+           CPU_FTRS_E5500 &
 #endif
            CPU_FTRS_POSSIBLE,
 };
index ec089acfa56bda9cd61d6363d42dba478e601bbb..8edec710cc6dab5449750995d09a53bd08cad270 100644 (file)
 #define H_DABRX_KERNEL         (1UL<<(63-62))
 #define H_DABRX_USER           (1UL<<(63-63))
 
-/* Each control block has to be on a 4K bondary */
+/* Each control block has to be on a 4K boundary */
 #define H_CB_ALIGNMENT          4096
 
 /* pSeries hypervisor opcodes */
index d0e7701fa1f6cbff19370ef0a2dc6e4856e5a27f..be0171afdc0f513cfff0a8bdb22abc70de29528c 100644 (file)
@@ -50,7 +50,7 @@ typedef unsigned int kprobe_opcode_t;
  * Handle cases where:
  *             - User passes a <.symbol> or <module:.symbol>
  *             - User passes a <symbol> or <module:symbol>
- *             - User passes a non-existant symbol, kallsyms_lookup_name
+ *             - User passes a non-existent symbol, kallsyms_lookup_name
  *               returns 0. Don't deref the NULL pointer in that case
  */
 #define kprobe_lookup_name(name, addr)                                 \
index 26b8c807f8f12d5ee5e3b06f7f2ec0a1523d559c..a077adc0b35e1a172adc2c3ca48d9a05ae44d4f4 100644 (file)
@@ -105,7 +105,7 @@ struct lppaca {
        // processing of external interrupts.  Note that PLIC will store the
        // XIRR directly into the xXirrValue field so that another XIRR will
        // not be presented until this one clears.  The layout of the low
-       // 4-bytes of this Dword is upto SLIC - PLIC just checks whether the
+       // 4-bytes of this Dword is up to SLIC - PLIC just checks whether the
        // entire Dword is zero or not.  A non-zero value in the low order
        // 2-bytes will result in SLIC being granted the highest thread
        // priority upon return.  A 0 will return to SLIC as medium priority.
index 932f88dcf6fa175616ca5dae4f3315e684120dbe..812b2cd80aed8a66b6b35b5399d75d20e63becc3 100644 (file)
@@ -169,7 +169,7 @@ do {                                                \
 /*
  * This is the default if a program doesn't have a PT_GNU_STACK
  * program header entry. The PPC64 ELF ABI has a non executable stack
- * stack by default, so in the absense of a PT_GNU_STACK program header
+ * stack by default, so in the absence of a PT_GNU_STACK program header
  * we turn execute permission off.
  */
 #define VM_STACK_DEFAULT_FLAGS32       (VM_READ | VM_WRITE | VM_EXEC | \
index 19fd7933e2d91a682231428641b2fa5ee52ac559..eafa5a5f56de9a312009dcbe50189180c69cb375 100644 (file)
@@ -522,7 +522,7 @@ extern void *pasemi_dma_alloc_buf(struct pasemi_dmachan *chan, int size,
 extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size,
                                dma_addr_t *handle);
 
-/* Routines to allocate flags (events) for channel syncronization */
+/* Routines to allocate flags (events) for channel synchronization */
 extern int  pasemi_dma_alloc_flag(void);
 extern void pasemi_dma_free_flag(int flag);
 extern void pasemi_dma_set_flag(int flag);
index 5e156e034fe29f18a9fc7cd3405ab550cc3ab091..b90dbf8e5cd9f9bf54288a9e23695c55af6b1372 100644 (file)
@@ -106,7 +106,7 @@ struct pci_controller {
         * Used for variants of PCI indirect handling and possible quirks:
         *  SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1
         *  EXT_REG - provides access to PCI-e extended registers
-        *  SURPRESS_PRIMARY_BUS - we surpress the setting of PCI_PRIMARY_BUS
+        *  SURPRESS_PRIMARY_BUS - we suppress the setting of PCI_PRIMARY_BUS
         *   on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS
         *   to determine which bus number to match on when generating type0
         *   config cycles
index 00eedc5a4e616b7b51fdf31dd0b0b9b68508ff23..10902c9375d09b9bf25454db1baf8c9c2c9f55a9 100644 (file)
@@ -53,8 +53,8 @@
 
 /* Here is the infamous serie of OHare based machines
  */
-#define PMAC_TYPE_COMET                        0x20    /* Beleived to be PowerBook 2400 */
-#define PMAC_TYPE_HOOPER               0x21    /* Beleived to be PowerBook 3400 */
+#define PMAC_TYPE_COMET                        0x20    /* Believed to be PowerBook 2400 */
+#define PMAC_TYPE_HOOPER               0x21    /* Believed to be PowerBook 3400 */
 #define PMAC_TYPE_KANGA                        0x22    /* PowerBook 3500 (first G3) */
 #define PMAC_TYPE_ALCHEMY              0x23    /* Alchemy motherboard base */
 #define PMAC_TYPE_GAZELLE              0x24    /* Spartacus, some 5xxx/6xxx */
index 76bb195e4f24d0e89db09665297dd68ec83ccb37..8d1569c290428e82db7d03cec9bca66c66dcf35b 100644 (file)
@@ -86,7 +86,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
 #define PTE_RPN_MASK   (~((1UL<<PTE_RPN_SHIFT)-1))
 #endif
 
-/* _PAGE_CHG_MASK masks of bits that are to be preserved accross
+/* _PAGE_CHG_MASK masks of bits that are to be preserved across
  * pgprot changes
  */
 #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
@@ -162,7 +162,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
  * on platforms where such control is possible.
  */
 #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
-       defined(CONFIG_KPROBES)
+       defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE)
 #define PAGE_KERNEL_TEXT       PAGE_KERNEL_X
 #else
 #define PAGE_KERNEL_TEXT       PAGE_KERNEL_ROX
@@ -174,7 +174,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
 /*
  * Don't just check for any non zero bits in __PAGE_USER, since for book3e
  * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in
- * _PAGE_USER.  Need to explictly match _PAGE_BAP_UR bit in that case too.
+ * _PAGE_USER.  Need to explicitly match _PAGE_BAP_UR bit in that case too.
  */
 #define pte_user(val)          ((val & _PAGE_USER) == _PAGE_USER)
 
index 3b1a9b707362b46abab3ce3c84f0f7c6a3d9970d..b316794aa2b5f443eaa596601136120291705f4c 100644 (file)
@@ -2,7 +2,7 @@
  * Contains register definitions common to the Book E PowerPC
  * specification.  Notice that while the IBM-40x series of CPUs
  * are not true Book E PowerPCs, they borrowed a number of features
- * before Book E was finalized, and are included here as well.  Unfortunatly,
+ * before Book E was finalized, and are included here as well.  Unfortunately,
  * they sometimes used different locations than true Book E CPUs did.
  *
  * This program is free software; you can redistribute it and/or
index 25020a34ce7fd47b6478a272b6969af4e74981aa..d8f5c60f61c16dc221af44bd0efcefe4ef7e995e 100644 (file)
@@ -223,7 +223,7 @@ spu_disable_spu (struct spu_context *ctx)
 }
 
 /*
- * The declarations folowing are put here for convenience
+ * The declarations following are put here for convenience
  * and only intended to be used by the platform setup code.
  */
 
index f737732c38617473779a1b149e43f557ed9da3f1..d12b11d7641e662286d3ef1d2a3e306a352388b0 100644 (file)
@@ -60,7 +60,7 @@
  *
  * Obviously, the GART is not cache coherent and so any change to it
  * must be flushed to memory (or maybe just make the GART space non
- * cachable). AGP memory itself doens't seem to be cache coherent neither.
+ * cachable). AGP memory itself doesn't seem to be cache coherent neither.
  *
  * In order to invalidate the GART (which is probably necessary to inval
  * the bridge internal TLBs), the following sequence has to be written,
index 25e39220e89c0ee3dc30c776746bd883a554e024..b73a8199f161cca520e325f073da7c45f45961a2 100644 (file)
@@ -57,7 +57,7 @@ struct vdso_data {
        } version;
 
        /* Note about the platform flags: it now only contains the lpar
-        * bit. The actual platform number is dead and burried
+        * bit. The actual platform number is dead and buried
         */
        __u32 platform;                 /* Platform flags               0x18 */
        __u32 processor;                /* Processor type               0x1C */
index 625942ae55856f8788011bc88f35781b3f178a1b..60b3e377b1e4e8c71ed0976b4a03e2269fae8305 100644 (file)
@@ -99,7 +99,7 @@ void __init btext_prepare_BAT(void)
 
 /* This function can be used to enable the early boot text when doing
  * OF booting or within bootx init. It must be followed by a btext_unmap()
- * call before the logical address becomes unuseable
+ * call before the logical address becomes unusable
  */
 void __init btext_setup_display(int width, int height, int depth, int pitch,
                                unsigned long address)
index c9b68d07ac4fca3cdd8996e8a43d850034efb407..b9602ee06deb11ee4c80c8eeeb63a2757f587841 100644 (file)
@@ -1973,7 +1973,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
                .pvr_mask               = 0xffff0000,
                .pvr_value              = 0x80240000,
                .cpu_name               = "e5500",
-               .cpu_features           = CPU_FTRS_E500MC,
+               .cpu_features           = CPU_FTRS_E5500,
                .cpu_user_features      = COMMON_USER_BOOKE,
                .mmu_features           = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
                        MMU_FTR_USE_TLBILX,
index 3d569e2aff18ecc3c3998ca2a6a7bf230755d66a..5b5e1f002a8ea2ef2053bb16ba20e1e110edd348 100644 (file)
@@ -188,7 +188,7 @@ static void crash_kexec_wait_realmode(int cpu)
        }
        mb();
 }
-#endif
+#endif /* CONFIG_PPC_STD_MMU_64 */
 
 /*
  * This function will be called by secondary cpus or by kexec cpu
@@ -233,7 +233,9 @@ void crash_kexec_secondary(struct pt_regs *regs)
        crash_ipi_callback(regs);
 }
 
-#else
+#else  /* ! CONFIG_SMP */
+static inline void crash_kexec_wait_realmode(int cpu) {}
+
 static void crash_kexec_prepare_cpus(int cpu)
 {
        /*
@@ -253,7 +255,7 @@ void crash_kexec_secondary(struct pt_regs *regs)
 {
        cpus_in_sr = CPU_MASK_NONE;
 }
-#endif
+#endif /* CONFIG_SMP */
 
 /*
  * Register a function to be called on shutdown.  Only use this if you
@@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
        crash_save_cpu(regs, crashing_cpu);
        crash_kexec_prepare_cpus(crashing_cpu);
        cpu_set(crashing_cpu, cpus_in_crash);
-#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
        crash_kexec_wait_realmode(crashing_cpu);
-#endif
 
        machine_kexec_mask_interrupts();
 
index 5c43063d250629a3fc708327f96880bc5d34e805..9651acc3504a9338aedc99211650efca44879221 100644 (file)
@@ -379,7 +379,7 @@ interrupt_end_book3e:
        mfspr   r13,SPRN_SPRG_PACA      /* get our PACA */
        b       system_call_common
 
-/* Auxillary Processor Unavailable Interrupt */
+/* Auxiliary Processor Unavailable Interrupt */
        START_EXCEPTION(ap_unavailable);
        NORMAL_EXCEPTION_PROLOG(0xf20, PROLOG_ADDITION_NONE)
        EXCEPTION_COMMON(0xf20, PACA_EXGEN, INTS_KEEP)
index c532cb2c927a1b7e83b9e20d3f9d5e9499450d04..aeb739e1876985d91ff7e698cd690158bf01d461 100644 (file)
@@ -5,7 +5,7 @@
  * handling and other fixed offset specific things.
  *
  * This file is meant to be #included from head_64.S due to
- * position dependant assembly.
+ * position dependent assembly.
  *
  * Most of this originates from head_64.S and thus has the same
  * copyright history.
index 9dd21a8c4d52ac3cef52923ea561c21347cf24b0..a91626d87fc96261a54e3637eab986e80119377c 100644 (file)
@@ -766,7 +766,7 @@ DataAccess:
         * miss get to this point to load the TLB.
         *      r10 - TLB_TAG value
         *      r11 - Linux PTE
-        *      r12, r9 - avilable to use
+        *      r12, r9 - available to use
         *      PID - loaded with proper value when we get here
         *      Upon exit, we reload everything and RFI.
         * Actually, it will fit now, but oh well.....a common place
index cbb3436b592d066f5bda450cfd96e82e51dfff95..5e12b741ba5fc15d5a7783dd5488dc8f315b9f77 100644 (file)
@@ -178,7 +178,7 @@ interrupt_base:
        NORMAL_EXCEPTION_PROLOG
        EXC_XFER_EE_LITE(0x0c00, DoSyscall)
 
-       /* Auxillary Processor Unavailable Interrupt */
+       /* Auxiliary Processor Unavailable Interrupt */
        EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE)
 
        /* Decrementer Interrupt */
index 271140b38b6f9d5867c66b23bf6b6e4d6642314a..3a319f9c9d3ebb41df3789e91f360e6c2161b1e5 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/kvm_book3s_asm.h>
 #include <asm/ptrace.h>
 
-/* The physical memory is layed out such that the secondary processor
+/* The physical memory is laid out such that the secondary processor
  * spin code sits at 0x0000...0x00ff. On server, the vectors follow
  * using the layout described in exceptions-64s.S
  */
index 3e02710d95629627bf087a5b67f36547dcdd6eb9..5ecf54cfa7d47d774c78c754e08e7713edb214cc 100644 (file)
@@ -326,7 +326,7 @@ interrupt_base:
        NORMAL_EXCEPTION_PROLOG
        EXC_XFER_EE_LITE(0x0c00, DoSyscall)
 
-       /* Auxillary Processor Unavailable Interrupt */
+       /* Auxiliary Processor Unavailable Interrupt */
        EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE)
 
        /* Decrementer Interrupt */
index c00d4ca1ee157fc995629825b95af4b8b232a5bb..28581f1ad2c08a8494502e2335cfeef2a295577e 100644 (file)
@@ -527,7 +527,7 @@ static int ibmebus_bus_pm_resume_noirq(struct device *dev)
 
 #endif /* !CONFIG_SUSPEND */
 
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
 
 static int ibmebus_bus_pm_freeze(struct device *dev)
 {
@@ -665,7 +665,7 @@ static int ibmebus_bus_pm_restore_noirq(struct device *dev)
        return ret;
 }
 
-#else /* !CONFIG_HIBERNATION */
+#else /* !CONFIG_HIBERNATE_CALLBACKS */
 
 #define ibmebus_bus_pm_freeze          NULL
 #define ibmebus_bus_pm_thaw            NULL
@@ -676,7 +676,7 @@ static int ibmebus_bus_pm_restore_noirq(struct device *dev)
 #define ibmebus_bus_pm_poweroff_noirq  NULL
 #define ibmebus_bus_pm_restore_noirq   NULL
 
-#endif /* !CONFIG_HIBERNATION */
+#endif /* !CONFIG_HIBERNATE_CALLBACKS */
 
 static struct dev_pm_ops ibmebus_bus_dev_pm_ops = {
        .prepare = ibmebus_bus_pm_prepare,
index 2a2f3c3f6d80321e3076cea3db5ae237a9fcbe6d..97ec8557f974b2bd0c5a8e04571e1b19719a33fc 100644 (file)
@@ -151,7 +151,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
         /**** Might be a good idea to set L2DO here - to prevent instructions
               from getting into the cache.  But since we invalidate
               the next time we enable the cache it doesn't really matter.
-              Don't do this unless you accomodate all processor variations.
+              Don't do this unless you accommodate all processor variations.
               The bit moved on the 7450.....
          ****/
 
index c834757bebc07663ba44f2c779f210a4f308637d..2b97b80d6d7d65911f951276eec81029cda748e6 100644 (file)
@@ -330,9 +330,11 @@ void __init find_legacy_serial_ports(void)
                if (!parent)
                        continue;
                if (of_match_node(legacy_serial_parents, parent) != NULL) {
-                       index = add_legacy_soc_port(np, np);
-                       if (index >= 0 && np == stdout)
-                               legacy_serial_console = index;
+                       if (of_device_is_available(np)) {
+                               index = add_legacy_soc_port(np, np);
+                               if (index >= 0 && np == stdout)
+                                       legacy_serial_console = index;
+                       }
                }
                of_node_put(parent);
        }
index 16468362ad579c5581d59f10feb8595336291eab..301db65f05a180454a775a412edb60b0bba8959c 100644 (file)
@@ -262,7 +262,7 @@ static void parse_ppp_data(struct seq_file *m)
        seq_printf(m, "system_active_processors=%d\n",
                   ppp_data.active_system_procs);
 
-       /* pool related entries are apropriate for shared configs */
+       /* pool related entries are appropriate for shared configs */
        if (lppaca_of(0).shared_proc) {
                unsigned long pool_idle_time, pool_procs;
 
index f4adf89d7614150a73c44ad8251ae13ad7934b16..10f0aadee95b9f8231d8deb8d2f6d996254fc4b4 100644 (file)
@@ -203,7 +203,7 @@ void __init free_unused_pacas(void)
 {
        int new_size;
 
-       new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus());
+       new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids);
 
        if (new_size >= paca_size)
                return;
index 97e0ae414940ee30c6a0a297f9c15dd53b5a0470..822f63008ae11642b570986c7faf8ca61478ae10 100644 (file)
@@ -398,6 +398,25 @@ static int check_excludes(struct perf_event **ctrs, unsigned int cflags[],
        return 0;
 }
 
+static u64 check_and_compute_delta(u64 prev, u64 val)
+{
+       u64 delta = (val - prev) & 0xfffffffful;
+
+       /*
+        * POWER7 can roll back counter values, if the new value is smaller
+        * than the previous value it will cause the delta and the counter to
+        * have bogus values unless we rolled a counter over.  If a coutner is
+        * rolled back, it will be smaller, but within 256, which is the maximum
+        * number of events to rollback at once.  If we dectect a rollback
+        * return 0.  This can lead to a small lack of precision in the
+        * counters.
+        */
+       if (prev > val && (prev - val) < 256)
+               delta = 0;
+
+       return delta;
+}
+
 static void power_pmu_read(struct perf_event *event)
 {
        s64 val, delta, prev;
@@ -416,10 +435,11 @@ static void power_pmu_read(struct perf_event *event)
                prev = local64_read(&event->hw.prev_count);
                barrier();
                val = read_pmc(event->hw.idx);
+               delta = check_and_compute_delta(prev, val);
+               if (!delta)
+                       return;
        } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev);
 
-       /* The counters are only 32 bits wide */
-       delta = (val - prev) & 0xfffffffful;
        local64_add(delta, &event->count);
        local64_sub(delta, &event->hw.period_left);
 }
@@ -449,8 +469,9 @@ static void freeze_limited_counters(struct cpu_hw_events *cpuhw,
                val = (event->hw.idx == 5) ? pmc5 : pmc6;
                prev = local64_read(&event->hw.prev_count);
                event->hw.idx = 0;
-               delta = (val - prev) & 0xfffffffful;
-               local64_add(delta, &event->count);
+               delta = check_and_compute_delta(prev, val);
+               if (delta)
+                       local64_add(delta, &event->count);
        }
 }
 
@@ -458,14 +479,16 @@ static void thaw_limited_counters(struct cpu_hw_events *cpuhw,
                                  unsigned long pmc5, unsigned long pmc6)
 {
        struct perf_event *event;
-       u64 val;
+       u64 val, prev;
        int i;
 
        for (i = 0; i < cpuhw->n_limited; ++i) {
                event = cpuhw->limited_counter[i];
                event->hw.idx = cpuhw->limited_hwidx[i];
                val = (event->hw.idx == 5) ? pmc5 : pmc6;
-               local64_set(&event->hw.prev_count, val);
+               prev = local64_read(&event->hw.prev_count);
+               if (check_and_compute_delta(prev, val))
+                       local64_set(&event->hw.prev_count, val);
                perf_event_update_userpage(event);
        }
 }
@@ -759,7 +782,7 @@ static int power_pmu_add(struct perf_event *event, int ef_flags)
 
        /*
         * If group events scheduling transaction was started,
-        * skip the schedulability test here, it will be peformed
+        * skip the schedulability test here, it will be performed
         * at commit time(->commit_txn) as a whole
         */
        if (cpuhw->group_flag & PERF_EVENT_TXN)
@@ -1197,7 +1220,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
 
        /* we don't have to worry about interrupts here */
        prev = local64_read(&event->hw.prev_count);
-       delta = (val - prev) & 0xfffffffful;
+       delta = check_and_compute_delta(prev, val);
        local64_add(delta, &event->count);
 
        /*
index e83ba3f078e4057789eece119d0eb15fc9656bbc..1b1787d528965c2304b9c01fab6c0c48407093b2 100644 (file)
@@ -15,7 +15,7 @@
 
 /*
  * Grab the register values as they are now.
- * This won't do a particularily good job because we really
+ * This won't do a particularly good job because we really
  * want our caller's caller's registers, and our caller has
  * already executed its prologue.
  * ToDo: We could reach back into the caller's save area to do
index 05b7139d6a27b984915f17d51ff30b70c37c21ec..e74fa12afc82b6c35da819f2b4a5f1e02ec42580 100644 (file)
@@ -683,7 +683,7 @@ void __init early_init_devtree(void *params)
 #endif
 
 #ifdef CONFIG_PHYP_DUMP
-       /* scan tree to see if dump occured during last boot */
+       /* scan tree to see if dump occurred during last boot */
        of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL);
 #endif
 
@@ -739,7 +739,7 @@ void __init early_init_devtree(void *params)
 
        DBG("Scanning CPUs ...\n");
 
-       /* Retreive CPU related informations from the flat tree
+       /* Retrieve CPU related informations from the flat tree
         * (altivec support, boot CPU ID, ...)
         */
        of_scan_flat_dt(early_init_dt_scan_cpus, NULL);
index 895b082f1e48bafe5c7826de6950edf14cff6d23..55613e33e263ac7abb3b1d478f4a27bb9912b86f 100644 (file)
@@ -463,7 +463,7 @@ static int vr_set(struct task_struct *target, const struct user_regset *regset,
 #ifdef CONFIG_VSX
 /*
  * Currently to set and and get all the vsx state, you need to call
- * the fp and VMX calls aswell.  This only get/sets the lower 32
+ * the fp and VMX calls as well.  This only get/sets the lower 32
  * 128bit VSX registers.
  */
 
index 7980ec0e1e1a98f318630bb5e7226848416fc71a..67f6c3b51357c80c16d373fc0f05561314a6cf0b 100644 (file)
@@ -465,7 +465,7 @@ static void start_event_scan(void)
        pr_debug("rtasd: will sleep for %d milliseconds\n",
                 (30000 / rtas_event_scan_rate));
 
-       /* Retreive errors from nvram if any */
+       /* Retrieve errors from nvram if any */
        retreive_nvram_error_log();
 
        schedule_delayed_work_on(cpumask_first(cpu_online_mask),
index 9d4882a466471c5903ce4ff2f065723e0a5b682f..21f30cb68077f6be97daf30ee5c1f7617571036f 100644 (file)
@@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void)
         */
        cpu_init_thread_core_maps(nthreads);
 
+       /* Now that possible cpus are set, set nr_cpu_ids for later use */
+       nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
+
        free_unused_pacas();
 }
 #endif /* CONFIG_SMP */
index b0754e237438a0c9e3e919c738231c58eb3c5df4..ba4dee3d233fe8ad8aee6fc226c43978f4c6731a 100644 (file)
@@ -143,7 +143,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 
        /* Disable MSR:DR to make sure we don't take a TLB or
         * hash miss during the copy, as our hash table will
-        * for a while be unuseable. For .text, we assume we are
+        * for a while be unusable. For .text, we assume we are
         * covered by a BAT. This works only for non-G5 at this
         * point. G5 will need a better approach, possibly using
         * a small temporary hash table filled with large mappings,
index 375480c56eb9fd6699c90e385dd1877affb3d052..f33acfd872ad31ef73df610b07a507d2e6bb78a1 100644 (file)
@@ -229,6 +229,9 @@ static u64 scan_dispatch_log(u64 stop_tb)
        u64 stolen = 0;
        u64 dtb;
 
+       if (!dtl)
+               return 0;
+
        if (i == vpa->dtl_idx)
                return 0;
        while (i < vpa->dtl_idx) {
index bd74fac169be0e665e108b87110ee1cefb5d4718..5ddb801bc15409ada686ee7fec56de73fac438cf 100644 (file)
@@ -959,7 +959,7 @@ void __kprobes program_check_exception(struct pt_regs *regs)
         * ESR_DST (!?) or 0.  In the process of chasing this with the
         * hardware people - not sure if it can happen on any illegal
         * instruction or only on FP instructions, whether there is a
-        * pattern to occurences etc. -dgibson 31/Mar/2003 */
+        * pattern to occurrences etc. -dgibson 31/Mar/2003 */
        switch (do_mathemu(regs)) {
        case 0:
                emulate_single_step(regs);
index b4b167b336432f916a4f24f263ae27ce8d885e40..baa33a7517bce02252d5e28c0c3eae98acdce8f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * udbg for NS16550 compatable serial ports
+ * udbg for NS16550 compatible serial ports
  *
  * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp
  *
index 68d49dd71dccfb8b2f1813b6576d7df60736479b..cf0c9c9c24f9ddf547fbf4aaaa5fdfd1f7b5e183 100644 (file)
@@ -19,7 +19,7 @@
 
 /* The nop here is a hack.  The dwarf2 unwind routines subtract 1 from
    the return address to get an address in the middle of the presumed
-   call instruction.  Since we don't have a call here, we artifically
+   call instruction.  Since we don't have a call here, we artificially
    extend the range covered by the unwind info by adding a nop before
    the real start.  */
        nop
index 59eb59bb408202043e19b904a46a6928c4beb6eb..45ea281e9a21d479a36e47fbd94a3a0c65075bee 100644 (file)
@@ -20,7 +20,7 @@
 
 /* The nop here is a hack.  The dwarf2 unwind routines subtract 1 from
    the return address to get an address in the middle of the presumed
-   call instruction.  Since we don't have a call here, we artifically
+   call instruction.  Since we don't have a call here, we artificially
    extend the range covered by the unwind info by padding before the
    real start.  */
        nop
index 3079f6b44cf531e5f1dafc8fa9e9a9e38e59dc15..5b7dd4ea02b57bce76dfb26d0e41e1c650863d46 100644 (file)
@@ -192,8 +192,8 @@ htab_insert_pte:
        rldicr  r3,r0,3,63-3            /* r3 = (hash & mask) << 3 */
 
        /* Call ppc_md.hpte_insert */
-       ld      r6,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
+       ld      r6,STK_PARM(r4)(r1)     /* Retrieve new pp bits */
+       mr      r4,r29                  /* Retrieve va */
        li      r7,0                    /* !bolted, !secondary */
        li      r8,MMU_PAGE_4K          /* page size */
        ld      r9,STK_PARM(r9)(r1)     /* segment size */
@@ -215,8 +215,8 @@ _GLOBAL(htab_call_hpte_insert1)
        rldicr  r3,r0,3,63-3    /* r0 = (~hash & mask) << 3 */
        
        /* Call ppc_md.hpte_insert */
-       ld      r6,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
+       ld      r6,STK_PARM(r4)(r1)     /* Retrieve new pp bits */
+       mr      r4,r29                  /* Retrieve va */
        li      r7,HPTE_V_SECONDARY     /* !bolted, secondary */
        li      r8,MMU_PAGE_4K          /* page size */
        ld      r9,STK_PARM(r9)(r1)     /* segment size */
@@ -495,8 +495,8 @@ htab_special_pfn:
        rldicr  r3,r0,3,63-3            /* r0 = (hash & mask) << 3 */
 
        /* Call ppc_md.hpte_insert */
-       ld      r6,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
+       ld      r6,STK_PARM(r4)(r1)     /* Retrieve new pp bits */
+       mr      r4,r29                  /* Retrieve va */
        li      r7,0                    /* !bolted, !secondary */
        li      r8,MMU_PAGE_4K          /* page size */
        ld      r9,STK_PARM(r9)(r1)     /* segment size */
@@ -522,8 +522,8 @@ _GLOBAL(htab_call_hpte_insert1)
        rldicr  r3,r0,3,63-3            /* r0 = (~hash & mask) << 3 */
 
        /* Call ppc_md.hpte_insert */
-       ld      r6,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
+       ld      r6,STK_PARM(r4)(r1)     /* Retrieve new pp bits */
+       mr      r4,r29                  /* Retrieve va */
        li      r7,HPTE_V_SECONDARY     /* !bolted, secondary */
        li      r8,MMU_PAGE_4K          /* page size */
        ld      r9,STK_PARM(r9)(r1)     /* segment size */
@@ -813,8 +813,8 @@ ht64_insert_pte:
        rldicr  r3,r0,3,63-3    /* r0 = (hash & mask) << 3 */
 
        /* Call ppc_md.hpte_insert */
-       ld      r6,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
+       ld      r6,STK_PARM(r4)(r1)     /* Retrieve new pp bits */
+       mr      r4,r29                  /* Retrieve va */
        li      r7,0                    /* !bolted, !secondary */
        li      r8,MMU_PAGE_64K
        ld      r9,STK_PARM(r9)(r1)     /* segment size */
@@ -836,8 +836,8 @@ _GLOBAL(ht64_call_hpte_insert1)
        rldicr  r3,r0,3,63-3    /* r0 = (~hash & mask) << 3 */
 
        /* Call ppc_md.hpte_insert */
-       ld      r6,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
+       ld      r6,STK_PARM(r4)(r1)     /* Retrieve new pp bits */
+       mr      r4,r29                  /* Retrieve va */
        li      r7,HPTE_V_SECONDARY     /* !bolted, secondary */
        li      r8,MMU_PAGE_64K
        ld      r9,STK_PARM(r9)(r1)     /* segment size */
index a5991facddcef87d0c40f8fb9bdd83a0bc7725bd..58a022d0f4636908c228fedbb27f2bd977ce00b2 100644 (file)
@@ -753,7 +753,7 @@ void __cpuinit early_init_mmu_secondary(void)
                mtspr(SPRN_SDR1, _SDR1);
 
        /* Initialize STAB/SLB. We use a virtual address as it works
-        * in real mode on pSeries and we want a virutal address on
+        * in real mode on pSeries and we want a virtual address on
         * iSeries anyway
         */
        if (cpu_has_feature(CPU_FTR_SLB))
index a66499650909bb1bce5d97a48ca7894b22d5241e..57e545b84bf199cb8db2b2fbefa0d4755a419394 100644 (file)
@@ -424,7 +424,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
        clear_page(page);
 
        /*
-        * We shouldnt have to do this, but some versions of glibc
+        * We shouldn't have to do this, but some versions of glibc
         * require it (ld.so assumes zero filled pages are icache clean)
         * - Anton
         */
index 0dc95c0aa3beb01f9f46b2ebecaa551baa844e6f..5ec1dad2a19de81c6d323273994c0eca2a4f643a 100644 (file)
@@ -440,11 +440,11 @@ static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp)
 }
 
 /*
- * Retreive and validate the ibm,dynamic-memory property of the device tree.
+ * Retrieve and validate the ibm,dynamic-memory property of the device tree.
  *
  * The layout of the ibm,dynamic-memory property is a number N of memblock
  * list entries followed by N memblock list entries.  Each memblock list entry
- * contains information as layed out in the of_drconf_cell struct above.
+ * contains information as laid out in the of_drconf_cell struct above.
  */
 static int of_get_drconf_memory(struct device_node *memory, const u32 **dm)
 {
@@ -468,7 +468,7 @@ static int of_get_drconf_memory(struct device_node *memory, const u32 **dm)
 }
 
 /*
- * Retreive and validate the ibm,lmb-size property for drconf memory
+ * Retrieve and validate the ibm,lmb-size property for drconf memory
  * from the device tree.
  */
 static u64 of_get_lmb_size(struct device_node *memory)
@@ -490,7 +490,7 @@ struct assoc_arrays {
 };
 
 /*
- * Retreive and validate the list of associativity arrays for drconf
+ * Retrieve and validate the list of associativity arrays for drconf
  * memory from the ibm,associativity-lookup-arrays property of the
  * device tree..
  *
@@ -604,7 +604,7 @@ static int __cpuinit cpu_numa_callback(struct notifier_block *nfb,
  * Returns the size the region should have to enforce the memory limit.
  * This will either be the original value of size, a truncated value,
  * or zero. If the returned value of size is 0 the region should be
- * discarded as it lies wholy above the memory limit.
+ * discarded as it lies wholly above the memory limit.
  */
 static unsigned long __init numa_enforce_memory_limit(unsigned long start,
                                                      unsigned long size)
index 8526bd9d2aa33603be03dbf10bc3656c7a833448..af08922094177a6750ea63e655d384b8f91daec1 100644 (file)
@@ -192,7 +192,7 @@ normal_tlb_miss:
        or      r10,r15,r14
 
 BEGIN_MMU_FTR_SECTION
-       /* Set the TLB reservation and seach for existing entry. Then load
+       /* Set the TLB reservation and search for existing entry. Then load
         * the entry.
         */
        PPC_TLBSRX_DOT(0,r16)
@@ -425,13 +425,13 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_TLBRSRV)
 
 virt_page_table_tlb_miss_fault:
        /* If we fault here, things are a little bit tricky. We need to call
-        * either data or instruction store fault, and we need to retreive
+        * either data or instruction store fault, and we need to retrieve
         * the original fault address and ESR (for data).
         *
         * The thing is, we know that in normal circumstances, this is
         * always called as a second level tlb miss for SW load or as a first
         * level TLB miss for HW load, so we should be able to peek at the
-        * relevant informations in the first exception frame in the PACA.
+        * relevant information in the first exception frame in the PACA.
         *
         * However, we do need to double check that, because we may just hit
         * a stray kernel pointer or a userland attack trying to hit those
index c4d2b7167568bc99c9c5843de8700071a98debf4..cb515cff745c91e586875e631450f4432ca84185 100644 (file)
@@ -67,7 +67,7 @@
 
 #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */
 
-/* Minumum HW interval timer setting to send value to trace buffer is 10 cycle.
+/* Minimum HW interval timer setting to send value to trace buffer is 10 cycle.
  * To configure counter to send value every N cycles set counter to
  * 2^32 - 1 - N.
  */
@@ -1470,7 +1470,7 @@ static int cell_global_start(struct op_counter_config *ctr)
  * trace buffer at the maximum rate possible.  The trace buffer is configured
  * to store the PCs, wrapping when it is full.  The performance counter is
  * initialized to the max hardware count minus the number of events, N, between
- * samples.  Once the N events have occured, a HW counter overflow occurs
+ * samples.  Once the N events have occurred, a HW counter overflow occurs
  * causing the generation of a HW counter interrupt which also stops the
  * writing of the SPU PC values to the trace buffer.  Hence the last PC
  * written to the trace buffer is the SPU PC that we want.  Unfortunately,
@@ -1656,7 +1656,7 @@ static void cell_handle_interrupt_ppu(struct pt_regs *regs,
                 * The counters were frozen by the interrupt.
                 * Reenable the interrupt and restart the counters.
                 * If there was a race between the interrupt handler and
-                * the virtual counter routine.  The virutal counter
+                * the virtual counter routine.  The virtual counter
                 * routine may have cleared the interrupts.  Hence must
                 * use the virt_cntr_inter_mask to re-enable the interrupts.
                 */
index 80774092db77f8366def941ec0dcdfabf2379489..8ee51a252cf1b28bb11c1f023b395067e0b90db4 100644 (file)
@@ -207,7 +207,7 @@ static unsigned long get_pc(struct pt_regs *regs)
        unsigned long mmcra;
        unsigned long slot;
 
-       /* Cant do much about it */
+       /* Can't do much about it */
        if (!cur_cpu_spec->oprofile_mmcra_sihv)
                return pc;
 
index 6385d883cb8dec749b95e03ac51dff0201f01b52..9940ce8a2d4eff3fffb9d5458a46e98683a58351 100644 (file)
@@ -57,7 +57,7 @@ struct mpc52xx_lpbfifo {
 static struct mpc52xx_lpbfifo lpbfifo;
 
 /**
- * mpc52xx_lpbfifo_kick - Trigger the next block of data to be transfered
+ * mpc52xx_lpbfifo_kick - Trigger the next block of data to be transferred
  */
 static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req)
 {
@@ -179,7 +179,7 @@ static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req)
  *
  * On transmit, the dma completion irq triggers before the fifo completion
  * triggers.  Handle the dma completion here instead of the LPB FIFO Bestcomm
- * task completion irq becuase everyting is not really done until the LPB FIFO
+ * task completion irq because everything is not really done until the LPB FIFO
  * completion irq triggers.
  *
  * In other words:
@@ -195,7 +195,7 @@ static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req)
  * Exit conditions:
  * 1) Transfer aborted
  * 2) FIFO complete without DMA; more data to do
- * 3) FIFO complete without DMA; all data transfered
+ * 3) FIFO complete without DMA; all data transferred
  * 4) FIFO complete using DMA
  *
  * Condition 1 can occur regardless of whether or not DMA is used.
index 3ddea96273ca5ec6e1ef5ce197fbfc26d664a815..1dd15400f6f0c50fefe3c1f5e199758c49d84691 100644 (file)
@@ -512,7 +512,7 @@ void __init mpc52xx_init_irq(void)
 /**
  * mpc52xx_get_irq - Get pending interrupt number hook function
  *
- * Called by the interupt handler to determine what IRQ handler needs to be
+ * Called by the interrupt handler to determine what IRQ handler needs to be
  * executed.
  *
  * Status of pending interrupts is determined by reading the encoded status
index 20576829eca503283af84587ad574a63afed807e..f7b07720aa30b0f60e698f96fb7821485b6129b8 100644 (file)
@@ -46,7 +46,7 @@ config PPC_OF_BOOT_TRAMPOLINE
        help
          Support from booting from Open Firmware or yaboot using an
          Open Firmware client interface. This enables the kernel to
-         communicate with open firmware to retrieve system informations
+         communicate with open firmware to retrieve system information
          such as the device tree.
 
          In case of doubt, say Y
index 3b894f5852800a439a4122ec8a6d02ee9579b3c4..147069938cfea9ff4b097b4d9cacb328ed7a7eb4 100644 (file)
@@ -90,7 +90,7 @@ int spu_alloc_lscsa(struct spu_state *csa)
         */
        for (i = 0; i < SPU_LSCSA_NUM_BIG_PAGES; i++) {
                /* XXX This is likely to fail, we should use a special pool
-                *     similiar to what hugetlbfs does.
+                *     similar to what hugetlbfs does.
                 */
                csa->lscsa_pages[i] = alloc_pages(GFP_KERNEL,
                                                  SPU_64K_PAGE_ORDER);
index 0b04662849320d662ea3cb974b20e5e4bdc711cb..65203857b0cebdf4601a23617d8d6db1aa84494f 100644 (file)
@@ -846,7 +846,7 @@ static struct spu_context *grab_runnable_context(int prio, int node)
                struct list_head *rq = &spu_prio->runq[best];
 
                list_for_each_entry(ctx, rq, rq) {
-                       /* XXX(hch): check for affinity here aswell */
+                       /* XXX(hch): check for affinity here as well */
                        if (__node_allowed(ctx, node)) {
                                __spu_del_from_rq(ctx);
                                goto found;
index 21a9c952d88b4435edbb820a0a98790b1489e058..72c905f1ee7a5b29902b98f0ccbd9745d0a646ed 100644 (file)
@@ -284,7 +284,7 @@ static inline void restore_complete(void)
                exit_instrs[3] = BR_INSTR;
                break;
        default:
-               /* SPU_Status[R]=1. No additonal instructions. */
+               /* SPU_Status[R]=1. No additional instructions. */
                break;
        }
        spu_sync();
index b5e026bdca21f5e0c8f0910239feabfc0c344795..62dabe3c2bfa0ac247354346cd6ce255c0d90a22 100644 (file)
@@ -51,7 +51,7 @@
 static int mf_initialized;
 
 /*
- * This is the structure layout for the Machine Facilites LPAR event
+ * This is the structure layout for the Machine Facilities LPAR event
  * flows.
  */
 struct vsp_cmd_data {
index b5f05d943a90526b2f60505a439fa92b5fcf9e86..2376069cdc148f33d1812fd89335fcd4bbf21033 100644 (file)
@@ -396,7 +396,7 @@ static void vio_handleEvent(struct HvLpEvent *event)
                        viopathStatus[remoteLp].mTargetInst)) {
                        printk(VIOPATH_KERN_WARN
                               "message from invalid partition. "
-                              "int msg rcvd, source inst (%d) doesnt match (%d)\n",
+                              "int msg rcvd, source inst (%d) doesn't match (%d)\n",
                               viopathStatus[remoteLp].mTargetInst,
                               event->xSourceInstanceId);
                        return;
@@ -407,7 +407,7 @@ static void vio_handleEvent(struct HvLpEvent *event)
                        viopathStatus[remoteLp].mSourceInst)) {
                        printk(VIOPATH_KERN_WARN
                               "message from invalid partition. "
-                              "int msg rcvd, target inst (%d) doesnt match (%d)\n",
+                              "int msg rcvd, target inst (%d) doesn't match (%d)\n",
                               viopathStatus[remoteLp].mSourceInst,
                               event->xTargetInstanceId);
                        return;
@@ -418,7 +418,7 @@ static void vio_handleEvent(struct HvLpEvent *event)
                    viopathStatus[remoteLp].mSourceInst) {
                        printk(VIOPATH_KERN_WARN
                               "message from invalid partition. "
-                              "ack msg rcvd, source inst (%d) doesnt match (%d)\n",
+                              "ack msg rcvd, source inst (%d) doesn't match (%d)\n",
                               viopathStatus[remoteLp].mSourceInst,
                               event->xSourceInstanceId);
                        return;
@@ -428,7 +428,7 @@ static void vio_handleEvent(struct HvLpEvent *event)
                    viopathStatus[remoteLp].mTargetInst) {
                        printk(VIOPATH_KERN_WARN
                               "message from invalid partition. "
-                              "viopath: ack msg rcvd, target inst (%d) doesnt match (%d)\n",
+                              "viopath: ack msg rcvd, target inst (%d) doesn't match (%d)\n",
                               viopathStatus[remoteLp].mTargetInst,
                               event->xTargetInstanceId);
                        return;
index 09695ae50f911c521766ad41fc938c1c05642b1b..321a9b3a2d00e6039b92fb9d92d6eda704bf63f4 100644 (file)
@@ -379,9 +379,9 @@ void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size,
 }
 EXPORT_SYMBOL(pasemi_dma_free_buf);
 
-/* pasemi_dma_alloc_flag - Allocate a flag (event) for channel syncronization
+/* pasemi_dma_alloc_flag - Allocate a flag (event) for channel synchronization
  *
- * Allocates a flag for use with channel syncronization (event descriptors).
+ * Allocates a flag for use with channel synchronization (event descriptors).
  * Returns allocated flag (0-63), < 0 on error.
  */
 int pasemi_dma_alloc_flag(void)
index 50f16939255160d11888b847daf3ff5d5cc76463..ea47df66fee5235588061efb08d5e2a6be685f4e 100644 (file)
@@ -11,7 +11,7 @@ obj-y                         += pic.o setup.o time.o feature.o pci.o \
 obj-$(CONFIG_PMAC_BACKLIGHT)   += backlight.o
 obj-$(CONFIG_CPU_FREQ_PMAC)    += cpufreq_32.o
 obj-$(CONFIG_CPU_FREQ_PMAC64)  += cpufreq_64.o
-# CONFIG_NVRAM is an arch. independant tristate symbol, for pmac32 we really
+# CONFIG_NVRAM is an arch. independent tristate symbol, for pmac32 we really
 # need this to be a bool.  Cheat here and pretend CONFIG_NVRAM=m is really
 # CONFIG_NVRAM=y
 obj-$(CONFIG_NVRAM:m=y)                += nvram.o
index 480567e5fa9ad38c6b9441e2a91228fa6a4a039d..e9c8a607268e5bb95622024af7dec47ee1ed179f 100644 (file)
@@ -904,7 +904,7 @@ static void __init smu_i2c_probe(void)
        printk(KERN_INFO "SMU i2c %s\n", controller->full_name);
 
        /* Look for childs, note that they might not be of the right
-        * type as older device trees mix i2c busses and other thigns
+        * type as older device trees mix i2c busses and other things
         * at the same level
         */
        for (busnode = NULL;
index ab6898942700a3a4ebb3018038300634e95dc40a..f33e08d573ce6b27722b118882a539b5895a914e 100644 (file)
@@ -299,7 +299,7 @@ static void __init setup_chaos(struct pci_controller *hose,
  * This function deals with some "special cases" devices.
  *
  *  0 -> No special case
- *  1 -> Skip the device but act as if the access was successfull
+ *  1 -> Skip the device but act as if the access was successful
  *       (return 0xff's on reads, eventually, cache config space
  *       accesses in a later version)
  * -1 -> Hide the device (unsuccessful access)
index a830c5e806577b4c3f443e6617b3964dbf8ae62f..bc5f0dc6ae1e7686f7dd7a10823025d0e138fa13 100644 (file)
@@ -842,6 +842,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
        mpic_setup_this_cpu();
 }
 
+#ifdef CONFIG_PPC64
 #ifdef CONFIG_HOTPLUG_CPU
 static int smp_core99_cpu_notify(struct notifier_block *self,
                                 unsigned long action, void *hcpu)
@@ -879,7 +880,6 @@ static struct notifier_block __cpuinitdata smp_core99_cpu_nb = {
 
 static void __init smp_core99_bringup_done(void)
 {
-#ifdef CONFIG_PPC64
        extern void g5_phy_disable_cpu1(void);
 
        /* Close i2c bus if it was used for tb sync */
@@ -894,14 +894,14 @@ static void __init smp_core99_bringup_done(void)
                set_cpu_present(1, false);
                g5_phy_disable_cpu1();
        }
-#endif /* CONFIG_PPC64 */
-
 #ifdef CONFIG_HOTPLUG_CPU
        register_cpu_notifier(&smp_core99_cpu_nb);
 #endif
+
        if (ppc_md.progress)
                ppc_md.progress("smp_core99_bringup_done", 0x349);
 }
+#endif /* CONFIG_PPC64 */
 
 #ifdef CONFIG_HOTPLUG_CPU
 
@@ -975,7 +975,9 @@ static void pmac_cpu_die(void)
 struct smp_ops_t core99_smp_ops = {
        .message_pass   = smp_mpic_message_pass,
        .probe          = smp_core99_probe,
+#ifdef CONFIG_PPC64
        .bringup_done   = smp_core99_bringup_done,
+#endif
        .kick_cpu       = smp_core99_kick_cpu,
        .setup_cpu      = smp_core99_setup_cpu,
        .give_timebase  = smp_core99_give_timebase,
index b74a9230edc9a0454856b5f4cf18d730f9a0c05e..57ceb92b2288a36e2e35f719b959ac0294974b2a 100644 (file)
@@ -74,7 +74,7 @@ static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa)
                return NULL;
 
        /* The configure connector reported name does not contain a
-        * preceeding '/', so we allocate a buffer large enough to
+        * preceding '/', so we allocate a buffer large enough to
         * prepend this to the full_name.
         */
        name = (char *)ccwa + ccwa->name_offset;
index 3cc4d102b1f159721b5886268c3657d07b50596e..89649173d3a339bcd70a4a70ef13b13644827535 100644 (file)
@@ -65,7 +65,7 @@
  *  with EEH.
  *
  *  Ideally, a PCI device driver, when suspecting that an isolation
- *  event has occured (e.g. by reading 0xff's), will then ask EEH
+ *  event has occurred (e.g. by reading 0xff's), will then ask EEH
  *  whether this is the case, and then take appropriate steps to
  *  reset the PCI slot, the PCI device, and then resume operations.
  *  However, until that day,  the checking is done here, with the
index fd50ccd4bac1a019ba92fde3a2205b950e529379..ef8c45489e2071451a5958a20ca23ee6616c06d0 100644 (file)
@@ -216,7 +216,7 @@ static void pseries_cpu_die(unsigned int cpu)
                       cpu, pcpu, cpu_status);
        }
 
-       /* Isolation and deallocation are definatly done by
+       /* Isolation and deallocation are definitely done by
         * drslot_chrp_cpu.  If they were not they would be
         * done here.  Change isolate state to Isolate and
         * change allocation-state to Unusable.
index 154c464cdca5c3d4d7e1fa44f84763b002dfdbac..6d5412a18b26b3261151bf80aa044b090756df4b 100644 (file)
@@ -272,7 +272,7 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum)
        return tce_ret;
 }
 
-/* this is compatable with cells for the device tree property */
+/* this is compatible with cells for the device tree property */
 struct dynamic_dma_window_prop {
        __be32  liobn;          /* tce table number */
        __be64  dma_base;       /* address hi,lo */
@@ -976,7 +976,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
        pr_debug("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev));
 
        /* dev setup for LPAR is a little tricky, since the device tree might
-        * contain the dma-window properties per-device and not neccesarily
+        * contain the dma-window properties per-device and not necessarily
         * for the bus. So we need to search upwards in the tree until we
         * either hit a dma-window property, OR find a parent with a table
         * already allocated.
@@ -1033,7 +1033,7 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask)
 
                /*
                 * the device tree might contain the dma-window properties
-                * per-device and not neccesarily for the bus. So we need to
+                * per-device and not necessarily for the bus. So we need to
                 * search upwards in the tree until we either hit a dma-window
                 * property, OR find a parent with a table already allocated.
                 */
index c319d04aa79992b25344005f02ad103b9e076a01..6c42cfde8415f31dacd0a981cee09535da581667 100644 (file)
@@ -287,14 +287,22 @@ static int alloc_dispatch_logs(void)
        int cpu, ret;
        struct paca_struct *pp;
        struct dtl_entry *dtl;
+       struct kmem_cache *dtl_cache;
 
        if (!firmware_has_feature(FW_FEATURE_SPLPAR))
                return 0;
 
+       dtl_cache = kmem_cache_create("dtl", DISPATCH_LOG_BYTES,
+                                               DISPATCH_LOG_BYTES, 0, NULL);
+       if (!dtl_cache) {
+               pr_warn("Failed to create dispatch trace log buffer cache\n");
+               pr_warn("Stolen time statistics will be unreliable\n");
+               return 0;
+       }
+
        for_each_possible_cpu(cpu) {
                pp = &paca[cpu];
-               dtl = kmalloc_node(DISPATCH_LOG_BYTES, GFP_KERNEL,
-                                  cpu_to_node(cpu));
+               dtl = kmem_cache_alloc(dtl_cache, GFP_KERNEL);
                if (!dtl) {
                        pr_warn("Failed to allocate dispatch trace log for cpu %d\n",
                                cpu);
@@ -378,7 +386,7 @@ static int __init pSeries_init_panel(void)
 
        return 0;
 }
-arch_initcall(pSeries_init_panel);
+machine_arch_initcall(pseries, pSeries_init_panel);
 
 static int pseries_set_dabr(unsigned long dabr)
 {
index d6479f9738f07011da9aa9e3fddbe1a864bfcad8..a509c5292a67a1ad1906e765b30137def31afebb 100644 (file)
@@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
 
        /* Fixup atomic count: it exited inside IRQ handler. */
        task_thread_info(paca[lcpu].__current)->preempt_count   = 0;
-
+#ifdef CONFIG_HOTPLUG_CPU
        if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE)
                goto out;
-
+#endif
        /* 
         * If the RTAS start-cpu token does not exist then presume the
         * cpu is already spinning.
@@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
                return 0;
        }
 
+#ifdef CONFIG_HOTPLUG_CPU
 out:
+#endif
        return 1;
 }
 
@@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu)
                vpa_init(cpu);
 
        cpumask_clear_cpu(cpu, of_spin_mask);
+#ifdef CONFIG_HOTPLUG_CPU
        set_cpu_current_state(cpu, CPU_STATE_ONLINE);
        set_default_offline_state(cpu);
-
+#endif
 }
 #endif /* CONFIG_XICS */
 
 static void __devinit smp_pSeries_kick_cpu(int nr)
 {
-       long rc;
-       unsigned long hcpuid;
        BUG_ON(nr < 0 || nr >= NR_CPUS);
 
        if (!smp_startup_cpu(nr))
@@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
         * the processor will continue on to secondary_start
         */
        paca[nr].cpu_start = 1;
-
+#ifdef CONFIG_HOTPLUG_CPU
        set_preferred_offline_state(nr, CPU_STATE_ONLINE);
 
        if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) {
+               long rc;
+               unsigned long hcpuid;
+
                hcpuid = get_hard_smp_processor_id(nr);
                rc = plpar_hcall_norets(H_PROD, hcpuid);
                if (rc != H_SUCCESS)
                        printk(KERN_ERR "Error: Prod to wake up processor %d "
                                                "Ret= %ld\n", nr, rc);
        }
+#endif
 }
 
 static int smp_pSeries_cpu_bootable(unsigned int nr)
index ec8fe22047b70f297a313c9accce01cb1d0f58e1..d6901334d66ea3705cb9a3be46b5dcac37710f70 100644 (file)
@@ -897,7 +897,7 @@ void xics_migrate_irqs_away(void)
                int status;
                unsigned long flags;
 
-               /* We cant set affinity on ISA interrupts */
+               /* We can't set affinity on ISA interrupts */
                if (virq < NUM_ISA_INTERRUPTS)
                        continue;
                if (irq_map[virq].host != xics_host)
index 27402c7d309d8973dc8915f537a400ba45f2e9f9..1636dd896707ec73e618fbab0453ea8506f31501 100644 (file)
@@ -95,7 +95,7 @@ axon_ram_irq_handler(int irq, void *dev)
 
        BUG_ON(!bank);
 
-       dev_err(&device->dev, "Correctable memory error occured\n");
+       dev_err(&device->dev, "Correctable memory error occurred\n");
        bank->ecc_counter++;
        return IRQ_HANDLED;
 }
index 23a95f80dfdb4f3658bcdbacdefa82d95a9fd6e7..a0e2e6b19b57536b12139d7d8b1c8cf0193f9d3a 100644 (file)
@@ -20,7 +20,7 @@
  * struct bcom_bd - Structure describing a generic BestComm buffer descriptor
  * @status: The current status of this buffer. Exact meaning depends on the
  *          task type
- * @data: An array of u32 extra data.  Size of array is task dependant.
+ * @data: An array of u32 extra data.  Size of array is task dependent.
  *
  * Note: Don't dereference a bcom_bd pointer as an array.  The size of the
  *       bcom_bd is variable.  Use bcom_get_bd() instead.
index eb0d1c883c318434b92278d9623935a95b1c7e98..3b52f3ffbdf869f1381a732c9ddcc5c6205be0d1 100644 (file)
@@ -97,7 +97,7 @@ struct bcom_task_header {
        u8      reserved[8];
 };
 
-/* Descriptors stucture & co */
+/* Descriptors structure & co */
 #define BCOM_DESC_NOP          0x000001f8
 #define BCOM_LCD_MASK          0x80000000
 #define BCOM_DRD_EXTENDED      0x40000000
index 8b5aba2633239b217346276d91c56d88eed7ecae..e0bc944eb23f42963f9b20a125e333f8d5deb2ad 100644 (file)
@@ -223,7 +223,7 @@ void __init cpm_reset(void)
 
        /* Set SDMA Bus Request priority 5.
         * On 860T, this also enables FEC priority 6.  I am not sure
-        * this is what we realy want for some applications, but the
+        * this is what we really want for some applications, but the
         * manual recommends it.
         * Bit 25, FAM can also be set to use FEC aggressive mode (860T).
         */
index f8f7f28c6343682bc9b00ac7f4a754fe1d00cc47..68ca9290df9451886e74d24fa4834c15780979f5 100644 (file)
@@ -324,6 +324,11 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
        struct resource rsrc;
        const int *bus_range;
 
+       if (!of_device_is_available(dev)) {
+               pr_warning("%s: disabled\n", dev->full_name);
+               return -ENODEV;
+       }
+
        pr_debug("Adding PCI host bridge %s\n", dev->full_name);
 
        /* Fetch host bridge registers address */
index 14232d57369c4de4f373f76e095ec95bb559345e..49798532b477b8630c77a203dfb76c62ad3caf46 100644 (file)
@@ -1457,7 +1457,6 @@ int fsl_rio_setup(struct platform_device *dev)
        port->ops = ops;
        port->priv = priv;
        port->phys_efptr = 0x100;
-       rio_register_mport(port);
 
        priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1);
        rio_regs_win = priv->regs_win;
@@ -1504,6 +1503,9 @@ int fsl_rio_setup(struct platform_device *dev)
        dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n",
                        port->sys_size ? 65536 : 256);
 
+       if (rio_register_mport(port))
+               goto err;
+
        if (port->host_deviceid >= 0)
                out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST |
                        RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED);
index 7ed8096766422759cf333062020c57f157566687..82fdad885d20207176d3b030f4ea9cb107fa98ff 100644 (file)
@@ -117,7 +117,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
                out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) |
                         (devfn << 8) | reg | cfg_type));
 
-       /* surpress setting of PCI_PRIMARY_BUS */
+       /* suppress setting of PCI_PRIMARY_BUS */
        if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS)
                if ((offset == PCI_PRIMARY_BUS) &&
                        (bus->number == hose->first_busno))
index 56d9e5deccbf5e7ccff3e6b1cc62ef23b9e10a9c..c39a134e86843594abb4ea753203d271399dfc88 100644 (file)
 #define PESDR0_460EX_IHS2              0x036D
 
 /*
- * 460SX addtional DCRs
+ * 460SX additional DCRs
  */
 #define PESDRn_460SX_RCEI              0x02
 
index 975e3ab13cb5477b29ac4ffd504d34e6cacd4325..8b16c479585b271db83330e68529634e5e5e4735 100644 (file)
@@ -76,7 +76,7 @@ static void prng_seed(int nbytes)
 
        /* Add the entropy */
        while (nbytes >= 8) {
-               *((__u64 *)parm_block) ^= *((__u64 *)buf+i*8);
+               *((__u64 *)parm_block) ^= *((__u64 *)(buf+i));
                prng_add_entropy();
                i += 8;
                nbytes -= 8;
index 5c5ba10384c2ee824065f5ae2ee8ac92a7cf3ab6..d9db13810d15cf8c1733768c52faec3e54cc9ab3 100644 (file)
@@ -9,7 +9,7 @@
  *
  * Atomic operations that C can't guarantee us.
  * Useful for resource counting etc.
- * s390 uses 'Compare And Swap' for atomicity in SMP enviroment.
+ * s390 uses 'Compare And Swap' for atomicity in SMP environment.
  *
  */
 
index e34347d567a6eadcf92f42d7e754cf6ef19507dd..fc50a3342da3ba726f35db37df75110897c50478 100644 (file)
@@ -183,7 +183,7 @@ struct esw3 {
  * The irb that is handed to the device driver when an interrupt occurs. For
  * solicited interrupts, the common I/O layer already performs checks whether
  * a field is valid; a field not being valid is always passed as %0.
- * If a unit check occured, @ecw may contain sense data; this is retrieved
+ * If a unit check occurred, @ecw may contain sense data; this is retrieved
  * by the common I/O layer itself if the device doesn't support concurrent
  * sense (so that the device driver never needs to perform basic sene itself).
  * For unsolicited interrupts, the irb is passed as-is (expect for sense data,
index 7061398341d59ac21ffab3affb29216ca973460e..fb317bf2c3780df747180766bd76fa9753f44e81 100644 (file)
@@ -460,7 +460,7 @@ startup:
 #ifndef CONFIG_MARCH_G5
        # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
        xc      __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
-       stfl    __LC_STFL_FAC_LIST      # store facility list
+       .insn   s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list
        tm      __LC_STFL_FAC_LIST,0x01 # stfle available ?
        jz      0f
        la      %r0,0
index 5e73dee63baaabe36a2aa8f924e7870f0bfa443e..9eabbc90795d832ee54710a91b958a71255cf081 100644 (file)
@@ -78,7 +78,7 @@ do_reipl_asm: basr    %r13,0
  * in the ESA psw.
  * Bit 31 of the addresses has to be 0 for the
  * 31bit lpswe instruction a fact they appear to have
- * ommited from the pop.
+ * omitted from the pop.
  */
 .Lnewpsw:      .quad   0x0000000080000000
                .quad   .Lpg1
index ed183c2c6168aa8414dfa6fbd60092bbe3be0e66..f5434d1ecb3166136eaf77e509d04e327b39165b 100644 (file)
@@ -708,7 +708,7 @@ static void __init setup_hwcaps(void)
         * and 1ULL<<0 as bit 63. Bits 0-31 contain the same information
         * as stored by stfl, bits 32-xxx contain additional facilities.
         * How many facility words are stored depends on the number of
-        * doublewords passed to the instruction. The additional facilites
+        * doublewords passed to the instruction. The additional facilities
         * are:
         *   Bit 42: decimal floating point facility is installed
         *   Bit 44: perform floating point operation facility is installed
index 469f11b574facd8a819de59fe2e6796e0f60cd35..20530dd2eab13ef9f780076edf5a6a23e2b6d9b6 100644 (file)
@@ -46,7 +46,9 @@ smp_restart_cpu:
        ltr     %r4,%r4                 /* New stack ? */
        jz      1f
        lr      %r15,%r4
-1:     basr    %r14,%r2
+1:     lr      %r14,%r2                /* r14: Function to call */
+       lr      %r2,%r3                 /* r2 : Parameter for function*/
+       basr    %r14,%r14               /* Call function */
 
 .gprregs_addr:
        .long   .gprregs
index d94aacc898cb99830bf85e458df2fd9a9e522481..5be3f43898f99584e6626f95c43210271e55c3b8 100644 (file)
@@ -42,7 +42,9 @@ smp_restart_cpu:
        ltgr    %r4,%r4                 /* New stack ? */
        jz      1f
        lgr     %r15,%r4
-1:     basr    %r14,%r2
+1:     lgr     %r14,%r2                /* r14: Function to call */
+       lgr     %r2,%r3                 /* r2 : Parameter for function*/
+       basr    %r14,%r14               /* Call function */
 
        .section .data,"aw",@progbits
 .gprregs:
index 9e7b039458da30e56d3e85074b70d703111d866c..87be655557aa48d4e0a0237e245977ffde9b0620 100644 (file)
@@ -724,7 +724,7 @@ static void clock_sync_cpu(struct clock_sync_data *sync)
 }
 
 /*
- * Sync the TOD clock using the port refered to by aibp. This port
+ * Sync the TOD clock using the port referred to by aibp. This port
  * has to be enabled and the other port has to be disabled. The
  * last eacr update has to be more than 1.6 seconds in the past.
  */
@@ -1012,7 +1012,7 @@ static void etr_work_fn(struct work_struct *work)
                eacr = etr_handle_update(&aib, eacr);
 
        /*
-        * Select ports to enable. The prefered synchronization mode is PPS.
+        * Select ports to enable. The preferred synchronization mode is PPS.
         * If a port can be enabled depends on a number of things:
         * 1) The port needs to be online and uptodate. A port is not
         *    disabled just because it is not uptodate, but it is only
@@ -1091,7 +1091,7 @@ static void etr_work_fn(struct work_struct *work)
        /*
         * Update eacr and try to synchronize the clock. If the update
         * of eacr caused a stepping port switch (or if we have to
-        * assume that a stepping port switch has occured) or the
+        * assume that a stepping port switch has occurred) or the
         * clock syncing failed, reset the sync check control bit
         * and set up a timer to try again after 0.5 seconds
         */
index 1ccdf4d8aa850ffb4206dfc0a349280adead120a..5e8ead4b4aba0d8604d2eaafcacd9b18d34468be 100644 (file)
@@ -44,7 +44,7 @@ static inline void set_vtimer(__u64 expires)
        __u64 timer;
 
        asm volatile ("  STPT %0\n"  /* Store current cpu timer value */
-                     "  SPT %1"     /* Set new value immediatly afterwards */
+                     "  SPT %1"     /* Set new value immediately afterwards */
                      : "=m" (timer) : "m" (expires) );
        S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer;
        S390_lowcore.last_update_timer = expires;
index bade533ba288789275ee8b419ccf16d40f23d0f1..30ca85cce3147f89b70cb2ba991c20e1275a1a5a 100644 (file)
@@ -721,7 +721,7 @@ static int __init kvm_s390_init(void)
 
        /*
         * guests can ask for up to 255+1 double words, we need a full page
-        * to hold the maximum amount of facilites. On the other hand, we
+        * to hold the maximum amount of facilities. On the other hand, we
         * only set facilities that are known to work in KVM.
         */
        facilities = (unsigned long long *) get_zeroed_page(GFP_KERNEL|GFP_DMA);
index 9194a4b52b22a84d3ada8dce7f46ab7f411e5576..73c47bd95db39e36c792ad7f12ae317ccc49b3d7 100644 (file)
@@ -311,7 +311,7 @@ int kvm_s390_handle_b2(struct kvm_vcpu *vcpu)
 
        /*
         * a lot of B2 instructions are priviledged. We first check for
-        * the priviledges ones, that we can handle in the kernel. If the
+        * the privileged ones, that we can handle in the kernel. If the
         * kernel can handle this instruction, we check for the problem
         * state bit and (a) handle the instruction or (b) send a code 2
         * program check.
index 7e9d30d567b0ab21265b669f1f343018d10de080..ab0e041ac54cf2b17fc0b631bf0ed6cd4f59fd53 100644 (file)
@@ -48,10 +48,10 @@ sie_irq_handler:
        tm      __TI_flags+7(%r2),_TIF_EXIT_SIE
        jz      0f
        larl    %r2,sie_exit                    # work pending, leave sie
-       stg     %r2,__LC_RETURN_PSW+8
+       stg     %r2,SPI_PSW+8(0,%r15)
        br      %r14
 0:     larl    %r2,sie_reenter                 # re-enter with guest id
-       stg     %r2,__LC_RETURN_PSW+8
+       stg     %r2,SPI_PSW+8(0,%r15)
 1:     br      %r14
 
 /*
index 2c57806c0858e91f8cf2771ca816e7ccc608e4db..ab988135e5c682a90370f998d5d72956fd40961c 100644 (file)
@@ -392,7 +392,7 @@ void __kprobes do_protection_exception(struct pt_regs *regs, long pgm_int_code,
 {
        int fault;
 
-       /* Protection exception is supressing, decrement psw address. */
+       /* Protection exception is suppressing, decrement psw address. */
        regs->psw.addr -= (pgm_int_code >> 16);
        /*
         * Check for low-address protection.  This needs to be treated
@@ -543,7 +543,6 @@ static void pfault_interrupt(unsigned int ext_int_code,
        struct task_struct *tsk;
        __u16 subcode;
 
-       kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++;
        /*
         * Get the external interruption subcode & pfault
         * initial/completion signal bit. VM stores this 
@@ -553,14 +552,15 @@ static void pfault_interrupt(unsigned int ext_int_code,
        subcode = ext_int_code >> 16;
        if ((subcode & 0xff00) != __SUBCODE_MASK)
                return;
+       kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++;
 
        /*
         * Get the token (= address of the task structure of the affected task).
         */
 #ifdef CONFIG_64BIT
-       tsk = *(struct task_struct **) param64;
+       tsk = (struct task_struct *) param64;
 #else
-       tsk = *(struct task_struct **) param32;
+       tsk = (struct task_struct *) param32;
 #endif
 
        if (subcode & 0x0080) {
index 122ffbd08ce016e4c87d744adcdf9b9cbf2c3c7f..0607e4b14b2742798e36b957c7f17e1451bc0bf0 100644 (file)
@@ -24,12 +24,13 @@ static void change_page_attr(unsigned long addr, int numpages,
                        WARN_ON_ONCE(1);
                        continue;
                }
-               ptep = pte_offset_kernel(pmdp, addr + i * PAGE_SIZE);
+               ptep = pte_offset_kernel(pmdp, addr);
 
                pte = *ptep;
                pte = set(pte);
-               ptep_invalidate(&init_mm, addr + i * PAGE_SIZE, ptep);
+               ptep_invalidate(&init_mm, addr, ptep);
                *ptep = pte;
+               addr += PAGE_SIZE;
        }
 }
 
index 3d48f4db246d2a2caf8ec43f4dd38cf272200aba..4952872d6f0ae1c05c58bd7d046fe24029aef5ac 100644 (file)
@@ -517,12 +517,8 @@ stop_exit:
 
 static int check_hardware_prerequisites(void)
 {
-       unsigned long long facility_bits[2];
-
-       memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32);
-       if (!(facility_bits[1] & (1ULL << 59)))
+       if (!test_facility(68))
                return -EOPNOTSUPP;
-
        return 0;
 }
 /*
index d77dc639d8e322ec8bfd0263f4849e4581670b9f..974aefe861233b8615ed61253a6f7a1d4b21085c 100644 (file)
@@ -40,5 +40,5 @@ archclean:
 define archhelp
        echo '  vmlinux.bin          - Raw binary boot image'
        echo
-       echo '  These will be default as apropriate for a configured platform.'
+       echo '  These will be default as appropriate for a configured platform.'
 endef
index bc439de48cd166f47137b73f9a390e11036349be..4b89da248d17acf77dc8355d96cef8c0bef79cea 100644 (file)
@@ -24,6 +24,7 @@ config SUPERH
        select RTC_LIB
        select GENERIC_ATOMIC64
        select GENERIC_IRQ_SHOW
+       select ARCH_NO_SYSDEV_OPS
        help
          The SuperH is a RISC processor targeted for use in embedded systems
          and consumer electronics; it was also used in the Sega Dreamcast
index 12fec72fec5f4888fb5a6f7c72911aaa0ebccd68..1553d56cf4e08f30e2454c4a20e85307059af331 100644 (file)
@@ -82,7 +82,7 @@ config SH_NO_BSS_INIT
        help
          If running in painfully slow environments, such as an RTL
          simulation or from remote memory via SHdebug, where the memory
-         can already be gauranteed to ber zeroed on boot, say Y.
+         can already be guaranteed to ber zeroed on boot, say Y.
 
          For all other cases, say N. If this option seems perplexing, or
          you aren't sure, say N.
index a9e33569ad387c92bfb4c5959b3d2a7534f3132c..fa2a208ec6cb585db12f768fcfae41116b93a362 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/io.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/sh_mmcif.h>
-#include <linux/mfd/sh_mobile_sdhi.h>
+#include <linux/mmc/sh_mobile_sdhi.h>
 #include <cpu/sh7757.h>
 #include <asm/sh_eth.h>
 #include <asm/heartbeat.h>
index 636d8318a72a2c76136c99b4d509247d7aa3c959..618bd566cf53bfe70b85b825072e0e7fa2b8aab5 100644 (file)
@@ -156,24 +156,34 @@ static struct platform_device nand_flash_device = {
 #define PORT_DRVCRA    0xA405018A
 #define PORT_DRVCRB    0xA405018C
 
+static int ap320_wvga_set_brightness(void *board_data, int brightness)
+{
+       if (brightness) {
+               gpio_set_value(GPIO_PTS3, 0);
+               __raw_writew(0x100, FPGA_BKLREG);
+       } else {
+               __raw_writew(0, FPGA_BKLREG);
+               gpio_set_value(GPIO_PTS3, 1);
+       }
+       
+       return 0;
+}
+
+static int ap320_wvga_get_brightness(void *board_data)
+{
+       return gpio_get_value(GPIO_PTS3);
+}
+
 static void ap320_wvga_power_on(void *board_data, struct fb_info *info)
 {
        msleep(100);
 
        /* ASD AP-320/325 LCD ON */
        __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG);
-
-       /* backlight */
-       gpio_set_value(GPIO_PTS3, 0);
-       __raw_writew(0x100, FPGA_BKLREG);
 }
 
 static void ap320_wvga_power_off(void *board_data)
 {
-       /* backlight */
-       __raw_writew(0, FPGA_BKLREG);
-       gpio_set_value(GPIO_PTS3, 1);
-
        /* ASD AP-320/325 LCD OFF */
        __raw_writew(0, FPGA_LCDREG);
 }
@@ -209,6 +219,12 @@ static struct sh_mobile_lcdc_info lcdc_info = {
                .board_cfg = {
                        .display_on = ap320_wvga_power_on,
                        .display_off = ap320_wvga_power_off,
+                       .set_brightness = ap320_wvga_set_brightness,
+                       .get_brightness = ap320_wvga_get_brightness,
+               },
+               .bl_info = {
+                       .name = "sh_mobile_lcdc_bl",
+                       .max_brightness = 1,
                },
        }
 };
index 78cf2ab89d7aa2f2ce1ee20c2c2112c8957b2ed2..f63d323f411f5f32043e32f966be6e3a1289df41 100644 (file)
@@ -51,7 +51,7 @@
  */
 #define LEVEL(event) (((event) - HW_EVENT_IRQ_BASE) / 32)
 
-/* Return the hardware event's bit positon within the EMR/ESR */
+/* Return the hardware event's bit position within the EMR/ESR */
 #define EVENT_BIT(event) (((event) - HW_EVENT_IRQ_BASE) & 31)
 
 /*
index fd4ff25f23b2f95ecd34166226a9896521f2f853..86a0d565adededfd69fcb491963fe30db5572f69 100644 (file)
@@ -263,6 +263,18 @@ const static struct fb_videomode ecovec_dvi_modes[] = {
        },
 };
 
+static int ecovec24_set_brightness(void *board_data, int brightness)
+{
+       gpio_set_value(GPIO_PTR1, brightness);
+
+       return 0;
+}
+
+static int ecovec24_get_brightness(void *board_data)
+{
+       return gpio_get_value(GPIO_PTR1);
+}
+
 static struct sh_mobile_lcdc_info lcdc_info = {
        .ch[0] = {
                .interface_type = RGB18,
@@ -273,6 +285,12 @@ static struct sh_mobile_lcdc_info lcdc_info = {
                        .height = 91,
                },
                .board_cfg = {
+                       .set_brightness = ecovec24_set_brightness,
+                       .get_brightness = ecovec24_get_brightness,
+               },
+               .bl_info = {
+                       .name = "sh_mobile_lcdc_bl",
+                       .max_brightness = 1,
                },
        }
 };
@@ -936,7 +954,7 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd)
                return;
        }
 
-       /* read MAC address frome EEPROM */
+       /* read MAC address from EEPROM */
        for (i = 0; i < sizeof(pd->mac_addr); i++) {
                pd->mac_addr[i] = mac_read(a, 0x10 + i);
                msleep(10);
index 94186cf079b635a882620eadb1e3ce88b4359a30..f1147caebacf020e6933b1069b962f1bc2a0cfca 100644 (file)
@@ -23,7 +23,7 @@
 
 static void landisk_power_off(void)
 {
-        __raw_writeb(0x01, PA_SHUTDOWN);
+       __raw_writeb(0x01, PA_SHUTDOWN);
 }
 
 static struct resource cf_ide_resources[3];
@@ -85,7 +85,7 @@ device_initcall(landisk_devices_setup);
 
 static void __init landisk_setup(char **cmdline_p)
 {
-        /* LED ON */
+       /* LED ON */
        __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED);
 
        printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n");
@@ -97,7 +97,6 @@ static void __init landisk_setup(char **cmdline_p)
  */
 static struct sh_machine_vector mv_landisk __initmv = {
        .mv_name = "LANDISK",
-       .mv_nr_irqs = 72,
        .mv_setup = landisk_setup,
        .mv_init_irq = init_landisk_IRQ,
 };
index 4983a4d2035593daefb9ea6da47854f856e20374..5ede38c330d35e8f8f3d33bb32b8464a9d3b6e04 100644 (file)
@@ -61,7 +61,7 @@
   #define SH7751_PCICONF3_BIST7      0x80000000  /* Bist Supported */
   #define SH7751_PCICONF3_BIST6      0x40000000  /* Bist Executing */
   #define SH7751_PCICONF3_BIST3_0    0x0F000000  /* Bist Passed */
-  #define SH7751_PCICONF3_HD7        0x00800000  /* Single Funtion device */
+  #define SH7751_PCICONF3_HD7        0x00800000  /* Single Function device */
   #define SH7751_PCICONF3_HD6_0      0x007F0000  /* Configuration Layout */
   #define SH7751_PCICONF3_LAT        0x0000FF00  /* Latency Timer */
   #define SH7751_PCICONF3_CLS        0x000000FF  /* Cache Line Size */
index a09c77dd09db7c252b34da5f72f861bf4a413d1f..194231cb5a70e48a9d27fd82c65f55e85bc640a5 100644 (file)
@@ -84,7 +84,7 @@ int __devinit register_pci_controller(struct pci_channel *hose)
        hose_tail = &hose->next;
 
        /*
-        * Do not panic here but later - this might hapen before console init.
+        * Do not panic here but later - this might happen before console init.
         */
        if (!hose->io_map_base) {
                printk(KERN_WARNING
index c4e0b3d472b95363646ddefed49650d052d16ea4..822d6084195b7397ff7eeff08fe33ce618630303 100644 (file)
@@ -186,7 +186,7 @@ typedef struct page *pgtable_t;
 /*
  * While BYTES_PER_WORD == 4 on the current sh64 ABI, GCC will still
  * happily generate {ld/st}.q pairs, requiring us to have 8-byte
- * alignment to avoid traps. The kmalloc alignment is gauranteed by
+ * alignment to avoid traps. The kmalloc alignment is guaranteed by
  * virtue of L1_CACHE_BYTES, requiring this to only be special cased
  * for slab caches.
  */
index b799fe71114cf3fece0043a95a5eb45c505d578a..0bce3d81569ee2af90c576c8754d615b090b2fb0 100644 (file)
@@ -167,7 +167,7 @@ static inline unsigned long copy_ptea_attributes(unsigned long x)
 #endif
 
 /*
- * Mask of bits that are to be preserved accross pgprot changes.
+ * Mask of bits that are to be preserved across pgprot changes.
  */
 #define _PAGE_CHG_MASK \
        (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \
index c48a9c3420da0e63888a2d85710db7dc1931b8db..95adc500cabc3acbc3cbd5d1918eaa540c7f7cc7 100644 (file)
@@ -9,7 +9,7 @@
  * struct.
  *
  * The same note as with the movli.l/movco.l pair applies here, as long
- * as the load is gauranteed to be inlined, nothing else will hook in to
+ * as the load is guaranteed to be inlined, nothing else will hook in to
  * r0 and we get the return value for free.
  *
  * NOTE: Due to the fact we require r0 encoding, care should be taken to
index 5d9d4d5154be3f038765253d16298c9005efb013..6ce944e33e59db4c7df85ee91b240a74c6bef615 100644 (file)
@@ -24,7 +24,7 @@
 #define PA_OBLED        (PA_BCR+0x001c) /* On Board LED control */
 #define PA_OBSW         (PA_BCR+0x001e) /* On Board Switch control */
 #define PA_AUDIOSEL     (PA_BCR+0x0020) /* Sound Interface Select control */
-#define PA_EXTPLR       (PA_BCR+0x001e) /* Extention Pin Polarity control */
+#define PA_EXTPLR       (PA_BCR+0x001e) /* Extension Pin Polarity control */
 #define PA_TPCTL        (PA_BCR+0x0100) /* Touch Panel Access control */
 #define PA_TPDCKCTL     (PA_BCR+0x0102) /* Touch Panel Access data control */
 #define PA_TPCTLCLR     (PA_BCR+0x0104) /* Touch Panel Access control */
@@ -89,7 +89,7 @@
 #define PA_OBLED       (PA_BCR+0x0018) /* On Board LED control */
 #define PA_OBSW                (PA_BCR+0x001a) /* On Board Switch control */
 #define PA_AUDIOSEL    (PA_BCR+0x001c) /* Sound Interface Select control */
-#define PA_EXTPLR      (PA_BCR+0x001e) /* Extention Pin Polarity control */
+#define PA_EXTPLR      (PA_BCR+0x001e) /* Extension Pin Polarity control */
 #define PA_TPCTL       (PA_BCR+0x0100) /* Touch Panel Access control */
 #define PA_TPDCKCTL    (PA_BCR+0x0102) /* Touch Panel Access data control */
 #define PA_TPCTLCLR    (PA_BCR+0x0104) /* Touch Panel Access control */
index 0a800157b82620fa1b32142c7810b0dff9f11ec4..e04f75eaa153b80be02b5a2c26a7677d6f58e022 100644 (file)
 #define PA_DISPCTL     0xa4000008      /* Display Timing control */
 #define PA_SDMPOW      0xa400000a      /* SD Power control */
 #define PA_RTCCE       0xa400000c      /* RTC(9701) Enable control */
-#define PA_PCICD       0xa400000e      /* PCI Extention detect control */
+#define PA_PCICD       0xa400000e      /* PCI Extension detect control */
 #define PA_VOYAGERRTS  0xa4000020      /* VOYAGER Reset control */
 
 #define PA_R2D1_AXRST          0xa4000022      /* AX_LAN Reset control */
 #define PA_R2D1_CFRST          0xa4000024      /* CF Reset control */
 #define PA_R2D1_ADMRTS         0xa4000026      /* SD Reset control */
-#define PA_R2D1_EXTRST         0xa4000028      /* Extention Reset control */
+#define PA_R2D1_EXTRST         0xa4000028      /* Extension Reset control */
 #define PA_R2D1_CFCDINTCLR     0xa400002a      /* CF Insert Interrupt clear */
 
 #define PA_R2DPLUS_CFRST       0xa4000022      /* CF Reset control */
 #define PA_R2DPLUS_ADMRTS      0xa4000024      /* SD Reset control */
-#define PA_R2DPLUS_EXTRST      0xa4000026      /* Extention Reset control */
+#define PA_R2DPLUS_EXTRST      0xa4000026      /* Extension Reset control */
 #define PA_R2DPLUS_CFCDINTCLR  0xa4000028      /* CF Insert Interrupt clear */
 #define PA_R2DPLUS_KEYCTLCLR   0xa400002a      /* Key Interrupt clear */
 
index dd0e0f2113598801270737de56eb3c8d4672a112..8f63a264a84277bda29a94ea88ca0e42fbd4d202 100644 (file)
@@ -67,7 +67,7 @@ int __init __deprecated cpg_clk_init(void)
 }
 
 /*
- * Placeholder for compatability, until the lazy CPUs do this
+ * Placeholder for compatibility, until the lazy CPUs do this
  * on their own.
  */
 int __init __weak arch_clk_init(void)
index 1656b8c91faf34fbcc6eaba31384388f5c347b68..beba32beb6d9899f95f9e8aad01c44845835bcf9 100644 (file)
@@ -648,7 +648,7 @@ static void __init sh7786_usb_setup(void)
         * The following settings are necessary
         * for using the USB modules.
         *
-        * see "USB Inital Settings" for detail
+        * see "USB Initial Settings" for detail
         */
        __raw_writel(USBINITVAL1, USBINITREG1);
        __raw_writel(USBINITVAL2, USBINITREG2);
index 64ea0b165399260665c68a63e5d3debba3b95356..91971103b62b56e7bd4352a441bf7282b8dac061 100644 (file)
@@ -183,7 +183,7 @@ asmlinkage void do_softirq(void)
                );
 
                /*
-                * Shouldnt happen, we returned above if in_interrupt():
+                * Shouldn't happen, we returned above if in_interrupt():
                 */
                WARN_ON_ONCE(softirq_count());
        }
index 4f267160c515a21b38ff7bc49ace6f4093c1ff51..58bff45d1156ee4d36857f28845d71e5bc5a4954 100644 (file)
@@ -150,7 +150,7 @@ void __init check_for_initrd(void)
        }
 
        /*
-        * If we got this far inspite of the boot loader's best efforts
+        * If we got this far in spite of the boot loader's best efforts
         * to the contrary, assume we actually have a valid initrd and
         * fix up the root dev.
         */
index 2a62816d2ddd54c61d7ef2054653651b3e87fb52..49aeabeba2c2c3b48d14c89004b3dc0ec04b987d 100644 (file)
@@ -27,7 +27,7 @@
 ! 2.: When there are two or three bytes in the last word of an 11-or-more
 !     bytes memory chunk to b copied, the rest of the word can be read
 !     without side effects.
-!     This could be easily changed by increasing the minumum size of
+!     This could be easily changed by increasing the minimum size of
 !     a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2,
 !     however, this would cost a few extra cyles on average.
 !     For SHmedia, the assumption is that any quadword can be read in its
index dd300c372ce1966148910c86bd472d87b3066d16..5d682e0ee24ff5ae334fa0f8d61b6f2c1a76a745 100644 (file)
@@ -29,7 +29,7 @@
 ! 2.: When there are two or three bytes in the last word of an 11-or-more
 !     bytes memory chunk to b copied, the rest of the word can be read
 !     without side effects.
-!     This could be easily changed by increasing the minumum size of
+!     This could be easily changed by increasing the minimum size of
 !     a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2,
 !     however, this would cost a few extra cyles on average.
 !     For SHmedia, the assumption is that any quadword can be read in its
index bafe5a631b6d1a4e46653c7f6fa01f4b80603a1f..75686409be245b4f11f7e675008f4e6e8f5bdf04 100644 (file)
@@ -654,7 +654,7 @@ extern unsigned long sun4v_mmu_tsb_ctx0(unsigned long num_descriptions,
  * ARG3:       mmu context
  * ARG4:       flags (HV_MMU_{IMMU,DMMU})
  * RET0:       status
- * ERRORS:     EINVAL                  Invalid virutal address, context, or
+ * ERRORS:     EINVAL                  Invalid virtual address, context, or
  *                                     flags value
  *             ENOTSUPPORTED           ARG0 or ARG1 is non-zero
  *
@@ -721,7 +721,7 @@ extern void sun4v_mmu_demap_all(void);
  * ARG2:       TTE
  * ARG3:       flags (HV_MMU_{IMMU,DMMU})
  * RET0:       status
- * ERRORS:     EINVAL                  Invalid virutal address or flags value
+ * ERRORS:     EINVAL                  Invalid virtual address or flags value
  *             EBADPGSZ                Invalid page size value
  *             ENORADDR                Invalid real address in TTE
  *             ETOOMANY                Too many mappings (max of 8 reached)
@@ -800,7 +800,7 @@ extern unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr,
  * ARG1:       reserved, must be zero
  * ARG2:       flags (HV_MMU_{IMMU,DMMU})
  * RET0:       status
- * ERRORS:     EINVAL                  Invalid virutal address or flags value
+ * ERRORS:     EINVAL                  Invalid virtual address or flags value
  *             ENOMAP                  Specified mapping was not found
  *
  * Demaps any permanent page mapping (established via
@@ -1205,7 +1205,7 @@ struct hv_trap_trace_control {
  * structure contents.  Attempts to do so will result in undefined
  * behavior for the guest.
  *
- * Each trap trace buffer entry is layed out as follows:
+ * Each trap trace buffer entry is laid out as follows:
  */
 #ifndef __ASSEMBLY__
 struct hv_trap_trace_entry {
@@ -1300,7 +1300,7 @@ struct hv_trap_trace_entry {
  * state in RET1.  Future systems may define various flags for the
  * enable argument (ARG0), for the moment a guest should pass
  * "(uint64_t) -1" to enable, and "(uint64_t) 0" to disable all
- * tracing - which will ensure future compatability.
+ * tracing - which will ensure future compatibility.
  */
 #define HV_FAST_TTRACE_ENABLE          0x92
 
@@ -1880,7 +1880,7 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle,
  * pci_device, at pci_config_offset from the beginning of the device's
  * configuration space.  If there was no error, RET1 is set to zero and
  * RET2 is set to the data read.  Insignificant bits in RET2 are not
- * guarenteed to have any specific value and therefore must be ignored.
+ * guaranteed to have any specific value and therefore must be ignored.
  *
  * The data returned in RET2 is size based byte swapped.
  *
@@ -1941,9 +1941,9 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle,
  * and return the actual data read in RET2.  The data returned is size based
  * byte swapped.
  *
- * Non-significant bits in RET2 are not guarenteed to have any specific value
+ * Non-significant bits in RET2 are not guaranteed to have any specific value
  * and therefore must be ignored.  If RET1 is returned as non-zero, the data
- * value is not guarenteed to have any specific value and should be ignored.
+ * value is not guaranteed to have any specific value and should be ignored.
  *
  * The caller must have permission to read from the given devhandle, real
  * address, which must be an IO address.  The argument real address must be a
@@ -2456,9 +2456,9 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle,
  *
  * As receive queue configuration causes a reset of the queue's head and
  * tail pointers there is no way for a gues to determine how many entries
- * have been received between a preceeding ldc_get_rx_state() API call
+ * have been received between a preceding ldc_get_rx_state() API call
  * and the completion of the configuration operation.  It should be noted
- * that datagram delivery is not guarenteed via domain channels anyway,
+ * that datagram delivery is not guaranteed via domain channels anyway,
  * and therefore any higher protocol should be resilient to datagram
  * loss if necessary.  However, to overcome this specific race potential
  * it is recommended, for example, that a higher level protocol be employed
index 686defe6aaa0cbe2ef0078ae4c70c668f814780a..af755483e17dc7517ac9770f91325a81fe3ac8a8 100644 (file)
@@ -37,7 +37,7 @@
 /* Power and Test Register (PTR) bits */
 #define PTR_LPTB_IRQ7  0x08
 #define PTR_LEVEL_IRQ  0x80    /* When not ECP/EPP: Use level IRQ           */
-#define PTR_LPT_REG_DIR        0x80    /* When ECP/EPP: LPT CTR controlls direction */
+#define PTR_LPT_REG_DIR        0x80    /* When ECP/EPP: LPT CTR controls direction */
                                /*               of the parallel port        */
 
 /* Function Control Register (FCR) bits */
index 843e4faf6a507fe8291e44c947794ba837e3376b..288d7beba051e8d976e91b759dae623a1a1124da 100644 (file)
@@ -31,7 +31,7 @@ extern unsigned int picl_shift;
 
 /* In order to commonize as much of the implementation as
  * possible, we use PICH as our counter.  Mostly this is
- * to accomodate Niagara-1 which can only count insn cycles
+ * to accommodate Niagara-1 which can only count insn cycles
  * in PICH.
  */
 static inline u64 picl_value(unsigned int nmi_hz)
index 30b0b797dc0c3d9c99cc342c5f5d3a285ea35e2a..c7ad3fe2b252b8b16c1bca8e2c062a77da1e3f6a 100644 (file)
@@ -33,7 +33,7 @@ struct pt_regs {
         * things like "in a system call" etc. for an arbitray
         * process.
         *
-        * The PT_REGS_MAGIC is choosen such that it can be
+        * The PT_REGS_MAGIC is chosen such that it can be
         * loaded completely using just a sethi instruction.
         */
        unsigned int magic;
index 906ee3e24cc96543e059358527f5d0f029b78401..6da784a5612be01936a34a96a4706d95d2c12b03 100644 (file)
@@ -801,7 +801,7 @@ vac_linesize_patch_32:              subcc   %l7, 32, %l7
        .globl  vac_hwflush_patch1_on, vac_hwflush_patch2_on
 
 /*
- * Ugly, but we cant use hardware flushing on the sun4 and we'd require
+ * Ugly, but we can't use hardware flushing on the sun4 and we'd require
  * two instructions (Anton)
  */
 vac_hwflush_patch1_on:         addcc   %l7, -PAGE_SIZE, %l7
@@ -851,7 +851,7 @@ sun4c_fault:
         sethi  %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4
 
        /* If the kernel references a bum kernel pointer, or a pte which
-        * points to a non existant page in ram, we will run this code
+        * points to a non existent page in ram, we will run this code
         * _forever_ and lock up the machine!!!!! So we must check for
         * this condition, the AC_SYNC_ERR bits are what we must examine.
         * Also a parity error would make this happen as well.  So we just
index f8f21050448b8963bc25e23e87a3a4f816bbbea6..aa594c792d19f4dbc1fb5f0c34c307048ac17905 100644 (file)
@@ -85,7 +85,7 @@ sparc_ramdisk_image64:
 sparc64_boot:
        mov     %o4, %l7
 
-       /* We need to remap the kernel.  Use position independant
+       /* We need to remap the kernel.  Use position independent
         * code to remap us to KERNBASE.
         *
         * SILO can invoke us with 32-bit address masking enabled,
index 5fe3d65581f7627885b0f3cce00a2c1e51c21670..35f141a9f506660d4c5e70077b9c811639261907 100644 (file)
@@ -15,7 +15,7 @@ EXPORT_SYMBOL(init_task);
 
 /* .text section in head.S is aligned at 8k boundary and this gets linked
  * right after that so that the init_thread_union is aligned properly as well.
- * If this is not aligned on a 8k boundry, then you should change code
+ * If this is not aligned on a 8k boundary, then you should change code
  * in etrap.S which assumes it.
  */
 union thread_union init_thread_union __init_task_data =
index 63cd4e5d47c2a62eb9264b8e01334027a7ebcaeb..5c149689bb20c365144dd000ae2ece677ced82f7 100644 (file)
@@ -459,7 +459,7 @@ apply_interrupt_map(struct device_node *dp, struct device_node *pp,
                 *
                 * Handle this by deciding that, if we didn't get a
                 * match in the parent's 'interrupt-map', and the
-                * parent is an IRQ translater, then use the parent as
+                * parent is an IRQ translator, then use the parent as
                 * our IRQ controller.
                 */
                if (pp->irq_trans)
index 760578687e7ca86cb0bb63cc7dc68721d51bee90..ee8426ede7c76ae5617ddb58a95d93a3f2c973ce 100644 (file)
@@ -1027,7 +1027,7 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags)
 
        /*
         * If group events scheduling transaction was started,
-        * skip the schedulability test here, it will be peformed
+        * skip the schedulability test here, it will be performed
         * at commit time(->commit_txn) as a whole
         */
        if (cpuc->group_flag & PERF_EVENT_TXN)
index b9085ecbb27b7f1f8a373af9cd0504f5bde1b0a0..825dbee94d8464bdccdc30018a4d8a19eae9120d 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the FPU instruction emulation.
 #
 
-# supress all warnings - as math.c produces a lot!
+# suppress all warnings - as math.c produces a lot!
 ccflags-y := -w
 
 obj-y    := math_$(BITS).o
index 6e2cdd5ae96bbc2ec160ce00f65467fd0bab3667..e32b0c23c4c815870ac0dac9358ea97af1e8cd05 100644 (file)
@@ -51,7 +51,7 @@ config GENERIC_TIME
 config GENERIC_CLOCKEVENTS
        def_bool y
 
-# FIXME: tilegx can implement a more efficent rwsem.
+# FIXME: tilegx can implement a more efficient rwsem.
 config RWSEM_GENERIC_SPINLOCK
        def_bool y
 
index 146e47d5334b8559a50bb16d63cb0839af8ee157..f13188ac281a33061f83d63ee872eecf1dfbe2d5 100644 (file)
@@ -319,7 +319,7 @@ typedef union
  *         is an error code, or zero if no error.  The val0 member is the
  *         updated value of seqno; it has been incremented by 1 for each
  *         packet sent.  That increment may be less than nentries if an
- *         error occured, or if some of the entries in the vector contain
+ *         error occurred, or if some of the entries in the vector contain
  *         handles equal to NETIO_PKT_HANDLE_NONE.  The val1 member is the
  *         updated value of nentries; it has been decremented by 1 for each
  *         vector entry processed.  Again, that decrement may be less than
index 1b8bf03d62a09ff5a7ccf63bb329205fa795f8c8..ee41bca4c8c40f8b4f34bf574a188b0ab838f0d3 100644 (file)
@@ -1340,7 +1340,7 @@ typedef struct
  *  this operation.  If any permanent delivery errors were encountered,
  *  the routine returns HV_ERECIP.  In the event of permanent delivery
  *  errors, it may be the case that delivery was not attempted to all
- *  recipients; if any messages were succesfully delivered, however,
+ *  recipients; if any messages were successfully delivered, however,
  *  recipients' state values will be updated appropriately.
  *
  *  It is explicitly legal to specify a recipient structure whose state
@@ -1359,7 +1359,7 @@ typedef struct
  *  never call hv_receive_message, or could register a different state
  *  buffer, losing the message.
  *
- *  Specifiying the same recipient more than once in the recipient list
+ *  Specifying the same recipient more than once in the recipient list
  *  is an error, which will not result in an error return but which may
  *  or may not result in more than one message being delivered to the
  *  recipient tile.
index a1ee25be9ad97084192b2853900d7aba3dab94ef..ea38f0c9ec7cc776f4bdeddfd7e8371e224166e4 100644 (file)
@@ -36,7 +36,7 @@
  * Initialization flow and process
  * -------------------------------
  *
- * This files containes the routines to search for PCI buses,
+ * This files contains the routines to search for PCI buses,
  * enumerate the buses, and configure any attached devices.
  *
  * There are two entry points here:
@@ -519,7 +519,7 @@ static int __devinit tile_cfg_read(struct pci_bus *bus,
 
 
 /*
- * See tile_cfg_read() for relevent comments.
+ * See tile_cfg_read() for relevant comments.
  * Note that "val" is the value to write, not a pointer to that value.
  */
 static int __devinit tile_cfg_write(struct pci_bus *bus,
index 758f597f488cd9c814f61b3295e9f684d74de344..51f8663bf0743e57765041fbedf3c6f1927e8a86 100644 (file)
@@ -290,7 +290,7 @@ static int handle_page_fault(struct pt_regs *regs,
        /*
         * Early on, we need to check for migrating PTE entries;
         * see homecache.c.  If we find a migrating PTE, we wait until
-        * the backing page claims to be done migrating, then we procede.
+        * the backing page claims to be done migrating, then we proceed.
         * For kernel PTEs, we rewrite the PTE and return and retry.
         * Otherwise, we treat the fault like a normal "no PTE" fault,
         * rather than trying to patch up the existing PTE.
index 201a582c413752c40ec6fc87bfc87ca3e73bb8d2..42cfcba4e1ef7edb949f5cebf509f4d8ab9116c1 100644 (file)
@@ -219,7 +219,7 @@ try_again:
        if (mm->free_area_cache < len)
                goto fail;
 
-       /* either no address requested or cant fit in requested address hole */
+       /* either no address requested or can't fit in requested address hole */
        addr = (mm->free_area_cache - len) & huge_page_mask(h);
        do {
                /*
index 9e9a4aaa703d60d77dc04aa6e8433bd2592a1f95..3160b1a5adb700f3cbdfe73e15f2bab54dee800b 100644 (file)
@@ -186,7 +186,7 @@ config UML_NET_SLIRP
         other transports, SLiRP works without the need of root level
         privleges, setuid binaries, or SLIP devices on the host.  This
         also means not every type of connection is possible, but most
-        situations can be accomodated with carefully crafted slirp
+        situations can be accommodated with carefully crafted slirp
         commands that can be passed along as part of the network device's
         setup string.  The effect of this transport on the UML is similar
         that of a host behind a firewall that masquerades all network
index 90a438acbfafcf00aa8281f03ca44228250189e4..b5e675e370c67203ef301ee0c0766d2babd5a330 100644 (file)
@@ -47,7 +47,7 @@ config HOSTFS
 
 config HPPFS
        tristate "HoneyPot ProcFS (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       depends on EXPERIMENTAL && PROC_FS
        help
          hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc
          entries to be overridden, removed, or fabricated from the host.
index 02fb017fed472ed96d66aa1a4252b17b2f5bd677..a9da516a527416e12cfdc887939e2eb8cbd5020f 100644 (file)
@@ -4,6 +4,10 @@ menu "UML-specific options"
 
 menu "Host processor type and features"
 
+config CMPXCHG_LOCAL
+       bool
+       default n
+
 source "arch/x86/Kconfig.cpu"
 
 endmenu
diff --git a/arch/um/include/asm/bug.h b/arch/um/include/asm/bug.h
new file mode 100644 (file)
index 0000000..9e33b86
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef __UM_BUG_H
+#define __UM_BUG_H
+
+#include <asm-generic/bug.h>
+
+#endif
index e2cf786bda0a28c43a8173ab40ec62ee2ab8a6de..5bd1bad33fab65fdd8f8857c3452768377e88290 100644 (file)
@@ -49,7 +49,10 @@ static inline struct thread_info *current_thread_info(void)
 {
        struct thread_info *ti;
        unsigned long mask = THREAD_SIZE - 1;
-       ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
+       void *p;
+
+       asm volatile ("" : "=r" (p) : "0" (&ti));
+       ti = (struct thread_info *) (((unsigned long)p) & ~mask);
        return ti;
 }
 
index 804b28dd0328a30088e122a1dcd984bf1464ba75..b1da91c1b200d4f14ff60fcbdbd3b203b595dbe4 100644 (file)
@@ -4,7 +4,7 @@
 
 obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
        ptrace_user.o setjmp.o signal.o stub.o stub_segv.o syscalls.o sysrq.o \
-       sys_call_table.o tls.o
+       sys_call_table.o tls.o atomic64_cx8_32.o
 
 obj-$(CONFIG_BINFMT_ELF) += elfcore.o
 
diff --git a/arch/um/sys-i386/atomic64_cx8_32.S b/arch/um/sys-i386/atomic64_cx8_32.S
new file mode 100644 (file)
index 0000000..1e901d3
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+ * atomic64_t for 586+
+ *
+ * Copied from arch/x86/lib/atomic64_cx8_32.S
+ *
+ * Copyright © 2010  Luca Barbieri
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#include <linux/linkage.h>
+#include <asm/alternative-asm.h>
+#include <asm/dwarf2.h>
+
+.macro SAVE reg
+       pushl_cfi %\reg
+       CFI_REL_OFFSET \reg, 0
+.endm
+
+.macro RESTORE reg
+       popl_cfi %\reg
+       CFI_RESTORE \reg
+.endm
+
+.macro read64 reg
+       movl %ebx, %eax
+       movl %ecx, %edx
+/* we need LOCK_PREFIX since otherwise cmpxchg8b always does the write */
+       LOCK_PREFIX
+       cmpxchg8b (\reg)
+.endm
+
+ENTRY(atomic64_read_cx8)
+       CFI_STARTPROC
+
+       read64 %ecx
+       ret
+       CFI_ENDPROC
+ENDPROC(atomic64_read_cx8)
+
+ENTRY(atomic64_set_cx8)
+       CFI_STARTPROC
+
+1:
+/* we don't need LOCK_PREFIX since aligned 64-bit writes
+ * are atomic on 586 and newer */
+       cmpxchg8b (%esi)
+       jne 1b
+
+       ret
+       CFI_ENDPROC
+ENDPROC(atomic64_set_cx8)
+
+ENTRY(atomic64_xchg_cx8)
+       CFI_STARTPROC
+
+       movl %ebx, %eax
+       movl %ecx, %edx
+1:
+       LOCK_PREFIX
+       cmpxchg8b (%esi)
+       jne 1b
+
+       ret
+       CFI_ENDPROC
+ENDPROC(atomic64_xchg_cx8)
+
+.macro addsub_return func ins insc
+ENTRY(atomic64_\func\()_return_cx8)
+       CFI_STARTPROC
+       SAVE ebp
+       SAVE ebx
+       SAVE esi
+       SAVE edi
+
+       movl %eax, %esi
+       movl %edx, %edi
+       movl %ecx, %ebp
+
+       read64 %ebp
+1:
+       movl %eax, %ebx
+       movl %edx, %ecx
+       \ins\()l %esi, %ebx
+       \insc\()l %edi, %ecx
+       LOCK_PREFIX
+       cmpxchg8b (%ebp)
+       jne 1b
+
+10:
+       movl %ebx, %eax
+       movl %ecx, %edx
+       RESTORE edi
+       RESTORE esi
+       RESTORE ebx
+       RESTORE ebp
+       ret
+       CFI_ENDPROC
+ENDPROC(atomic64_\func\()_return_cx8)
+.endm
+
+addsub_return add add adc
+addsub_return sub sub sbb
+
+.macro incdec_return func ins insc
+ENTRY(atomic64_\func\()_return_cx8)
+       CFI_STARTPROC
+       SAVE ebx
+
+       read64 %esi
+1:
+       movl %eax, %ebx
+       movl %edx, %ecx
+       \ins\()l $1, %ebx
+       \insc\()l $0, %ecx
+       LOCK_PREFIX
+       cmpxchg8b (%esi)
+       jne 1b
+
+10:
+       movl %ebx, %eax
+       movl %ecx, %edx
+       RESTORE ebx
+       ret
+       CFI_ENDPROC
+ENDPROC(atomic64_\func\()_return_cx8)
+.endm
+
+incdec_return inc add adc
+incdec_return dec sub sbb
+
+ENTRY(atomic64_dec_if_positive_cx8)
+       CFI_STARTPROC
+       SAVE ebx
+
+       read64 %esi
+1:
+       movl %eax, %ebx
+       movl %edx, %ecx
+       subl $1, %ebx
+       sbb $0, %ecx
+       js 2f
+       LOCK_PREFIX
+       cmpxchg8b (%esi)
+       jne 1b
+
+2:
+       movl %ebx, %eax
+       movl %ecx, %edx
+       RESTORE ebx
+       ret
+       CFI_ENDPROC
+ENDPROC(atomic64_dec_if_positive_cx8)
+
+ENTRY(atomic64_add_unless_cx8)
+       CFI_STARTPROC
+       SAVE ebp
+       SAVE ebx
+/* these just push these two parameters on the stack */
+       SAVE edi
+       SAVE esi
+
+       movl %ecx, %ebp
+       movl %eax, %esi
+       movl %edx, %edi
+
+       read64 %ebp
+1:
+       cmpl %eax, 0(%esp)
+       je 4f
+2:
+       movl %eax, %ebx
+       movl %edx, %ecx
+       addl %esi, %ebx
+       adcl %edi, %ecx
+       LOCK_PREFIX
+       cmpxchg8b (%ebp)
+       jne 1b
+
+       movl $1, %eax
+3:
+       addl $8, %esp
+       CFI_ADJUST_CFA_OFFSET -8
+       RESTORE ebx
+       RESTORE ebp
+       ret
+4:
+       cmpl %edx, 4(%esp)
+       jne 2b
+       xorl %eax, %eax
+       jmp 3b
+       CFI_ENDPROC
+ENDPROC(atomic64_add_unless_cx8)
+
+ENTRY(atomic64_inc_not_zero_cx8)
+       CFI_STARTPROC
+       SAVE ebx
+
+       read64 %esi
+1:
+       testl %eax, %eax
+       je 4f
+2:
+       movl %eax, %ebx
+       movl %edx, %ecx
+       addl $1, %ebx
+       adcl $0, %ecx
+       LOCK_PREFIX
+       cmpxchg8b (%esi)
+       jne 1b
+
+       movl $1, %eax
+3:
+       RESTORE ebx
+       ret
+4:
+       testl %edx, %edx
+       jne 2b
+       jmp 3b
+       CFI_ENDPROC
+ENDPROC(atomic64_inc_not_zero_cx8)
index 885bb62fee71601e655ae8f59710dddec056a40f..aa22df74e11d1bbd95f504b2733a269f5b661b42 100644 (file)
@@ -52,7 +52,7 @@
  */
 #define UMAL_MIISTATUS         (PKUNITY_UMAL_BASE + 0x0030)
 /*
- * MII Managment Indicator UMAL_MIIIDCT
+ * MII Management Indicator UMAL_MIIIDCT
  */
 #define UMAL_MIIIDCT           (PKUNITY_UMAL_BASE + 0x0034)
 /*
@@ -91,7 +91,7 @@
 #define UMAL_FIFORAM6          (PKUNITY_UMAL_BASE + 0x0078)
 #define UMAL_FIFORAM7          (PKUNITY_UMAL_BASE + 0x007c)
 
-/* MAHBE MODUEL OF UMAL */
+/* MAHBE MODULE OF UMAL */
 /* UMAL's MAHBE module interfaces to the host system through 32-bit AHB Master
  * and Slave ports.Registers within the M-AHBE provide Control and Status
  * information concerning these transfers.
index 92255f3ab6a774ea8e01112efd5a944e41e62e9f..8caf322e110d79eba0f90c916dae72d6f6113fa8 100644 (file)
@@ -164,7 +164,7 @@ ENTRY(stext)
 ENDPROC(stext)
 
 /*
- * Enable the MMU.  This completely changes the stucture of the visible
+ * Enable the MMU.  This completely changes the structure of the visible
  * memory space.  You will not be able to trace execution through this.
  *
  *  r0  = cp#0 control register
index cae3feb1035e3da73826b518de4d47c15ad4e58d..db75d07c3645c0375090596ae29d1085f0f8a38a 100644 (file)
@@ -91,7 +91,7 @@ static int detect_memory_e801(void)
        if (oreg.ax > 15*1024) {
                return -1;      /* Bogus! */
        } else if (oreg.ax == 15*1024) {
-               boot_params.alt_mem_k = (oreg.dx << 6) + oreg.ax;
+               boot_params.alt_mem_k = (oreg.bx << 6) + oreg.ax;
        } else {
                /*
                 * This ignores memory above 16MB if we have a memory
index a279d98ea95e9880d93fee697b3efd30646f9b5b..2b7d573be5496863572be6dc724af256e00f4cf7 100644 (file)
@@ -2,7 +2,6 @@
 #define _ASM_X86_APIC_H
 
 #include <linux/cpumask.h>
-#include <linux/delay.h>
 #include <linux/pm.h>
 
 #include <asm/alternative.h>
index 97b6d8114a439e410bc7107e07492f5ff52cf14c..057099e5faba5fa4e82c33e8dfd54807b3062fec 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <linux/spinlock.h>    /* And spinlocks */
 #include <asm/io.h>            /* need byte IO */
-#include <linux/delay.h>
 
 #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
 #define dma_outb       outb_p
index 43085bfc99c30f963b929a9c7afdcff932ad9236..156cd5d18d2abeabb26a0587cfffd15c52aa6f13 100644 (file)
@@ -66,7 +66,7 @@ static inline void gart_set_size_and_enable(struct pci_dev *dev, u32 order)
         * Don't enable translation but enable GART IO and CPU accesses.
         * Also, set DISTLBWALKPRB since GART tables memory is UC.
         */
-       ctl = DISTLBWALKPRB | order << 1;
+       ctl = order << 1;
 
        pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl);
 }
@@ -75,17 +75,17 @@ static inline void enable_gart_translation(struct pci_dev *dev, u64 addr)
 {
        u32 tmp, ctl;
 
-        /* address of the mappings table */
-        addr >>= 12;
-        tmp = (u32) addr<<4;
-        tmp &= ~0xf;
-        pci_write_config_dword(dev, AMD64_GARTTABLEBASE, tmp);
-
-        /* Enable GART translation for this hammer. */
-        pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl);
-        ctl |= GARTEN;
-        ctl &= ~(DISGARTCPU | DISGARTIO);
-        pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl);
+       /* address of the mappings table */
+       addr >>= 12;
+       tmp = (u32) addr<<4;
+       tmp &= ~0xf;
+       pci_write_config_dword(dev, AMD64_GARTTABLEBASE, tmp);
+
+       /* Enable GART translation for this hammer. */
+       pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl);
+       ctl |= GARTEN | DISTLBWALKPRB;
+       ctl &= ~(DISGARTCPU | DISGARTIO);
+       pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl);
 }
 
 static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size)
index ef328901c80240f4a1471d3e4bdd795daffc6621..c9e09ea05644fdea45227388d87e04be3db0390f 100644 (file)
@@ -237,7 +237,7 @@ static inline void fpu_save_init(struct fpu *fpu)
        } else if (use_fxsr()) {
                fpu_fxsave(fpu);
        } else {
-               asm volatile("fsave %[fx]; fwait"
+               asm volatile("fnsave %[fx]; fwait"
                             : [fx] "=m" (fpu->state->fsave));
                return;
        }
index c4bd267dfc50842e73ea02c562549717c47fb80a..a97a240f67f3158f79c112fffcd0b8dd1e3f4847 100644 (file)
@@ -150,7 +150,7 @@ void setup_IO_APIC_irq_extra(u32 gsi);
 extern void ioapic_and_gsi_init(void);
 extern void ioapic_insert_resources(void);
 
-int io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr);
+int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr);
 
 extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
 extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
index fd5a1f365c95105ebe095c33df1dfbf91e1715a1..3cce71413d0be86278a7037eccc692d3d205b4e8 100644 (file)
 #define MSR_IA32_MC0_ADDR              0x00000402
 #define MSR_IA32_MC0_MISC              0x00000403
 
+#define MSR_AMD64_MC0_MASK             0xc0010044
+
 #define MSR_IA32_MCx_CTL(x)            (MSR_IA32_MC0_CTL + 4*(x))
 #define MSR_IA32_MCx_STATUS(x)         (MSR_IA32_MC0_STATUS + 4*(x))
 #define MSR_IA32_MCx_ADDR(x)           (MSR_IA32_MC0_ADDR + 4*(x))
 #define MSR_IA32_MCx_MISC(x)           (MSR_IA32_MC0_MISC + 4*(x))
 
+#define MSR_AMD64_MCx_MASK(x)          (MSR_AMD64_MC0_MASK + (x))
+
 /* These are consecutive and not in the normal 4er MCE bank block */
 #define MSR_IA32_MC0_CTL2              0x00000280
 #define MSR_IA32_MCx_CTL2(x)           (MSR_IA32_MC0_CTL2 + (x))
index 3d4dab43c99469b6d917f0ba4f4bebd7cdc25bb6..a50fc9f493b3d68a4750a085d48d98b4e4ba72ea 100644 (file)
@@ -51,7 +51,7 @@ static inline void numa_remove_cpu(int cpu)           { }
 #endif /* CONFIG_NUMA */
 
 #ifdef CONFIG_DEBUG_PER_CPU_MAPS
-struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable);
+void debug_cpumask_set_cpu(int cpu, int node, bool enable);
 #endif
 
 #endif /* _ASM_X86_NUMA_H */
index 6801959a8b2a4976c8e45d55c89df93f1c574d17..4c39baa8facc25529c7018e53b38de43eab823d9 100644 (file)
@@ -21,7 +21,7 @@ const struct pci_device_id amd_nb_misc_ids[] = {
 EXPORT_SYMBOL(amd_nb_misc_ids);
 
 static struct pci_device_id amd_nb_link_ids[] = {
-       { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_LINK) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
        {}
 };
 
index 86d1ad4962a73a352ec22625658bec7deca21d7c..73fb469908c6852476c10a75a05aa49329f386b8 100644 (file)
@@ -499,7 +499,7 @@ out:
                 * Don't enable translation yet but enable GART IO and CPU
                 * accesses and set DISTLBWALKPRB since GART table memory is UC.
                 */
-               u32 ctl = DISTLBWALKPRB | aper_order << 1;
+               u32 ctl = aper_order << 1;
 
                bus = amd_nb_bus_dev_ranges[i].bus;
                dev_base = amd_nb_bus_dev_ranges[i].dev_base;
index c4e557a1ebb6feae34839531ee6752ec98995e4f..5260fe91bcb66301aeb2eb97ad833ab855212494 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kprobes.h>
 #include <linux/nmi.h>
 #include <linux/module.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_HARDLOCKUP_DETECTOR
 u64 hw_nmi_get_sample_period(void)
index 68df09bba92ee902dabdd2e37acdd29d9ae67007..45fd33d1fd3a01951184feca64ed476178d34922 100644 (file)
@@ -128,8 +128,8 @@ static int __init parse_noapic(char *str)
 }
 early_param("noapic", parse_noapic);
 
-static int io_apic_setup_irq_pin_once(unsigned int irq, int node,
-                                     struct io_apic_irq_attr *attr);
+static int io_apic_setup_irq_pin(unsigned int irq, int node,
+                                struct io_apic_irq_attr *attr);
 
 /* Will be called in mpparse/acpi/sfi codes for saving IRQ info */
 void mp_save_irq(struct mpc_intsrc *m)
@@ -3570,7 +3570,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
 }
 #endif /* CONFIG_HT_IRQ */
 
-int
+static int
 io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr)
 {
        struct irq_cfg *cfg = alloc_irq_and_cfg_at(irq, node);
@@ -3585,8 +3585,8 @@ io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr)
        return ret;
 }
 
-static int io_apic_setup_irq_pin_once(unsigned int irq, int node,
-                                     struct io_apic_irq_attr *attr)
+int io_apic_setup_irq_pin_once(unsigned int irq, int node,
+                              struct io_apic_irq_attr *attr)
 {
        unsigned int id = attr->ioapic, pin = attr->ioapic_pin;
        int ret;
index 3c289281394cff3e164891e56509fa9658412755..33b10a0fc095b9d458f851b20e4c5dda37cfc9ed 100644 (file)
@@ -23,6 +23,8 @@
 #include <linux/io.h>
 #include <linux/pci.h>
 #include <linux/kdebug.h>
+#include <linux/delay.h>
+#include <linux/crash_dump.h>
 
 #include <asm/uv/uv_mmrs.h>
 #include <asm/uv/uv_hub.h>
@@ -34,6 +36,7 @@
 #include <asm/ipi.h>
 #include <asm/smp.h>
 #include <asm/x86_init.h>
+#include <asm/emergency-restart.h>
 
 DEFINE_PER_CPU(int, x2apic_extra_bits);
 
@@ -810,4 +813,11 @@ void __init uv_system_init(void)
 
        /* register Legacy VGA I/O redirection handler */
        pci_register_set_vga_state(uv_set_vga_state);
+
+       /*
+        * For a kdump kernel the reset must be BOOT_ACPI, not BOOT_EFI, as
+        * EFI is not enabled in the kdump kernel.
+        */
+       if (is_kdump_kernel())
+               reboot_type = BOOT_ACPI;
 }
index 0b4be431c620ab30ac0bd348888fdf3e9dd3a5b8..adee12e0da1fcaf6e1c8f9ad3ff1e362e2ec736b 100644 (file)
 #include <linux/kthread.h>
 #include <linux/jiffies.h>
 #include <linux/acpi.h>
+#include <linux/syscore_ops.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -1238,6 +1239,7 @@ static int suspend(int vetoable)
 
        local_irq_disable();
        sysdev_suspend(PMSG_SUSPEND);
+       syscore_suspend();
 
        local_irq_enable();
 
@@ -1255,6 +1257,7 @@ static int suspend(int vetoable)
                apm_error("suspend", err);
        err = (err == APM_SUCCESS) ? 0 : -EIO;
 
+       syscore_resume();
        sysdev_resume();
        local_irq_enable();
 
@@ -1280,6 +1283,7 @@ static void standby(void)
 
        local_irq_disable();
        sysdev_suspend(PMSG_SUSPEND);
+       syscore_suspend();
        local_irq_enable();
 
        err = set_system_power_state(APM_STATE_STANDBY);
@@ -1287,6 +1291,7 @@ static void standby(void)
                apm_error("standby", err);
 
        local_irq_disable();
+       syscore_resume();
        sysdev_resume();
        local_irq_enable();
 
index 3ecece0217ef1c10e4bcab2a9cd64b9d10f94833..bb9eb29a52dd155d97deb653170270a058575727 100644 (file)
@@ -615,6 +615,25 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
        /* As a rule processors have APIC timer running in deep C states */
        if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400))
                set_cpu_cap(c, X86_FEATURE_ARAT);
+
+       /*
+        * Disable GART TLB Walk Errors on Fam10h. We do this here
+        * because this is always needed when GART is enabled, even in a
+        * kernel which has no MCE support built in.
+        */
+       if (c->x86 == 0x10) {
+               /*
+                * BIOS should disable GartTlbWlk Errors themself. If
+                * it doesn't do it here as suggested by the BKDG.
+                *
+                * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012
+                */
+               u64 mask;
+
+               rdmsrl(MSR_AMD64_MCx_MASK(4), mask);
+               mask |= (1 << 10);
+               wrmsrl(MSR_AMD64_MCx_MASK(4), mask);
+       }
 }
 
 #ifdef CONFIG_X86_32
@@ -679,7 +698,7 @@ cpu_dev_register(amd_cpu_dev);
  */
 
 const int amd_erratum_400[] =
-       AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf),
+       AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0x0f, 0x4, 0x2, 0xff, 0xf),
                            AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf));
 EXPORT_SYMBOL_GPL(amd_erratum_400);
 
index 5a05ef63eb4a71cc4d6e609787f9ce00dcffd75b..3385ea26f6841bea370faa9ea7baa08b3fda90f2 100644 (file)
@@ -1626,7 +1626,7 @@ out:
 static unsigned int mce_poll(struct file *file, poll_table *wait)
 {
        poll_wait(file, &mce_wait, wait);
-       if (rcu_dereference_check_mce(mcelog.next))
+       if (rcu_access_index(mcelog.next))
                return POLLIN | POLLRDNORM;
        if (!mce_apei_read_done && apei_check_mce())
                return POLLIN | POLLRDNORM;
index 307dfbbf4a8e75b0f000aca27100a493fed23c6c..929739a653d12e7a5c9675628eed8eb625bc491e 100644 (file)
@@ -293,14 +293,24 @@ set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type typ
 
        /*
         * HACK!
-        * We use this same function to initialize the mtrrs on boot.
-        * The state of the boot cpu's mtrrs has been saved, and we want
-        * to replicate across all the APs.
-        * If we're doing that @reg is set to something special...
+        *
+        * We use this same function to initialize the mtrrs during boot,
+        * resume, runtime cpu online and on an explicit request to set a
+        * specific MTRR.
+        *
+        * During boot or suspend, the state of the boot cpu's mtrrs has been
+        * saved, and we want to replicate that across all the cpus that come
+        * online (either at the end of boot or resume or during a runtime cpu
+        * online). If we're doing that, @reg is set to something special and on
+        * this cpu we still do mtrr_if->set_all(). During boot/resume, this
+        * is unnecessary if at this point we are still on the cpu that started
+        * the boot/resume sequence. But there is no guarantee that we are still
+        * on the same cpu. So we do mtrr_if->set_all() on this cpu aswell to be
+        * sure that we are in sync with everyone else.
         */
        if (reg != ~0U)
                mtrr_if->set(reg, base, size, type);
-       else if (!mtrr_aps_delayed_init)
+       else
                mtrr_if->set_all();
 
        /* Wait for the others */
index eed3673a8656f5688d54f6b4d72fd9774c831fcb..e638689279d3ec183867b2946309f92b3d4d9415 100644 (file)
@@ -586,8 +586,12 @@ static int x86_setup_perfctr(struct perf_event *event)
                        return -EOPNOTSUPP;
        }
 
+       /*
+        * Do not allow config1 (extended registers) to propagate,
+        * there's no sane user-space generalization yet:
+        */
        if (attr->type == PERF_TYPE_RAW)
-               return x86_pmu_extra_regs(event->attr.config, event);
+               return 0;
 
        if (attr->type == PERF_TYPE_HW_CACHE)
                return set_ext_hw_attr(hwc, event);
@@ -609,8 +613,8 @@ static int x86_setup_perfctr(struct perf_event *event)
        /*
         * Branch tracing:
         */
-       if ((attr->config == PERF_COUNT_HW_BRANCH_INSTRUCTIONS) &&
-           (hwc->sample_period == 1)) {
+       if (attr->config == PERF_COUNT_HW_BRANCH_INSTRUCTIONS &&
+           !attr->freq && hwc->sample_period == 1) {
                /* BTS is not supported by this architecture. */
                if (!x86_pmu.bts_active)
                        return -EOPNOTSUPP;
@@ -1284,6 +1288,16 @@ static int x86_pmu_handle_irq(struct pt_regs *regs)
 
        cpuc = &__get_cpu_var(cpu_hw_events);
 
+       /*
+        * Some chipsets need to unmask the LVTPC in a particular spot
+        * inside the nmi handler.  As a result, the unmasking was pushed
+        * into all the nmi handlers.
+        *
+        * This generic handler doesn't seem to have any issues where the
+        * unmasking occurs so it was left at the top.
+        */
+       apic_write(APIC_LVTPC, APIC_DM_NMI);
+
        for (idx = 0; idx < x86_pmu.num_counters; idx++) {
                if (!test_bit(idx, cpuc->active_mask)) {
                        /*
@@ -1370,8 +1384,6 @@ perf_event_nmi_handler(struct notifier_block *self,
                return NOTIFY_DONE;
        }
 
-       apic_write(APIC_LVTPC, APIC_DM_NMI);
-
        handled = x86_pmu.handle_irq(args->regs);
        if (!handled)
                return NOTIFY_DONE;
index 461f62bbd774a0adec028334f8c723e5a33bea1d..cf4e369cea6793ab3b4eac82fcdcd594547cd019 100644 (file)
@@ -8,7 +8,7 @@ static __initconst const u64 amd_hw_cache_event_ids
  [ C(L1D) ] = {
        [ C(OP_READ) ] = {
                [ C(RESULT_ACCESS) ] = 0x0040, /* Data Cache Accesses        */
-               [ C(RESULT_MISS)   ] = 0x0041, /* Data Cache Misses          */
+               [ C(RESULT_MISS)   ] = 0x0141, /* Data Cache Misses          */
        },
        [ C(OP_WRITE) ] = {
                [ C(RESULT_ACCESS) ] = 0x0142, /* Data Cache Refills :system */
@@ -427,7 +427,9 @@ static __initconst const struct x86_pmu amd_pmu = {
  *
  * Exceptions:
  *
+ * 0x000       FP      PERF_CTL[3], PERF_CTL[5:3] (*)
  * 0x003       FP      PERF_CTL[3]
+ * 0x004       FP      PERF_CTL[3], PERF_CTL[5:3] (*)
  * 0x00B       FP      PERF_CTL[3]
  * 0x00D       FP      PERF_CTL[3]
  * 0x023       DE      PERF_CTL[2:0]
@@ -448,6 +450,8 @@ static __initconst const struct x86_pmu amd_pmu = {
  * 0x0DF       LS      PERF_CTL[5:0]
  * 0x1D6       EX      PERF_CTL[5:0]
  * 0x1D8       EX      PERF_CTL[5:0]
+ *
+ * (*) depending on the umask all FPU counters may be used
  */
 
 static struct event_constraint amd_f15_PMC0  = EVENT_CONSTRAINT(0, 0x01, 0);
@@ -460,18 +464,28 @@ static struct event_constraint amd_f15_PMC53 = EVENT_CONSTRAINT(0, 0x38, 0);
 static struct event_constraint *
 amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, struct perf_event *event)
 {
-       unsigned int event_code = amd_get_event_code(&event->hw);
+       struct hw_perf_event *hwc = &event->hw;
+       unsigned int event_code = amd_get_event_code(hwc);
 
        switch (event_code & AMD_EVENT_TYPE_MASK) {
        case AMD_EVENT_FP:
                switch (event_code) {
+               case 0x000:
+                       if (!(hwc->config & 0x0000F000ULL))
+                               break;
+                       if (!(hwc->config & 0x00000F00ULL))
+                               break;
+                       return &amd_f15_PMC3;
+               case 0x004:
+                       if (hweight_long(hwc->config & ARCH_PERFMON_EVENTSEL_UMASK) <= 1)
+                               break;
+                       return &amd_f15_PMC3;
                case 0x003:
                case 0x00B:
                case 0x00D:
                        return &amd_f15_PMC3;
-               default:
-                       return &amd_f15_PMC53;
                }
+               return &amd_f15_PMC53;
        case AMD_EVENT_LS:
        case AMD_EVENT_DC:
        case AMD_EVENT_EX_LS:
index 8fc2b2cee1da32713746cc7e871aab075deaee41..e61539b07d2c25f5f7e81df9947f543e8138e244 100644 (file)
@@ -25,7 +25,7 @@ struct intel_percore {
 /*
  * Intel PerfMon, used on Core and later.
  */
-static const u64 intel_perfmon_event_map[] =
+static u64 intel_perfmon_event_map[PERF_COUNT_HW_MAX] __read_mostly =
 {
   [PERF_COUNT_HW_CPU_CYCLES]           = 0x003c,
   [PERF_COUNT_HW_INSTRUCTIONS]         = 0x00c0,
@@ -391,12 +391,12 @@ static __initconst const u64 nehalem_hw_cache_event_ids
 {
  [ C(L1D) ] = {
        [ C(OP_READ) ] = {
-               [ C(RESULT_ACCESS) ] = 0x0f40, /* L1D_CACHE_LD.MESI            */
-               [ C(RESULT_MISS)   ] = 0x0140, /* L1D_CACHE_LD.I_STATE         */
+               [ C(RESULT_ACCESS) ] = 0x010b, /* MEM_INST_RETIRED.LOADS       */
+               [ C(RESULT_MISS)   ] = 0x0151, /* L1D.REPL                     */
        },
        [ C(OP_WRITE) ] = {
-               [ C(RESULT_ACCESS) ] = 0x0f41, /* L1D_CACHE_ST.MESI            */
-               [ C(RESULT_MISS)   ] = 0x0141, /* L1D_CACHE_ST.I_STATE         */
+               [ C(RESULT_ACCESS) ] = 0x020b, /* MEM_INST_RETURED.STORES      */
+               [ C(RESULT_MISS)   ] = 0x0251, /* L1D.M_REPL                   */
        },
        [ C(OP_PREFETCH) ] = {
                [ C(RESULT_ACCESS) ] = 0x014e, /* L1D_PREFETCH.REQUESTS        */
@@ -933,6 +933,16 @@ static int intel_pmu_handle_irq(struct pt_regs *regs)
 
        cpuc = &__get_cpu_var(cpu_hw_events);
 
+       /*
+        * Some chipsets need to unmask the LVTPC in a particular spot
+        * inside the nmi handler.  As a result, the unmasking was pushed
+        * into all the nmi handlers.
+        *
+        * This handler doesn't seem to have any issues with the unmasking
+        * so it was left at the top.
+        */
+       apic_write(APIC_LVTPC, APIC_DM_NMI);
+
        intel_pmu_disable_all();
        handled = intel_pmu_drain_bts_buffer();
        status = intel_pmu_get_status();
@@ -998,6 +1008,9 @@ intel_bts_constraints(struct perf_event *event)
        struct hw_perf_event *hwc = &event->hw;
        unsigned int hw_event, bts_event;
 
+       if (event->attr.freq)
+               return NULL;
+
        hw_event = hwc->config & INTEL_ARCH_EVENT_MASK;
        bts_event = x86_pmu.event_map(PERF_COUNT_HW_BRANCH_INSTRUCTIONS);
 
@@ -1305,7 +1318,7 @@ static void intel_clovertown_quirks(void)
         * AJ106 could possibly be worked around by not allowing LBR
         *       usage from PEBS, including the fixup.
         * AJ68  could possibly be worked around by always programming
-        *       a pebs_event_reset[0] value and coping with the lost events.
+        *       a pebs_event_reset[0] value and coping with the lost events.
         *
         * But taken together it might just make sense to not enable PEBS on
         * these chips.
@@ -1409,6 +1422,18 @@ static __init int intel_pmu_init(void)
                x86_pmu.percore_constraints = intel_nehalem_percore_constraints;
                x86_pmu.enable_all = intel_pmu_nhm_enable_all;
                x86_pmu.extra_regs = intel_nehalem_extra_regs;
+
+               if (ebx & 0x40) {
+                       /*
+                        * Erratum AAJ80 detected, we work it around by using
+                        * the BR_MISP_EXEC.ANY event. This will over-count
+                        * branch-misses, but it's still much better than the
+                        * architectural event which is often completely bogus:
+                        */
+                       intel_perfmon_event_map[PERF_COUNT_HW_BRANCH_MISSES] = 0x7f89;
+
+                       pr_cont("erratum AAJ80 worked around, ");
+               }
                pr_cont("Nehalem events, ");
                break;
 
@@ -1425,6 +1450,7 @@ static __init int intel_pmu_init(void)
 
        case 37: /* 32 nm nehalem, "Clarkdale" */
        case 44: /* 32 nm nehalem, "Gulftown" */
+       case 47: /* 32 nm Xeon E7 */
                memcpy(hw_cache_event_ids, westmere_hw_cache_event_ids,
                       sizeof(hw_cache_event_ids));
                memcpy(hw_cache_extra_regs, nehalem_hw_cache_extra_regs,
index c2520e178d32147fd9e2acd954d59e4217115add..e93fcd55fae16f8bc5e5b3c14e5c1e4c56a9426c 100644 (file)
@@ -947,14 +947,23 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
                if (!x86_perf_event_set_period(event))
                        continue;
                if (perf_event_overflow(event, 1, &data, regs))
-                       p4_pmu_disable_event(event);
+                       x86_pmu_stop(event, 0);
        }
 
-       if (handled) {
-               /* p4 quirk: unmask it again */
-               apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED);
+       if (handled)
                inc_irq_stat(apic_perf_irqs);
-       }
+
+       /*
+        * When dealing with the unmasking of the LVTPC on P4 perf hw, it has
+        * been observed that the OVF bit flag has to be cleared first _before_
+        * the LVTPC can be unmasked.
+        *
+        * The reason is the NMI line will continue to be asserted while the OVF
+        * bit is set.  This causes a second NMI to generate if the LVTPC is
+        * unmasked before the OVF bit is cleared, leading to unknown NMI
+        * messages.
+        */
+       apic_write(APIC_LVTPC, APIC_DM_NMI);
 
        return handled;
 }
index 706a9fb46a58785edef3632d2dcfc5d02ac6404f..e90f08458e6ba5879c033388945fbec7963f677c 100644 (file)
@@ -391,7 +391,7 @@ static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize,
 
        set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity);
 
-       return io_apic_setup_irq_pin(*out_hwirq, cpu_to_node(0), &attr);
+       return io_apic_setup_irq_pin_once(*out_hwirq, cpu_to_node(0), &attr);
 }
 
 static void __init ioapic_add_ofnode(struct device_node *np)
index 948a31eae75fdf837d9eee344108ce7b7fb4200d..1cb0b9fc78dccffd68a1c571e873043e0d28d007 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/seq_file.h>
 #include <linux/smp.h>
 #include <linux/ftrace.h>
+#include <linux/delay.h>
 
 #include <asm/apic.h>
 #include <asm/io_apic.h>
index 5ed0ab549eb84615964a300b6524efd73c80aaaf..f9242800bc84073cbb284fc3c6bb0fbe0c2e7f12 100644 (file)
@@ -550,6 +550,7 @@ static void __exit microcode_exit(void)
        microcode_dev_exit();
 
        unregister_hotcpu_notifier(&mc_cpu_notifier);
+       unregister_syscore_ops(&mc_syscore_ops);
 
        get_online_cpus();
        mutex_lock(&microcode_mutex);
index 82ada01625b98c111a41fbecf72fdd026c08e5f1..b117efd24f71f589286aac56e0b50fb235dac0cc 100644 (file)
@@ -81,6 +81,9 @@ static u32 gart_unmapped_entry;
 #define AGPEXTERN
 #endif
 
+/* GART can only remap to physical addresses < 1TB */
+#define GART_MAX_PHYS_ADDR     (1ULL << 40)
+
 /* backdoor interface to AGP driver */
 AGPEXTERN int agp_memory_reserved;
 AGPEXTERN __u32 *agp_gatt_table;
@@ -212,9 +215,13 @@ static dma_addr_t dma_map_area(struct device *dev, dma_addr_t phys_mem,
                                size_t size, int dir, unsigned long align_mask)
 {
        unsigned long npages = iommu_num_pages(phys_mem, size, PAGE_SIZE);
-       unsigned long iommu_page = alloc_iommu(dev, npages, align_mask);
+       unsigned long iommu_page;
        int i;
 
+       if (unlikely(phys_mem + size > GART_MAX_PHYS_ADDR))
+               return bad_dma_addr;
+
+       iommu_page = alloc_iommu(dev, npages, align_mask);
        if (iommu_page == -1) {
                if (!nonforced_iommu(dev, phys_mem, size))
                        return phys_mem;
index d3ce37edb54dfd386c5fe0ced008e623aed29f7e..08c44b08bf5bda05e227a2c8b2a55bfa36964836 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/dmi.h>
 #include <linux/sched.h>
 #include <linux/tboot.h>
+#include <linux/delay.h>
 #include <acpi/reboot.h>
 #include <asm/io.h>
 #include <asm/apic.h>
index 29092b38d816ee2577e5e89fb74cc023dbafc411..1d5c46df0d787abc497a1d025a9a8fd2cd347026 100644 (file)
@@ -21,26 +21,26 @@ r_base = .
        /* Get our own relocated address */
        call    1f
 1:     popl    %ebx
-       subl    $1b, %ebx
+       subl    $(1b - r_base), %ebx
 
        /* Compute the equivalent real-mode segment */
        movl    %ebx, %ecx
        shrl    $4, %ecx
        
        /* Patch post-real-mode segment jump */
-       movw    dispatch_table(%ebx,%eax,2),%ax
-       movw    %ax, 101f(%ebx)
-       movw    %cx, 102f(%ebx)
+       movw    (dispatch_table - r_base)(%ebx,%eax,2),%ax
+       movw    %ax, (101f - r_base)(%ebx)
+       movw    %cx, (102f - r_base)(%ebx)
 
        /* Set up the IDT for real mode. */
-       lidtl   machine_real_restart_idt(%ebx)
+       lidtl   (machine_real_restart_idt - r_base)(%ebx)
 
        /*
         * Set up a GDT from which we can load segment descriptors for real
         * mode.  The GDT is not used in real mode; it is just needed here to
         * prepare the descriptors.
         */
-       lgdtl   machine_real_restart_gdt(%ebx)
+       lgdtl   (machine_real_restart_gdt - r_base)(%ebx)
 
        /*
         * Load the data segment registers with 16-bit compatible values
index 5a0484a95ad6b99ad1824058efdcb238170a9f93..4be9b398470ea7ed399fcd72d39c67681ae98e3f 100644 (file)
@@ -976,6 +976,11 @@ void __init setup_arch(char **cmdline_p)
        paging_init();
        x86_init.paging.pagetable_setup_done(swapper_pg_dir);
 
+       if (boot_cpu_data.cpuid_level >= 0) {
+               /* A CPU has %cr4 if and only if it has CPUID */
+               mmu_cr4_features = read_cr4();
+       }
+
 #ifdef CONFIG_X86_32
        /* sync back kernel address range */
        clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY,
index 58f517b59645458cf4dbf7705fdd7e4e3a82281c..934b4c6b0bf9abea16252e45ac459ed8b398681e 100644 (file)
@@ -2395,9 +2395,9 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
                int i;
 
                entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
-               for (i = 1; *nent < maxnent; ++i) {
-                       if (entry[i - 1].eax == 0 && i != 2)
-                               break;
+               for (i = 1; *nent < maxnent && i < 64; ++i) {
+                       if (entry[i].eax == 0)
+                               continue;
                        do_cpuid_1_ent(&entry[i], function, i);
                        entry[i].flags |=
                               KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
@@ -4958,12 +4958,6 @@ struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu,
                        best = e;
                        break;
                }
-               /*
-                * Both basic or both extended?
-                */
-               if (((e->function ^ function) & 0x80000000) == 0)
-                       if (!best || e->function > best->function)
-                               best = e;
        }
        return best;
 }
@@ -4983,6 +4977,27 @@ not_found:
        return 36;
 }
 
+/*
+ * If no match is found, check whether we exceed the vCPU's limit
+ * and return the content of the highest valid _standard_ leaf instead.
+ * This is to satisfy the CPUID specification.
+ */
+static struct kvm_cpuid_entry2* check_cpuid_limit(struct kvm_vcpu *vcpu,
+                                                  u32 function, u32 index)
+{
+       struct kvm_cpuid_entry2 *maxlevel;
+
+       maxlevel = kvm_find_cpuid_entry(vcpu, function & 0x80000000, 0);
+       if (!maxlevel || maxlevel->eax >= function)
+               return NULL;
+       if (function & 0x80000000) {
+               maxlevel = kvm_find_cpuid_entry(vcpu, 0, 0);
+               if (!maxlevel)
+                       return NULL;
+       }
+       return kvm_find_cpuid_entry(vcpu, maxlevel->eax, index);
+}
+
 void kvm_emulate_cpuid(struct kvm_vcpu *vcpu)
 {
        u32 function, index;
@@ -4995,6 +5010,10 @@ void kvm_emulate_cpuid(struct kvm_vcpu *vcpu)
        kvm_register_write(vcpu, VCPU_REGS_RCX, 0);
        kvm_register_write(vcpu, VCPU_REGS_RDX, 0);
        best = kvm_find_cpuid_entry(vcpu, function, index);
+
+       if (!best)
+               best = check_cpuid_limit(vcpu, function, index);
+
        if (best) {
                kvm_register_write(vcpu, VCPU_REGS_RAX, best->eax);
                kvm_register_write(vcpu, VCPU_REGS_RBX, best->ebx);
index 9559d360fde79b8373d042fb48e24c98b836684d..745258dfc4dc1cc93afdd96e6944aac4d9c4a0ec 100644 (file)
@@ -213,53 +213,48 @@ int early_cpu_to_node(int cpu)
        return per_cpu(x86_cpu_to_node_map, cpu);
 }
 
-struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable)
+void debug_cpumask_set_cpu(int cpu, int node, bool enable)
 {
-       int node = early_cpu_to_node(cpu);
        struct cpumask *mask;
        char buf[64];
 
        if (node == NUMA_NO_NODE) {
                /* early_cpu_to_node() already emits a warning and trace */
-               return NULL;
+               return;
        }
        mask = node_to_cpumask_map[node];
        if (!mask) {
                pr_err("node_to_cpumask_map[%i] NULL\n", node);
                dump_stack();
-               return NULL;
+               return;
        }
 
+       if (enable)
+               cpumask_set_cpu(cpu, mask);
+       else
+               cpumask_clear_cpu(cpu, mask);
+
        cpulist_scnprintf(buf, sizeof(buf), mask);
        printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n",
                enable ? "numa_add_cpu" : "numa_remove_cpu",
                cpu, node, buf);
-       return mask;
+       return;
 }
 
 # ifndef CONFIG_NUMA_EMU
-static void __cpuinit numa_set_cpumask(int cpu, int enable)
+static void __cpuinit numa_set_cpumask(int cpu, bool enable)
 {
-       struct cpumask *mask;
-
-       mask = debug_cpumask_set_cpu(cpu, enable);
-       if (!mask)
-               return;
-
-       if (enable)
-               cpumask_set_cpu(cpu, mask);
-       else
-               cpumask_clear_cpu(cpu, mask);
+       debug_cpumask_set_cpu(cpu, early_cpu_to_node(cpu), enable);
 }
 
 void __cpuinit numa_add_cpu(int cpu)
 {
-       numa_set_cpumask(cpu, 1);
+       numa_set_cpumask(cpu, true);
 }
 
 void __cpuinit numa_remove_cpu(int cpu)
 {
-       numa_set_cpumask(cpu, 0);
+       numa_set_cpumask(cpu, false);
 }
 # endif        /* !CONFIG_NUMA_EMU */
 
index e8c00cc72033cbf4ee5e4f44a3a59a10386596fe..85b52fc03084c57601fe619d7f6fb126d7a177fd 100644 (file)
@@ -306,7 +306,7 @@ int __init numa_cleanup_meminfo(struct numa_meminfo *mi)
                bi->end = min(bi->end, high);
 
                /* and there's no empty block */
-               if (bi->start == bi->end) {
+               if (bi->start >= bi->end) {
                        numa_remove_memblk_from(i--, mi);
                        continue;
                }
index ad091e4cff17f01a598c7a2c1b3a5a541e9d96a1..de84cc140379ea0b3688d4815577b8c7548e8a44 100644 (file)
@@ -454,10 +454,9 @@ void __cpuinit numa_remove_cpu(int cpu)
                cpumask_clear_cpu(cpu, node_to_cpumask_map[i]);
 }
 #else  /* !CONFIG_DEBUG_PER_CPU_MAPS */
-static void __cpuinit numa_set_cpumask(int cpu, int enable)
+static void __cpuinit numa_set_cpumask(int cpu, bool enable)
 {
-       struct cpumask *mask;
-       int nid, physnid, i;
+       int nid, physnid;
 
        nid = early_cpu_to_node(cpu);
        if (nid == NUMA_NO_NODE) {
@@ -467,28 +466,21 @@ static void __cpuinit numa_set_cpumask(int cpu, int enable)
 
        physnid = emu_nid_to_phys[nid];
 
-       for_each_online_node(i) {
+       for_each_online_node(nid) {
                if (emu_nid_to_phys[nid] != physnid)
                        continue;
 
-               mask = debug_cpumask_set_cpu(cpu, enable);
-               if (!mask)
-                       return;
-
-               if (enable)
-                       cpumask_set_cpu(cpu, mask);
-               else
-                       cpumask_clear_cpu(cpu, mask);
+               debug_cpumask_set_cpu(cpu, nid, enable);
        }
 }
 
 void __cpuinit numa_add_cpu(int cpu)
 {
-       numa_set_cpumask(cpu, 1);
+       numa_set_cpumask(cpu, true);
 }
 
 void __cpuinit numa_remove_cpu(int cpu)
 {
-       numa_set_cpumask(cpu, 0);
+       numa_set_cpumask(cpu, false);
 }
 #endif /* !CONFIG_DEBUG_PER_CPU_MAPS */
index 48651c6f657d58605ef5ab6ac54ec3ff03400ac0..364f36bdfad878b897a3119a23006856b526bf48 100644 (file)
@@ -211,10 +211,12 @@ int __init get_memcfg_from_srat(void)
 {
        int i, j, nid;
 
-
        if (srat_disabled())
                goto out_fail;
 
+       if (acpi_numa_init() < 0)
+               goto out_fail;
+
        if (num_memory_chunks == 0) {
                printk(KERN_DEBUG
                         "could not find any ACPI SRAT memory areas.\n");
index 8dace181c88e51a19a8b3fb767d9d28f46b0a2f5..cf9750004a08fe673eb312414090c7b0c7759b09 100644 (file)
@@ -49,6 +49,10 @@ u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
        val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0;
        val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0;
        val |= (counter_config->unit_mask & 0xFF) << 8;
+       counter_config->extra &= (ARCH_PERFMON_EVENTSEL_INV |
+                                 ARCH_PERFMON_EVENTSEL_EDGE |
+                                 ARCH_PERFMON_EVENTSEL_CMASK);
+       val |= counter_config->extra;
        event &= model->event_mask ? model->event_mask : 0xFF;
        val |= event & 0xFF;
        val |= (event & 0x0F00) << 24;
@@ -440,6 +444,7 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root)
                oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask);
                oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel);
                oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user);
+               oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra);
        }
 
        return 0;
index e28398df0df2959bc391a1aa028487264e746d85..0b7b7b179cbeeff36b559ab0b0f139d616998bc1 100644 (file)
@@ -22,6 +22,7 @@ struct op_counter_config {
        unsigned long kernel;
        unsigned long user;
        unsigned long unit_mask;
+       unsigned long extra;
 };
 
 extern struct op_counter_config counter_config[];
index dc701ea585461a3735085447b8e13af6f77b178b..e70be38ce03920d4d8210a98ef1038c9ec471745 100644 (file)
@@ -74,6 +74,7 @@
                                compatible = "intel,ce4100-pci", "pci";
                                device_type = "pci";
                                bus-range = <1 1>;
+                               reg = <0x0800 0x0 0x0 0x0 0x0>;
                                ranges = <0x2000000 0 0xdffe0000 0x2000000 0 0xdffe0000 0 0x1000>;
 
                                interrupt-parent = <&ioapic2>;
                                                   "pciclass0c03";
 
                                        reg = <0x16800 0x0 0x0 0x0 0x0>;
-                                       interrupts = <22 3>;
+                                       interrupts = <22 1>;
                                };
 
                                usb@d,1 {
                                                   "pciclass0c03";
 
                                        reg = <0x16900 0x0 0x0 0x0 0x0>;
-                                       interrupts = <22 3>;
+                                       interrupts = <22 1>;
                                };
 
                                sata@e,0 {
                                                   "pciclass0106";
 
                                        reg = <0x17000 0x0 0x0 0x0 0x0>;
-                                       interrupts = <23 3>;
+                                       interrupts = <23 1>;
                                };
 
                                flash@f,0 {
                                #address-cells = <2>;
                                #size-cells = <1>;
                                compatible = "isa";
+                               reg = <0xf800 0x0 0x0 0x0 0x0>;
                                ranges = <1 0 0 0 0 0x100>;
 
                                rtc@70 {
index 5c0207bf959bc4a8490347d775eba452c13f2684..275dbc19e2cf55f2e7cb55f1c3ad861cb976c8a6 100644 (file)
@@ -97,11 +97,11 @@ static int __init sfi_parse_mtmr(struct sfi_table_header *table)
                        pentry->freq_hz, pentry->irq);
                        if (!pentry->irq)
                                continue;
-                       mp_irq.type = MP_IOAPIC;
+                       mp_irq.type = MP_INTSRC;
                        mp_irq.irqtype = mp_INT;
 /* triggering mode edge bit 2-3, active high polarity bit 0-1 */
                        mp_irq.irqflag = 5;
-                       mp_irq.srcbus = 0;
+                       mp_irq.srcbus = MP_BUS_ISA;
                        mp_irq.srcbusirq = pentry->irq; /* IRQ */
                        mp_irq.dstapic = MP_APIC_ALL;
                        mp_irq.dstirq = pentry->irq;
@@ -168,10 +168,10 @@ int __init sfi_parse_mrtc(struct sfi_table_header *table)
        for (totallen = 0; totallen < sfi_mrtc_num; totallen++, pentry++) {
                pr_debug("RTC[%d]: paddr = 0x%08x, irq = %d\n",
                        totallen, (u32)pentry->phys_addr, pentry->irq);
-               mp_irq.type = MP_IOAPIC;
+               mp_irq.type = MP_INTSRC;
                mp_irq.irqtype = mp_INT;
                mp_irq.irqflag = 0xf;   /* level trigger and active low */
-               mp_irq.srcbus = 0;
+               mp_irq.srcbus = MP_BUS_ISA;
                mp_irq.srcbusirq = pentry->irq; /* IRQ */
                mp_irq.dstapic = MP_APIC_ALL;
                mp_irq.dstirq = pentry->irq;
@@ -282,7 +282,7 @@ void __init x86_mrst_early_setup(void)
        /* Avoid searching for BIOS MP tables */
        x86_init.mpparse.find_smp_config = x86_init_noop;
        x86_init.mpparse.get_smp_config = x86_init_uint_noop;
-
+       set_bit(MP_BUS_ISA, mp_bus_not_pci);
 }
 
 /*
index 04cf645feb92018edf96bf32779ea4dde274782f..73d70d65e76ef613e6d454cfc27f2eafe57e91be 100644 (file)
@@ -100,9 +100,11 @@ int vrtc_set_mmss(unsigned long nowtime)
 
 void __init mrst_rtc_init(void)
 {
-       unsigned long vrtc_paddr = sfi_mrtc_array[0].phys_addr;
+       unsigned long vrtc_paddr;
 
        sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc);
+
+       vrtc_paddr = sfi_mrtc_array[0].phys_addr;
        if (!sfi_mrtc_num || !vrtc_paddr)
                return;
 
index a7b38d35c29a1ce7578d36e38cfe04616143b39f..7cb6424317f642bcbb44caabdd6c92cf0fbfa605 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/debugfs.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 
 #include <asm/mmu_context.h>
 #include <asm/uv/uv.h>
index fe4cf8294878a9e5de7d0773cb8086c22cc8b55a..c7abf13a213ffb266371752e6fe827ebf92fe954 100644 (file)
@@ -471,15 +471,7 @@ static unsigned int startup_piix4_master_irq(struct irq_data *data)
 {
        legacy_pic->init(0);
        enable_cobalt_irq(data);
-}
-
-static void end_piix4_master_irq(struct irq_data *data)
-{
-       unsigned long flags;
-
-       spin_lock_irqsave(&cobalt_lock, flags);
-       enable_cobalt_irq(data);
-       spin_unlock_irqrestore(&cobalt_lock, flags);
+       return 0;
 }
 
 static struct irq_chip piix4_master_irq_type = {
@@ -492,7 +484,7 @@ static void pii4_mask(struct irq_data *data) { }
 
 static struct irq_chip piix4_virtual_irq_type = {
        .name           = "PIIX4-virtual",
-       .mask           = pii4_mask,
+       .irq_mask       = pii4_mask,
 };
 
 /*
@@ -580,9 +572,9 @@ static struct irqaction cascade_action = {
 
 static inline void set_piix4_virtual_irq_type(void)
 {
-       piix4_virtual_irq_type.enable = i8259A_chip.unmask;
-       piix4_virtual_irq_type.disable = i8259A_chip.mask;
-       piix4_virtual_irq_type.unmask = i8259A_chip.unmask;
+       piix4_virtual_irq_type.irq_enable = i8259A_chip.irq_unmask;
+       piix4_virtual_irq_type.irq_disable = i8259A_chip.irq_mask;
+       piix4_virtual_irq_type.irq_unmask = i8259A_chip.irq_unmask;
 }
 
 static void __init visws_pre_intr_init(void)
@@ -599,7 +591,7 @@ static void __init visws_pre_intr_init(void)
                else if (i == CO_IRQ_IDE0)
                        chip = &cobalt_irq_type;
                else if (i == CO_IRQ_IDE1)
-                       >chip = &cobalt_irq_type;
+                       chip = &cobalt_irq_type;
                else if (i == CO_IRQ_8259)
                        chip = &piix4_master_irq_type;
                else if (i < CO_IRQ_APIC0)
index 1c7121ba18ffdc902740c396427e448ae62250d4..5cc821cb2e0968090501e8c6e5af36353d5e2f87 100644 (file)
@@ -39,6 +39,7 @@ config XEN_MAX_DOMAIN_MEMORY
 config XEN_SAVE_RESTORE
        bool
        depends on XEN
+       select HIBERNATE_CALLBACKS
        default y
 
 config XEN_DEBUG_FS
index 49dbd78ec3cb0d4481e72e96cdb041507b5ae686..e3c6a06cf725ef08b87a5961b33043bbf493acf3 100644 (file)
@@ -238,6 +238,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
 static __init void xen_init_cpuid_mask(void)
 {
        unsigned int ax, bx, cx, dx;
+       unsigned int xsave_mask;
 
        cpuid_leaf1_edx_mask =
                ~((1 << X86_FEATURE_MCE)  |  /* disable MCE */
@@ -249,24 +250,16 @@ static __init void xen_init_cpuid_mask(void)
                cpuid_leaf1_edx_mask &=
                        ~((1 << X86_FEATURE_APIC) |  /* disable local APIC */
                          (1 << X86_FEATURE_ACPI));  /* disable ACPI */
-
        ax = 1;
-       cx = 0;
        xen_cpuid(&ax, &bx, &cx, &dx);
 
-       /* cpuid claims we support xsave; try enabling it to see what happens */
-       if (cx & (1 << (X86_FEATURE_XSAVE % 32))) {
-               unsigned long cr4;
-
-               set_in_cr4(X86_CR4_OSXSAVE);
-               
-               cr4 = read_cr4();
+       xsave_mask =
+               (1 << (X86_FEATURE_XSAVE % 32)) |
+               (1 << (X86_FEATURE_OSXSAVE % 32));
 
-               if ((cr4 & X86_CR4_OSXSAVE) == 0)
-                       cpuid_leaf1_ecx_mask &= ~(1 << (X86_FEATURE_XSAVE % 32));
-
-               clear_in_cr4(X86_CR4_OSXSAVE);
-       }
+       /* Xen will set CR4.OSXSAVE if supported and not disabled by force */
+       if ((cx & xsave_mask) != xsave_mask)
+               cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */
 }
 
 static void xen_set_debugreg(int reg, unsigned long val)
index c82df6c9c0f0a4a1bbc61f1ea881ebdd37fecdef..55c965b38c27c76769ecde61a9b5041c6969003b 100644 (file)
@@ -565,13 +565,13 @@ pte_t xen_make_pte_debug(pteval_t pte)
        if (io_page &&
            (xen_initial_domain() || addr >= ISA_END_ADDRESS)) {
                other_addr = pfn_to_mfn(addr >> PAGE_SHIFT) << PAGE_SHIFT;
-               WARN(addr != other_addr,
+               WARN_ONCE(addr != other_addr,
                        "0x%lx is using VM_IO, but it is 0x%lx!\n",
                        (unsigned long)addr, (unsigned long)other_addr);
        } else {
                pteval_t iomap_set = (_pte.pte & PTE_FLAGS_MASK) & _PAGE_IOMAP;
                other_addr = (_pte.pte & PTE_PFN_MASK);
-               WARN((addr == other_addr) && (!io_page) && (!iomap_set),
+               WARN_ONCE((addr == other_addr) && (!io_page) && (!iomap_set),
                        "0x%lx is missing VM_IO (and wasn't fixed)!\n",
                        (unsigned long)addr);
        }
@@ -1463,6 +1463,119 @@ static int xen_pgd_alloc(struct mm_struct *mm)
        return ret;
 }
 
+#ifdef CONFIG_X86_64
+static __initdata u64 __last_pgt_set_rw = 0;
+static __initdata u64 __pgt_buf_start = 0;
+static __initdata u64 __pgt_buf_end = 0;
+static __initdata u64 __pgt_buf_top = 0;
+/*
+ * As a consequence of the commit:
+ * 
+ * commit 4b239f458c229de044d6905c2b0f9fe16ed9e01e
+ * Author: Yinghai Lu <yinghai@kernel.org>
+ * Date:   Fri Dec 17 16:58:28 2010 -0800
+ * 
+ *     x86-64, mm: Put early page table high
+ * 
+ * at some point init_memory_mapping is going to reach the pagetable pages
+ * area and map those pages too (mapping them as normal memory that falls
+ * in the range of addresses passed to init_memory_mapping as argument).
+ * Some of those pages are already pagetable pages (they are in the range
+ * pgt_buf_start-pgt_buf_end) therefore they are going to be mapped RO and
+ * everything is fine.
+ * Some of these pages are not pagetable pages yet (they fall in the range
+ * pgt_buf_end-pgt_buf_top; for example the page at pgt_buf_end) so they
+ * are going to be mapped RW.  When these pages become pagetable pages and
+ * are hooked into the pagetable, xen will find that the guest has already
+ * a RW mapping of them somewhere and fail the operation.
+ * The reason Xen requires pagetables to be RO is that the hypervisor needs
+ * to verify that the pagetables are valid before using them. The validation
+ * operations are called "pinning".
+ * 
+ * In order to fix the issue we mark all the pages in the entire range
+ * pgt_buf_start-pgt_buf_top as RO, however when the pagetable allocation
+ * is completed only the range pgt_buf_start-pgt_buf_end is reserved by
+ * init_memory_mapping. Hence the kernel is going to crash as soon as one
+ * of the pages in the range pgt_buf_end-pgt_buf_top is reused (b/c those
+ * ranges are RO).
+ * 
+ * For this reason, 'mark_rw_past_pgt' is introduced which is called _after_
+ * the init_memory_mapping has completed (in a perfect world we would
+ * call this function from init_memory_mapping, but lets ignore that).
+ * 
+ * Because we are called _after_ init_memory_mapping the pgt_buf_[start,
+ * end,top] have all changed to new values (b/c init_memory_mapping
+ * is called and setting up another new page-table). Hence, the first time
+ * we enter this function, we save away the pgt_buf_start value and update
+ * the pgt_buf_[end,top].
+ * 
+ * When we detect that the "old" pgt_buf_start through pgt_buf_end
+ * PFNs have been reserved (so memblock_x86_reserve_range has been called),
+ * we immediately set out to RW the "old" pgt_buf_end through pgt_buf_top.
+ * 
+ * And then we update those "old" pgt_buf_[end|top] with the new ones
+ * so that we can redo this on the next pagetable.
+ */
+static __init void mark_rw_past_pgt(void) {
+
+       if (pgt_buf_end > pgt_buf_start) {
+               u64 addr, size;
+
+               /* Save it away. */
+               if (!__pgt_buf_start) {
+                       __pgt_buf_start = pgt_buf_start;
+                       __pgt_buf_end = pgt_buf_end;
+                       __pgt_buf_top = pgt_buf_top;
+                       return;
+               }
+               /* If we get the range that starts at __pgt_buf_end that means
+                * the range is reserved, and that in 'init_memory_mapping'
+                * the 'memblock_x86_reserve_range' has been called with the
+                * outdated __pgt_buf_start, __pgt_buf_end (the "new"
+                * pgt_buf_[start|end|top] refer now to a new pagetable.
+                * Note: we are called _after_ the pgt_buf_[..] have been
+                * updated.*/
+
+               addr = memblock_x86_find_in_range_size(PFN_PHYS(__pgt_buf_start),
+                                                      &size, PAGE_SIZE);
+
+               /* Still not reserved, meaning 'memblock_x86_reserve_range'
+                * hasn't been called yet. Update the _end and _top.*/
+               if (addr == PFN_PHYS(__pgt_buf_start)) {
+                       __pgt_buf_end = pgt_buf_end;
+                       __pgt_buf_top = pgt_buf_top;
+                       return;
+               }
+
+               /* OK, the area is reserved, meaning it is time for us to
+                * set RW for the old end->top PFNs. */
+
+               /* ..unless we had already done this. */
+               if (__pgt_buf_end == __last_pgt_set_rw)
+                       return;
+
+               addr = PFN_PHYS(__pgt_buf_end);
+               
+               /* set as RW the rest */
+               printk(KERN_DEBUG "xen: setting RW the range %llx - %llx\n",
+                       PFN_PHYS(__pgt_buf_end), PFN_PHYS(__pgt_buf_top));
+               
+               while (addr < PFN_PHYS(__pgt_buf_top)) {
+                       make_lowmem_page_readwrite(__va(addr));
+                       addr += PAGE_SIZE;
+               }
+               /* And update everything so that we are ready for the next
+                * pagetable (the one created for regions past 4GB) */
+               __last_pgt_set_rw = __pgt_buf_end;
+               __pgt_buf_start = pgt_buf_start;
+               __pgt_buf_end = pgt_buf_end;
+               __pgt_buf_top = pgt_buf_top;
+       }
+       return;
+}
+#else
+static __init void mark_rw_past_pgt(void) { }
+#endif
 static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd)
 {
 #ifdef CONFIG_X86_64
@@ -1473,17 +1586,29 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd)
 #endif
 }
 
+#ifdef CONFIG_X86_32
 static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
 {
-       unsigned long pfn = pte_pfn(pte);
-
-#ifdef CONFIG_X86_32
        /* If there's an existing pte, then don't allow _PAGE_RW to be set */
        if (pte_val_ma(*ptep) & _PAGE_PRESENT)
                pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) &
                               pte_val_ma(pte));
-#endif
+
+       return pte;
+}
+#else /* CONFIG_X86_64 */
+static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
+{
+       unsigned long pfn = pte_pfn(pte);
 
+       /*
+        * A bit of optimization. We do not need to call the workaround
+        * when xen_set_pte_init is called with a PTE with 0 as PFN.
+        * That is b/c the pagetable at that point are just being populated
+        * with empty values and we can save some cycles by not calling
+        * the 'memblock' code.*/
+       if (pfn)
+               mark_rw_past_pgt();
        /*
         * If the new pfn is within the range of the newly allocated
         * kernel pagetable, and it isn't being mapped into an
@@ -1491,12 +1616,13 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
         * it is RO.
         */
        if (((!is_early_ioremap_ptep(ptep) &&
-                       pfn >= pgt_buf_start && pfn < pgt_buf_end)) ||
+                       pfn >= pgt_buf_start && pfn < pgt_buf_top)) ||
                        (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1)))
                pte = pte_wrprotect(pte);
 
        return pte;
 }
+#endif /* CONFIG_X86_64 */
 
 /* Init-time set_pte while constructing initial pagetables, which
    doesn't allow RO pagetable pages to be remapped RW */
@@ -1992,6 +2118,8 @@ __init void xen_ident_map_ISA(void)
 
 static __init void xen_post_allocator_init(void)
 {
+       mark_rw_past_pgt();
+
 #ifdef CONFIG_XEN_DEBUG
        pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte_debug);
 #endif
index fa0269a993773f8488f765c3a1e255ba59fd4e3f..90bac0aac3a5d42f3c45b48c3980e0fb432eee03 100644 (file)
@@ -227,7 +227,7 @@ char * __init xen_memory_setup(void)
 
        memcpy(map_raw, map, sizeof(map));
        e820.nr_map = 0;
-       xen_extra_mem_start = mem_end;
+       xen_extra_mem_start = max((1ULL << 32), mem_end);
        for (i = 0; i < memmap.nr_entries; i++) {
                unsigned long long end;
 
index 137ca3945b07b55966b65a2ac2e89d0393fe4e8c..bb099a373b5add5c7f5fa9fb3d5544f3d3da6c9c 100644 (file)
@@ -37,7 +37,7 @@
  *     the size of the statically mapped kernel segment
  *     (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB.
  *
- * NOTE: When the entire KSEG area is DMA capable, we substract
+ * NOTE: When the entire KSEG area is DMA capable, we subtract
  *     one from the max address so that the virt_to_phys() macro
  *     works correctly on the address (otherwise the address
  *     enters another area, and virt_to_phys() may not return
index 5fd01f6aaf37a57b3cbec0208138b52f94d9bd03..6223f3346b5c1015621418d7a535ada366478901 100644 (file)
@@ -1026,7 +1026,7 @@ ENTRY(fast_syscall_unrecoverable)
  * TRY  adds an entry to the __ex_table fixup table for the immediately
  *      following instruction.
  *
- * CATCH catches any exception that occurred at one of the preceeding TRY
+ * CATCH catches any exception that occurred at one of the preceding TRY
  *       statements and continues from there
  *
  * Usage TRY   l32i    a0, a1, 0
index d77089df412e156fb4784f7d3913af0b21d68980..4340ee076bd522f88229aae7f474ce4a59493a40 100644 (file)
@@ -64,47 +64,41 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
 
 int arch_show_interrupts(struct seq_file *p, int prec)
 {
-       int j;
-
-       seq_printf(p, "%*s: ", prec, "NMI");
-       for_each_online_cpu(j)
-               seq_printf(p, "%10u ", nmi_count(j));
-       seq_putc(p, '\n');
        seq_printf(p, "%*s: ", prec, "ERR");
        seq_printf(p, "%10u\n", atomic_read(&irq_err_count));
        return 0;
 }
 
-static void xtensa_irq_mask(struct irq_chip *d)
+static void xtensa_irq_mask(struct irq_data *d)
 {
        cached_irq_mask &= ~(1 << d->irq);
        set_sr (cached_irq_mask, INTENABLE);
 }
 
-static void xtensa_irq_unmask(struct irq_chip *d)
+static void xtensa_irq_unmask(struct irq_data *d)
 {
        cached_irq_mask |= 1 << d->irq;
        set_sr (cached_irq_mask, INTENABLE);
 }
 
-static void xtensa_irq_enable(struct irq_chip *d)
+static void xtensa_irq_enable(struct irq_data *d)
 {
        variant_irq_enable(d->irq);
        xtensa_irq_unmask(d->irq);
 }
 
-static void xtensa_irq_disable(struct irq_chip *d)
+static void xtensa_irq_disable(struct irq_data *d)
 {
        xtensa_irq_mask(d->irq);
        variant_irq_disable(d->irq);
 }
 
-static void xtensa_irq_ack(struct irq_chip *d)
+static void xtensa_irq_ack(struct irq_data *d)
 {
        set_sr(1 << d->irq, INTCLEAR);
 }
 
-static int xtensa_irq_retrigger(struct irq_chip *d)
+static int xtensa_irq_retrigger(struct irq_data *d)
 {
        set_sr (1 << d->irq, INTSET);
        return 1;
index 2bef5705ce249d474a5d51dbab84b5c516383095..f0605ab2a76119dd94bccd5809ad881443c25fd7 100644 (file)
@@ -868,7 +868,7 @@ static void blkio_update_policy_rule(struct blkio_policy_node *oldpn,
 }
 
 /*
- * Some rules/values in blkg have changed. Propogate those to respective
+ * Some rules/values in blkg have changed. Propagate those to respective
  * policies.
  */
 static void blkio_update_blkg_policy(struct blkio_cgroup *blkcg,
@@ -903,7 +903,7 @@ static void blkio_update_blkg_policy(struct blkio_cgroup *blkcg,
 }
 
 /*
- * A policy node rule has been updated. Propogate this update to all the
+ * A policy node rule has been updated. Propagate this update to all the
  * block groups which might be affected by this update.
  */
 static void blkio_update_policy_node_blkg(struct blkio_cgroup *blkcg,
index e0a062363937291e2a9b82602b296bd8e6e2602a..a2e58eeb35499d5f44502a650c822ec000007d4e 100644 (file)
@@ -198,26 +198,13 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
 }
 EXPORT_SYMBOL(blk_dump_rq_flags);
 
-/*
- * Make sure that plugs that were pending when this function was entered,
- * are now complete and requests pushed to the queue.
-*/
-static inline void queue_sync_plugs(struct request_queue *q)
-{
-       /*
-        * If the current process is plugged and has barriers submitted,
-        * we will livelock if we don't unplug first.
-        */
-       blk_flush_plug(current);
-}
-
 static void blk_delay_work(struct work_struct *work)
 {
        struct request_queue *q;
 
        q = container_of(work, struct request_queue, delay_work.work);
        spin_lock_irq(q->queue_lock);
-       __blk_run_queue(q, false);
+       __blk_run_queue(q);
        spin_unlock_irq(q->queue_lock);
 }
 
@@ -233,7 +220,8 @@ static void blk_delay_work(struct work_struct *work)
  */
 void blk_delay_queue(struct request_queue *q, unsigned long msecs)
 {
-       schedule_delayed_work(&q->delay_work, msecs_to_jiffies(msecs));
+       queue_delayed_work(kblockd_workqueue, &q->delay_work,
+                               msecs_to_jiffies(msecs));
 }
 EXPORT_SYMBOL(blk_delay_queue);
 
@@ -251,7 +239,7 @@ void blk_start_queue(struct request_queue *q)
        WARN_ON(!irqs_disabled());
 
        queue_flag_clear(QUEUE_FLAG_STOPPED, q);
-       __blk_run_queue(q, false);
+       __blk_run_queue(q);
 }
 EXPORT_SYMBOL(blk_start_queue);
 
@@ -298,37 +286,41 @@ void blk_sync_queue(struct request_queue *q)
 {
        del_timer_sync(&q->timeout);
        cancel_delayed_work_sync(&q->delay_work);
-       queue_sync_plugs(q);
 }
 EXPORT_SYMBOL(blk_sync_queue);
 
 /**
  * __blk_run_queue - run a single device queue
  * @q: The queue to run
- * @force_kblockd: Don't run @q->request_fn directly.  Use kblockd.
  *
  * Description:
  *    See @blk_run_queue. This variant must be called with the queue lock
  *    held and interrupts disabled.
- *
  */
-void __blk_run_queue(struct request_queue *q, bool force_kblockd)
+void __blk_run_queue(struct request_queue *q)
 {
        if (unlikely(blk_queue_stopped(q)))
                return;
 
-       /*
-        * Only recurse once to avoid overrunning the stack, let the unplug
-        * handling reinvoke the handler shortly if we already got there.
-        */
-       if (!force_kblockd && !queue_flag_test_and_set(QUEUE_FLAG_REENTER, q)) {
-               q->request_fn(q);
-               queue_flag_clear(QUEUE_FLAG_REENTER, q);
-       } else
-               queue_delayed_work(kblockd_workqueue, &q->delay_work, 0);
+       q->request_fn(q);
 }
 EXPORT_SYMBOL(__blk_run_queue);
 
+/**
+ * blk_run_queue_async - run a single device queue in workqueue context
+ * @q: The queue to run
+ *
+ * Description:
+ *    Tells kblockd to perform the equivalent of @blk_run_queue on behalf
+ *    of us.
+ */
+void blk_run_queue_async(struct request_queue *q)
+{
+       if (likely(!blk_queue_stopped(q)))
+               queue_delayed_work(kblockd_workqueue, &q->delay_work, 0);
+}
+EXPORT_SYMBOL(blk_run_queue_async);
+
 /**
  * blk_run_queue - run a single device queue
  * @q: The queue to run
@@ -342,7 +334,7 @@ void blk_run_queue(struct request_queue *q)
        unsigned long flags;
 
        spin_lock_irqsave(q->queue_lock, flags);
-       __blk_run_queue(q, false);
+       __blk_run_queue(q);
        spin_unlock_irqrestore(q->queue_lock, flags);
 }
 EXPORT_SYMBOL(blk_run_queue);
@@ -991,7 +983,7 @@ void blk_insert_request(struct request_queue *q, struct request *rq,
                blk_queue_end_tag(q, rq);
 
        add_acct_request(q, rq, where);
-       __blk_run_queue(q, false);
+       __blk_run_queue(q);
        spin_unlock_irqrestore(q->queue_lock, flags);
 }
 EXPORT_SYMBOL(blk_insert_request);
@@ -1184,7 +1176,7 @@ static bool bio_attempt_front_merge(struct request_queue *q,
 
 /*
  * Attempts to merge with the plugged list in the current process. Returns
- * true if merge was succesful, otherwise false.
+ * true if merge was successful, otherwise false.
  */
 static bool attempt_plug_merge(struct task_struct *tsk, struct request_queue *q,
                               struct bio *bio)
@@ -1311,7 +1303,15 @@ get_rq:
 
        plug = current->plug;
        if (plug) {
-               if (!plug->should_sort && !list_empty(&plug->list)) {
+               /*
+                * If this is the first request added after a plug, fire
+                * of a plug trace. If others have been added before, check
+                * if we have multiple devices in this plug. If so, make a
+                * note to sort the list before dispatch.
+                */
+               if (list_empty(&plug->list))
+                       trace_block_plug(q);
+               else if (!plug->should_sort) {
                        struct request *__rq;
 
                        __rq = list_entry_rq(plug->list.prev);
@@ -1327,7 +1327,7 @@ get_rq:
        } else {
                spin_lock_irq(q->queue_lock);
                add_acct_request(q, req, where);
-               __blk_run_queue(q, false);
+               __blk_run_queue(q);
 out_unlock:
                spin_unlock_irq(q->queue_lock);
        }
@@ -2163,7 +2163,7 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
         * size, something has gone terribly wrong.
         */
        if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) {
-               printk(KERN_ERR "blk: request botched\n");
+               blk_dump_rq_flags(req, "request botched");
                req->__data_len = blk_rq_cur_bytes(req);
        }
 
@@ -2644,6 +2644,7 @@ void blk_start_plug(struct blk_plug *plug)
 
        plug->magic = PLUG_MAGIC;
        INIT_LIST_HEAD(&plug->list);
+       INIT_LIST_HEAD(&plug->cb_list);
        plug->should_sort = 0;
 
        /*
@@ -2665,36 +2666,96 @@ static int plug_rq_cmp(void *priv, struct list_head *a, struct list_head *b)
        struct request *rqa = container_of(a, struct request, queuelist);
        struct request *rqb = container_of(b, struct request, queuelist);
 
-       return !(rqa->q == rqb->q);
+       return !(rqa->q <= rqb->q);
+}
+
+/*
+ * If 'from_schedule' is true, then postpone the dispatch of requests
+ * until a safe kblockd context. We due this to avoid accidental big
+ * additional stack usage in driver dispatch, in places where the originally
+ * plugger did not intend it.
+ */
+static void queue_unplugged(struct request_queue *q, unsigned int depth,
+                           bool from_schedule)
+       __releases(q->queue_lock)
+{
+       trace_block_unplug(q, depth, !from_schedule);
+
+       /*
+        * If we are punting this to kblockd, then we can safely drop
+        * the queue_lock before waking kblockd (which needs to take
+        * this lock).
+        */
+       if (from_schedule) {
+               spin_unlock(q->queue_lock);
+               blk_run_queue_async(q);
+       } else {
+               __blk_run_queue(q);
+               spin_unlock(q->queue_lock);
+       }
+
+}
+
+static void flush_plug_callbacks(struct blk_plug *plug)
+{
+       LIST_HEAD(callbacks);
+
+       if (list_empty(&plug->cb_list))
+               return;
+
+       list_splice_init(&plug->cb_list, &callbacks);
+
+       while (!list_empty(&callbacks)) {
+               struct blk_plug_cb *cb = list_first_entry(&callbacks,
+                                                         struct blk_plug_cb,
+                                                         list);
+               list_del(&cb->list);
+               cb->callback(cb);
+       }
 }
 
-static void flush_plug_list(struct blk_plug *plug)
+void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
 {
        struct request_queue *q;
        unsigned long flags;
        struct request *rq;
+       LIST_HEAD(list);
+       unsigned int depth;
 
        BUG_ON(plug->magic != PLUG_MAGIC);
 
+       flush_plug_callbacks(plug);
        if (list_empty(&plug->list))
                return;
 
-       if (plug->should_sort)
-               list_sort(NULL, &plug->list, plug_rq_cmp);
+       list_splice_init(&plug->list, &list);
+
+       if (plug->should_sort) {
+               list_sort(NULL, &list, plug_rq_cmp);
+               plug->should_sort = 0;
+       }
 
        q = NULL;
+       depth = 0;
+
+       /*
+        * Save and disable interrupts here, to avoid doing it for every
+        * queue lock we have to take.
+        */
        local_irq_save(flags);
-       while (!list_empty(&plug->list)) {
-               rq = list_entry_rq(plug->list.next);
+       while (!list_empty(&list)) {
+               rq = list_entry_rq(list.next);
                list_del_init(&rq->queuelist);
                BUG_ON(!(rq->cmd_flags & REQ_ON_PLUG));
                BUG_ON(!rq->q);
                if (rq->q != q) {
-                       if (q) {
-                               __blk_run_queue(q, false);
-                               spin_unlock(q->queue_lock);
-                       }
+                       /*
+                        * This drops the queue lock
+                        */
+                       if (q)
+                               queue_unplugged(q, depth, from_schedule);
                        q = rq->q;
+                       depth = 0;
                        spin_lock(q->queue_lock);
                }
                rq->cmd_flags &= ~REQ_ON_PLUG;
@@ -2706,38 +2767,27 @@ static void flush_plug_list(struct blk_plug *plug)
                        __elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH);
                else
                        __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE);
-       }
 
-       if (q) {
-               __blk_run_queue(q, false);
-               spin_unlock(q->queue_lock);
+               depth++;
        }
 
-       BUG_ON(!list_empty(&plug->list));
-       local_irq_restore(flags);
-}
-
-static void __blk_finish_plug(struct task_struct *tsk, struct blk_plug *plug)
-{
-       flush_plug_list(plug);
+       /*
+        * This drops the queue lock
+        */
+       if (q)
+               queue_unplugged(q, depth, from_schedule);
 
-       if (plug == tsk->plug)
-               tsk->plug = NULL;
+       local_irq_restore(flags);
 }
 
 void blk_finish_plug(struct blk_plug *plug)
 {
-       if (plug)
-               __blk_finish_plug(current, plug);
-}
-EXPORT_SYMBOL(blk_finish_plug);
+       blk_flush_plug_list(plug, false);
 
-void __blk_flush_plug(struct task_struct *tsk, struct blk_plug *plug)
-{
-       __blk_finish_plug(tsk, plug);
-       tsk->plug = plug;
+       if (plug == current->plug)
+               current->plug = NULL;
 }
-EXPORT_SYMBOL(__blk_flush_plug);
+EXPORT_SYMBOL(blk_finish_plug);
 
 int __init blk_dev_init(void)
 {
index 7482b7fa863ba10b337d7547fb7040767e02b2da..81e31819a597bb0c6ed6dd4f781eb037c986a243 100644 (file)
@@ -55,7 +55,7 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
        WARN_ON(irqs_disabled());
        spin_lock_irq(q->queue_lock);
        __elv_add_request(q, rq, where);
-       __blk_run_queue(q, false);
+       __blk_run_queue(q);
        /* the queue is stopped so it won't be plugged+unplugged */
        if (rq->cmd_type == REQ_TYPE_PM_RESUME)
                q->request_fn(q);
index 93d5fd8e51ebfe1126746321af3a9f143831ac83..6c9b5e189e624888860e5185d1d9b3479b3e49a4 100644 (file)
@@ -218,7 +218,7 @@ static void flush_end_io(struct request *flush_rq, int error)
         * request_fn may confuse the driver.  Always use kblockd.
         */
        if (queued)
-               __blk_run_queue(q, true);
+               blk_run_queue_async(q);
 }
 
 /**
@@ -261,7 +261,7 @@ static bool blk_kick_flush(struct request_queue *q)
        q->flush_rq.end_io = flush_end_io;
 
        q->flush_pending_idx ^= 1;
-       elv_insert(q, &q->flush_rq, ELEVATOR_INSERT_REQUEUE);
+       list_add_tail(&q->flush_rq.queuelist, &q->queue_head);
        return true;
 }
 
@@ -274,14 +274,14 @@ static void flush_data_end_io(struct request *rq, int error)
         * the comment in flush_end_io().
         */
        if (blk_flush_complete_seq(rq, REQ_FSEQ_DATA, error))
-               __blk_run_queue(q, true);
+               blk_run_queue_async(q);
 }
 
 /**
  * blk_insert_flush - insert a new FLUSH/FUA request
  * @rq: request to insert
  *
- * To be called from elv_insert() for %ELEVATOR_INSERT_FLUSH insertions.
+ * To be called from __elv_add_request() for %ELEVATOR_INSERT_FLUSH insertions.
  * @rq is being submitted.  Analyze what needs to be done and put it on the
  * right queue.
  *
@@ -312,7 +312,7 @@ void blk_insert_flush(struct request *rq)
         */
        if ((policy & REQ_FSEQ_DATA) &&
            !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) {
-               list_add(&rq->queuelist, &q->queue_head);
+               list_add_tail(&rq->queuelist, &q->queue_head);
                return;
        }
 
index 54bcba6c02a75ed87af935c49d4428f18eb6a615..129b9e209a3b46dcf06ab36c0629e632e9b75035 100644 (file)
@@ -30,6 +30,8 @@
 
 static struct kmem_cache *integrity_cachep;
 
+static const char *bi_unsupported_name = "unsupported";
+
 /**
  * blk_rq_count_integrity_sg - Count number of integrity scatterlist elements
  * @q:         request queue
@@ -358,6 +360,14 @@ static struct kobj_type integrity_ktype = {
        .release        = blk_integrity_release,
 };
 
+bool blk_integrity_is_initialized(struct gendisk *disk)
+{
+       struct blk_integrity *bi = blk_get_integrity(disk);
+
+       return (bi && bi->name && strcmp(bi->name, bi_unsupported_name) != 0);
+}
+EXPORT_SYMBOL(blk_integrity_is_initialized);
+
 /**
  * blk_integrity_register - Register a gendisk as being integrity-capable
  * @disk:      struct gendisk pointer to make integrity-aware
@@ -407,7 +417,7 @@ int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template)
                bi->get_tag_fn = template->get_tag_fn;
                bi->tag_size = template->tag_size;
        } else
-               bi->name = "unsupported";
+               bi->name = bi_unsupported_name;
 
        return 0;
 }
index 261c75c665ae381a4c12dd444f7ed3b847c155a0..bd236313f35d59bd08da5a3d375cc29eed6fd86f 100644 (file)
@@ -66,14 +66,14 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count)
 
        if (rl->count[BLK_RW_SYNC] >= q->nr_requests) {
                blk_set_queue_full(q, BLK_RW_SYNC);
-       } else if (rl->count[BLK_RW_SYNC]+1 <= q->nr_requests) {
+       } else {
                blk_clear_queue_full(q, BLK_RW_SYNC);
                wake_up(&rl->wait[BLK_RW_SYNC]);
        }
 
        if (rl->count[BLK_RW_ASYNC] >= q->nr_requests) {
                blk_set_queue_full(q, BLK_RW_ASYNC);
-       } else if (rl->count[BLK_RW_ASYNC]+1 <= q->nr_requests) {
+       } else {
                blk_clear_queue_full(q, BLK_RW_ASYNC);
                wake_up(&rl->wait[BLK_RW_ASYNC]);
        }
@@ -498,7 +498,6 @@ int blk_register_queue(struct gendisk *disk)
 {
        int ret;
        struct device *dev = disk_to_dev(disk);
-
        struct request_queue *q = disk->queue;
 
        if (WARN_ON(!q))
@@ -509,8 +508,10 @@ int blk_register_queue(struct gendisk *disk)
                return ret;
 
        ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue");
-       if (ret < 0)
+       if (ret < 0) {
+               blk_trace_remove_sysfs(dev);
                return ret;
+       }
 
        kobject_uevent(&q->kobj, KOBJ_ADD);
 
@@ -521,7 +522,7 @@ int blk_register_queue(struct gendisk *disk)
        if (ret) {
                kobject_uevent(&q->kobj, KOBJ_REMOVE);
                kobject_del(&q->kobj);
-               blk_trace_remove_sysfs(disk_to_dev(disk));
+               blk_trace_remove_sysfs(dev);
                kobject_put(&dev->kobj);
                return ret;
        }
index 5352bdafbcf0fe6dcf761e6c1f4f36b12492f64e..0475a22a420dfb09d34ba51698e8b2a07f391b32 100644 (file)
@@ -77,7 +77,7 @@ struct throtl_grp {
        unsigned long slice_end[2];
 
        /* Some throttle limits got updated for the group */
-       bool limits_changed;
+       int limits_changed;
 };
 
 struct throtl_data
@@ -102,7 +102,7 @@ struct throtl_data
        /* Work for dispatching throttled bios */
        struct delayed_work throtl_work;
 
-       bool limits_changed;
+       int limits_changed;
 };
 
 enum tg_state_flags {
@@ -916,7 +916,7 @@ static void throtl_update_blkio_group_common(struct throtl_data *td,
 /*
  * For all update functions, key should be a valid pointer because these
  * update functions are called under blkcg_lock, that means, blkg is
- * valid and in turn key is valid. queue exit path can not race becuase
+ * valid and in turn key is valid. queue exit path can not race because
  * of blkcg_lock
  *
  * Can not take queue lock in update functions as queue lock under blkcg_lock
index c8db371a921d55760e2d9494c25a0f52c16bd659..61263463e38e17be7c7f742f0bbe9233eec2ecd2 100644 (file)
@@ -32,7 +32,7 @@ enum rq_atomic_flags {
 
 /*
  * EH timer and IO completion will both attempt to 'grab' the request, make
- * sure that only one of them suceeds
+ * sure that only one of them succeeds
  */
 static inline int blk_mark_rq_complete(struct request *rq)
 {
index 7785169f3c8f86df03887fe98d9af988b260e8ea..5b52011e3a40a38c1235e1729554abfbb9f99c7d 100644 (file)
@@ -888,7 +888,7 @@ cfq_group_notify_queue_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
        /*
         * Currently put the group at the end. Later implement something
         * so that groups get lesser vtime based on their weights, so that
-        * if group does not loose all if it was not continously backlogged.
+        * if group does not loose all if it was not continuously backlogged.
         */
        n = rb_last(&st->rb);
        if (n) {
@@ -2582,28 +2582,20 @@ static void cfq_put_queue(struct cfq_queue *cfqq)
 }
 
 /*
- * Must always be called with the rcu_read_lock() held
+ * Call func for each cic attached to this ioc.
  */
 static void
-__call_for_each_cic(struct io_context *ioc,
-                   void (*func)(struct io_context *, struct cfq_io_context *))
+call_for_each_cic(struct io_context *ioc,
+                 void (*func)(struct io_context *, struct cfq_io_context *))
 {
        struct cfq_io_context *cic;
        struct hlist_node *n;
 
+       rcu_read_lock();
+
        hlist_for_each_entry_rcu(cic, n, &ioc->cic_list, cic_list)
                func(ioc, cic);
-}
 
-/*
- * Call func for each cic attached to this ioc.
- */
-static void
-call_for_each_cic(struct io_context *ioc,
-                 void (*func)(struct io_context *, struct cfq_io_context *))
-{
-       rcu_read_lock();
-       __call_for_each_cic(ioc, func);
        rcu_read_unlock();
 }
 
@@ -2664,7 +2656,7 @@ static void cfq_free_io_context(struct io_context *ioc)
         * should be ok to iterate over the known list, we will see all cic's
         * since no new ones are added.
         */
-       __call_for_each_cic(ioc, cic_free_func);
+       call_for_each_cic(ioc, cic_free_func);
 }
 
 static void cfq_put_cooperator(struct cfq_queue *cfqq)
@@ -3368,7 +3360,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
                            cfqd->busy_queues > 1) {
                                cfq_del_timer(cfqd, cfqq);
                                cfq_clear_cfqq_wait_request(cfqq);
-                               __blk_run_queue(cfqd->queue, false);
+                               __blk_run_queue(cfqd->queue);
                        } else {
                                cfq_blkiocg_update_idle_time_stats(
                                                &cfqq->cfqg->blkg);
@@ -3383,7 +3375,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
                 * this new queue is RT and the current one is BE
                 */
                cfq_preempt_queue(cfqd, cfqq);
-               __blk_run_queue(cfqd->queue, false);
+               __blk_run_queue(cfqd->queue);
        }
 }
 
@@ -3743,7 +3735,7 @@ static void cfq_kick_queue(struct work_struct *work)
        struct request_queue *q = cfqd->queue;
 
        spin_lock_irq(q->queue_lock);
-       __blk_run_queue(cfqd->queue, false);
+       __blk_run_queue(cfqd->queue);
        spin_unlock_irq(q->queue_lock);
 }
 
index c387d3168734c21d74336b536819d35dc77719a5..45ca1e34f58249ff5b3838c0ec89fbc1c6ea2bb7 100644 (file)
@@ -610,7 +610,7 @@ void elv_requeue_request(struct request_queue *q, struct request *rq)
 
        rq->cmd_flags &= ~REQ_STARTED;
 
-       elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE);
+       __elv_add_request(q, rq, ELEVATOR_INSERT_REQUEUE);
 }
 
 void elv_drain_elevator(struct request_queue *q)
@@ -642,7 +642,7 @@ void elv_quiesce_start(struct request_queue *q)
         */
        elv_drain_elevator(q);
        while (q->rq.elvpriv) {
-               __blk_run_queue(q, false);
+               __blk_run_queue(q);
                spin_unlock_irq(q->queue_lock);
                msleep(10);
                spin_lock_irq(q->queue_lock);
@@ -655,12 +655,26 @@ void elv_quiesce_end(struct request_queue *q)
        queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q);
 }
 
-void elv_insert(struct request_queue *q, struct request *rq, int where)
+void __elv_add_request(struct request_queue *q, struct request *rq, int where)
 {
        trace_block_rq_insert(q, rq);
 
        rq->q = q;
 
+       BUG_ON(rq->cmd_flags & REQ_ON_PLUG);
+
+       if (rq->cmd_flags & REQ_SOFTBARRIER) {
+               /* barriers are scheduling boundary, update end_sector */
+               if (rq->cmd_type == REQ_TYPE_FS ||
+                   (rq->cmd_flags & REQ_DISCARD)) {
+                       q->end_sector = rq_end_sector(rq);
+                       q->boundary_rq = rq;
+               }
+       } else if (!(rq->cmd_flags & REQ_ELVPRIV) &&
+                   (where == ELEVATOR_INSERT_SORT ||
+                    where == ELEVATOR_INSERT_SORT_MERGE))
+               where = ELEVATOR_INSERT_BACK;
+
        switch (where) {
        case ELEVATOR_INSERT_REQUEUE:
        case ELEVATOR_INSERT_FRONT:
@@ -682,7 +696,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)
                 *   with anything.  There's no point in delaying queue
                 *   processing.
                 */
-               __blk_run_queue(q, false);
+               __blk_run_queue(q);
                break;
 
        case ELEVATOR_INSERT_SORT_MERGE:
@@ -722,24 +736,6 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)
                BUG();
        }
 }
-
-void __elv_add_request(struct request_queue *q, struct request *rq, int where)
-{
-       BUG_ON(rq->cmd_flags & REQ_ON_PLUG);
-
-       if (rq->cmd_flags & REQ_SOFTBARRIER) {
-               /* barriers are scheduling boundary, update end_sector */
-               if (rq->cmd_type == REQ_TYPE_FS ||
-                   (rq->cmd_flags & REQ_DISCARD)) {
-                       q->end_sector = rq_end_sector(rq);
-                       q->boundary_rq = rq;
-               }
-       } else if (!(rq->cmd_flags & REQ_ELVPRIV) &&
-                   where == ELEVATOR_INSERT_SORT)
-               where = ELEVATOR_INSERT_BACK;
-
-       elv_insert(q, rq, where);
-}
 EXPORT_SYMBOL(__elv_add_request);
 
 void elv_add_request(struct request_queue *q, struct request *rq, int where)
index c91a2dac6b6b282f5104c781b8f9509dda42f38d..2dd988723d73e98880d271b84dc77ef36b49a0a9 100644 (file)
@@ -739,7 +739,7 @@ void __init printk_all_partitions(void)
 
                /*
                 * Don't show empty devices or things that have been
-                * surpressed
+                * suppressed
                 */
                if (get_capacity(disk) == 0 ||
                    (disk->flags & GENHD_FL_SUPPRESS_PARTITION_INFO))
@@ -1588,9 +1588,13 @@ static void disk_events_workfn(struct work_struct *work)
 
        spin_unlock_irq(&ev->lock);
 
-       /* tell userland about new events */
+       /*
+        * Tell userland about new events.  Only the events listed in
+        * @disk->events are reported.  Unlisted events are processed the
+        * same internally but never get reported to userland.
+        */
        for (i = 0; i < ARRAY_SIZE(disk_uevents); i++)
-               if (events & (1 << i))
+               if (events & disk->events & (1 << i))
                        envp[nr_events++] = disk_uevents[i];
 
        if (nr_events)
index 2bc3321428494d727ca27064c73694f031443ea6..ffa0245e2abceb5b79b7d2f46a7407b6ea03b971 100644 (file)
@@ -83,7 +83,7 @@ static void xor_vectors(unsigned char *in1, unsigned char *in2,
 }
 /*
  * Returns DEFAULT_BLK_SZ bytes of random data per call
- * returns 0 if generation succeded, <0 if something went wrong
+ * returns 0 if generation succeeded, <0 if something went wrong
  */
 static int _get_more_prng_bytes(struct prng_context *ctx, int cont_test)
 {
index 079ae8ca590bf869fdeb475a1bf4bea7a563831e..bc28337fded2fdb2ae1b2725ae22464898bdb051 100644 (file)
@@ -94,7 +94,7 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list,
                if (unlikely(!tx))
                        async_tx_quiesce(&submit->depend_tx);
 
-               /* spin wait for the preceeding transactions to complete */
+               /* spin wait for the preceding transactions to complete */
                while (unlikely(!tx)) {
                        dma_async_issue_pending(chan);
                        tx = dma->device_prep_dma_xor(chan, dma_dest,
index a90d260528d4fbe09e3df8832736dc627f25de21..df35e4ccd07e565e02ca547a4202107118fdb1e1 100644 (file)
@@ -89,7 +89,7 @@
 }
 
 /*     Given the value i in 0..255 as the byte overflow when a field element
-    in GHASH is multipled by x^8, this function will return the values that
+    in GHASH is multiplied by x^8, this function will return the values that
     are generated in the lo 16-bit word of the field value by applying the
     modular polynomial. The values lo_byte and hi_byte are returned via the
     macro xp_fun(lo_byte, hi_byte) so that the values can be assembled into
index 0999274a27acf18e21a389b22ae2f5f3fed9cb1d..f35ff8a3926e2689deb66f6db541a79b1a6703f3 100644 (file)
@@ -95,7 +95,7 @@ const u64 mpoly = UINT64_C(0x1fffffff1fffffff);  /* Poly key mask     */
 
 /*
  * For highest performance the L1 NH and L2 polynomial hashes should be
- * carefully implemented to take advantage of one's target architechture.
+ * carefully implemented to take advantage of one's target architecture.
  * Here these two hash functions are defined multiple time; once for
  * 64-bit architectures, once for 32-bit SSE2 architectures, and once
  * for the rest (32-bit) architectures.
index 555ecaab1e544d89d519d685fdfecc9bf602470d..851705446c8201f13232ff3d8fce6956c99d72e4 100644 (file)
@@ -45,7 +45,7 @@ static int setkey(struct crypto_tfm *parent, const u8 *key,
                return -EINVAL;
        }
 
-       /* we need two cipher instances: one to compute the inital 'tweak'
+       /* we need two cipher instances: one to compute the initial 'tweak'
         * by encrypting the IV (usually the 'plain' iv) and the other
         * one to encrypt and decrypt the data */
 
index d1d484d4a06a3632ad6e7fb139030afd39b5b29d..f703b2881153f57c9eb01b1a2da47ae45e8a4af3 100644 (file)
@@ -241,7 +241,7 @@ static inline int ghes_severity(int severity)
        case CPER_SEV_FATAL:
                return GHES_SEV_PANIC;
        default:
-               /* Unkown, go panic */
+               /* Unknown, go panic */
                return GHES_SEV_PANIC;
        }
 }
index fa84e97443301d5a855db667fce2eceeb9a6f1c7..ad350173956338cc75ece02f3159b5f1b150b8e4 100644 (file)
@@ -1164,7 +1164,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
                         */
                        if (!match_pr->flags.throttling) {
                                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-                                       "Throttling Controll is unsupported "
+                                       "Throttling Control is unsupported "
                                        "on CPU %d\n", i));
                                continue;
                        }
index b136c9c1e531954dc27cc4bed422e1618e7681ee..449c556274c052cf4c9fd221c577b7735bcdca0f 100644 (file)
@@ -943,6 +943,10 @@ static int acpi_bus_get_flags(struct acpi_device *device)
        if (ACPI_SUCCESS(status))
                device->flags.lockable = 1;
 
+       /* Power resources cannot be power manageable. */
+       if (device->device_type == ACPI_BUS_TYPE_POWER)
+               return 0;
+
        /* Presence of _PS0|_PR0 indicates 'power manageable' */
        status = acpi_get_handle(device->handle, "_PS0", &temp);
        if (ACPI_FAILURE(status))
index 31e9e10f657eb6dda1ad9c58171ff38a523a1c34..ec574fc8fbc6028089eea27ab90695c4accf794c 100644 (file)
@@ -1354,7 +1354,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
                status = acpi_video_bus_get_one_device(dev, video);
                if (ACPI_FAILURE(status)) {
                        printk(KERN_WARNING PREFIX
-                                       "Cant attach device\n");
+                                       "Can't attach device\n");
                        continue;
                }
        }
@@ -1373,7 +1373,7 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
                                            acpi_video_device_notify);
        if (ACPI_FAILURE(status)) {
                printk(KERN_WARNING PREFIX
-                      "Cant remove video notify handler\n");
+                      "Can't remove video notify handler\n");
        }
        if (device->backlight) {
                backlight_device_unregister(device->backlight);
index 6d2bb2524b6ecda169a5d0c0ed0b14540a5dda17..7025593a58c89d39cb3ff260801b242730d8fdf2 100644 (file)
@@ -214,7 +214,7 @@ static int amba_pm_resume_noirq(struct device *dev)
 
 #endif /* !CONFIG_SUSPEND */
 
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
 
 static int amba_pm_freeze(struct device *dev)
 {
@@ -352,7 +352,7 @@ static int amba_pm_restore_noirq(struct device *dev)
        return ret;
 }
 
-#else /* !CONFIG_HIBERNATION */
+#else /* !CONFIG_HIBERNATE_CALLBACKS */
 
 #define amba_pm_freeze         NULL
 #define amba_pm_thaw           NULL
@@ -363,7 +363,7 @@ static int amba_pm_restore_noirq(struct device *dev)
 #define amba_pm_poweroff_noirq NULL
 #define amba_pm_restore_noirq  NULL
 
-#endif /* !CONFIG_HIBERNATION */
+#endif /* !CONFIG_HIBERNATE_CALLBACKS */
 
 #ifdef CONFIG_PM
 
@@ -760,7 +760,7 @@ int amba_request_regions(struct amba_device *dev, const char *name)
 }
 
 /**
- *     amba_release_regions - release mem regions assoicated with device
+ *     amba_release_regions - release mem regions associated with device
  *     @dev: amba_device structure for device
  *
  *     Release regions claimed by a successful call to amba_request_regions.
index e62f693be8ea71398322196295906b36da253f77..71afe0371311d7475e7034bb5ab1e483b2d3ce68 100644 (file)
@@ -150,7 +150,7 @@ static const struct ata_port_info ahci_port_info[] = {
        {
                AHCI_HFLAGS     (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
                                 AHCI_HFLAG_YES_NCQ),
-               .flags          = AHCI_FLAG_COMMON,
+               .flags          = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
                .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &ahci_ops,
@@ -261,6 +261,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
        { PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */
        { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */
        { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */
+       { PCI_VDEVICE(INTEL, 0x1e02), board_ahci }, /* Panther Point AHCI */
+       { PCI_VDEVICE(INTEL, 0x1e03), board_ahci }, /* Panther Point AHCI */
+       { PCI_VDEVICE(INTEL, 0x1e04), board_ahci }, /* Panther Point RAID */
+       { PCI_VDEVICE(INTEL, 0x1e05), board_ahci }, /* Panther Point RAID */
+       { PCI_VDEVICE(INTEL, 0x1e06), board_ahci }, /* Panther Point RAID */
+       { PCI_VDEVICE(INTEL, 0x1e07), board_ahci }, /* Panther Point RAID */
 
        /* JMicron 360/1/3/5/6, match class to avoid IDE function */
        { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
@@ -926,7 +932,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
                /*
                 * Acer eMachines G725 has the same problem.  BIOS
                 * V1.03 is known to be broken.  V3.04 is known to
-                * work.  Inbetween, there are V1.06, V2.06 and V3.03
+                * work.  Between, there are V1.06, V2.06 and V3.03
                 * that we don't have much idea about.  For now,
                 * blacklist anything older than V3.04.
                 *
index ccaf081220584db609852f7c5d0e8d43ec19de55..12c5282e7fca9c6effe1c42a2a7dae0a78395b2e 100644 (file)
@@ -225,10 +225,14 @@ enum {
        /* em_ctl bits */
        EM_CTL_RST              = (1 << 9), /* Reset */
        EM_CTL_TM               = (1 << 8), /* Transmit Message */
-       EM_CTL_MR               = (1 << 0), /* Message Recieved */
+       EM_CTL_MR               = (1 << 0), /* Message Received */
        EM_CTL_ALHD             = (1 << 26), /* Activity LED */
        EM_CTL_XMT              = (1 << 25), /* Transmit Only */
        EM_CTL_SMB              = (1 << 24), /* Single Message Buffer */
+       EM_CTL_SGPIO            = (1 << 19), /* SGPIO messages supported */
+       EM_CTL_SES              = (1 << 18), /* SES-2 messages supported */
+       EM_CTL_SAFTE            = (1 << 17), /* SAF-TE messages supported */
+       EM_CTL_LED              = (1 << 16), /* LED messages supported */
 
        /* em message type */
        EM_MSG_TYPE_LED         = (1 << 0), /* LED */
@@ -281,7 +285,7 @@ struct ahci_port_priv {
 };
 
 struct ahci_host_priv {
-       void __iomem *          mmio;           /* bus-independant mem map */
+       void __iomem *          mmio;           /* bus-independent mem map */
        unsigned int            flags;          /* AHCI_HFLAG_* */
        u32                     cap;            /* cap to use */
        u32                     cap2;           /* cap2 to use */
index cdec4ab3b159b6796425385bc02a0be1cb88f732..6f6e7718b05c7ff905ab3ad068aaa15160992581 100644 (file)
  *  Hardware documentation available at http://developer.intel.com/
  *
  * Documentation
- *     Publically available from Intel web site. Errata documentation
- * is also publically available. As an aide to anyone hacking on this
+ *     Publicly available from Intel web site. Errata documentation
+ * is also publicly available. As an aide to anyone hacking on this
  * driver the list of errata that are relevant is below, going back to
  * PIIX4. Older device documentation is now a bit tricky to find.
  *
  * The chipsets all follow very much the same design. The original Triton
- * series chipsets do _not_ support independant device timings, but this
+ * series chipsets do _not_ support independent device timings, but this
  * is fixed in Triton II. With the odd mobile exception the chips then
  * change little except in gaining more modes until SATA arrives. This
- * driver supports only the chips with independant timing (that is those
+ * driver supports only the chips with independent timing (that is those
  * with SITRE and the 0x44 timing register). See pata_oldpiix and pata_mpiix
  * for the early chip drivers.
  *
@@ -122,7 +122,7 @@ enum {
        P2                      = 2,  /* port 2 */
        P3                      = 3,  /* port 3 */
        IDE                     = -1, /* IDE */
-       NA                      = -2, /* not avaliable */
+       NA                      = -2, /* not available */
        RV                      = -3, /* reserved */
 
        PIIX_AHCI_DEVICE        = 6,
@@ -309,6 +309,14 @@ static const struct pci_device_id piix_pci_tbl[] = {
        { 0x8086, 0x1d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
        /* SATA Controller IDE (PBG) */
        { 0x8086, 0x1d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+       /* SATA Controller IDE (Panther Point) */
+       { 0x8086, 0x1e00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
+       /* SATA Controller IDE (Panther Point) */
+       { 0x8086, 0x1e01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
+       /* SATA Controller IDE (Panther Point) */
+       { 0x8086, 0x1e08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+       /* SATA Controller IDE (Panther Point) */
+       { 0x8086, 0x1e09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
        { }     /* terminate list */
 };
 
index 26d452339e98f59fc483cbc85e9c53f56b2a0183..ff9d832a163de8442c2adc1d8fa18be75ec4f417 100644 (file)
@@ -109,6 +109,8 @@ static ssize_t ahci_read_em_buffer(struct device *dev,
 static ssize_t ahci_store_em_buffer(struct device *dev,
                                    struct device_attribute *attr,
                                    const char *buf, size_t size);
+static ssize_t ahci_show_em_supported(struct device *dev,
+                                     struct device_attribute *attr, char *buf);
 
 static DEVICE_ATTR(ahci_host_caps, S_IRUGO, ahci_show_host_caps, NULL);
 static DEVICE_ATTR(ahci_host_cap2, S_IRUGO, ahci_show_host_cap2, NULL);
@@ -116,6 +118,7 @@ static DEVICE_ATTR(ahci_host_version, S_IRUGO, ahci_show_host_version, NULL);
 static DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL);
 static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO,
                   ahci_read_em_buffer, ahci_store_em_buffer);
+static DEVICE_ATTR(em_message_supported, S_IRUGO, ahci_show_em_supported, NULL);
 
 struct device_attribute *ahci_shost_attrs[] = {
        &dev_attr_link_power_management_policy,
@@ -126,6 +129,7 @@ struct device_attribute *ahci_shost_attrs[] = {
        &dev_attr_ahci_host_version,
        &dev_attr_ahci_port_cmd,
        &dev_attr_em_buffer,
+       &dev_attr_em_message_supported,
        NULL
 };
 EXPORT_SYMBOL_GPL(ahci_shost_attrs);
@@ -343,6 +347,24 @@ static ssize_t ahci_store_em_buffer(struct device *dev,
        return size;
 }
 
+static ssize_t ahci_show_em_supported(struct device *dev,
+                                     struct device_attribute *attr, char *buf)
+{
+       struct Scsi_Host *shost = class_to_shost(dev);
+       struct ata_port *ap = ata_shost_to_port(shost);
+       struct ahci_host_priv *hpriv = ap->host->private_data;
+       void __iomem *mmio = hpriv->mmio;
+       u32 em_ctl;
+
+       em_ctl = readl(mmio + HOST_EM_CTL);
+
+       return sprintf(buf, "%s%s%s%s\n",
+                      em_ctl & EM_CTL_LED ? "led " : "",
+                      em_ctl & EM_CTL_SAFTE ? "saf-te " : "",
+                      em_ctl & EM_CTL_SES ? "ses-2 " : "",
+                      em_ctl & EM_CTL_SGPIO ? "sgpio " : "");
+}
+
 /**
  *     ahci_save_initial_config - Save and fixup initial config values
  *     @dev: target AHCI device
@@ -539,6 +561,27 @@ void ahci_start_engine(struct ata_port *ap)
 {
        void __iomem *port_mmio = ahci_port_base(ap);
        u32 tmp;
+       u8 status;
+
+       status = readl(port_mmio + PORT_TFDATA) & 0xFF;
+
+       /*
+        * At end of section 10.1 of AHCI spec (rev 1.3), it states
+        * Software shall not set PxCMD.ST to 1 until it is determined
+        * that a functoinal device is present on the port as determined by
+        * PxTFD.STS.BSY=0, PxTFD.STS.DRQ=0 and PxSSTS.DET=3h
+        *
+        * Even though most AHCI host controllers work without this check,
+        * specific controller will fail under this condition
+        */
+       if (status & (ATA_BUSY | ATA_DRQ))
+               return;
+       else {
+               ahci_scr_read(&ap->link, SCR_STATUS, &tmp);
+
+               if ((tmp & 0xf) != 0x3)
+                       return;
+       }
 
        /* start DMA */
        tmp = readl(port_mmio + PORT_CMD);
@@ -1897,7 +1940,17 @@ static void ahci_pmp_attach(struct ata_port *ap)
        ahci_enable_fbs(ap);
 
        pp->intr_mask |= PORT_IRQ_BAD_PMP;
-       writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
+
+       /*
+        * We must not change the port interrupt mask register if the
+        * port is marked frozen, the value in pp->intr_mask will be
+        * restored later when the port is thawed.
+        *
+        * Note that during initialization, the port is marked as
+        * frozen since the irq handler is not yet registered.
+        */
+       if (!(ap->pflags & ATA_PFLAG_FROZEN))
+               writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
 }
 
 static void ahci_pmp_detach(struct ata_port *ap)
@@ -1913,7 +1966,10 @@ static void ahci_pmp_detach(struct ata_port *ap)
        writel(cmd, port_mmio + PORT_CMD);
 
        pp->intr_mask &= ~PORT_IRQ_BAD_PMP;
-       writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
+
+       /* see comment above in ahci_pmp_attach() */
+       if (!(ap->pflags & ATA_PFLAG_FROZEN))
+               writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
 }
 
 int ahci_port_resume(struct ata_port *ap)
index b91e19cab1026671f734f4738ed275aed2529651..76c3c15cb1e66680e11f9c5fb670d616e564acc5 100644 (file)
@@ -4139,6 +4139,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
         */
        { "PIONEER DVD-RW  DVRTD08",    "1.00", ATA_HORKAGE_NOSETXFER },
        { "PIONEER DVD-RW  DVR-212D",   "1.28", ATA_HORKAGE_NOSETXFER },
+       { "PIONEER DVD-RW  DVR-216D",   "1.08", ATA_HORKAGE_NOSETXFER },
 
        /* End Marker */
        { }
@@ -5340,7 +5341,7 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
  *
  *     Resume @host.  Actual operation is performed by EH.  This
  *     function requests EH to perform PM operations and returns.
- *     Note that all resume operations are performed parallely.
+ *     Note that all resume operations are performed parallelly.
  *
  *     LOCKING:
  *     Kernel thread context (may sleep).
@@ -5480,7 +5481,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
        if (!ap)
                return NULL;
 
-       ap->pflags |= ATA_PFLAG_INITIALIZING;
+       ap->pflags |= ATA_PFLAG_INITIALIZING | ATA_PFLAG_FROZEN;
        ap->lock = &host->lock;
        ap->print_id = -1;
        ap->host = host;
index df3f3140c9c79bb25347cc67d6f1054f7d208c19..f26f2fe3480ad0847b6ce059a0b4206e182a9f46 100644 (file)
@@ -771,7 +771,7 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap)
                /* process port suspend request */
                ata_eh_handle_port_suspend(ap);
 
-               /* Exception might have happend after ->error_handler
+               /* Exception might have happened after ->error_handler
                 * recovered the port but before this point.  Repeat
                 * EH in such case.
                 */
@@ -1742,7 +1742,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
  *
  *     Analyze taskfile of @qc and further determine cause of
  *     failure.  This function also requests ATAPI sense data if
- *     avaliable.
+ *     available.
  *
  *     LOCKING:
  *     Kernel thread context (may sleep).
@@ -1893,7 +1893,7 @@ static int speed_down_verdict_cb(struct ata_ering_entry *ent, void *void_arg)
  *        occurred during last 5 mins, NCQ_OFF.
  *
  *     3. If more than 8 ATA_BUS, TOUT_HSM or UNK_DEV errors
- *        ocurred during last 5 mins, FALLBACK_TO_PIO
+ *        occurred during last 5 mins, FALLBACK_TO_PIO
  *
  *     4. If more than 3 TOUT_HSM or UNK_DEV errors occurred
  *        during last 10 mins, NCQ_OFF.
@@ -2577,7 +2577,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
        if (link->flags & ATA_LFLAG_NO_SRST)
                softreset = NULL;
 
-       /* make sure each reset attemp is at least COOL_DOWN apart */
+       /* make sure each reset attempt is at least COOL_DOWN apart */
        if (ehc->i.flags & ATA_EHI_DID_RESET) {
                now = jiffies;
                WARN_ON(time_after(ehc->last_reset, now));
@@ -2736,7 +2736,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
                        if (!reset) {
                                ata_link_printk(link, KERN_ERR,
                                                "follow-up softreset required "
-                                               "but no softreset avaliable\n");
+                                               "but no softreset available\n");
                                failed_link = link;
                                rc = -EINVAL;
                                goto fail;
@@ -3316,6 +3316,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
        struct ata_eh_context *ehc = &link->eh_context;
        struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL;
        enum ata_lpm_policy old_policy = link->lpm_policy;
+       bool no_dipm = ap->flags & ATA_FLAG_NO_DIPM;
        unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM;
        unsigned int err_mask;
        int rc;
@@ -3332,7 +3333,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
         */
        ata_for_each_dev(dev, link, ENABLED) {
                bool hipm = ata_id_has_hipm(dev->id);
-               bool dipm = ata_id_has_dipm(dev->id);
+               bool dipm = ata_id_has_dipm(dev->id) && !no_dipm;
 
                /* find the first enabled and LPM enabled devices */
                if (!link_dev)
@@ -3389,7 +3390,8 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
 
        /* host config updated, enable DIPM if transitioning to MIN_POWER */
        ata_for_each_dev(dev, link, ENABLED) {
-               if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) {
+               if (policy == ATA_LPM_MIN_POWER && !no_dipm &&
+                   ata_id_has_dipm(dev->id)) {
                        err_mask = ata_dev_set_feature(dev,
                                        SETFEATURES_SATA_ENABLE, SATA_DIPM);
                        if (err_mask && err_mask != AC_ERR_DEV) {
index a834199913576057467884dcd41ea0b1bc22ec80..e2f57e9e12f0eecb0fd8bbd2603ef14122ff003e 100644 (file)
@@ -999,7 +999,7 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
  *     @qc: Command that we are erroring out
  *
  *     Generate sense block for a failed ATA command @qc.  Descriptor
- *     format is used to accomodate LBA48 block address.
+ *     format is used to accommodate LBA48 block address.
  *
  *     LOCKING:
  *     None.
index cf7acbc0cfcbd4fe456d57e3d764d78a89d21ee4..f8380ce0f4d1d85e1eee7638e93a9b996885adce 100644 (file)
@@ -2839,7 +2839,7 @@ unsigned int ata_bmdma_port_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
                bmdma_stopped = true;
 
                if (unlikely(host_stat & ATA_DMA_ERR)) {
-                       /* error when transfering data to/from memory */
+                       /* error when transferring data to/from memory */
                        qc->err_mask |= AC_ERR_HOST_BUS;
                        ap->hsm_task_state = HSM_ST_ERR;
                }
@@ -3032,7 +3032,7 @@ void ata_bmdma_start(struct ata_queued_cmd *qc)
         * Or maybe I'm just being paranoid.
         *
         * FIXME: The posting of this write means I/O starts are
-        * unneccessarily delayed for MMIO
+        * unnecessarily delayed for MMIO
         */
 }
 EXPORT_SYMBOL_GPL(ata_bmdma_start);
index 620a07cabe31d11dde15c563e53f4fd7f51337e1..b0975a5ad8c4ad195e2200f2e45c1a10bcf689b8 100644 (file)
@@ -11,7 +11,7 @@
  *     Power management on ports
  *
  *
- *  Documentation publically available.
+ *  Documentation publicly available.
  */
 
 #include <linux/kernel.h>
index 65cee74605b4d53b29b7849559513fe51c4491a0..719bb73a73e046215d6005e01df46d1d9baefad9 100644 (file)
@@ -385,7 +385,7 @@ static inline int wait4buf(struct arasan_cf_dev *acdev)
                return -ETIMEDOUT;
        }
 
-       /* Check if PIO Error interrupt has occured */
+       /* Check if PIO Error interrupt has occurred */
        if (acdev->dma_status & ATA_DMA_ERR)
                return -EAGAIN;
 
@@ -450,7 +450,7 @@ static int sg_xfer(struct arasan_cf_dev *acdev, struct scatterlist *sg)
        /*
         * For each sg:
         * MAX_XFER_COUNT data will be transferred before we get transfer
-        * complete interrupt. Inbetween after FIFO_SIZE data
+        * complete interrupt. Between after FIFO_SIZE data
         * buffer available interrupt will be generated. At this time we will
         * fill FIFO again: max FIFO_SIZE data.
         */
@@ -463,7 +463,7 @@ static int sg_xfer(struct arasan_cf_dev *acdev, struct scatterlist *sg)
                                acdev->vbase + XFER_CTR);
                spin_unlock_irqrestore(&acdev->host->lock, flags);
 
-               /* continue dma xfers untill current sg is completed */
+               /* continue dma xfers until current sg is completed */
                while (xfer_cnt) {
                        /* wait for read to complete */
                        if (!write) {
@@ -563,7 +563,7 @@ static void data_xfer(struct work_struct *work)
 
 chan_request_fail:
        spin_lock_irqsave(&acdev->host->lock, flags);
-       /* error when transfering data to/from memory */
+       /* error when transferring data to/from memory */
        qc->err_mask |= AC_ERR_HOST_BUS;
        qc->ap->hsm_task_state = HSM_ST_ERR;
 
index 0da0dcc7dd089427a988171c3f1a8b62c1b8f90f..a5fdbdcb0faf2ed8daa5c4fa77767da6cc3fa7ea 100644 (file)
 
 
 #define DRV_NAME "pata_at91"
-#define DRV_VERSION "0.1"
+#define DRV_VERSION "0.2"
 
 #define CF_IDE_OFFSET      0x00c00000
 #define CF_ALT_IDE_OFFSET   0x00e00000
 #define CF_IDE_RES_SIZE     0x08
+#define NCS_RD_PULSE_LIMIT  0x3f /* maximal value for pulse bitfields */
 
 struct at91_ide_info {
        unsigned long mode;
@@ -49,8 +50,18 @@ struct at91_ide_info {
        void __iomem *alt_addr;
 };
 
-static const struct ata_timing initial_timing =
-       {XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0};
+static const struct ata_timing initial_timing = {
+       .mode           = XFER_PIO_0,
+       .setup          = 70,
+       .act8b          = 290,
+       .rec8b          = 240,
+       .cyc8b          = 600,
+       .active         = 165,
+       .recover        = 150,
+       .dmack_hold     = 0,
+       .cycle          = 600,
+       .udma           = 0
+};
 
 static unsigned long calc_mck_cycles(unsigned long ns, unsigned long mck_hz)
 {
@@ -109,6 +120,11 @@ static void set_smc_timing(struct device *dev,
        /* (CS0, CS1, DIR, OE) <= (CFCE1, CFCE2, CFRNW, NCSX) timings */
        ncs_read_setup = 1;
        ncs_read_pulse = read_cycle - 2;
+       if (ncs_read_pulse > NCS_RD_PULSE_LIMIT) {
+               ncs_read_pulse = NCS_RD_PULSE_LIMIT;
+               dev_warn(dev, "ncs_read_pulse limited to maximal value %lu\n",
+                       ncs_read_pulse);
+       }
 
        /* Write timings same as read timings */
        write_cycle = read_cycle;
index e0b58b8dfe6f20546af962ed5c3322842cb7460e..ea64967000ff439b6e4cb03a477a58e06efec2c2 100644 (file)
@@ -1342,7 +1342,7 @@ static unsigned int bfin_ata_host_intr(struct ata_port *ap,
                        ap->ops->bmdma_stop(qc);
 
                        if (unlikely(host_stat & ATA_DMA_ERR)) {
-                               /* error when transfering data to/from memory */
+                               /* error when transferring data to/from memory */
                                qc->err_mask |= AC_ERR_HOST_BUS;
                                ap->hsm_task_state = HSM_ST_ERR;
                        }
index 030952f1f97c6e1290dc2a35663fbb29038f4d3e..e3254fcff0f1eff39f1b4b3c7793cd742844f450 100644 (file)
@@ -29,7 +29,7 @@
  * General Public License for more details.
  *
  * Documentation:
- *     Not publically available.
+ *     Not publicly available.
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
index b21f0021f54aed850dd6e2825491f829e2a02d84..d8d9c5807740cf6990923a77cd2b7ece14366e03 100644 (file)
@@ -15,7 +15,7 @@
  * with PCI IDE and also that we do not disable the device when our driver is
  * unloaded (as it has many other functions).
  *
- * The driver conciously keeps this logic internally to avoid pushing quirky
+ * The driver consciously keeps this logic internally to avoid pushing quirky
  * PATA history into the clean libata layer.
  *
  * Thinkpad specific note: If you boot an MPIIX using a thinkpad with a PCMCIA
index 4a454a88aa9daacff710c47f736d28e3bec451b0..4d04471794b62f07692e1dcc2ddc8315c5e8e547 100644 (file)
@@ -112,7 +112,7 @@ static int rz1000_reinit_one(struct pci_dev *pdev)
        if (rc)
                return rc;
 
-       /* If this fails on resume (which is a "cant happen" case), we
+       /* If this fails on resume (which is a "can't happen" case), we
           must stop as any progress risks data loss */
        if (rz1000_fifo_disable(pdev))
                panic("rz1000 fifo");
index 00eefbd84b33ebc927224f6dc343fd0f71707a42..118787caa93fcaf64fe372738d4a0a3a81d19bcd 100644 (file)
@@ -11,7 +11,7 @@
  *
  *  May be copied or modified under the terms of the GNU General Public License
  *
- *  Documentation publically available.
+ *  Documentation publicly available.
  *
  *     If you have strange problems with nVidia chipset systems please
  *     see the SI support documentation and update your system BIOS
@@ -43,7 +43,7 @@
  *
  *     Turn a config register offset into the right address in either
  *     PCI space or MMIO space to access the control register in question
- *     Thankfully this is a configuration operation so isnt performance
+ *     Thankfully this is a configuration operation so isn't performance
  *     criticial.
  */
 
index c04abc393fc5276461fe39b50fd4f2766343f687..be08ff92db178c416cb3e495b24e473ee329a07a 100644 (file)
@@ -331,7 +331,7 @@ static void sis_old_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 
        if (adev->dma_mode < XFER_UDMA_0) {
                /* bits 3-0 hold recovery timing bits 8-10 active timing and
-                  the higher bits are dependant on the device */
+                  the higher bits are dependent on the device */
                timing &= ~0x870F;
                timing |= mwdma_bits[speed];
        } else {
@@ -371,7 +371,7 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 
        if (adev->dma_mode < XFER_UDMA_0) {
                /* bits 3-0 hold recovery timing bits 8-10 active timing and
-                  the higher bits are dependant on the device, bit 15 udma */
+                  the higher bits are dependent on the device, bit 15 udma */
                timing &= ~0x870F;
                timing |= mwdma_bits[speed];
        } else {
index 0d1f89e571ddb35641e2860783ceb17cf9b42fe0..03b6d69d619739fe454aa2c17b8adfc0fff6ece9 100644 (file)
@@ -30,7 +30,7 @@
  * Loosely based on the piix & svwks drivers.
  *
  * Documentation:
- *     Not publically available.
+ *     Not publicly available.
  */
 
 #include <linux/kernel.h>
index 0f91e583892e19a4578501407d0b816584bac83e..35a71d875d0ec029f4d4676f8e8814e98a0a596a 100644 (file)
@@ -42,7 +42,7 @@ enum {
 
        /*
         * SATA-FSL host controller supports a max. of (15+1) direct PRDEs, and
-        * chained indirect PRDEs upto a max count of 63.
+        * chained indirect PRDEs up to a max count of 63.
         * We are allocating an array of 63 PRDEs contiguously, but PRDE#15 will
         * be setup as an indirect descriptor, pointing to it's next
         * (contiguous) PRDE. Though chained indirect PRDE arrays are
@@ -907,7 +907,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
        ata_msleep(ap, 1);
 
        /*
-        * SATA device enters reset state after receving a Control register
+        * SATA device enters reset state after receiving a Control register
         * FIS with SRST bit asserted and it awaits another H2D Control reg.
         * FIS with SRST bit cleared, then the device does internal diags &
         * initialization, followed by indicating it's initialization status
index cd40651e9b72b977c5f8cc520b66a8d89f289689..b52c0519ad0bdf0a6f6bc4d26beab464912f3a7d 100644 (file)
@@ -1352,7 +1352,7 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val)
                        /*
                         * Workaround for 88SX60x1 FEr SATA#26:
                         *
-                        * COMRESETs have to take care not to accidently
+                        * COMRESETs have to take care not to accidentally
                         * put the drive to sleep when writing SCR_CONTROL.
                         * Setting bits 12..15 prevents this problem.
                         *
@@ -2044,7 +2044,7 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
 
        cw = &pp->crqb[in_index].ata_cmd[0];
 
-       /* Sadly, the CRQB cannot accomodate all registers--there are
+       /* Sadly, the CRQB cannot accommodate all registers--there are
         * only 11 bytes...so we must pick and choose required
         * registers based on the command.  So, we drop feature and
         * hob_feature for [RW] DMA commands, but they are needed for
index 42344e3c686df4194240ac759a20eafb57c98f16..f173ef3bfc10c1fdc9a4d85794d763df13bd8d7a 100644 (file)
@@ -2121,7 +2121,7 @@ static int nv_swncq_sdbfis(struct ata_port *ap)
 
        host_stat = ap->ops->bmdma_status(ap);
        if (unlikely(host_stat & ATA_DMA_ERR)) {
-               /* error when transfering data to/from memory */
+               /* error when transferring data to/from memory */
                ata_ehi_clear_desc(ehi);
                ata_ehi_push_desc(ehi, "BMDMA stat 0x%x", host_stat);
                ehi->err_mask |= AC_ERR_HOST_BUS;
index 21242c5709a0c14bef6f5e48aae6c54c1cab8534..54434db15b122e49ddefef9f68a84046019c72a3 100644 (file)
@@ -582,7 +582,7 @@ static void svia_configure(struct pci_dev *pdev, int board_id)
         * When host issues HOLD, device may send up to 20DW of data
         * before acknowledging it with HOLDA and the host should be
         * able to buffer them in FIFO.  Unfortunately, some WD drives
-        * send upto 40DW before acknowledging HOLD and, in the
+        * send up to 40DW before acknowledging HOLD and, in the
         * default configuration, this ends up overflowing vt6421's
         * FIFO, making the controller abort the transaction with
         * R_ERR.
index 9f47e86252669a4581b7805db5b79d192f52376f..a5fcb1eb862f256f05f87dceb09f7cfc3d1779d8 100644 (file)
@@ -497,7 +497,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) {
          // VC layer stats
          atomic_inc(&atm_vcc->stats->rx);
          __net_timestamp(skb);
-         // end of our responsability
+         // end of our responsibility
          atm_vcc->push (atm_vcc, skb);
          return;
          
index 049650d42c882139ca5a6c05b4381ce7f9a4d936..ef7a658312a62a0e66d81302dfedf8812f8b20fd 100644 (file)
@@ -1782,7 +1782,7 @@ static int __devinit fs_init (struct fs_dev *dev)
                write_fs (dev, RAS0, RAS0_DCD_XHLT 
                          | (((1 << FS155_VPI_BITS) - 1) * RAS0_VPSEL)
                          | (((1 << FS155_VCI_BITS) - 1) * RAS0_VCSEL));
-               /* We can chose the split arbitarily. We might be able to 
+               /* We can chose the split arbitrarily. We might be able to 
                   support more. Whatever. This should do for now. */
                dev->atm_dev->ci_range.vpi_bits = FS155_VPI_BITS;
                dev->atm_dev->ci_range.vci_bits = FS155_VCI_BITS;
index 7f97c09aaea5ec068d83c37e2ed2222af601f43a..ba34a02b717d2329d94433bc4e8bddab0ac8a30f 100644 (file)
@@ -263,7 +263,7 @@ typedef enum opcode {
 } opcode_t;
 
 
-/* virtual path / virtual channel identifers */
+/* virtual path / virtual channel identifiers */
 
 typedef struct vpvc {
     BITFIELD3(
@@ -926,7 +926,7 @@ typedef struct fore200e_vcc {
 
 #define PCA200E_PCI_LATENCY      0x40    /* maximum slave latenty            */
 #define PCA200E_PCI_MASTER_CTRL  0x41    /* master control                   */
-#define PCA200E_PCI_THRESHOLD    0x42    /* burst / continous req threshold  */
+#define PCA200E_PCI_THRESHOLD    0x42    /* burst / continuous req threshold  */
 
 /* PBI master control register */
 
index 24761e1d6642d7c6a2c7dcb6e8d4073c89f76c64..d58e3fcb9db364d0a1e2da49a64559dff691f6ab 100644 (file)
@@ -169,13 +169,13 @@ static inline void __init show_version (void) {
   Real Time (cdv and max CDT given)
   
   CBR(pcr)             pcr bandwidth always available
-  rtVBR(pcr,scr,mbs)   scr bandwidth always available, upto pcr at mbs too
+  rtVBR(pcr,scr,mbs)   scr bandwidth always available, up to pcr at mbs too
   
   Non Real Time
   
-  nrtVBR(pcr,scr,mbs)  scr bandwidth always available, upto pcr at mbs too
+  nrtVBR(pcr,scr,mbs)  scr bandwidth always available, up to pcr at mbs too
   UBR()
-  ABR(mcr,pcr)         mcr bandwidth always available, upto pcr (depending) too
+  ABR(mcr,pcr)         mcr bandwidth always available, up to pcr (depending) too
   
   mbs is max burst size (bucket)
   pcr and scr have associated cdvt values
@@ -944,7 +944,7 @@ static void hrz_close_rx (hrz_dev * dev, u16 vc) {
 // to be fixed soon, so do not define TAILRECUSRIONWORKS unless you
 // are sure it does as you may otherwise overflow the kernel stack.
 
-// giving this fn a return value would help GCC, alledgedly
+// giving this fn a return value would help GCC, allegedly
 
 static void rx_schedule (hrz_dev * dev, int irq) {
   unsigned int rx_bytes;
@@ -1036,7 +1036,7 @@ static void rx_schedule (hrz_dev * dev, int irq) {
          // VC layer stats
          atomic_inc(&vcc->stats->rx);
          __net_timestamp(skb);
-         // end of our responsability
+         // end of our responsibility
          vcc->push (vcc, skb);
        }
       }
index bfb7feee0400df5c8f9a13adc0cde06a053c2ac7..048f99fe6f838edc146ff1297545b2737fc17d89 100644 (file)
@@ -3495,7 +3495,7 @@ init_card(struct atm_dev *dev)
                return -1;
        }
        if (dev->phy->ioctl == NULL) {
-               printk("%s: LT had no IOCTL funtion defined.\n", card->name);
+               printk("%s: LT had no IOCTL function defined.\n", card->name);
                deinit_card(card);
                return -1;
        }
index f53a43ae2bbeee9f4fd4fea845409492e50cc069..3a82cc23a0532ba72e74a551c162b03c383c3c5f 100644 (file)
@@ -766,7 +766,7 @@ struct idt77252_dev
 #define SAR_RCTE_BUFFSTAT_MASK 0x00003000  /* buffer status                  */
 #define SAR_RCTE_EFCI          0x00000800  /* EFCI Congestion flag           */
 #define SAR_RCTE_CLP           0x00000400  /* Cell Loss Priority flag        */
-#define SAR_RCTE_CRC           0x00000200  /* Recieved CRC Error             */
+#define SAR_RCTE_CRC           0x00000200  /* Received CRC Error             */
 #define SAR_RCTE_CELLCNT_MASK  0x000001FF  /* cell Count                     */
 
 #define SAR_RCTE_AAL0          0x00000000  /* AAL types for ALL field        */
index d80d51b62a1a4a4cef448696fd36e2665a7b16b4..1c674a91f1465f147b4d3a512c51f78fe2efd286 100644 (file)
@@ -1025,7 +1025,7 @@ static void desc_dbg(IADEV *iadev) {
 } 
   
   
-/*----------------------------- Recieving side stuff --------------------------*/  
+/*----------------------------- Receiving side stuff --------------------------*/  
  
 static void rx_excp_rcvd(struct atm_dev *dev)  
 {  
@@ -1195,7 +1195,7 @@ static void rx_intr(struct atm_dev *dev)
   if (status & RX_PKT_RCVD)  
   {  
        /* do something */  
-       /* Basically recvd an interrupt for receving a packet.  
+       /* Basically recvd an interrupt for receiving a packet.  
        A descriptor would have been written to the packet complete   
        queue. Get all the descriptors and set up dma to move the   
        packets till the packet complete queue is empty..  
@@ -1855,7 +1855,7 @@ static int open_tx(struct atm_vcc *vcc)
                     return -EINVAL; 
                 }
                 if (vcc->qos.txtp.max_pcr > iadev->LineRate) {
-                   IF_CBR(printk("PCR is not availble\n");)
+                   IF_CBR(printk("PCR is not available\n");)
                    return -1;
                 }
                 vc->type = CBR;
index 52880c8387d823f861745840ff27539adf1daba7..4e8ba56f75d311e9429a783c14eec438810114bc 100644 (file)
@@ -1255,7 +1255,7 @@ static inline void lanai_endtx(struct lanai_dev *lanai,
        /*
         * Since the "butt register" is a shared resounce on the card we
         * serialize all accesses to it through this spinlock.  This is
-        * mostly just paranoia sicne the register is rarely "busy" anyway
+        * mostly just paranoia since the register is rarely "busy" anyway
         * but is needed for correctness.
         */
        spin_lock(&lanai->endtxlock);
@@ -1990,7 +1990,7 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai)
 
 /*
  * We _can_ use VCI==0 for normal traffic, but only for UBR (or we'll
- * get a CBRZERO interrupt), and we can use it only if noone is receiving
+ * get a CBRZERO interrupt), and we can use it only if no one is receiving
  * AAL0 traffic (since they will use the same queue) - according to the
  * docs we shouldn't even use it for AAL0 traffic
  */
index 49758593a5ba6d79c283df0317ef961b70c62729..41ce4bd96813eea5818f6774a45e1bc5a923db2a 100644 (file)
@@ -49,7 +49,7 @@
 static unsigned int cfag12864b_rate = CONFIG_CFAG12864B_RATE;
 module_param(cfag12864b_rate, uint, S_IRUGO);
 MODULE_PARM_DESC(cfag12864b_rate,
-       "Refresh rate (hertzs)");
+       "Refresh rate (hertz)");
 
 unsigned int cfag12864b_getrate(void)
 {
@@ -60,7 +60,7 @@ unsigned int cfag12864b_getrate(void)
  * cfag12864b Commands
  *
  *     E = Enable signal
- *             Everytime E switch from low to high,
+ *             Every time E switch from low to high,
  *             cfag12864b/ks0108 reads the command/data.
  *
  *     CS1 = First ks0108controller.
index f051cfff18afe2e703bc6383d8b6277cdc652401..9e0e4fc24c46506e4adcfd6f4e429ad6ddced5f7 100644 (file)
@@ -149,6 +149,7 @@ static void platform_device_release(struct device *dev)
 
        of_device_node_put(&pa->pdev.dev);
        kfree(pa->pdev.dev.platform_data);
+       kfree(pa->pdev.mfd_cell);
        kfree(pa->pdev.resource);
        kfree(pa);
 }
@@ -771,7 +772,7 @@ int __weak platform_pm_resume_noirq(struct device *dev)
 
 #endif /* !CONFIG_SUSPEND */
 
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
 
 static int platform_pm_freeze(struct device *dev)
 {
@@ -909,7 +910,7 @@ static int platform_pm_restore_noirq(struct device *dev)
        return ret;
 }
 
-#else /* !CONFIG_HIBERNATION */
+#else /* !CONFIG_HIBERNATE_CALLBACKS */
 
 #define platform_pm_freeze             NULL
 #define platform_pm_thaw               NULL
@@ -920,7 +921,7 @@ static int platform_pm_restore_noirq(struct device *dev)
 #define platform_pm_poweroff_noirq     NULL
 #define platform_pm_restore_noirq      NULL
 
-#endif /* !CONFIG_HIBERNATION */
+#endif /* !CONFIG_HIBERNATE_CALLBACKS */
 
 #ifdef CONFIG_PM_RUNTIME
 
index 052dc53eef388db918f2a0f6ce961be366691577..abe3ab709e87ffe3340757b6ae80bad694caf2d8 100644 (file)
@@ -63,6 +63,7 @@ void device_pm_init(struct device *dev)
        dev->power.wakeup = NULL;
        spin_lock_init(&dev->power.lock);
        pm_runtime_init(dev);
+       INIT_LIST_HEAD(&dev->power.entry);
 }
 
 /**
@@ -233,7 +234,7 @@ static int pm_op(struct device *dev,
                }
                break;
 #endif /* CONFIG_SUSPEND */
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
        case PM_EVENT_FREEZE:
        case PM_EVENT_QUIESCE:
                if (ops->freeze) {
@@ -260,7 +261,7 @@ static int pm_op(struct device *dev,
                        suspend_report_result(ops->restore, error);
                }
                break;
-#endif /* CONFIG_HIBERNATION */
+#endif /* CONFIG_HIBERNATE_CALLBACKS */
        default:
                error = -EINVAL;
        }
@@ -308,7 +309,7 @@ static int pm_noirq_op(struct device *dev,
                }
                break;
 #endif /* CONFIG_SUSPEND */
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
        case PM_EVENT_FREEZE:
        case PM_EVENT_QUIESCE:
                if (ops->freeze_noirq) {
@@ -335,7 +336,7 @@ static int pm_noirq_op(struct device *dev,
                        suspend_report_result(ops->restore_noirq, error);
                }
                break;
-#endif /* CONFIG_HIBERNATION */
+#endif /* CONFIG_HIBERNATE_CALLBACKS */
        default:
                error = -EINVAL;
        }
index 54597c859ecbc295d9691af86f6382c52f48395b..3172c60d23a96e0e2d910219deed3b40bc2f6c79 100644 (file)
@@ -443,7 +443,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)
  *
  * Check if the device's run-time PM status allows it to be resumed.  Cancel
  * any scheduled or pending requests.  If another resume has been started
- * earlier, either return imediately or wait for it to finish, depending on the
+ * earlier, either return immediately or wait for it to finish, depending on the
  * RPM_NOWAIT and RPM_ASYNC flags.  Similarly, if there's a suspend running in
  * parallel with this function, either tell the other process to resume after
  * suspending (deferred_resume) or wait for it to finish.  If the RPM_ASYNC
index 4573c83df6ddc4d996e342bc47bb54f717063474..abbbd33e8d8af8ebd82c27f0b1a298f2286d0373 100644 (file)
@@ -258,7 +258,7 @@ void device_set_wakeup_capable(struct device *dev, bool capable)
        if (!!dev->power.can_wakeup == !!capable)
                return;
 
-       if (device_is_registered(dev)) {
+       if (device_is_registered(dev) && !list_empty(&dev->power.entry)) {
                if (capable) {
                        if (wakeup_sysfs_add(dev))
                                return;
index fbe72da6c4141e20a1ecda2eb433417acb4bf5cf..acde9b5ee1314b10577e00a38064cb25ea3118f7 100644 (file)
@@ -197,7 +197,7 @@ kset_put:
 }
 
 /**
- *     sysdev_driver_register - Register auxillary driver
+ *     sysdev_driver_register - Register auxiliary driver
  *     @cls:   Device class driver belongs to.
  *     @drv:   Driver.
  *
@@ -250,7 +250,7 @@ unlock:
 }
 
 /**
- *     sysdev_driver_unregister - Remove an auxillary driver.
+ *     sysdev_driver_unregister - Remove an auxiliary driver.
  *     @cls:   Class driver belongs to.
  *     @drv:   Driver.
  */
@@ -302,7 +302,7 @@ int sysdev_register(struct sys_device *sysdev)
                 * code that should have called us.
                 */
 
-               /* Notify class auxillary drivers */
+               /* Notify class auxiliary drivers */
                list_for_each_entry(drv, &cls->drivers, entry) {
                        if (drv->add)
                                drv->add(sysdev);
@@ -335,7 +335,7 @@ void sysdev_unregister(struct sys_device *sysdev)
  *
  *     Loop over each class of system devices, and the devices in each
  *     of those classes. For each device, we call the shutdown method for
- *     each driver registered for the device - the auxillaries,
+ *     each driver registered for the device - the auxiliaries,
  *     and the class driver.
  *
  *     Note: The list is iterated in reverse order, so that we shut down
@@ -360,7 +360,7 @@ void sysdev_shutdown(void)
                        struct sysdev_driver *drv;
                        pr_debug(" %s\n", kobject_name(&sysdev->kobj));
 
-                       /* Call auxillary drivers first */
+                       /* Call auxiliary drivers first */
                        list_for_each_entry(drv, &cls->drivers, entry) {
                                if (drv->shutdown)
                                        drv->shutdown(sysdev);
@@ -385,7 +385,7 @@ static void __sysdev_resume(struct sys_device *dev)
        WARN_ONCE(!irqs_disabled(),
                "Interrupts enabled after %pF\n", cls->resume);
 
-       /* Call auxillary drivers next. */
+       /* Call auxiliary drivers next. */
        list_for_each_entry(drv, &cls->drivers, entry) {
                if (drv->resume)
                        drv->resume(dev);
@@ -432,7 +432,7 @@ int sysdev_suspend(pm_message_t state)
                list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) {
                        pr_debug(" %s\n", kobject_name(&sysdev->kobj));
 
-                       /* Call auxillary drivers first */
+                       /* Call auxiliary drivers first */
                        list_for_each_entry(drv, &cls->drivers, entry) {
                                if (drv->suspend) {
                                        ret = drv->suspend(sysdev, state);
index 90af2943f9e4a56bb284aab6ce5bab177cfba794..c126db3cb7d12c92be4b5d62abfd58d4a699a961 100644 (file)
@@ -73,6 +73,7 @@ int syscore_suspend(void)
 
        return ret;
 }
+EXPORT_SYMBOL_GPL(syscore_suspend);
 
 /**
  * syscore_resume - Execute all the registered system core resume callbacks.
@@ -95,6 +96,7 @@ void syscore_resume(void)
                                "Interrupts enabled after %pF\n", ops->resume);
                }
 }
+EXPORT_SYMBOL_GPL(syscore_resume);
 #endif /* CONFIG_PM_SLEEP */
 
 /**
index 79882104e431a283235b3e1cdee24343429366eb..8066d086578a7124a4873bb8376389dc9a010be9 100644 (file)
@@ -1790,7 +1790,7 @@ static bool DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T
   unsigned short LogicalDeviceNumber = 0;
   int ModelNameLength;
 
-  /* Get data into dma-able area, then copy into permanant location */
+  /* Get data into dma-able area, then copy into permanent location */
   if (!DAC960_V2_NewControllerInfo(Controller))
     return DAC960_Failure(Controller, "GET CONTROLLER INFO");
   memcpy(ControllerInfo, Controller->V2.NewControllerInformation,
index 2a1642bc451d6cdaffebc8e9c6bf9ba9fa895077..c6828b68d77b00831e3f45ae5555f9c2c2751c7a 100644 (file)
@@ -30,7 +30,7 @@
 
 /* We maintain a trivial check sum in our on disk activity log.
  * With that we can ensure correct operation even when the storage
- * device might do a partial (last) sector write while loosing power.
+ * device might do a partial (last) sector write while losing power.
  */
 struct __packed al_transaction {
        u32       magic;
index 81030d8d654b26115e8d32a425cd9974e30737d1..b2699bb2e5303472d5e67e72086ac517195eeab7 100644 (file)
@@ -622,7 +622,7 @@ DCBP_set_pad_bits(struct p_compressed_bm *p, int n)
 /* one bitmap packet, including the p_header,
  * should fit within one _architecture independend_ page.
  * so we need to use the fixed size 4KiB page size
- * most architechtures have used for a long time.
+ * most architectures have used for a long time.
  */
 #define BM_PACKET_PAYLOAD_BYTES (4096 - sizeof(struct p_header80))
 #define BM_PACKET_WORDS (BM_PACKET_PAYLOAD_BYTES/sizeof(long))
@@ -810,7 +810,7 @@ enum {
 
 /* global flag bits */
 enum {
-       CREATE_BARRIER,         /* next P_DATA is preceeded by a P_BARRIER */
+       CREATE_BARRIER,         /* next P_DATA is preceded by a P_BARRIER */
        SIGNAL_ASENDER,         /* whether asender wants to be interrupted */
        SEND_PING,              /* whether asender should send a ping asap */
 
@@ -1126,7 +1126,7 @@ struct drbd_conf {
        int c_sync_rate; /* current resync rate after syncer throttle magic */
        struct fifo_buffer rs_plan_s; /* correction values of resync planer */
        int rs_in_flight; /* resync sectors in flight (to proxy, in proxy and from proxy) */
-       int rs_planed;    /* resync sectors already planed */
+       int rs_planed;    /* resync sectors already planned */
        atomic_t ap_in_flight; /* App sectors in flight (waiting for ack) */
 };
 
@@ -1144,7 +1144,7 @@ static inline unsigned int mdev_to_minor(struct drbd_conf *mdev)
        return mdev->minor;
 }
 
-/* returns 1 if it was successfull,
+/* returns 1 if it was successful,
  * returns 0 if there was no data socket.
  * so wherever you are going to use the data.socket, e.g. do
  * if (!drbd_get_data_sock(mdev))
@@ -2079,7 +2079,7 @@ static inline void inc_ap_pending(struct drbd_conf *mdev)
 /* counts how many resync-related answers we still expect from the peer
  *                  increase                   decrease
  * C_SYNC_TARGET sends P_RS_DATA_REQUEST (and expects P_RS_DATA_REPLY)
- * C_SYNC_SOURCE sends P_RS_DATA_REPLY   (and expects P_WRITE_ACK whith ID_SYNCER)
+ * C_SYNC_SOURCE sends P_RS_DATA_REPLY   (and expects P_WRITE_ACK with ID_SYNCER)
  *                                        (or P_NEG_ACK with ID_SYNCER)
  */
 static inline void inc_rs_pending(struct drbd_conf *mdev)
index dfc85f32d3177bb90bcc2b53f8d3921de82df544..5b525c179f39919d6e245948a434e3248c9f329b 100644 (file)
@@ -1561,7 +1561,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
                if (drbd_send_state(mdev))
                        dev_warn(DEV, "Notified peer that I'm now diskless.\n");
                /* corresponding get_ldev in __drbd_set_state
-                * this may finaly trigger drbd_ldev_destroy. */
+                * this may finally trigger drbd_ldev_destroy. */
                put_ldev(mdev);
        }
 
@@ -3706,7 +3706,7 @@ int drbd_md_read(struct drbd_conf *mdev, struct drbd_backing_dev *bdev)
        buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page);
 
        if (!drbd_md_sync_page_io(mdev, bdev, bdev->md.md_offset, READ)) {
-               /* NOTE: cant do normal error processing here as this is
+               /* NOTE: can't do normal error processing here as this is
                   called BEFORE disk is attached */
                dev_err(DEV, "Error while reading metadata.\n");
                rv = ERR_IO_MD_DISK;
index fe1564c7d8b6e835643939d18f3aba2bc9e6b60d..fd26666c0b08436fe0c648f3f09c016b0c999207 100644 (file)
@@ -862,7 +862,7 @@ retry:
        msock->sk->sk_rcvtimeo = mdev->net_conf->ping_int*HZ;
 
        /* we don't want delays.
-        * we use TCP_CORK where apropriate, though */
+        * we use TCP_CORK where appropriate, though */
        drbd_tcp_nodelay(sock);
        drbd_tcp_nodelay(msock);
 
index fc824006e7217179e2ef8bb7552363efe8208827..8cb1532a381600f44fc5145ad89d506235300869 100644 (file)
@@ -32,7 +32,7 @@
  * the bitmap transfer time can take much too long,
  * if transmitted in plain text.
  *
- * We try to reduce the transfered bitmap information
+ * We try to reduce the transferred bitmap information
  * by encoding runlengths of bit polarity.
  *
  * We never actually need to encode a "zero" (runlengths are positive).
index 30ec6b37424ef901dada825d3429478c0e57854a..007c630904c125a5e61fa3cd23b36669c0582d6b 100644 (file)
@@ -733,7 +733,7 @@ static int __init hd_init(void)
                 * the BIOS or CMOS.  This doesn't work all that well,
                 * since this assumes that this is a primary or secondary
                 * drive, and if we're using this legacy driver, it's
-                * probably an auxilliary controller added to recover
+                * probably an auxiliary controller added to recover
                 * legacy data off an ST-506 drive.  Either way, it's
                 * definitely safest to have the user explicitly specify
                 * the information.
index e2ff697697c27c7a26d7f66d24bafd94f10e1031..9a5b2a2d616ddca884499622693536b98e950914 100644 (file)
@@ -94,7 +94,7 @@ static const struct vio_error_entry viodasd_err_table[] = {
        { 0x0204, EIO, "Use Error" },
        { 0x0205, EIO, "Release Error" },
        { 0x0206, EINVAL, "Invalid Disk" },
-       { 0x0207, EBUSY, "Cant Lock" },
+       { 0x0207, EBUSY, "Can't Lock" },
        { 0x0208, EIO, "Already Locked" },
        { 0x0209, EIO, "Already Unlocked" },
        { 0x020A, EIO, "Invalid Arg" },
index 73354b081ed3e8a629c849f3aaac865c1e1649e1..645ff765cd129cbb3046e57ea477e4b387205d45 100644 (file)
@@ -621,7 +621,7 @@ static void ace_fsm_dostate(struct ace_device *ace)
                ace_dump_mem(ace->cf_id, 512);  /* Debug: Dump out disk ID */
 
                if (ace->data_result) {
-                       /* Error occured, disable the disk */
+                       /* Error occurred, disable the disk */
                        ace->media_change = 1;
                        set_capacity(ace->gd, 0);
                        dev_err(ace->dev, "error fetching CF id (%i)\n",
@@ -801,7 +801,7 @@ static int ace_interrupt_checkstate(struct ace_device *ace)
        u32 sreg = ace_in32(ace, ACE_STATUS);
        u16 creg = ace_in(ace, ACE_CTRL);
 
-       /* Check for error occurance */
+       /* Check for error occurrence */
        if ((sreg & (ACE_STATUS_CFGERROR | ACE_STATUS_CFCERROR)) &&
            (creg & ACE_CTRL_ERRORIRQ)) {
                dev_err(ace->dev, "transfer failure\n");
@@ -1169,7 +1169,7 @@ static int __devinit ace_probe(struct platform_device *dev)
                        irq = dev->resource[i].start;
        }
 
-       /* Call the bus-independant setup code */
+       /* Call the bus-independent setup code */
        return ace_alloc(&dev->dev, id, physaddr, irq, bus_width);
 }
 
@@ -1222,7 +1222,7 @@ static int __devinit ace_of_probe(struct platform_device *op)
        if (of_find_property(op->dev.of_node, "8-bit", NULL))
                bus_width = ACE_BUS_WIDTH_8;
 
-       /* Call the bus-independant setup code */
+       /* Call the bus-independent setup code */
        return ace_alloc(&op->dev, id ? be32_to_cpup(id) : 0,
                                                physaddr, irq, bus_width);
 }
index 866811428e209c95d3eadb3de08e0c8038297799..762a5109c68ac24c3c6e83cb462429059528ebac 100644 (file)
@@ -71,6 +71,9 @@ static struct usb_device_id btusb_table[] = {
        /* Apple MacBookAir3,1, MacBookAir3,2 */
        { USB_DEVICE(0x05ac, 0x821b) },
 
+       /* Apple MacBookPro8,2 */
+       { USB_DEVICE(0x05ac, 0x821a) },
+
        /* AVM BlueFRITZ! USB v2.0 */
        { USB_DEVICE(0x057c, 0x3800) },
 
@@ -690,7 +693,8 @@ static int btusb_send_frame(struct sk_buff *skb)
                break;
 
        case HCI_ACLDATA_PKT:
-               if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1)
+               if (!data->bulk_tx_ep || (hdev->conn_hash.acl_num < 1 &&
+                                               hdev->conn_hash.le_num < 1))
                        return -ENODEV;
 
                urb = usb_alloc_urb(0, GFP_ATOMIC);
index 38595e782d02e1c39dcbd82cc0fa0c94b0babfd2..7e4b435f79f04244cdf5c65d2b7eba9852463bf1 100644 (file)
@@ -207,7 +207,7 @@ static void ll_device_want_to_wakeup(struct hci_uart *hu)
                /*
                 * This state means that both the host and the BRF chip
                 * have simultaneously sent a wake-up-indication packet.
-                * Traditionaly, in this case, receiving a wake-up-indication
+                * Traditionally, in this case, receiving a wake-up-indication
                 * was enough and an additional wake-up-ack wasn't needed.
                 * This has changed with the BRF6350, which does require an
                 * explicit wake-up-ack. Other BRF versions, which do not
index e2c48a7eccffe72aafe1812fb38cde294875a1a3..514dd8efaf7385f03ab6d7566f4eaac38d4fd5aa 100644 (file)
@@ -30,7 +30,7 @@
   changelog for the 1.x series, David?
 
 2.00  Dec  2, 1997 -- Erik Andersen <andersee@debian.org>
-  -- New maintainer! As David A. van Leeuwen has been too busy to activly
+  -- New maintainer! As David A. van Leeuwen has been too busy to actively
   maintain and improve this driver, I am now carrying on the torch. If
   you have a problem with this driver, please feel free to contact me.
 
@@ -2520,7 +2520,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
 /*
  * Ok, this is where problems start.  The current interface for the
  * CDROM_DISC_STATUS ioctl is flawed.  It makes the false assumption that
- * CDs are all CDS_DATA_1 or all CDS_AUDIO, etc.  Unfortunatly, while this
+ * CDs are all CDS_DATA_1 or all CDS_AUDIO, etc.  Unfortunately, while this
  * is often the case, it is also very common for CDs to have some tracks
  * with data, and some tracks with audio.  Just because I feel like it,
  * I declare the following to be the best way to cope.  If the CD has ANY
index 3e67ddde9e16403577a6cf74b219f418cb1c4886..923f99df4f1c2e572249532fd874f4ea3fccee2f 100644 (file)
@@ -237,7 +237,7 @@ extern int agp_try_unsupported_boot;
 
 long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 
-/* Chipset independant registers (from AGP Spec) */
+/* Chipset independent registers (from AGP Spec) */
 #define AGP_APBASE     0x10
 
 #define AGPSTAT                0x4
index 45681c0ff3b64d01f5e8f3265ed3ef98bea6bab4..f7e88787af970947f236b78f68c6ade8c02fab46 100644 (file)
@@ -272,7 +272,7 @@ static void amd_irongate_cleanup(void)
  * This routine could be implemented by taking the addresses
  * written to the GATT, and flushing them individually.  However
  * currently it just flushes the whole table.  Which is probably
- * more efficent, since agp_memory blocks can be a large number of
+ * more efficient, since agp_memory blocks can be a large number of
  * entries.
  */
 
index 012cba0d6d965219de4d286a855285eeab05ec23..b072648dc3f64904f60df2f58d230de06688024e 100644 (file)
@@ -115,6 +115,9 @@ static struct agp_memory *agp_create_user_memory(unsigned long num_agp_pages)
        struct agp_memory *new;
        unsigned long alloc_size = num_agp_pages*sizeof(struct page *);
 
+       if (INT_MAX/sizeof(struct page *) < num_agp_pages)
+               return NULL;
+
        new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL);
        if (new == NULL)
                return NULL;
@@ -234,11 +237,14 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
        int scratch_pages;
        struct agp_memory *new;
        size_t i;
+       int cur_memory;
 
        if (!bridge)
                return NULL;
 
-       if ((atomic_read(&bridge->current_memory_agp) + page_count) > bridge->max_memory_agp)
+       cur_memory = atomic_read(&bridge->current_memory_agp);
+       if ((cur_memory + page_count > bridge->max_memory_agp) ||
+           (cur_memory + page_count < page_count))
                return NULL;
 
        if (type >= AGP_USER_TYPES) {
@@ -1089,8 +1095,8 @@ int agp_generic_insert_memory(struct agp_memory * mem, off_t pg_start, int type)
                return -EINVAL;
        }
 
-       /* AK: could wrap */
-       if ((pg_start + mem->page_count) > num_entries)
+       if (((pg_start + mem->page_count) > num_entries) ||
+           ((pg_start + mem->page_count) < pg_start))
                return -EINVAL;
 
        j = pg_start;
@@ -1124,7 +1130,7 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
 {
        size_t i;
        struct agp_bridge_data *bridge;
-       int mask_type;
+       int mask_type, num_entries;
 
        bridge = mem->bridge;
        if (!bridge)
@@ -1136,6 +1142,11 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
        if (type != mem->type)
                return -EINVAL;
 
+       num_entries = agp_num_entries();
+       if (((pg_start + mem->page_count) > num_entries) ||
+           ((pg_start + mem->page_count) < pg_start))
+               return -EINVAL;
+
        mask_type = bridge->driver->agp_type_to_mask_type(bridge, type);
        if (mask_type != 0) {
                /* The generic routines know nothing of memory types */
index 13acaaf64edb6f2878d145075ada2c3707c17150..f02f9b07fd4ca71ff6db710f85efb580de8977bb 100644 (file)
@@ -229,7 +229,7 @@ static int serverworks_fetch_size(void)
  * This routine could be implemented by taking the addresses
  * written to the GATT, and flushing them individually.  However
  * currently it just flushes the whole table.  Which is probably
- * more efficent, since agp_memory blocks can be a large number of
+ * more efficient, since agp_memory blocks can be a large number of
  * entries.
  */
 static void serverworks_tlbflush(struct agp_memory *temp)
index df67e80019d28cb2e7d38703f3620953520e4cb3..8bc384937401d53155f4a5f95107775ed723dc6f 100644 (file)
@@ -400,7 +400,7 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata =
         * the traditional AGP which resides only in chipset. AGP is used
         * by 3D driver which wasn't available for the VT3336 and VT3364
         * generation until now.  Unfortunately, by testing, VT3364 works
-        * but VT3336 doesn't. - explaination from via, just leave this as
+        * but VT3336 doesn't. - explanation from via, just leave this as
         * as a placeholder to avoid future patches adding it back in.
         */
 #if 0
index 0dec5da000efdb54cb4fec68e6d86f756b4eb952..2efa176beab0b2a765b3fe5e01dfb08c13706455 100644 (file)
@@ -122,7 +122,7 @@ static struct ipmi_recv_msg halt_recv_msg = {
 
 
 /*
- * Code to send a message and wait for the reponse.
+ * Code to send a message and wait for the response.
  */
 
 static void receive_handler(struct ipmi_recv_msg *recv_msg, void *handler_data)
index d28b484aee45bf8d012dcc4a03904bbd81c4af85..cc6c9b2546a30eed5dad30ac8a928e19514bc1c9 100644 (file)
@@ -339,7 +339,7 @@ static void return_hosed_msg(struct smi_info *smi_info, int cCode)
                cCode = IPMI_ERR_UNSPECIFIED;
        /* else use it as is */
 
-       /* Make it a reponse */
+       /* Make it a response */
        msg->rsp[0] = msg->data[0] | 4;
        msg->rsp[1] = msg->data[1];
        msg->rsp[2] = cCode;
@@ -2927,7 +2927,7 @@ static void return_hosed_msg_badsize(struct smi_info *smi_info)
 {
        struct ipmi_smi_msg *msg = smi_info->curr_msg;
 
-       /* Make it a reponse */
+       /* Make it a response */
        msg->rsp[0] = msg->data[0] | 4;
        msg->rsp[1] = msg->data[1];
        msg->rsp[2] = CANNOT_RETURN_REQUESTED_LENGTH;
index ba671589f4cba31716a0b1ac4f505e39003b5626..1a36884c48b526d786b306d647a5e43df7d74ecb 100644 (file)
 #define MBCS_RD_DMA_CTRL       0x0110  /* Read DMA Control */
 #define MBCS_RD_DMA_AMO_DEST   0x0118  /* Read DMA AMO Destination */
 #define MBCS_RD_DMA_INT_DEST   0x0120  /* Read DMA Interrupt Destination */
-#define MBCS_RD_DMA_AUX_STAT   0x0130  /* Read DMA Auxillary Status */
+#define MBCS_RD_DMA_AUX_STAT   0x0130  /* Read DMA Auxiliary Status */
 #define MBCS_WR_DMA_SYS_ADDR   0x0200  /* Write DMA System Address */
 #define MBCS_WR_DMA_LOC_ADDR   0x0208  /* Write DMA Local Address */
 #define MBCS_WR_DMA_CTRL       0x0210  /* Write DMA Control */
 #define MBCS_WR_DMA_AMO_DEST   0x0218  /* Write DMA AMO Destination */
 #define MBCS_WR_DMA_INT_DEST   0x0220  /* Write DMA Interrupt Destination */
-#define MBCS_WR_DMA_AUX_STAT   0x0230  /* Write DMA Auxillary Status */
+#define MBCS_WR_DMA_AUX_STAT   0x0230  /* Write DMA Auxiliary Status */
 #define MBCS_ALG_AMO_DEST      0x0300  /* Algorithm AMO Destination */
 #define MBCS_ALG_INT_DEST      0x0308  /* Algorithm Interrupt Destination */
 #define MBCS_ALG_OFFSETS       0x0310
index 270431ca7dae1ce4ee3755bd608bf496c4822efa..fba6ab1160ce84432523607e2a13f7fbcc29250b 100644 (file)
@@ -122,7 +122,7 @@ typedef struct {
 typedef struct {
        unsigned char Dma:3;    /* RW: DMA channel selection */
        unsigned char NumTransfers:2;   /* RW: Maximum # of transfers once being granted the ISA bus */
-       unsigned char ReRequest:2;      /* RW: Minumum delay between releasing the ISA bus and requesting it again */
+       unsigned char ReRequest:2;      /* RW: Minimum delay between releasing the ISA bus and requesting it again */
        unsigned char MEMCS16:1;        /* RW: ISA signal MEMCS16: 0=disabled, 1=enabled */
 } DSP_BUSMASTER_CFG_1;
 
index 8994ce32e6c70046c2658d69a4bc4e828636c43a..04a480f86c6c8e7a052f68ff9c4e813d61d5e5d9 100644 (file)
@@ -75,7 +75,7 @@ int button_add_callback (void (*callback) (void), int count)
  * with -EINVAL. If there is more than one entry with the same address,
  * because it searches the list from end to beginning, it will unregister the
  * last one to be registered first (FILO- First In Last Out).
- * Note that this is not neccessarily true if the entries are not submitted
+ * Note that this is not necessarily true if the entries are not submitted
  * at the same time, because another driver could have unregistered a callback
  * between the submissions creating a gap earlier in the list, which would
  * be filled first at submission time.
index bcbbc71febb78f2b9801c4a89f6e5f9989167a3a..90bd01671c70e230be0fdf47211b9d7d3eae1885 100644 (file)
@@ -806,7 +806,7 @@ static void monitor_card(unsigned long p)
                dev->flags1 = 0x01;
                xoutb(dev->flags1, REG_FLAGS1(iobase));
 
-               /* atr is present (which doesnt mean it's valid) */
+               /* atr is present (which doesn't mean it's valid) */
                set_bit(IS_ATR_PRESENT, &dev->flags);
                if (dev->atr[0] == 0x03)
                        str_invert_revert(dev->atr, dev->atr_len);
index beca80bb9bdbfa1f14ff1b0459a5cef9af23e245..b575411c69b2e813024251628cc7faad4cfe7ec6 100644 (file)
@@ -1290,7 +1290,7 @@ static int startup(MGSLPC_INFO * info, struct tty_struct *tty)
        /* Allocate and claim adapter resources */
        retval = claim_resources(info);
 
-       /* perform existance check and diagnostics */
+       /* perform existence check and diagnostics */
        if ( !retval )
                retval = adapter_test(info);
 
@@ -2680,7 +2680,7 @@ static void rx_free_buffers(MGSLPC_INFO *info)
 static int claim_resources(MGSLPC_INFO *info)
 {
        if (rx_alloc_buffers(info) < 0 ) {
-               printk( "Cant allocate rx buffer %s\n", info->device_name);
+               printk( "Can't allocate rx buffer %s\n", info->device_name);
                release_resources(info);
                return -ENODEV;
        }
index 5e29e8031bbc125159c95459f02147b5e6c48026..d4ddeba56682f129bbcfab8145c253286f1fc6a2 100644 (file)
@@ -732,7 +732,7 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
                               size_t nbytes, int min, int rsvd);
 
 /*
- * This utility inline function is responsible for transfering entropy
+ * This utility inline function is responsible for transferring entropy
  * from the primary pool to the secondary extraction pool. We make
  * sure we pull enough for a 'catastrophic reseed'.
  */
index 79e36c878a4c181d2edc5e8f3e9b6b00b8fb4253..1ee8ce7d27621699c235c5859bb7e9c0be4b5c53 100644 (file)
@@ -1241,7 +1241,7 @@ static int __devinit sonypi_setup_ioports(struct sonypi_device *dev,
        while (check_ioport && check->port1) {
                if (!request_region(check->port1,
                                   sonypi_device.region_size,
-                                  "Sony Programable I/O Device Check")) {
+                                  "Sony Programmable I/O Device Check")) {
                        printk(KERN_ERR "sonypi: ioport 0x%.4x busy, using sony-laptop? "
                                        "if not use check_ioport=0\n",
                                        check->port1);
@@ -1255,7 +1255,7 @@ static int __devinit sonypi_setup_ioports(struct sonypi_device *dev,
 
                if (request_region(ioport_list->port1,
                                   sonypi_device.region_size,
-                                  "Sony Programable I/O Device")) {
+                                  "Sony Programmable I/O Device")) {
                        dev->ioport1 = ioport_list->port1;
                        dev->ioport2 = ioport_list->port2;
                        return 0;
index 84b164d1eb2b16d29db4d87ed6a7d745fa1938bc..838568a7dbf56845755bf6e579142505a7172809 100644 (file)
@@ -1280,18 +1280,7 @@ static void unplug_port(struct port *port)
                spin_lock_irq(&pdrvdata_lock);
                list_del(&port->cons.list);
                spin_unlock_irq(&pdrvdata_lock);
-#if 0
-               /*
-                * hvc_remove() not called as removing one hvc port
-                * results in other hvc ports getting frozen.
-                *
-                * Once this is resolved in hvc, this functionality
-                * will be enabled.  Till that is done, the -EPIPE
-                * return from get_chars() above will help
-                * hvc_console.c to clean up on ports we remove here.
-                */
                hvc_remove(port->cons.hvc);
-#endif
        }
 
        /* Remove unused data this port might have received. */
index d3c9d755ed9870b0286c498fd256a970dd0f9bad..d6412c16385f72940da3d501052742a250bdb8ed 100644 (file)
@@ -67,7 +67,7 @@
  * cp foo.bit /dev/icap0
  *
  * Note that unless foo.bit is an appropriately constructed partial
- * bitstream, this has a high likelyhood of overwriting the design
+ * bitstream, this has a high likelihood of overwriting the design
  * currently programmed in the FPGA.
  */
 
index 0fc0a79852de0f919bd2ac9ac117533ed8a0f991..6db161f64ae0e9ab42a17f04608ab3ac18638141 100644 (file)
@@ -32,10 +32,9 @@ static DEFINE_MUTEX(clocks_mutex);
  * Then we take the most specific entry - with the following
  * order of precedence: dev+con > dev only > con only.
  */
-static struct clk *clk_find(const char *dev_id, const char *con_id)
+static struct clk_lookup *clk_find(const char *dev_id, const char *con_id)
 {
-       struct clk_lookup *p;
-       struct clk *clk = NULL;
+       struct clk_lookup *p, *cl = NULL;
        int match, best = 0;
 
        list_for_each_entry(p, &clocks, node) {
@@ -52,27 +51,27 @@ static struct clk *clk_find(const char *dev_id, const char *con_id)
                }
 
                if (match > best) {
-                       clk = p->clk;
+                       cl = p;
                        if (match != 3)
                                best = match;
                        else
                                break;
                }
        }
-       return clk;
+       return cl;
 }
 
 struct clk *clk_get_sys(const char *dev_id, const char *con_id)
 {
-       struct clk *clk;
+       struct clk_lookup *cl;
 
        mutex_lock(&clocks_mutex);
-       clk = clk_find(dev_id, con_id);
-       if (clk && !__clk_get(clk))
-               clk = NULL;
+       cl = clk_find(dev_id, con_id);
+       if (cl && !__clk_get(cl->clk))
+               cl = NULL;
        mutex_unlock(&clocks_mutex);
 
-       return clk ? clk : ERR_PTR(-ENOENT);
+       return cl ? cl->clk : ERR_PTR(-ENOENT);
 }
 EXPORT_SYMBOL(clk_get_sys);
 
index d77005849af857935fe270725f2ee0d08561d265..219d88a0eeae07c1e963c4997f6894fe79046d2a 100644 (file)
@@ -142,6 +142,7 @@ static int cn_call_callback(struct sk_buff *skb)
                cbq->callback(msg, nsp);
                kfree_skb(skb);
                cn_queue_release_callback(cbq);
+               err = 0;
        }
 
        return err;
index b03771d4787cdddf4790940d3573bdd49ed72700..2dafc5c38ae7530584aa6e0fc73c9aa438eaa293 100644 (file)
@@ -1782,7 +1782,7 @@ error_out:
  *     cpufreq_update_policy - re-evaluate an existing cpufreq policy
  *     @cpu: CPU which shall be re-evaluated
  *
- *     Usefull for policy notifiers which have different necessities
+ *     Useful for policy notifiers which have different necessities
  *     at different times.
  */
 int cpufreq_update_policy(unsigned int cpu)
index 466fd94cd4a36d69517d8d28a5554c262339180d..de8a7a48775abe0ad48c4d9883e9680daf8df4e9 100644 (file)
@@ -17,7 +17,7 @@
  * @file crypto4xx_sa.c
  *
  * This file implements the security context
- * assoicate format.
+ * associate format.
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
index 4b83ed7e55702bc3acb9cc614a2d4a8180ac4646..1352d58d4e340be0b5d84840cce937f20cc89d1e 100644 (file)
@@ -15,7 +15,7 @@
  * GNU General Public License for more details.
  *
  * This file defines the security context
- * assoicate format.
+ * associate format.
  */
 
 #ifndef __CRYPTO4XX_SA_H__
index 0d662213c06693fc16b0f95cf0eaac7252798a1f..4c20c5bf605832a2e2e801396e1c331d566e0aaa 100644 (file)
@@ -1044,7 +1044,7 @@ static int aead_perform(struct aead_request *req, int encrypt,
        memcpy(crypt->iv, req->iv, ivsize);
 
        if (req->src != req->dst) {
-               BUG(); /* -ENOTSUP because of my lazyness */
+               BUG(); /* -ENOTSUP because of my laziness */
        }
 
        /* ASSOC data */
index 3d7d705f026fa8f93a33565d17db57f8c264a9aa..235f53bf494eabec1affaff2d840b3d3e00ed5a3 100644 (file)
@@ -167,7 +167,7 @@ static void atc_desc_put(struct at_dma_chan *atchan, struct at_desc *desc)
 /**
  * atc_assign_cookie - compute and assign new cookie
  * @atchan: channel we work on
- * @desc: descriptor to asign cookie for
+ * @desc: descriptor to assign cookie for
  *
  * Called with atchan->lock held and bh disabled
  */
index 00deabd9a04b2222734d024c4ea02a7138e05ea4..f48e54006518e9929cbae1c2af2cf135a4edaa13 100644 (file)
@@ -529,7 +529,7 @@ static void coh901318_pause(struct dma_chan *chan)
        val = readl(virtbase + COH901318_CX_CFG +
                    COH901318_CX_CFG_SPACING * channel);
 
-       /* Stopping infinit transfer */
+       /* Stopping infinite transfer */
        if ((val & COH901318_CX_CTRL_TC_ENABLE) == 0 &&
            (val & COH901318_CX_CFG_CH_ENABLE))
                cohc->stopped = 1;
index 6b396759e7f596f54eab9d9bd28c06ae13fe6887..8a781540590cdf1e76e79c74d137a647c02642f6 100644 (file)
@@ -1448,7 +1448,7 @@ static const struct of_device_id fsldma_of_ids[] = {
        {}
 };
 
-static struct of_platform_driver fsldma_of_driver = {
+static struct platform_driver fsldma_of_driver = {
        .driver = {
                .name = "fsl-elo-dma",
                .owner = THIS_MODULE,
index 798f46a4590d4eed64d1ee5a66ed01bac56c665c..3d4ec38b9b62879ea9175b9ddf59b5f7ea07f3a2 100644 (file)
@@ -911,8 +911,8 @@ static int intel_mid_dma_alloc_chan_resources(struct dma_chan *chan)
 
 /**
  * midc_handle_error - Handle DMA txn error
- * @mid: controller where error occured
- * @midc: chan where error occured
+ * @mid: controller where error occurred
+ * @midc: chan where error occurred
  *
  * Scan the descriptor for error
  */
@@ -1099,7 +1099,7 @@ static int mid_setup_dma(struct pci_dev *pdev)
                dma->mask_reg = ioremap(LNW_PERIPHRAL_MASK_BASE,
                                        LNW_PERIPHRAL_MASK_SIZE);
                if (dma->mask_reg == NULL) {
-                       pr_err("ERR_MDMA:Cant map periphral intr space !!\n");
+                       pr_err("ERR_MDMA:Can't map periphral intr space !!\n");
                        return -ENOMEM;
                }
        } else
@@ -1373,7 +1373,7 @@ int dma_resume(struct pci_dev *pci)
        pci_restore_state(pci);
        ret = pci_enable_device(pci);
        if (ret) {
-               pr_err("MDMA: device cant be enabled for %x\n", pci->device);
+               pr_err("MDMA: device can't be enabled for %x\n", pci->device);
                return ret;
        }
        device->state = RUNNING;
index 709fecbdde7951543392324b8e628853453d39b1..aea5ee88ce035a1d432eb836ef6b4b938f163ab4 100644 (file)
@@ -174,8 +174,8 @@ union intel_mid_dma_cfg_hi {
  * @dma: dma device struture pointer
  * @busy: bool representing if ch is busy (active txn) or not
  * @in_use: bool representing if ch is in use or not
- * @raw_tfr: raw trf interrupt recieved
- * @raw_block: raw block interrupt recieved
+ * @raw_tfr: raw trf interrupt received
+ * @raw_block: raw block interrupt received
  */
 struct intel_mid_dma_chan {
        struct dma_chan         chan;
index 4f95d31f5a2062c151fa15e998c9b4936d1b2f11..b9bae94f2015c99d095cf005d7e257cf3fcf607d 100644 (file)
@@ -328,7 +328,7 @@ static irqreturn_t mpc_dma_irq(int irq, void *data)
        return IRQ_HANDLED;
 }
 
-/* proccess completed descriptors */
+/* process completed descriptors */
 static void mpc_dma_process_completed(struct mpc_dma *mdma)
 {
        dma_cookie_t last_cookie = 0;
index 6451b581a70b86e489eba697da2d956a4f4c67a7..d50da41ac328c6fdf82484371232db31a701febf 100644 (file)
@@ -865,7 +865,12 @@ static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev)
 
 static irqreturn_t sh_dmae_err(int irq, void *data)
 {
-       return IRQ_RETVAL(sh_dmae_reset(data));
+       struct sh_dmae_device *shdev = data;
+
+       if (dmaor_read(shdev) & DMAOR_AE)
+               return IRQ_RETVAL(sh_dmae_reset(data));
+       else
+               return IRQ_NONE;
 }
 
 static void dmae_do_tasklet(unsigned long data)
index af955de035f42dd4d6a96ea97c11f16295b44e7b..94ee15dd3aed7ca0c0dc55c0a06f4e12e7834097 100644 (file)
@@ -90,7 +90,7 @@ struct d40_lli_pool {
  * @lli_log: Same as above but for logical channels.
  * @lli_pool: The pool with two entries pre-allocated.
  * @lli_len: Number of llis of current descriptor.
- * @lli_current: Number of transfered llis.
+ * @lli_current: Number of transferred llis.
  * @lcla_alloc: Number of LCLA entries allocated.
  * @txd: DMA engine struct. Used for among other things for communication
  * during a transfer.
@@ -1214,7 +1214,7 @@ static void dma_tasklet(unsigned long data)
        return;
 
  err:
-       /* Rescue manouver if receiving double interrupts */
+       /* Rescue manoeuvre if receiving double interrupts */
        if (d40c->pending_tx > 0)
                d40c->pending_tx--;
        spin_unlock_irqrestore(&d40c->lock, flags);
index fac1a2002e67da498410f7b5d576fedfa394b832..af1a17d42bd76ad09309e9cba305e2d5e2bc8fbd 100644 (file)
@@ -45,7 +45,7 @@ config EDAC_DECODE_MCE
        default y
        ---help---
          Enable this option if you want to decode Machine Check Exceptions
-         occuring on your machine in human-readable form.
+         occurring on your machine in human-readable form.
 
          You should definitely say Y here in case you want to decode MCEs
          which occur really early upon boot, before the module infrastructure
index 31e71c4fc83171e7da846740533f63131189327b..9a8bebcf6b177fa79e9635ecde71f05b2578e798 100644 (file)
@@ -211,8 +211,6 @@ static int amd64_get_scrub_rate(struct mem_ctl_info *mci)
 
        scrubval = scrubval & 0x001F;
 
-       amd64_debug("pci-read, sdram scrub control value: %d\n", scrubval);
-
        for (i = 0; i < ARRAY_SIZE(scrubrates); i++) {
                if (scrubrates[i].scrubval == scrubval) {
                        retval = scrubrates[i].bandwidth;
@@ -933,25 +931,74 @@ static int k8_early_channel_count(struct amd64_pvt *pvt)
 /* On F10h and later ErrAddr is MC4_ADDR[47:1] */
 static u64 get_error_address(struct mce *m)
 {
+       struct cpuinfo_x86 *c = &boot_cpu_data;
+       u64 addr;
        u8 start_bit = 1;
        u8 end_bit   = 47;
 
-       if (boot_cpu_data.x86 == 0xf) {
+       if (c->x86 == 0xf) {
                start_bit = 3;
                end_bit   = 39;
        }
 
-       return m->addr & GENMASK(start_bit, end_bit);
+       addr = m->addr & GENMASK(start_bit, end_bit);
+
+       /*
+        * Erratum 637 workaround
+        */
+       if (c->x86 == 0x15) {
+               struct amd64_pvt *pvt;
+               u64 cc6_base, tmp_addr;
+               u32 tmp;
+               u8 mce_nid, intlv_en;
+
+               if ((addr & GENMASK(24, 47)) >> 24 != 0x00fdf7)
+                       return addr;
+
+               mce_nid = amd_get_nb_id(m->extcpu);
+               pvt     = mcis[mce_nid]->pvt_info;
+
+               amd64_read_pci_cfg(pvt->F1, DRAM_LOCAL_NODE_LIM, &tmp);
+               intlv_en = tmp >> 21 & 0x7;
+
+               /* add [47:27] + 3 trailing bits */
+               cc6_base  = (tmp & GENMASK(0, 20)) << 3;
+
+               /* reverse and add DramIntlvEn */
+               cc6_base |= intlv_en ^ 0x7;
+
+               /* pin at [47:24] */
+               cc6_base <<= 24;
+
+               if (!intlv_en)
+                       return cc6_base | (addr & GENMASK(0, 23));
+
+               amd64_read_pci_cfg(pvt->F1, DRAM_LOCAL_NODE_BASE, &tmp);
+
+                                                       /* faster log2 */
+               tmp_addr  = (addr & GENMASK(12, 23)) << __fls(intlv_en + 1);
+
+               /* OR DramIntlvSel into bits [14:12] */
+               tmp_addr |= (tmp & GENMASK(21, 23)) >> 9;
+
+               /* add remaining [11:0] bits from original MC4_ADDR */
+               tmp_addr |= addr & GENMASK(0, 11);
+
+               return cc6_base | tmp_addr;
+       }
+
+       return addr;
 }
 
 static void read_dram_base_limit_regs(struct amd64_pvt *pvt, unsigned range)
 {
+       struct cpuinfo_x86 *c = &boot_cpu_data;
        int off = range << 3;
 
        amd64_read_pci_cfg(pvt->F1, DRAM_BASE_LO + off,  &pvt->ranges[range].base.lo);
        amd64_read_pci_cfg(pvt->F1, DRAM_LIMIT_LO + off, &pvt->ranges[range].lim.lo);
 
-       if (boot_cpu_data.x86 == 0xf)
+       if (c->x86 == 0xf)
                return;
 
        if (!dram_rw(pvt, range))
@@ -959,6 +1006,31 @@ static void read_dram_base_limit_regs(struct amd64_pvt *pvt, unsigned range)
 
        amd64_read_pci_cfg(pvt->F1, DRAM_BASE_HI + off,  &pvt->ranges[range].base.hi);
        amd64_read_pci_cfg(pvt->F1, DRAM_LIMIT_HI + off, &pvt->ranges[range].lim.hi);
+
+       /* Factor in CC6 save area by reading dst node's limit reg */
+       if (c->x86 == 0x15) {
+               struct pci_dev *f1 = NULL;
+               u8 nid = dram_dst_node(pvt, range);
+               u32 llim;
+
+               f1 = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0x18 + nid, 1));
+               if (WARN_ON(!f1))
+                       return;
+
+               amd64_read_pci_cfg(f1, DRAM_LOCAL_NODE_LIM, &llim);
+
+               pvt->ranges[range].lim.lo &= GENMASK(0, 15);
+
+                                           /* {[39:27],111b} */
+               pvt->ranges[range].lim.lo |= ((llim & 0x1fff) << 3 | 0x7) << 16;
+
+               pvt->ranges[range].lim.hi &= GENMASK(0, 7);
+
+                                           /* [47:40] */
+               pvt->ranges[range].lim.hi |= llim >> 13;
+
+               pci_dev_put(f1);
+       }
 }
 
 static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr,
@@ -1403,12 +1475,8 @@ static int f1x_match_to_this_node(struct amd64_pvt *pvt, unsigned range,
                return -EINVAL;
        }
 
-       if (intlv_en &&
-           (intlv_sel != ((sys_addr >> 12) & intlv_en))) {
-               amd64_warn("Botched intlv bits, en: 0x%x, sel: 0x%x\n",
-                          intlv_en, intlv_sel);
+       if (intlv_en && (intlv_sel != ((sys_addr >> 12) & intlv_en)))
                return -EINVAL;
-       }
 
        sys_addr = f1x_swap_interleaved_region(pvt, sys_addr);
 
index 11be36a311eb55d312178e8e6886f6abc6594cd8..9a666cb985b2bd446edba7c249f3740d23e49d8e 100644 (file)
 
 #define DCT_CFG_SEL                    0x10C
 
+#define DRAM_LOCAL_NODE_BASE           0x120
+#define DRAM_LOCAL_NODE_LIM            0x124
+
 #define DRAM_BASE_HI                   0x140
 #define DRAM_LIMIT_HI                  0x144
 
index b9a781c47e3cdae63fd0aafe4ccddaaf5d5daaea..837ad8f85b48e1197dfd4e3f72a7a4340dd432bb 100644 (file)
@@ -817,7 +817,7 @@ static void cpc925_del_edac_devices(void)
        }
 }
 
-/* Convert current back-ground scrub rate into byte/sec bandwith */
+/* Convert current back-ground scrub rate into byte/sec bandwidth */
 static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci)
 {
        struct cpc925_mc_pdata *pdata = mci->pvt_info;
index 3d965347a673ccf23e5b14247608450bc2c9cc51..eefa3501916b60c0da2a6df740b8413da3df136a 100644 (file)
@@ -164,7 +164,7 @@ enum mem_type {
 /* chipset Error Detection and Correction capabilities and mode */
 enum edac_type {
        EDAC_UNKNOWN = 0,       /* Unknown if ECC is available */
-       EDAC_NONE,              /* Doesnt support ECC */
+       EDAC_NONE,              /* Doesn't support ECC */
        EDAC_RESERVED,          /* Reserved ECC type */
        EDAC_PARITY,            /* Detects parity errors */
        EDAC_EC,                /* Error Checking - no correction */
@@ -233,7 +233,7 @@ enum scrub_type {
  *                     of these in parallel provides 64 bits which is common
  *                     for a memory stick.
  *
- * Memory Stick:       A printed circuit board that agregates multiple
+ * Memory Stick:       A printed circuit board that aggregates multiple
  *                     memory devices in parallel.  This is the atomic
  *                     memory component that is purchaseable by Joe consumer
  *                     and loaded into a memory socket.
@@ -385,7 +385,7 @@ struct mem_ctl_info {
 
        /* Get the current sdram memory scrub rate from the internal
           representation and converts it to the closest matching
-          bandwith in bytes/sec.
+          bandwidth in bytes/sec.
         */
        int (*get_sdram_scrub_rate) (struct mem_ctl_info * mci);
 
@@ -823,7 +823,7 @@ extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci,
  * There are a limited number of error logging registers that can
  * be exausted.  When all registers are exhausted and an additional
  * error occurs then an error overflow register records that an
- * error occured and the type of error, but doesn't have any
+ * error occurred and the type of error, but doesn't have any
  * further information.  The ce/ue versions make for cleaner
  * reporting logic and function interface - reduces conditional
  * statement clutter and extra function arguments.
index d5e13c94714f13bca93ae94927b55b144be9f10b..a7408cf86f37f5ece603052bd8956cae30269777 100644 (file)
@@ -672,7 +672,7 @@ void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
                block->counters.ce_count++;
        }
 
-       /* Propogate the count up the 'totals' tree */
+       /* Propagate the count up the 'totals' tree */
        instance->counters.ce_count++;
        edac_dev->counters.ce_count++;
 
@@ -718,7 +718,7 @@ void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
                block->counters.ue_count++;
        }
 
-       /* Propogate the count up the 'totals' tree */
+       /* Propagate the count up the 'totals' tree */
        instance->counters.ue_count++;
        edac_dev->counters.ue_count++;
 
index 400de071cabc38fdc4b7e3575b0ed1ab5f44995f..86649df002850f0c56620063f550fa47d1ac5dd1 100644 (file)
@@ -533,7 +533,7 @@ static int edac_device_create_block(struct edac_device_ctl_info *edac_dev,
        memset(&block->kobj, 0, sizeof(struct kobject));
 
        /* bump the main kobject's reference count for this controller
-        * and this instance is dependant on the main
+        * and this instance is dependent on the main
         */
        main_kobj = kobject_get(&edac_dev->kobj);
        if (!main_kobj) {
@@ -635,7 +635,7 @@ static int edac_device_create_instance(struct edac_device_ctl_info *edac_dev,
        instance->ctl = edac_dev;
 
        /* bump the main kobject's reference count for this controller
-        * and this instance is dependant on the main
+        * and this instance is dependent on the main
         */
        main_kobj = kobject_get(&edac_dev->kobj);
        if (!main_kobj) {
index a4e9db2d6524f9dfd001236b2c5f693ecd7b0d17..1d8056049072698361a2eeb83db0d0a5935964e0 100644 (file)
@@ -724,7 +724,7 @@ void edac_mc_handle_ce(struct mem_ctl_info *mci,
                 * Some MC's can remap memory so that it is still available
                 * at a different address when PCI devices map into memory.
                 * MC's that can't do this lose the memory where PCI devices
-                * are mapped.  This mapping is MC dependant and so we call
+                * are mapped.  This mapping is MC dependent and so we call
                 * back into the MC driver for it to map the MC page to
                 * a physical (CPU) page which can then be mapped to a virtual
                 * page - which can then be scrubbed.
index 73196f7b722934940ba4a484fb71d4e0d2655f26..29ffa350bfbe00281376c61c5c5c9c8434098a37 100644 (file)
@@ -458,13 +458,13 @@ static ssize_t mci_sdram_scrub_rate_store(struct mem_ctl_info *mci,
                return -EINVAL;
 
        new_bw = mci->set_sdram_scrub_rate(mci, bandwidth);
-       if (new_bw >= 0) {
-               edac_printk(KERN_DEBUG, EDAC_MC, "Scrub rate set to %d\n", new_bw);
-               return count;
+       if (new_bw < 0) {
+               edac_printk(KERN_WARNING, EDAC_MC,
+                           "Error setting scrub rate to: %lu\n", bandwidth);
+               return -EINVAL;
        }
 
-       edac_printk(KERN_DEBUG, EDAC_MC, "Error setting scrub rate to: %lu\n", bandwidth);
-       return -EINVAL;
+       return count;
 }
 
 /*
@@ -483,7 +483,6 @@ static ssize_t mci_sdram_scrub_rate_show(struct mem_ctl_info *mci, char *data)
                return bandwidth;
        }
 
-       edac_printk(KERN_DEBUG, EDAC_MC, "Read scrub rate: %d\n", bandwidth);
        return sprintf(data, "%d\n", bandwidth);
 }
 
@@ -850,7 +849,7 @@ static void edac_remove_mci_instance_attributes(struct mem_ctl_info *mci,
 
        /*
         * loop if there are attributes and until we hit a NULL entry
-        * Remove first all the atributes
+        * Remove first all the attributes
         */
        while (sysfs_attrib) {
                debugf4("%s() sysfs_attrib = %p\n",__func__, sysfs_attrib);
index 023b01cb5175c70a15804faba0c356ecacfb1809..495198ad059c2c4b9c452d0ecce3c95ecc45c510 100644 (file)
@@ -352,7 +352,7 @@ static int edac_pci_main_kobj_setup(void)
                return 0;
 
        /* First time, so create the main kobject and its
-        * controls and atributes
+        * controls and attributes
         */
        edac_class = edac_get_sysfs_class();
        if (edac_class == NULL) {
@@ -551,7 +551,7 @@ static void edac_pci_dev_parity_clear(struct pci_dev *dev)
 /*
  *  PCI Parity polling
  *
- *     Fucntion to retrieve the current parity status
+ *     Function to retrieve the current parity status
  *     and decode it
  *
  */
index a5cefab8d65d029339dbef50fd3f2dd5664c6db3..87f427c2ce5c56dd6b303eea470baa28b2799ace 100644 (file)
@@ -1372,7 +1372,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
         * actual number of slots/dimms per channel, we thus utilize the
         * resource as specified by the chipset. Thus, we might have
         * have more DIMMs per channel than actually on the mobo, but this
-        * allows the driver to support upto the chipset max, without
+        * allows the driver to support up to the chipset max, without
         * some fancy mobo determination.
         */
        i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel,
index 0448da0af75d7a39e3c6f190e0d7c9bc83f8f288..bcbdeeca48b8910b3d365547c394d46193e5b464 100644 (file)
@@ -11,7 +11,7 @@
  *
  * The intel 5100 has two independent channels. EDAC core currently
  * can not reflect this configuration so instead the chip-select
- * rows for each respective channel are layed out one after another,
+ * rows for each respective channel are laid out one after another,
  * the first half belonging to channel 0, the second half belonging
  * to channel 1.
  */
index 38a9be9e1c7c5d40e19089250db4bed6a65901b7..80a465efbae89e2739e493082a0494cfb11e4faf 100644 (file)
@@ -648,7 +648,7 @@ static void i5400_process_nonfatal_error_info(struct mem_ctl_info *mci,
                return;
        }
 
-       /* Miscelaneous errors */
+       /* Miscellaneous errors */
        errnum = find_first_bit(&allErrors, ARRAY_SIZE(error_name));
 
        branch = extract_fbdchan_indx(info->ferr_nf_fbd);
@@ -1240,7 +1240,7 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx)
         * actual number of slots/dimms per channel, we thus utilize the
         * resource as specified by the chipset. Thus, we might have
         * have more DIMMs per channel than actually on the mobo, but this
-        * allows the driver to support upto the chipset max, without
+        * allows the driver to support up to the chipset max, without
         * some fancy mobo determination.
         */
        num_dimms_per_channel = MAX_DIMMS_PER_CHANNEL;
index 76d1f576cdc8752c93a268e6e4afd86470a8a4ec..363cc1602944086a9bcbe6406ef1bbee0be209cb 100644 (file)
@@ -1065,7 +1065,7 @@ static int __devinit i7300_init_one(struct pci_dev *pdev,
         * actual number of slots/dimms per channel, we thus utilize the
         * resource as specified by the chipset. Thus, we might have
         * have more DIMMs per channel than actually on the mobo, but this
-        * allows the driver to support upto the chipset max, without
+        * allows the driver to support up to the chipset max, without
         * some fancy mobo determination.
         */
        num_dimms_per_channel = MAX_SLOTS;
index 81154ab296b68e68cb93bb9c2b989365167a9581..465cbc25149fffab899997e3d133cacacd5bad5f 100644 (file)
@@ -1772,7 +1772,7 @@ static void i7core_check_error(struct mem_ctl_info *mci)
        /*
         * MCE first step: Copy all mce errors into a temporary buffer
         * We use a double buffering here, to reduce the risk of
-        * loosing an error.
+        * losing an error.
         */
        smp_rmb();
        count = (pvt->mce_out + MCE_LOG_LEN - pvt->mce_in)
index 678405ab04e47c341e03fd5be2c9f85c7763a64f..4329d39f902cd4eed4181e119c6f0325fc3f0de0 100644 (file)
@@ -203,7 +203,7 @@ static void i82443bxgx_init_csrows(struct mem_ctl_info *mci,
                row_high_limit = ((u32) drbar << 23);
                /* find the DRAM Chip Select Base address and mask */
                debugf1("MC%d: %s: %s() Row=%d, "
-                       "Boundry Address=%#0x, Last = %#0x\n",
+                       "Boundary Address=%#0x, Last = %#0x\n",
                        mci->mc_idx, __FILE__, __func__, index, row_high_limit,
                        row_high_limit_last);
 
@@ -305,7 +305,7 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx)
        i82443bxgx_init_csrows(mci, pdev, edac_mode, mtype);
 
        /* Many BIOSes don't clear error flags on boot, so do this
-        * here, or we get "phantom" errors occuring at module-load
+        * here, or we get "phantom" errors occurring at module-load
         * time. */
        pci_write_bits32(pdev, I82443BXGX_EAP,
                        (I82443BXGX_EAP_OFFSET_SBE |
index 733a7e7a8d6fd4bdedb3d318cff78a506a0e3873..a4987e03f59e8b26416cc4d9b1559f0d0ea16c06 100644 (file)
@@ -90,7 +90,7 @@ static ssize_t edac_inject_bank_store(struct kobject *kobj,
 
        if (value > 5)
                if (boot_cpu_data.x86 != 0x15 || value > 6) {
-                       printk(KERN_ERR "Non-existant MCE bank: %lu\n", value);
+                       printk(KERN_ERR "Non-existent MCE bank: %lu\n", value);
                        return -EINVAL;
                }
 
index ffb5ad080bee81b765992dfd9cc9fd06ebc09b6d..38ab8e2cd7f4f864500aa3cac45dedb76e51d50c 100644 (file)
@@ -1147,13 +1147,14 @@ static struct platform_driver mpc85xx_mc_err_driver = {
 static void __init mpc85xx_mc_clear_rfxe(void *data)
 {
        orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1);
-       mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~0x20000));
+       mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE));
 }
 #endif
 
 static int __init mpc85xx_mc_init(void)
 {
        int res = 0;
+       u32 pvr = 0;
 
        printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, "
               "(C) 2006 Montavista Software\n");
@@ -1183,12 +1184,17 @@ static int __init mpc85xx_mc_init(void)
 #endif
 
 #ifdef CONFIG_FSL_SOC_BOOKE
-       /*
-        * need to clear HID1[RFXE] to disable machine check int
-        * so we can catch it
-        */
-       if (edac_op_state == EDAC_OPSTATE_INT)
-               on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
+       pvr = mfspr(SPRN_PVR);
+
+       if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
+           (PVR_VER(pvr) == PVR_VER_E500V2)) {
+               /*
+                * need to clear HID1[RFXE] to disable machine check int
+                * so we can catch it
+                */
+               if (edac_op_state == EDAC_OPSTATE_INT)
+                       on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
+       }
 #endif
 
        return 0;
@@ -1206,7 +1212,12 @@ static void __exit mpc85xx_mc_restore_hid1(void *data)
 static void __exit mpc85xx_mc_exit(void)
 {
 #ifdef CONFIG_FSL_SOC_BOOKE
-       on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
+       u32 pvr = mfspr(SPRN_PVR);
+
+       if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
+           (PVR_VER(pvr) == PVR_VER_E500V2)) {
+               on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
+       }
 #endif
 #ifdef CONFIG_PCI
        platform_driver_unregister(&mpc85xx_pci_err_driver);
index 6a822c631ef51df8e3b8858e24ddc05839690094..678513738c331fbd1497d2c772aab9d0b3dcc143 100644 (file)
                                 *        write 0=NOP
                                 */
 
-#define R82600_DRBA    0x60    /* + 0x60..0x63 SDRAM Row Boundry Address
+#define R82600_DRBA    0x60    /* + 0x60..0x63 SDRAM Row Boundary Address
                                 *  Registers
                                 *
                                 * 7:0  Address lines 30:24 - upper limit of
@@ -217,7 +217,7 @@ static void r82600_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev,
 {
        struct csrow_info *csrow;
        int index;
-       u8 drbar;               /* SDRAM Row Boundry Address Register */
+       u8 drbar;               /* SDRAM Row Boundary Address Register */
        u32 row_high_limit, row_high_limit_last;
        u32 reg_sdram, ecc_on, row_base;
 
@@ -236,7 +236,7 @@ static void r82600_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev,
                row_high_limit = ((u32) drbar << 24);
 /*             row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */
 
-               debugf1("%s() Row=%d, Boundry Address=%#0x, Last = %#0x\n",
+               debugf1("%s() Row=%d, Boundary Address=%#0x, Last = %#0x\n",
                        __func__, index, row_high_limit, row_high_limit_last);
 
                /* Empty row [p.57] */
index 7ed08fd1214eccc7bfd9f231e41a68de67ea6250..3f04dd3681cf7698bf5b8f377db07e84fb8c726c 100644 (file)
@@ -453,7 +453,7 @@ static bool fwnet_pd_update(struct fwnet_peer *peer,
        memcpy(pd->pbuf + frag_off, frag_buf, frag_len);
 
        /*
-        * Move list entry to beginnig of list so that oldest partial
+        * Move list entry to beginning of list so that oldest partial
         * datagrams percolate to the end of the list
         */
        list_move_tail(&pd->pd_link, &peer->pd_list);
index f903d7b6f34a92bca580b5ed01cf422c9a8caf7c..23d1468ad253d54c9c0745a858b6b155123e76e7 100644 (file)
@@ -2199,7 +2199,6 @@ static int ohci_set_config_rom(struct fw_card *card,
 {
        struct fw_ohci *ohci;
        unsigned long flags;
-       int ret = -EBUSY;
        __be32 *next_config_rom;
        dma_addr_t uninitialized_var(next_config_rom_bus);
 
@@ -2240,22 +2239,37 @@ static int ohci_set_config_rom(struct fw_card *card,
 
        spin_lock_irqsave(&ohci->lock, flags);
 
+       /*
+        * If there is not an already pending config_rom update,
+        * push our new allocation into the ohci->next_config_rom
+        * and then mark the local variable as null so that we
+        * won't deallocate the new buffer.
+        *
+        * OTOH, if there is a pending config_rom update, just
+        * use that buffer with the new config_rom data, and
+        * let this routine free the unused DMA allocation.
+        */
+
        if (ohci->next_config_rom == NULL) {
                ohci->next_config_rom = next_config_rom;
                ohci->next_config_rom_bus = next_config_rom_bus;
+               next_config_rom = NULL;
+       }
 
-               copy_config_rom(ohci->next_config_rom, config_rom, length);
+       copy_config_rom(ohci->next_config_rom, config_rom, length);
 
-               ohci->next_header = config_rom[0];
-               ohci->next_config_rom[0] = 0;
+       ohci->next_header = config_rom[0];
+       ohci->next_config_rom[0] = 0;
 
-               reg_write(ohci, OHCI1394_ConfigROMmap,
-                         ohci->next_config_rom_bus);
-               ret = 0;
-       }
+       reg_write(ohci, OHCI1394_ConfigROMmap, ohci->next_config_rom_bus);
 
        spin_unlock_irqrestore(&ohci->lock, flags);
 
+       /* If we didn't use the DMA allocation, delete it. */
+       if (next_config_rom != NULL)
+               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
+                                 next_config_rom, next_config_rom_bus);
+
        /*
         * Now initiate a bus reset to have the changes take
         * effect. We clean up the old config rom memory and DMA
@@ -2263,13 +2277,10 @@ static int ohci_set_config_rom(struct fw_card *card,
         * controller could need to access it before the bus reset
         * takes effect.
         */
-       if (ret == 0)
-               fw_schedule_bus_reset(&ohci->card, true, true);
-       else
-               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
-                                 next_config_rom, next_config_rom_bus);
 
-       return ret;
+       fw_schedule_bus_reset(&ohci->card, true, true);
+
+       return 0;
 }
 
 static void ohci_send_request(struct fw_card *card, struct fw_packet *packet)
index 00f6d24c669d096b437bde1c410f68ac2c10f691..4ec797593bdb80ec75848ad720c70059292e2be8 100644 (file)
@@ -45,7 +45,7 @@
  * To save time we cache them here in memory
  */
 struct mc33880 {
-       struct mutex    lock;   /* protect from simultanous accesses */
+       struct mutex    lock;   /* protect from simultaneous accesses */
        u8              port_config;
        struct gpio_chip chip;
        struct spi_device *spi;
index 7f6f01a4b145ad00bc9c2b1fac7c704d67e145a4..0a775f7987c257237943879a1d08e5ac20f3cd14 100644 (file)
@@ -116,6 +116,7 @@ static int ioh_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
                reg_val |= (1 << nr);
        else
                reg_val &= ~(1 << nr);
+       iowrite32(reg_val, &chip->reg->regs[chip->ch].po);
 
        mutex_unlock(&chip->lock);
 
index 583e92592073647481d52acf81cd1a520d0e9d85..7630ab7b9bec30cdad9628908d74813075413b65 100644 (file)
@@ -558,7 +558,7 @@ static int __devinit pca953x_probe(struct i2c_client *client,
 
        ret = gpiochip_add(&chip->gpio_chip);
        if (ret)
-               goto out_failed;
+               goto out_failed_irq;
 
        if (pdata->setup) {
                ret = pdata->setup(client, chip->gpio_chip.base,
@@ -570,8 +570,9 @@ static int __devinit pca953x_probe(struct i2c_client *client,
        i2c_set_clientdata(client, chip);
        return 0;
 
-out_failed:
+out_failed_irq:
        pca953x_irq_teardown(chip);
+out_failed:
        kfree(chip->dyn_pdata);
        kfree(chip);
        return ret;
index 2c6af87051030b1017cc5670fcbfd2bfddad61fa..f970a5f3585e03b5395b74f32f6103d21a67128d 100644 (file)
@@ -105,6 +105,7 @@ static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
                reg_val |= (1 << nr);
        else
                reg_val &= ~(1 << nr);
+       iowrite32(reg_val, &chip->reg->po);
 
        mutex_unlock(&chip->lock);
 
index a6feb78c404c33a9f0c98f9f44cd57aef226874b..b493663c7ba717a0652e45b456fac3d95aa56de4 100644 (file)
@@ -24,6 +24,7 @@ config DRM_KMS_HELPER
        depends on DRM
        select FB
        select FRAMEBUFFER_CONSOLE if !EXPERT
+       select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
        help
          FB and CRTC helpers for KMS drivers.
 
@@ -96,6 +97,7 @@ config DRM_I915
        # i915 depends on ACPI_VIDEO when ACPI is enabled
        # but for select to work, need to select ACPI_VIDEO's dependencies, ick
        select BACKLIGHT_CLASS_DEVICE if ACPI
+       select VIDEO_OUTPUT_CONTROL if ACPI
        select INPUT if ACPI
        select ACPI_VIDEO if ACPI
        select ACPI_BUTTON if ACPI
index 799e1490cf240964962650140bc1aca3631f3691..872747c5a544a08ffb57c1e0b55578b9d3b3596f 100644 (file)
@@ -1699,7 +1699,7 @@ int drm_mode_addfb(struct drm_device *dev,
 
        mutex_lock(&dev->mode_config.mutex);
 
-       /* TODO check buffer is sufficently large */
+       /* TODO check buffer is sufficiently large */
        /* TODO setup destructor callback */
 
        fb = dev->mode_config.funcs->fb_create(dev, file_priv, r);
@@ -1750,7 +1750,7 @@ int drm_mode_rmfb(struct drm_device *dev,
 
        mutex_lock(&dev->mode_config.mutex);
        obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB);
-       /* TODO check that we realy get a framebuffer back. */
+       /* TODO check that we really get a framebuffer back. */
        if (!obj) {
                DRM_ERROR("mode invalid framebuffer id\n");
                ret = -EINVAL;
index 9c595e3b9c203fbdd746d154d3de8cbc1ddb921e..adc9358c9bec4a2b1f0d86a7a7ebb32655c36184 100644 (file)
@@ -1297,7 +1297,7 @@ add_detailed_modes(struct drm_connector *connector, struct edid *edid,
 /**
  * Search EDID for CEA extension block.
  */
-static u8 *drm_find_cea_extension(struct edid *edid)
+u8 *drm_find_cea_extension(struct edid *edid)
 {
        u8 *edid_ext = NULL;
        int i;
@@ -1318,6 +1318,7 @@ static u8 *drm_find_cea_extension(struct edid *edid)
 
        return edid_ext;
 }
+EXPORT_SYMBOL(drm_find_cea_extension);
 
 /**
  * drm_detect_hdmi_monitor - detect whether monitor is hdmi.
index 950720473967069ff093712b172446183a7c493f..11d7a72c22d9141697697db81b375e15a8a15f0b 100644 (file)
@@ -342,9 +342,22 @@ int drm_fb_helper_debug_leave(struct fb_info *info)
 }
 EXPORT_SYMBOL(drm_fb_helper_debug_leave);
 
+bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper)
+{
+       bool error = false;
+       int i, ret;
+       for (i = 0; i < fb_helper->crtc_count; i++) {
+               struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;
+               ret = drm_crtc_helper_set_config(mode_set);
+               if (ret)
+                       error = true;
+       }
+       return error;
+}
+EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode);
+
 bool drm_fb_helper_force_kernel_mode(void)
 {
-       int i = 0;
        bool ret, error = false;
        struct drm_fb_helper *helper;
 
@@ -352,12 +365,12 @@ bool drm_fb_helper_force_kernel_mode(void)
                return false;
 
        list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
-               for (i = 0; i < helper->crtc_count; i++) {
-                       struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set;
-                       ret = drm_crtc_helper_set_config(mode_set);
-                       if (ret)
-                               error = true;
-               }
+               if (helper->dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+                       continue;
+
+               ret = drm_fb_helper_restore_fbdev_mode(helper);
+               if (ret)
+                       error = true;
        }
        return error;
 }
index 741457bd1c46ef1f54af12296e348a053430329e..a1f12cb043deb233484f9a4957300fa475c3a024 100644 (file)
@@ -932,11 +932,34 @@ EXPORT_SYMBOL(drm_vblank_put);
 
 void drm_vblank_off(struct drm_device *dev, int crtc)
 {
+       struct drm_pending_vblank_event *e, *t;
+       struct timeval now;
        unsigned long irqflags;
+       unsigned int seq;
 
        spin_lock_irqsave(&dev->vbl_lock, irqflags);
        vblank_disable_and_save(dev, crtc);
        DRM_WAKEUP(&dev->vbl_queue[crtc]);
+
+       /* Send any queued vblank events, lest the natives grow disquiet */
+       seq = drm_vblank_count_and_time(dev, crtc, &now);
+       list_for_each_entry_safe(e, t, &dev->vblank_event_list, base.link) {
+               if (e->pipe != crtc)
+                       continue;
+               DRM_DEBUG("Sending premature vblank event on disable: \
+                         wanted %d, current %d\n",
+                         e->event.sequence, seq);
+
+               e->event.sequence = seq;
+               e->event.tv_sec = now.tv_sec;
+               e->event.tv_usec = now.tv_usec;
+               drm_vblank_put(dev, e->pipe);
+               list_move_tail(&e->base.link, &e->base.file_priv->event_list);
+               wake_up_interruptible(&e->base.file_priv->event_wait);
+               trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
+                                                e->event.sequence);
+       }
+
        spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
 }
 EXPORT_SYMBOL(drm_vblank_off);
index add1737dae0db24c7479c55eb7557fd4334762b8..5d00b0fc0d91d837f6aa47b49901cb04bd6db1c0 100644 (file)
@@ -551,7 +551,7 @@ EXPORT_SYMBOL(drm_mm_scan_add_block);
  * corrupted.
  *
  * When the scan list is empty, the selected memory nodes can be freed. An
- * immediatly following drm_mm_search_free with best_match = 0 will then return
+ * immediately following drm_mm_search_free with best_match = 0 will then return
  * the just freed block (because its at the top of the free_stack list).
  *
  * Returns one if this block should be evicted, zero otherwise. Will always
index 72730377a01b7cac5fec231c2fd93e5b81b01f99..12876f2795d2b373d9cac4130ec0052b44db23e6 100644 (file)
@@ -2207,7 +2207,7 @@ void i915_driver_lastclose(struct drm_device * dev)
        drm_i915_private_t *dev_priv = dev->dev_private;
 
        if (!dev_priv || drm_core_check_feature(dev, DRIVER_MODESET)) {
-               drm_fb_helper_restore();
+               intel_fb_restore_mode(dev);
                vga_switcheroo_process_delayed_switch();
                return;
        }
index 5004724ea57e08aa808b85ec5612e4e9a8a97af8..1c1b27c97e5cee3aa26138a1d5c6ebf8ba5f85c0 100644 (file)
@@ -630,7 +630,7 @@ typedef struct drm_i915_private {
                 * Flag if the hardware appears to be wedged.
                 *
                 * This is set when attempts to idle the device timeout.
-                * It prevents command submission from occuring and makes
+                * It prevents command submission from occurring and makes
                 * every pending request fail
                 */
                atomic_t wedged;
index 8342259f3160d3eeaf118890c58825e845535982..d03fc05b39c0e008236406a9820f459103154f10 100644 (file)
@@ -269,21 +269,6 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
        return ret;
 }
 
-static bool intel_crt_ddc_probe(struct drm_i915_private *dev_priv, int ddc_bus)
-{
-       u8 buf;
-       struct i2c_msg msgs[] = {
-               {
-                       .addr = 0xA0,
-                       .flags = 0,
-                       .len = 1,
-                       .buf = &buf,
-               },
-       };
-       /* DDC monitor detect: Does it ACK a write to 0xA0? */
-       return i2c_transfer(&dev_priv->gmbus[ddc_bus].adapter, msgs, 1) == 1;
-}
-
 static bool intel_crt_detect_ddc(struct drm_connector *connector)
 {
        struct intel_crt *crt = intel_attached_crt(connector);
@@ -293,11 +278,6 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector)
        if (crt->base.type != INTEL_OUTPUT_ANALOG)
                return false;
 
-       if (intel_crt_ddc_probe(dev_priv, dev_priv->crt_ddc_pin)) {
-               DRM_DEBUG_KMS("CRT detected via DDC:0xa0\n");
-               return true;
-       }
-
        if (intel_ddc_probe(&crt->base, dev_priv->crt_ddc_pin)) {
                struct edid *edid;
                bool is_digital = false;
index 432fc04c6bffc1b58d8da1645a8a5687049a9bc2..e522c702b04e6387a07ae07f5917fb81835705ac 100644 (file)
@@ -3771,8 +3771,11 @@ static bool g4x_compute_wm0(struct drm_device *dev,
        int entries, tlb_miss;
 
        crtc = intel_get_crtc_for_plane(dev, plane);
-       if (crtc->fb == NULL || !crtc->enabled)
+       if (crtc->fb == NULL || !crtc->enabled) {
+               *cursor_wm = cursor->guard_size;
+               *plane_wm = display->guard_size;
                return false;
+       }
 
        htotal = crtc->mode.htotal;
        hdisplay = crtc->mode.hdisplay;
@@ -6215,36 +6218,6 @@ cleanup_work:
        return ret;
 }
 
-static void intel_crtc_reset(struct drm_crtc *crtc)
-{
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-
-       /* Reset flags back to the 'unknown' status so that they
-        * will be correctly set on the initial modeset.
-        */
-       intel_crtc->dpms_mode = -1;
-}
-
-static struct drm_crtc_helper_funcs intel_helper_funcs = {
-       .dpms = intel_crtc_dpms,
-       .mode_fixup = intel_crtc_mode_fixup,
-       .mode_set = intel_crtc_mode_set,
-       .mode_set_base = intel_pipe_set_base,
-       .mode_set_base_atomic = intel_pipe_set_base_atomic,
-       .load_lut = intel_crtc_load_lut,
-       .disable = intel_crtc_disable,
-};
-
-static const struct drm_crtc_funcs intel_crtc_funcs = {
-       .reset = intel_crtc_reset,
-       .cursor_set = intel_crtc_cursor_set,
-       .cursor_move = intel_crtc_cursor_move,
-       .gamma_set = intel_crtc_gamma_set,
-       .set_config = drm_crtc_helper_set_config,
-       .destroy = intel_crtc_destroy,
-       .page_flip = intel_crtc_page_flip,
-};
-
 static void intel_sanitize_modesetting(struct drm_device *dev,
                                       int pipe, int plane)
 {
@@ -6281,6 +6254,42 @@ static void intel_sanitize_modesetting(struct drm_device *dev,
        intel_disable_pipe(dev_priv, pipe);
 }
 
+static void intel_crtc_reset(struct drm_crtc *crtc)
+{
+       struct drm_device *dev = crtc->dev;
+       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+
+       /* Reset flags back to the 'unknown' status so that they
+        * will be correctly set on the initial modeset.
+        */
+       intel_crtc->dpms_mode = -1;
+
+       /* We need to fix up any BIOS configuration that conflicts with
+        * our expectations.
+        */
+       intel_sanitize_modesetting(dev, intel_crtc->pipe, intel_crtc->plane);
+}
+
+static struct drm_crtc_helper_funcs intel_helper_funcs = {
+       .dpms = intel_crtc_dpms,
+       .mode_fixup = intel_crtc_mode_fixup,
+       .mode_set = intel_crtc_mode_set,
+       .mode_set_base = intel_pipe_set_base,
+       .mode_set_base_atomic = intel_pipe_set_base_atomic,
+       .load_lut = intel_crtc_load_lut,
+       .disable = intel_crtc_disable,
+};
+
+static const struct drm_crtc_funcs intel_crtc_funcs = {
+       .reset = intel_crtc_reset,
+       .cursor_set = intel_crtc_cursor_set,
+       .cursor_move = intel_crtc_cursor_move,
+       .gamma_set = intel_crtc_gamma_set,
+       .set_config = drm_crtc_helper_set_config,
+       .destroy = intel_crtc_destroy,
+       .page_flip = intel_crtc_page_flip,
+};
+
 static void intel_crtc_init(struct drm_device *dev, int pipe)
 {
        drm_i915_private_t *dev_priv = dev->dev_private;
@@ -6330,8 +6339,6 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
 
        setup_timer(&intel_crtc->idle_timer, intel_crtc_idle_timer,
                    (unsigned long)intel_crtc);
-
-       intel_sanitize_modesetting(dev, intel_crtc->pipe, intel_crtc->plane);
 }
 
 int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
index 0daefca5cbb83591ec83ffc391e3303b2f3ca50b..cb8578b7e4432c1aad04f79324be3d588c1e74e0 100644 (file)
@@ -213,7 +213,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
                        return MODE_PANEL;
        }
 
-       /* only refuse the mode on non eDP since we have seen some wierd eDP panels
+       /* only refuse the mode on non eDP since we have seen some weird eDP panels
           which are outside spec tolerances but somehow work by magic */
        if (!is_edp(intel_dp) &&
            (intel_dp_link_required(connector->dev, intel_dp, mode->clock)
index 5daa991cb28733149da4402b51ff01964731bc46..1d20712d527f1e5d38a192f59f2aa3c6493e5e53 100644 (file)
@@ -39,7 +39,7 @@
                        ret__ = -ETIMEDOUT;                             \
                        break;                                          \
                }                                                       \
-               if (W && !in_dbg_master()) msleep(W);                   \
+               if (W && !(in_atomic() || in_dbg_master())) msleep(W);  \
        }                                                               \
        ret__;                                                          \
 })
@@ -338,4 +338,5 @@ extern int intel_overlay_attrs(struct drm_device *dev, void *data,
                               struct drm_file *file_priv);
 
 extern void intel_fb_output_poll_changed(struct drm_device *dev);
+extern void intel_fb_restore_mode(struct drm_device *dev);
 #endif /* __INTEL_DRV_H__ */
index 512782728e5127aed5ea383efb7f4d79dd2b8cb7..ec49bae7338260d77cc6b78f9bc15d948303c1e8 100644 (file)
@@ -264,3 +264,13 @@ void intel_fb_output_poll_changed(struct drm_device *dev)
        drm_i915_private_t *dev_priv = dev->dev_private;
        drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
 }
+
+void intel_fb_restore_mode(struct drm_device *dev)
+{
+       int ret;
+       drm_i915_private_t *dev_priv = dev->dev_private;
+
+       ret = drm_fb_helper_restore_fbdev_mode(&dev_priv->fbdev->helper);
+       if (ret)
+               DRM_DEBUG("failed to restore crtc mode\n");
+}
index 82d04c5899d27d9942c4fa47a3222f21d3e97993..d3b903bce7c5b3a25845c570aaf21f064d416224 100644 (file)
@@ -259,7 +259,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
                                if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50))
                                        goto timeout;
                                if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER)
-                                       return 0;
+                                       goto clear_err;
 
                                val = I915_READ(GMBUS3 + reg_offset);
                                do {
@@ -287,7 +287,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
                                if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50))
                                        goto timeout;
                                if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER)
-                                       return 0;
+                                       goto clear_err;
 
                                val = loop = 0;
                                do {
@@ -302,14 +302,31 @@ gmbus_xfer(struct i2c_adapter *adapter,
                if (i + 1 < num && wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_WAIT_PHASE), 50))
                        goto timeout;
                if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER)
-                       return 0;
+                       goto clear_err;
        }
 
-       return num;
+       goto done;
+
+clear_err:
+       /* Toggle the Software Clear Interrupt bit. This has the effect
+        * of resetting the GMBUS controller and so clearing the
+        * BUS_ERROR raised by the slave's NAK.
+        */
+       I915_WRITE(GMBUS1 + reg_offset, GMBUS_SW_CLR_INT);
+       I915_WRITE(GMBUS1 + reg_offset, 0);
+
+done:
+       /* Mark the GMBUS interface as disabled. We will re-enable it at the
+        * start of the next xfer, till then let it sleep.
+        */
+       I915_WRITE(GMBUS0 + reg_offset, 0);
+       return i;
 
 timeout:
        DRM_INFO("GMBUS timed out, falling back to bit banging on pin %d [%s]\n",
                 bus->reg0 & 0xff, bus->adapter.name);
+       I915_WRITE(GMBUS0 + reg_offset, 0);
+
        /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */
        bus->force_bit = intel_gpio_create(dev_priv, bus->reg0 & 0xff);
        if (!bus->force_bit)
index 1a311ad0111655717322d7757e68a4aaa9787f56..a562bd2648c7bb76f2db4df8a167f755db57ae1b 100644 (file)
@@ -473,19 +473,13 @@ static enum drm_connector_status
 intel_lvds_detect(struct drm_connector *connector, bool force)
 {
        struct drm_device *dev = connector->dev;
-       enum drm_connector_status status = connector_status_connected;
+       enum drm_connector_status status;
 
        status = intel_panel_detect(dev);
        if (status != connector_status_unknown)
                return status;
 
-       /* ACPI lid methods were generally unreliable in this generation, so
-        * don't even bother.
-        */
-       if (IS_GEN2(dev) || IS_GEN3(dev))
-               return connector_status_connected;
-
-       return status;
+       return connector_status_connected;
 }
 
 /**
@@ -835,25 +829,6 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev,
        return false;
 }
 
-static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin)
-{
-       struct drm_i915_private *dev_priv = dev->dev_private;
-       u8 buf = 0;
-       struct i2c_msg msgs[] = {
-               {
-                       .addr = 0xA0,
-                       .flags = 0,
-                       .len = 1,
-                       .buf = &buf,
-               },
-       };
-       struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter;
-       /* XXX this only appears to work when using GMBUS */
-       if (intel_gmbus_is_forced_bit(i2c))
-               return true;
-       return i2c_transfer(i2c, msgs, 1) == 1;
-}
-
 /**
  * intel_lvds_init - setup LVDS connectors on this device
  * @dev: drm device
@@ -894,11 +869,6 @@ bool intel_lvds_init(struct drm_device *dev)
                }
        }
 
-       if (!intel_lvds_ddc_probe(dev, pin)) {
-               DRM_DEBUG_KMS("LVDS did not respond to DDC probe\n");
-               return false;
-       }
-
        intel_lvds = kzalloc(sizeof(struct intel_lvds), GFP_KERNEL);
        if (!intel_lvds) {
                return false;
index a386b022e538d16f71696a616e977c616c5d831d..4f4e23bc2d165e92383c5ca7bd14e7b81f25cb56 100644 (file)
@@ -230,7 +230,7 @@ struct intel_sdvo_set_target_input_args {
 } __attribute__((packed));
 
 /**
- * Takes a struct intel_sdvo_output_flags of which outputs are targetted by
+ * Takes a struct intel_sdvo_output_flags of which outputs are targeted by
  * future output commands.
  *
  * Affected commands inclue SET_OUTPUT_TIMINGS_PART[12],
index 4256b8ef3947454048d2d432c3375776983c3e06..6b22c1dcc015f406bf2fcdbc866511bc92f3d882 100644 (file)
@@ -1151,10 +1151,10 @@ intel_tv_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
                            (video_levels->blank << TV_BLANK_LEVEL_SHIFT)));
        {
                int pipeconf_reg = PIPECONF(pipe);
-               int dspcntr_reg = DSPCNTR(pipe);
+               int dspcntr_reg = DSPCNTR(intel_crtc->plane);
                int pipeconf = I915_READ(pipeconf_reg);
                int dspcntr = I915_READ(dspcntr_reg);
-               int dspbase_reg = DSPADDR(pipe);
+               int dspbase_reg = DSPADDR(intel_crtc->plane);
                int xpos = 0x0, ypos = 0x0;
                unsigned int xsize, ysize;
                /* Pipe must be off here */
@@ -1378,7 +1378,9 @@ intel_tv_detect(struct drm_connector *connector, bool force)
        if (type < 0)
                return connector_status_disconnected;
 
+       intel_tv->type = type;
        intel_tv_find_better_format(connector);
+
        return connector_status_connected;
 }
 
@@ -1670,8 +1672,7 @@ intel_tv_init(struct drm_device *dev)
         *
         * More recent chipsets favour HDMI rather than integrated S-Video.
         */
-       connector->polled =
-               DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
+       connector->polled = DRM_CONNECTOR_POLL_CONNECT;
 
        drm_connector_init(dev, connector, &intel_tv_connector_funcs,
                           DRM_MODE_CONNECTOR_SVIDEO);
index 1e1eb1d7e9713edda376e65be6f417b157329f1e..5ccb65deb83c2f956eb67a1adbf505c8d1e8d382 100644 (file)
@@ -426,7 +426,7 @@ int mga_driver_load(struct drm_device *dev, unsigned long flags)
  * Bootstrap the driver for AGP DMA.
  *
  * \todo
- * Investigate whether there is any benifit to storing the WARP microcode in
+ * Investigate whether there is any benefit to storing the WARP microcode in
  * AGP memory.  If not, the microcode may as well always be put in PCI
  * memory.
  *
index 8314a49b6b9a9e195250c92729a0f77168f6f44c..90aef64b76f277a649cd8e7caf79bfa40851cf3f 100644 (file)
@@ -269,7 +269,7 @@ struct init_tbl_entry {
        int (*handler)(struct nvbios *, uint16_t, struct init_exec *);
 };
 
-static int parse_init_table(struct nvbios *, unsigned int, struct init_exec *);
+static int parse_init_table(struct nvbios *, uint16_t, struct init_exec *);
 
 #define MACRO_INDEX_SIZE       2
 #define MACRO_SIZE             8
@@ -2010,6 +2010,27 @@ init_sub_direct(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
        return 3;
 }
 
+static int
+init_jump(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
+{
+       /*
+        * INIT_JUMP   opcode: 0x5C ('\')
+        *
+        * offset      (8  bit): opcode
+        * offset + 1  (16 bit): offset (in bios)
+        *
+        * Continue execution of init table from 'offset'
+        */
+
+       uint16_t jmp_offset = ROM16(bios->data[offset + 1]);
+
+       if (!iexec->execute)
+               return 3;
+
+       BIOSLOG(bios, "0x%04X: Jump to 0x%04X\n", offset, jmp_offset);
+       return jmp_offset - offset;
+}
+
 static int
 init_i2c_if(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
 {
@@ -3659,6 +3680,7 @@ static struct init_tbl_entry itbl_entry[] = {
        { "INIT_ZM_REG_SEQUENCE"              , 0x58, init_zm_reg_sequence            },
        /* INIT_INDIRECT_REG (0x5A, 7, 0, 0) removed due to no example of use */
        { "INIT_SUB_DIRECT"                   , 0x5B, init_sub_direct                 },
+       { "INIT_JUMP"                         , 0x5C, init_jump                       },
        { "INIT_I2C_IF"                       , 0x5E, init_i2c_if                     },
        { "INIT_COPY_NV_REG"                  , 0x5F, init_copy_nv_reg                },
        { "INIT_ZM_INDEX_IO"                  , 0x62, init_zm_index_io                },
@@ -3700,8 +3722,7 @@ static struct init_tbl_entry itbl_entry[] = {
 #define MAX_TABLE_OPS 1000
 
 static int
-parse_init_table(struct nvbios *bios, unsigned int offset,
-                struct init_exec *iexec)
+parse_init_table(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
 {
        /*
         * Parses all commands in an init table.
@@ -6333,6 +6354,32 @@ apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf)
                }
        }
 
+       /* XFX GT-240X-YA
+        *
+        * So many things wrong here, replace the entire encoder table..
+        */
+       if (nv_match_device(dev, 0x0ca3, 0x1682, 0x3003)) {
+               if (idx == 0) {
+                       *conn = 0x02001300; /* VGA, connector 1 */
+                       *conf = 0x00000028;
+               } else
+               if (idx == 1) {
+                       *conn = 0x01010312; /* DVI, connector 0 */
+                       *conf = 0x00020030;
+               } else
+               if (idx == 2) {
+                       *conn = 0x01010310; /* VGA, connector 0 */
+                       *conf = 0x00000028;
+               } else
+               if (idx == 3) {
+                       *conn = 0x02022362; /* HDMI, connector 2 */
+                       *conf = 0x00020010;
+               } else {
+                       *conn = 0x0000000e; /* EOL */
+                       *conf = 0x00000000;
+               }
+       }
+
        return true;
 }
 
index 3837090d66af71bfab695a06ef8d11640c4121c2..4cea35c57d15a4582ac0dfbd76add6b9934e9317 100644 (file)
@@ -200,7 +200,7 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
        /* disable the fifo caches */
        pfifo->reassign(dev, false);
 
-       /* Construct inital RAMFC for new channel */
+       /* Construct initial RAMFC for new channel */
        ret = pfifo->create_context(chan);
        if (ret) {
                nouveau_channel_put(&chan);
@@ -278,7 +278,7 @@ nouveau_channel_put_unlocked(struct nouveau_channel **pchan)
                return;
        }
 
-       /* noone wants the channel anymore */
+       /* no one wants the channel anymore */
        NV_DEBUG(dev, "freeing channel %d\n", chan->id);
        nouveau_debugfs_channel_fini(chan);
 
index ce38e97b9428eaaaf81e248572555a80736c9242..568caedd7216e141a148753ea1dd55d8657ff261 100644 (file)
@@ -83,7 +83,7 @@ nouveau_dma_init(struct nouveau_channel *chan)
                return ret;
 
        /* NV_MEMORY_TO_MEMORY_FORMAT requires a notifier object */
-       ret = nouveau_notifier_alloc(chan, NvNotify0, 32, 0xfd0, 0x1000,
+       ret = nouveau_notifier_alloc(chan, NvNotify0, 32, 0xfe0, 0x1000,
                                     &chan->m2mf_ntfy);
        if (ret)
                return ret;
index fff180a99867f43ca09d61fab78bcfba1468a631..a76514a209b369880ac8b5ced881bb337a186695 100644 (file)
@@ -216,7 +216,7 @@ struct nouveau_channel {
        /* mapping of the fifo itself */
        struct drm_local_map *map;
 
-       /* mapping of the regs controling the fifo */
+       /* mapping of the regs controlling the fifo */
        void __iomem *user;
        uint32_t user_get;
        uint32_t user_put;
@@ -682,6 +682,9 @@ struct drm_nouveau_private {
        /* For PFIFO and PGRAPH. */
        spinlock_t context_switch_lock;
 
+       /* VM/PRAMIN flush, legacy PRAMIN aperture */
+       spinlock_t vm_lock;
+
        /* RAMIN configuration, RAMFC, RAMHT and RAMRO offsets */
        struct nouveau_ramht  *ramht;
        struct nouveau_gpuobj *ramfc;
@@ -1190,7 +1193,7 @@ extern int  nv50_graph_load_context(struct nouveau_channel *);
 extern int  nv50_graph_unload_context(struct drm_device *);
 extern int  nv50_grctx_init(struct nouveau_grctx *);
 extern void nv50_graph_tlb_flush(struct drm_device *dev);
-extern void nv86_graph_tlb_flush(struct drm_device *dev);
+extern void nv84_graph_tlb_flush(struct drm_device *dev);
 extern struct nouveau_enum nv50_data_error_names[];
 
 /* nvc0_graph.c */
index 889c4454682e674316685ac322b55b3960610dc1..39aee6d4daf869ab5c5c931bd7174b249aab10b5 100644 (file)
@@ -181,13 +181,13 @@ nouveau_fbcon_sync(struct fb_info *info)
                OUT_RING  (chan, 0);
        }
 
-       nouveau_bo_wr32(chan->notifier_bo, chan->m2mf_ntfy + 3, 0xffffffff);
+       nouveau_bo_wr32(chan->notifier_bo, chan->m2mf_ntfy/4 + 3, 0xffffffff);
        FIRE_RING(chan);
        mutex_unlock(&chan->mutex);
 
        ret = -EBUSY;
        for (i = 0; i < 100000; i++) {
-               if (!nouveau_bo_rd32(chan->notifier_bo, chan->m2mf_ntfy + 3)) {
+               if (!nouveau_bo_rd32(chan->notifier_bo, chan->m2mf_ntfy/4 + 3)) {
                        ret = 0;
                        break;
                }
index e8b04f4aed7efd6049f7f3f358b1032b5f4ec40b..b52e46018245801776dc77ab490ce95942fbbbad 100644 (file)
@@ -97,7 +97,7 @@ nouveau_gem_new(struct drm_device *dev, struct nouveau_channel *chan,
                return -ENOMEM;
        }
 
-       nvbo->bo.persistant_swap_storage = nvbo->gem->filp;
+       nvbo->bo.persistent_swap_storage = nvbo->gem->filp;
        nvbo->gem->driver_private = nvbo;
        return 0;
 }
index 2683377f4131ed73b29a9d57282c04fab8874246..5045f8b921d644088ef4d8345dda673fadfba424 100644 (file)
@@ -398,7 +398,7 @@ nouveau_mem_vram_init(struct drm_device *dev)
                        dma_bits = 40;
        } else
        if (drm_pci_device_is_pcie(dev) &&
-           dev_priv->chipset != 0x40 &&
+           dev_priv->chipset  > 0x40 &&
            dev_priv->chipset != 0x45) {
                if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(39)))
                        dma_bits = 39;
@@ -552,6 +552,7 @@ nouveau_mem_timing_init(struct drm_device *dev)
        u8 tRC;         /* Byte 9 */
        u8 tUNK_10, tUNK_11, tUNK_12, tUNK_13, tUNK_14;
        u8 tUNK_18, tUNK_19, tUNK_20, tUNK_21;
+       u8 magic_number = 0; /* Yeah... sorry*/
        u8 *mem = NULL, *entry;
        int i, recordlen, entries;
 
@@ -596,6 +597,12 @@ nouveau_mem_timing_init(struct drm_device *dev)
        if (!memtimings->timing)
                return;
 
+       /* Get "some number" from the timing reg for NV_40
+        * Used in calculations later */
+       if(dev_priv->card_type == NV_40) {
+               magic_number = (nv_rd32(dev,0x100228) & 0x0f000000) >> 24;
+       }
+
        entry = mem + mem[1];
        for (i = 0; i < entries; i++, entry += recordlen) {
                struct nouveau_pm_memtiming *timing = &pm->memtimings.timing[i];
@@ -635,36 +642,51 @@ nouveau_mem_timing_init(struct drm_device *dev)
 
                /* XXX: I don't trust the -1's and +1's... they must come
                 *      from somewhere! */
-               timing->reg_100224 = ((tUNK_0 + tUNK_19 + 1) << 24 |
+               timing->reg_100224 = (tUNK_0 + tUNK_19 + 1 + magic_number) << 24 |
                                      tUNK_18 << 16 |
-                                     (tUNK_1 + tUNK_19 + 1) << 8 |
-                                     (tUNK_2 - 1));
+                                     (tUNK_1 + tUNK_19 + 1 + magic_number) << 8;
+               if(dev_priv->chipset == 0xa8) {
+                       timing->reg_100224 |= (tUNK_2 - 1);
+               } else {
+                       timing->reg_100224 |= (tUNK_2 + 2 - magic_number);
+               }
 
                timing->reg_100228 = (tUNK_12 << 16 | tUNK_11 << 8 | tUNK_10);
-               if(recordlen > 19) {
-                       timing->reg_100228 += (tUNK_19 - 1) << 24;
-               }/* I cannot back-up this else-statement right now
-                        else {
-                       timing->reg_100228 += tUNK_12 << 24;
-               }*/
-
-               /* XXX: reg_10022c */
-               timing->reg_10022c = tUNK_2 - 1;
-
-               timing->reg_100230 = (tUNK_20 << 24 | tUNK_21 << 16 |
-                                     tUNK_13 << 8  | tUNK_13);
-
-               /* XXX: +6? */
-               timing->reg_100234 = (tRAS << 24 | (tUNK_19 + 6) << 8 | tRC);
-               timing->reg_100234 += max(tUNK_10,tUNK_11) << 16;
-
-               /* XXX; reg_100238, reg_10023c
-                * reg: 0x00??????
-                * reg_10023c:
-                *      0 for pre-NV50 cards
-                *      0x????0202 for NV50+ cards (empirical evidence) */
-               if(dev_priv->card_type >= NV_50) {
+               if(dev_priv->chipset >= 0xa3 && dev_priv->chipset < 0xaa) {
+                       timing->reg_100228 |= (tUNK_19 - 1) << 24;
+               }
+
+               if(dev_priv->card_type == NV_40) {
+                       /* NV40: don't know what the rest of the regs are..
+                        * And don't need to know either */
+                       timing->reg_100228 |= 0x20200000 | magic_number << 24;
+               } else if(dev_priv->card_type >= NV_50) {
+                       /* XXX: reg_10022c */
+                       timing->reg_10022c = tUNK_2 - 1;
+
+                       timing->reg_100230 = (tUNK_20 << 24 | tUNK_21 << 16 |
+                                                 tUNK_13 << 8  | tUNK_13);
+
+                       timing->reg_100234 = (tRAS << 24 | tRC);
+                       timing->reg_100234 += max(tUNK_10,tUNK_11) << 16;
+
+                       if(dev_priv->chipset < 0xa3) {
+                               timing->reg_100234 |= (tUNK_2 + 2) << 8;
+                       } else {
+                               /* XXX: +6? */
+                               timing->reg_100234 |= (tUNK_19 + 6) << 8;
+                       }
+
+                       /* XXX; reg_100238, reg_10023c
+                        * reg_100238: 0x00??????
+                        * reg_10023c: 0x!!??0202 for NV50+ cards (empirical evidence) */
                        timing->reg_10023c = 0x202;
+                       if(dev_priv->chipset < 0xa3) {
+                               timing->reg_10023c |= 0x4000000 | (tUNK_2 - 1) << 16;
+                       } else {
+                               /* currently unknown
+                                * 10023c seen as 06xxxxxx, 0bxxxxxx or 0fxxxxxx */
+                       }
                }
 
                NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", i,
@@ -675,7 +697,7 @@ nouveau_mem_timing_init(struct drm_device *dev)
                         timing->reg_100238, timing->reg_10023c);
        }
 
-       memtimings->nr_timing  = entries;
+       memtimings->nr_timing = entries;
        memtimings->supported = true;
 }
 
index 7ba3fc0b30c19a5dfdcda496202b99c2d141e0a8..5b39718ae1f8359683f96295d96a55ac4fdc56a8 100644 (file)
@@ -35,19 +35,22 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
 {
        struct drm_device *dev = chan->dev;
        struct nouveau_bo *ntfy = NULL;
-       uint32_t flags;
+       uint32_t flags, ttmpl;
        int ret;
 
-       if (nouveau_vram_notify)
+       if (nouveau_vram_notify) {
                flags = NOUVEAU_GEM_DOMAIN_VRAM;
-       else
+               ttmpl = TTM_PL_FLAG_VRAM;
+       } else {
                flags = NOUVEAU_GEM_DOMAIN_GART;
+               ttmpl = TTM_PL_FLAG_TT;
+       }
 
        ret = nouveau_gem_new(dev, NULL, PAGE_SIZE, 0, flags, 0, 0, &ntfy);
        if (ret)
                return ret;
 
-       ret = nouveau_bo_pin(ntfy, flags);
+       ret = nouveau_bo_pin(ntfy, ttmpl);
        if (ret)
                goto out_err;
 
index 4f00c87ed86eefda49bbd4e01559d51007700082..67a16e01ffa6db3030fd789d500dafd9b03eaf54 100644 (file)
@@ -1039,19 +1039,20 @@ nv_ro32(struct nouveau_gpuobj *gpuobj, u32 offset)
 {
        struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private;
        struct drm_device *dev = gpuobj->dev;
+       unsigned long flags;
 
        if (gpuobj->pinst == ~0 || !dev_priv->ramin_available) {
                u64  ptr = gpuobj->vinst + offset;
                u32 base = ptr >> 16;
                u32  val;
 
-               spin_lock(&dev_priv->ramin_lock);
+               spin_lock_irqsave(&dev_priv->vm_lock, flags);
                if (dev_priv->ramin_base != base) {
                        dev_priv->ramin_base = base;
                        nv_wr32(dev, 0x001700, dev_priv->ramin_base);
                }
                val = nv_rd32(dev, 0x700000 + (ptr & 0xffff));
-               spin_unlock(&dev_priv->ramin_lock);
+               spin_unlock_irqrestore(&dev_priv->vm_lock, flags);
                return val;
        }
 
@@ -1063,18 +1064,19 @@ nv_wo32(struct nouveau_gpuobj *gpuobj, u32 offset, u32 val)
 {
        struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private;
        struct drm_device *dev = gpuobj->dev;
+       unsigned long flags;
 
        if (gpuobj->pinst == ~0 || !dev_priv->ramin_available) {
                u64  ptr = gpuobj->vinst + offset;
                u32 base = ptr >> 16;
 
-               spin_lock(&dev_priv->ramin_lock);
+               spin_lock_irqsave(&dev_priv->vm_lock, flags);
                if (dev_priv->ramin_base != base) {
                        dev_priv->ramin_base = base;
                        nv_wr32(dev, 0x001700, dev_priv->ramin_base);
                }
                nv_wr32(dev, 0x700000 + (ptr & 0xffff), val);
-               spin_unlock(&dev_priv->ramin_lock);
+               spin_unlock_irqrestore(&dev_priv->vm_lock, flags);
                return;
        }
 
index ac62a1b8c4fc307afad07c9fafbb034f3301efcb..670e3cb697ec7664921e1fc87f57fa6fa40cd68e 100644 (file)
@@ -134,7 +134,7 @@ nouveau_perf_init(struct drm_device *dev)
                case 0x13:
                case 0x15:
                        perflvl->fanspeed = entry[55];
-                       perflvl->voltage = entry[56];
+                       perflvl->voltage = (recordlen > 56) ? entry[56] : 0;
                        perflvl->core = ROM32(entry[1]) * 10;
                        perflvl->memory = ROM32(entry[5]) * 20;
                        break;
index a33fe4019286e39294af123b7f8140973451c623..4bce801bc588ffd04e1cdd3800e2e82ebf33008f 100644 (file)
@@ -55,6 +55,7 @@ nouveau_sgdma_populate(struct ttm_backend *be, unsigned long num_pages,
                                be->func->clear(be);
                                return -EFAULT;
                        }
+                       nvbe->ttm_alloced[nvbe->nr_pages] = false;
                }
 
                nvbe->nr_pages++;
@@ -427,7 +428,7 @@ nouveau_sgdma_init(struct drm_device *dev)
        u32 aper_size, align;
        int ret;
 
-       if (dev_priv->card_type >= NV_50 || drm_pci_device_is_pcie(dev))
+       if (dev_priv->card_type >= NV_40 && drm_pci_device_is_pcie(dev))
                aper_size = 512 * 1024 * 1024;
        else
                aper_size = 64 * 1024 * 1024;
@@ -457,7 +458,7 @@ nouveau_sgdma_init(struct drm_device *dev)
                dev_priv->gart_info.func = &nv50_sgdma_backend;
        } else
        if (drm_pci_device_is_pcie(dev) &&
-           dev_priv->chipset != 0x40 && dev_priv->chipset != 0x45) {
+           dev_priv->chipset > 0x40 && dev_priv->chipset != 0x45) {
                if (nv44_graph_class(dev)) {
                        dev_priv->gart_info.func = &nv44_sgdma_backend;
                        align = 512 * 1024;
index 4fcbd091a117caea61fb684374a4fe9f0e661886..a30adec5beaa7c1149a0089e688fc71832debb7b 100644 (file)
@@ -376,15 +376,11 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
                engine->graph.destroy_context   = nv50_graph_destroy_context;
                engine->graph.load_context      = nv50_graph_load_context;
                engine->graph.unload_context    = nv50_graph_unload_context;
-               if (dev_priv->chipset != 0x86)
+               if (dev_priv->chipset == 0x50 ||
+                   dev_priv->chipset == 0xac)
                        engine->graph.tlb_flush = nv50_graph_tlb_flush;
-               else {
-                       /* from what i can see nvidia do this on every
-                        * pre-NVA3 board except NVAC, but, we've only
-                        * ever seen problems on NV86
-                        */
-                       engine->graph.tlb_flush = nv86_graph_tlb_flush;
-               }
+               else
+                       engine->graph.tlb_flush = nv84_graph_tlb_flush;
                engine->fifo.channels           = 128;
                engine->fifo.init               = nv50_fifo_init;
                engine->fifo.takedown           = nv50_fifo_takedown;
@@ -612,6 +608,7 @@ nouveau_card_init(struct drm_device *dev)
        spin_lock_init(&dev_priv->channels.lock);
        spin_lock_init(&dev_priv->tile.lock);
        spin_lock_init(&dev_priv->context_switch_lock);
+       spin_lock_init(&dev_priv->vm_lock);
 
        /* Make the CRTCs and I2C buses accessible */
        ret = engine->display.early_init(dev);
@@ -963,7 +960,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
        if (ret)
                goto err_mmio;
 
-       /* Map PRAMIN BAR, or on older cards, the aperture withing BAR0 */
+       /* Map PRAMIN BAR, or on older cards, the aperture within BAR0 */
        if (dev_priv->card_type >= NV_40) {
                int ramin_bar = 2;
                if (pci_resource_len(dev->pdev, ramin_bar) == 0)
index a260fbbe3d9b8230e52960de6d56281f1ebf4589..748b9d9c2949df0f24a998e1caf0cfec2f929258 100644 (file)
@@ -164,7 +164,7 @@ nv_crtc_dpms(struct drm_crtc *crtc, int mode)
        NV_DEBUG_KMS(dev, "Setting dpms mode %d on CRTC %d\n", mode,
                                                        nv_crtc->index);
 
-       if (nv_crtc->last_dpms == mode) /* Don't do unnecesary mode changes. */
+       if (nv_crtc->last_dpms == mode) /* Don't do unnecessary mode changes. */
                return;
 
        nv_crtc->last_dpms = mode;
@@ -677,7 +677,7 @@ static void nv_crtc_prepare(struct drm_crtc *crtc)
 
        NVBlankScreen(dev, nv_crtc->index, true);
 
-       /* Some more preperation. */
+       /* Some more preparation. */
        NVWriteCRTC(dev, nv_crtc->index, NV_PCRTC_CONFIG, NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA);
        if (dev_priv->card_type == NV_40) {
                uint32_t reg900 = NVReadRAMDAC(dev, nv_crtc->index, NV_PRAMDAC_900);
index c82db37d9f4157a26e2dfc8ce679a3f6821be9fd..12098bf839c493561bf5aa5ab185a3601eeca34d 100644 (file)
@@ -581,12 +581,13 @@ static void nv04_dfp_restore(struct drm_encoder *encoder)
        int head = nv_encoder->restore.head;
 
        if (nv_encoder->dcb->type == OUTPUT_LVDS) {
-               struct drm_display_mode *native_mode = nouveau_encoder_connector_get(nv_encoder)->native_mode;
-               if (native_mode)
-                       call_lvds_script(dev, nv_encoder->dcb, head, LVDS_PANEL_ON,
-                                        native_mode->clock);
-               else
-                       NV_ERROR(dev, "Not restoring LVDS without native mode\n");
+               struct nouveau_connector *connector =
+                       nouveau_encoder_connector_get(nv_encoder);
+
+               if (connector && connector->native_mode)
+                       call_lvds_script(dev, nv_encoder->dcb, head,
+                                        LVDS_PANEL_ON,
+                                        connector->native_mode->clock);
 
        } else if (nv_encoder->dcb->type == OUTPUT_TMDS) {
                int clock = nouveau_hw_pllvals_to_clk
index 18d30c2c1aa6baf0065619d07aed34229e9f9e63..fceb44c0ec748d2f1499dc6255983339c675c830 100644 (file)
@@ -181,7 +181,7 @@ nv40_graph_load_context(struct nouveau_channel *chan)
                  NV40_PGRAPH_CTXCTL_CUR_LOADED);
        /* 0x32E0 records the instance address of the active FIFO's PGRAPH
         * context.  If at any time this doesn't match 0x40032C, you will
-        * recieve PGRAPH_INTR_CONTEXT_SWITCH
+        * receive PGRAPH_INTR_CONTEXT_SWITCH
         */
        nv_wr32(dev, NV40_PFIFO_GRCTX_INSTANCE, inst);
        return 0;
index 2b9984027f417702af0ce5ec9b6d03326cb4f32a..a19ccaa025b389508f604f72a10a060d338a32ee 100644 (file)
@@ -469,9 +469,6 @@ nv50_crtc_wait_complete(struct drm_crtc *crtc)
 
        start = ptimer->read(dev);
        do {
-               nv_wr32(dev, 0x61002c, 0x370);
-               nv_wr32(dev, 0x000140, 1);
-
                if (nv_ro32(disp->ntfy, 0x000))
                        return 0;
        } while (ptimer->read(dev) - start < 2000000000ULL);
index a2cfaa691e9bb3968d7e12f41cc5c5e226a4008a..c8e83c1a4de8f1381236ba750f670639b4ab155e 100644 (file)
@@ -186,6 +186,7 @@ nv50_evo_channel_init(struct nouveau_channel *evo)
        nv_mask(dev, 0x610028, 0x00000000, 0x00010001 << id);
 
        evo->dma.max = (4096/4) - 2;
+       evo->dma.max &= ~7;
        evo->dma.put = 0;
        evo->dma.cur = evo->dma.put;
        evo->dma.free = evo->dma.max - evo->dma.cur;
index 8675b00caf1890b37b81a3245c6ebcb3a636df28..b02a5b1e7d379fb1928467a668b905ddb4fa30b9 100644 (file)
@@ -503,7 +503,7 @@ nv50_graph_tlb_flush(struct drm_device *dev)
 }
 
 void
-nv86_graph_tlb_flush(struct drm_device *dev)
+nv84_graph_tlb_flush(struct drm_device *dev)
 {
        struct drm_nouveau_private *dev_priv = dev->dev_private;
        struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer;
index a6f8aa651fc6e585c5af4104c7b0e9146a45c3b9..4f95a1e5822e151ab89fcc51ba665c47cc4b50e4 100644 (file)
@@ -404,23 +404,25 @@ void
 nv50_instmem_flush(struct drm_device *dev)
 {
        struct drm_nouveau_private *dev_priv = dev->dev_private;
+       unsigned long flags;
 
-       spin_lock(&dev_priv->ramin_lock);
+       spin_lock_irqsave(&dev_priv->vm_lock, flags);
        nv_wr32(dev, 0x00330c, 0x00000001);
        if (!nv_wait(dev, 0x00330c, 0x00000002, 0x00000000))
                NV_ERROR(dev, "PRAMIN flush timeout\n");
-       spin_unlock(&dev_priv->ramin_lock);
+       spin_unlock_irqrestore(&dev_priv->vm_lock, flags);
 }
 
 void
 nv84_instmem_flush(struct drm_device *dev)
 {
        struct drm_nouveau_private *dev_priv = dev->dev_private;
+       unsigned long flags;
 
-       spin_lock(&dev_priv->ramin_lock);
+       spin_lock_irqsave(&dev_priv->vm_lock, flags);
        nv_wr32(dev, 0x070000, 0x00000001);
        if (!nv_wait(dev, 0x070000, 0x00000002, 0x00000000))
                NV_ERROR(dev, "PRAMIN flush timeout\n");
-       spin_unlock(&dev_priv->ramin_lock);
+       spin_unlock_irqrestore(&dev_priv->vm_lock, flags);
 }
 
index 4fd3432b5b8d36023a853101074bd74d90073c9a..6c26944907418b0d090d35758b8e22d7ce9de06c 100644 (file)
@@ -174,10 +174,11 @@ void
 nv50_vm_flush_engine(struct drm_device *dev, int engine)
 {
        struct drm_nouveau_private *dev_priv = dev->dev_private;
+       unsigned long flags;
 
-       spin_lock(&dev_priv->ramin_lock);
+       spin_lock_irqsave(&dev_priv->vm_lock, flags);
        nv_wr32(dev, 0x100c80, (engine << 16) | 1);
        if (!nv_wait(dev, 0x100c80, 0x00000001, 0x00000000))
                NV_ERROR(dev, "vm flush timeout: engine %d\n", engine);
-       spin_unlock(&dev_priv->ramin_lock);
+       spin_unlock_irqrestore(&dev_priv->vm_lock, flags);
 }
index 69af0ba7edd3c3edb5a6147d19f0950b2495bc7d..a179e6c55afbaeaaabcc71de6d834c5426abb6b9 100644 (file)
@@ -104,20 +104,27 @@ nvc0_vm_flush(struct nouveau_vm *vm)
        struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem;
        struct drm_device *dev = vm->dev;
        struct nouveau_vm_pgd *vpgd;
-       u32 r100c80, engine;
+       unsigned long flags;
+       u32 engine = (dev_priv->chan_vm == vm) ? 1 : 5;
 
        pinstmem->flush(vm->dev);
 
-       if (vm == dev_priv->chan_vm)
-               engine = 1;
-       else
-               engine = 5;
-
+       spin_lock_irqsave(&dev_priv->vm_lock, flags);
        list_for_each_entry(vpgd, &vm->pgd_list, head) {
-               r100c80 = nv_rd32(dev, 0x100c80);
+               /* looks like maybe a "free flush slots" counter, the
+                * faster you write to 0x100cbc to more it decreases
+                */
+               if (!nv_wait_ne(dev, 0x100c80, 0x00ff0000, 0x00000000)) {
+                       NV_ERROR(dev, "vm timeout 0: 0x%08x %d\n",
+                                nv_rd32(dev, 0x100c80), engine);
+               }
                nv_wr32(dev, 0x100cb8, vpgd->obj->vinst >> 8);
                nv_wr32(dev, 0x100cbc, 0x80000000 | engine);
-               if (!nv_wait(dev, 0x100c80, 0xffffffff, r100c80))
-                       NV_ERROR(dev, "vm flush timeout eng %d\n", engine);
+               /* wait for flush to be queued? */
+               if (!nv_wait(dev, 0x100c80, 0x00008000, 0x00008000)) {
+                       NV_ERROR(dev, "vm timeout 1: 0x%08x %d\n",
+                                nv_rd32(dev, 0x100c80), engine);
+               }
        }
+       spin_unlock_irqrestore(&dev_priv->vm_lock, flags);
 }
index 258fa5e7a2d9aa4b175807f73e3f55fa407986f6..7bd7456890974025c74bfce11f8516bad909eacf 100644 (file)
@@ -32,6 +32,7 @@
 #include "atom.h"
 #include "atom-names.h"
 #include "atom-bits.h"
+#include "radeon.h"
 
 #define ATOM_COND_ABOVE                0
 #define ATOM_COND_ABOVEOREQUAL 1
@@ -101,7 +102,9 @@ static void debug_print_spaces(int n)
 static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
                                 uint32_t index, uint32_t data)
 {
+       struct radeon_device *rdev = ctx->card->dev->dev_private;
        uint32_t temp = 0xCDCDCDCD;
+
        while (1)
                switch (CU8(base)) {
                case ATOM_IIO_NOP:
@@ -112,7 +115,8 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
                        base += 3;
                        break;
                case ATOM_IIO_WRITE:
-                       (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));
+                       if (rdev->family == CHIP_RV515)
+                               (void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));
                        ctx->card->ioreg_write(ctx->card, CU16(base + 1), temp);
                        base += 3;
                        break;
@@ -131,7 +135,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
                case ATOM_IIO_MOVE_INDEX:
                        temp &=
                            ~((0xFFFFFFFF >> (32 - CU8(base + 1))) <<
-                             CU8(base + 2));
+                             CU8(base + 3));
                        temp |=
                            ((index >> CU8(base + 2)) &
                             (0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base +
@@ -141,7 +145,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
                case ATOM_IIO_MOVE_DATA:
                        temp &=
                            ~((0xFFFFFFFF >> (32 - CU8(base + 1))) <<
-                             CU8(base + 2));
+                             CU8(base + 3));
                        temp |=
                            ((data >> CU8(base + 2)) &
                             (0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base +
@@ -151,7 +155,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
                case ATOM_IIO_MOVE_ATTR:
                        temp &=
                            ~((0xFFFFFFFF >> (32 - CU8(base + 1))) <<
-                             CU8(base + 2));
+                             CU8(base + 3));
                        temp |=
                            ((ctx->
                              io_attr >> CU8(base + 2)) & (0xFFFFFFFF >> (32 -
index 04b269d14a59102f9ad7b800203a3c6836e05f3d..7fd88497b93042eacae1736a3762fe61e60e044e 100644 (file)
@@ -738,13 +738,13 @@ typedef struct _ATOM_DIG_ENCODER_CONFIG_V3
 {
 #if ATOM_BIG_ENDIAN
     UCHAR ucReserved1:1;
-    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F)
+    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F)
     UCHAR ucReserved:3;
     UCHAR ucDPLinkRate:1;         // =0: 1.62Ghz, =1: 2.7Ghz
 #else
     UCHAR ucDPLinkRate:1;         // =0: 1.62Ghz, =1: 2.7Ghz
     UCHAR ucReserved:3;
-    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F)
+    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F)
     UCHAR ucReserved1:1;
 #endif
 }ATOM_DIG_ENCODER_CONFIG_V3;
@@ -785,13 +785,13 @@ typedef struct _ATOM_DIG_ENCODER_CONFIG_V4
 {
 #if ATOM_BIG_ENDIAN
     UCHAR ucReserved1:1;
-    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F)
+    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F)
     UCHAR ucReserved:2;
     UCHAR ucDPLinkRate:2;         // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz    <= Changed comparing to previous version
 #else
     UCHAR ucDPLinkRate:2;         // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz    <= Changed comparing to previous version
     UCHAR ucReserved:2;
-    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also refered as DIGA/B/C/D/E/F)
+    UCHAR ucDigSel:3;             // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F)
     UCHAR ucReserved1:1;
 #endif
 }ATOM_DIG_ENCODER_CONFIG_V4;
@@ -2126,7 +2126,7 @@ typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO
 // Structures used in FirmwareInfoTable
 /****************************************************************************/ 
 
-// usBIOSCapability Defintion:
+// usBIOSCapability Definition:
 // Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; 
 // Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; 
 // Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; 
@@ -3341,7 +3341,7 @@ typedef struct _ATOM_SPREAD_SPECTRUM_INFO
 /****************************************************************************/ 
 // Structure used in AnalogTV_InfoTable (Top level)
 /****************************************************************************/ 
-//ucTVBootUpDefaultStd definiton:
+//ucTVBootUpDefaultStd definition:
 
 //ATOM_TV_NTSC                1
 //ATOM_TV_NTSCJ               2
@@ -3816,7 +3816,7 @@ typedef  struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO
   UCHAR                    Reserved [6];                          // for potential expansion
 }ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO;
 
-//Related definitions, all records are differnt but they have a commond header
+//Related definitions, all records are different but they have a commond header
 typedef struct _ATOM_COMMON_RECORD_HEADER
 {
   UCHAR               ucRecordType;                      //An emun to indicate the record type
@@ -4365,14 +4365,14 @@ ucUMAChannelNumber:                     System memory channel numbers.
 ulCSR_M3_ARB_CNTL_DEFAULT[10]:    Arrays with values for CSR M3 arbiter for default
 ulCSR_M3_ARB_CNTL_UVD[10]:        Arrays with values for CSR M3 arbiter for UVD playback.
 ulCSR_M3_ARB_CNTL_FS3D[10]:       Arrays with values for CSR M3 arbiter for Full Screen 3D applications.
-sAvail_SCLK[5]:                   Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high  
+sAvail_SCLK[5]:                   Arrays to provide available list of SLCK and corresponding voltage, order from low to high  
 ulGMCRestoreResetTime:            GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. 
 ulMinimumNClk:                    Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. 
 ulIdleNClk:                       NCLK speed while memory runs in self-refresh state. Unit in 10kHz.
 ulDDR_DLL_PowerUpTime:            DDR PHY DLL power up time. Unit in ns.
 ulDDR_PLL_PowerUpTime:            DDR PHY PLL power up time. Unit in ns.
-usPCIEClkSSPercentage:            PCIE Clock Spred Spectrum Percentage in unit 0.01%; 100 mean 1%.
-usPCIEClkSSType:                  PCIE Clock Spred Spectrum Type. 0 for Down spread(default); 1 for Center spread.
+usPCIEClkSSPercentage:            PCIE Clock Spread Spectrum Percentage in unit 0.01%; 100 mean 1%.
+usPCIEClkSSType:                  PCIE Clock Spread Spectrum Type. 0 for Down spread(default); 1 for Center spread.
 usLvdsSSPercentage:               LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. 
 usLvdsSSpreadRateIn10Hz:          LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 
 usHDMISSPercentage:               HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%,  =0, use VBIOS default setting. 
@@ -4555,7 +4555,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3
 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LIT2AC 4
 
-//Byte aligned defintion for BIOS usage
+//Byte aligned definition for BIOS usage
 #define ATOM_S0_CRT1_MONOb0             0x01
 #define ATOM_S0_CRT1_COLORb0            0x02
 #define ATOM_S0_CRT1_MASKb0             (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0)
@@ -4621,7 +4621,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
 #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK   0xC0000000L
 
 
-//Byte aligned defintion for BIOS usage
+//Byte aligned definition for BIOS usage
 #define ATOM_S2_TV1_STANDARD_MASKb0     0x0F
 #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF
 #define ATOM_S2_DEVICE_DPMS_STATEb2     0x01
@@ -4671,7 +4671,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
 #define ATOM_S3_ALLOW_FAST_PWR_SWITCH   0x40000000L
 #define ATOM_S3_RQST_GPU_USE_MIN_PWR    0x80000000L
 
-//Byte aligned defintion for BIOS usage
+//Byte aligned definition for BIOS usage
 #define ATOM_S3_CRT1_ACTIVEb0           0x01
 #define ATOM_S3_LCD1_ACTIVEb0           0x02
 #define ATOM_S3_TV1_ACTIVEb0            0x04
@@ -4707,7 +4707,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
 #define ATOM_S4_LCD1_REFRESH_MASK       0x0000FF00L
 #define ATOM_S4_LCD1_REFRESH_SHIFT      8
 
-//Byte aligned defintion for BIOS usage
+//Byte aligned definition for BIOS usage
 #define ATOM_S4_LCD1_PANEL_ID_MASKb0     0x0FF
 #define ATOM_S4_LCD1_REFRESH_MASKb1              ATOM_S4_LCD1_PANEL_ID_MASKb0
 #define ATOM_S4_VRAM_INFO_MASKb2        ATOM_S4_LCD1_PANEL_ID_MASKb0
@@ -4786,7 +4786,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
 #define ATOM_S6_VRI_BRIGHTNESS_CHANGE       0x40000000L
 #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK  0x80000000L
 
-//Byte aligned defintion for BIOS usage
+//Byte aligned definition for BIOS usage
 #define ATOM_S6_DEVICE_CHANGEb0         0x01
 #define ATOM_S6_SCALER_CHANGEb0         0x02
 #define ATOM_S6_LID_CHANGEb0            0x04
@@ -5027,7 +5027,7 @@ typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION
 
 typedef struct _MEMORY_CLEAN_UP_PARAMETERS
 {
-  USHORT  usMemoryStart;                //in 8Kb boundry, offset from memory base address
+  USHORT  usMemoryStart;                //in 8Kb boundary, offset from memory base address
   USHORT  usMemorySize;                 //8Kb blocks aligned
 }MEMORY_CLEAN_UP_PARAMETERS;
 #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS
@@ -6855,7 +6855,7 @@ typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table
 /**************************************************************************/
 
 
-// Following definitions are for compatiblity issue in different SW components. 
+// Following definitions are for compatibility issue in different SW components. 
 #define ATOM_MASTER_DATA_TABLE_REVISION   0x01
 #define Object_Info                                                                                            Object_Header                   
 #define        AdjustARB_SEQ                                                                                   MC_InitParameter
index 10e41af6b0269d24210a945762ddead3e8a26786..529a3a704731ba39d77b423ac1ebe670697816f3 100644 (file)
@@ -531,6 +531,9 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
                        pll->flags |= RADEON_PLL_PREFER_HIGH_FB_DIV;
                else
                        pll->flags |= RADEON_PLL_PREFER_LOW_REF_DIV;
+
+               if (rdev->family < CHIP_RV770)
+                       pll->flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
        } else {
                pll->flags |= RADEON_PLL_LEGACY;
 
@@ -559,7 +562,6 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
                        if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
                                if (ss_enabled) {
                                        if (ss->refdiv) {
-                                               pll->flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
                                                pll->flags |= RADEON_PLL_USE_REF_DIV;
                                                pll->reference_div = ss->refdiv;
                                                if (ASIC_IS_AVIVO(rdev))
@@ -1009,6 +1011,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
        uint64_t fb_location;
        uint32_t fb_format, fb_pitch_pixels, tiling_flags;
        u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE);
+       u32 tmp;
        int r;
 
        /* no fb bound */
@@ -1137,6 +1140,15 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
        WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset,
               (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay);
 
+       /* pageflip setup */
+       /* make sure flip is at vb rather than hb */
+       tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
+       tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN;
+       WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
+
+       /* set pageflip to happen anywhere in vblank interval */
+       WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
+
        if (!atomic && fb && fb != crtc->fb) {
                radeon_fb = to_radeon_framebuffer(fb);
                rbo = gem_to_radeon_bo(radeon_fb->obj);
@@ -1167,6 +1179,7 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc,
        uint64_t fb_location;
        uint32_t fb_format, fb_pitch_pixels, tiling_flags;
        u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE;
+       u32 tmp;
        int r;
 
        /* no fb bound */
@@ -1294,6 +1307,15 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc,
        WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset,
               (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay);
 
+       /* pageflip setup */
+       /* make sure flip is at vb rather than hb */
+       tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
+       tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN;
+       WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
+
+       /* set pageflip to happen anywhere in vblank interval */
+       WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
+
        if (!atomic && fb && fb != crtc->fb) {
                radeon_fb = to_radeon_framebuffer(fb);
                rbo = gem_to_radeon_bo(radeon_fb->obj);
index 941080a779407bcdf5d1d071ed97399d7412a16f..c20eac3379e67f055f0d18ec89174ff4eb166e44 100644 (file)
@@ -43,17 +43,6 @@ static void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
 
 void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc)
 {
-       struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc];
-       u32 tmp;
-
-       /* make sure flip is at vb rather than hb */
-       tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
-       tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN;
-       WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
-
-       /* set pageflip to happen anywhere in vblank interval */
-       WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
-
        /* enable the pflip int */
        radeon_irq_kms_pflip_irq_get(rdev, crtc);
 }
@@ -131,11 +120,16 @@ void evergreen_pm_misc(struct radeon_device *rdev)
        struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx];
        struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage;
 
-       if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
-               if (voltage->voltage != rdev->pm.current_vddc) {
-                       radeon_atom_set_voltage(rdev, voltage->voltage);
+       if (voltage->type == VOLTAGE_SW) {
+               if (voltage->voltage && (voltage->voltage != rdev->pm.current_vddc)) {
+                       radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC);
                        rdev->pm.current_vddc = voltage->voltage;
-                       DRM_DEBUG("Setting: v: %d\n", voltage->voltage);
+                       DRM_DEBUG("Setting: vddc: %d\n", voltage->voltage);
+               }
+               if (voltage->vddci && (voltage->vddci != rdev->pm.current_vddci)) {
+                       radeon_atom_set_voltage(rdev, voltage->vddci, SET_VOLTAGE_TYPE_ASIC_VDDCI);
+                       rdev->pm.current_vddci = voltage->vddci;
+                       DRM_DEBUG("Setting: vddci: %d\n", voltage->vddci);
                }
        }
 }
@@ -359,7 +353,7 @@ static u32 evergreen_line_buffer_adjust(struct radeon_device *rdev,
                                        struct drm_display_mode *mode,
                                        struct drm_display_mode *other_mode)
 {
-       u32 tmp = 0;
+       u32 tmp;
        /*
         * Line Buffer Setup
         * There are 3 line buffers, each one shared by 2 display controllers.
@@ -369,64 +363,63 @@ static u32 evergreen_line_buffer_adjust(struct radeon_device *rdev,
         * first display controller
         *  0 - first half of lb (3840 * 2)
         *  1 - first 3/4 of lb (5760 * 2)
-        *  2 - whole lb (7680 * 2)
+        *  2 - whole lb (7680 * 2), other crtc must be disabled
         *  3 - first 1/4 of lb (1920 * 2)
         * second display controller
         *  4 - second half of lb (3840 * 2)
         *  5 - second 3/4 of lb (5760 * 2)
-        *  6 - whole lb (7680 * 2)
+        *  6 - whole lb (7680 * 2), other crtc must be disabled
         *  7 - last 1/4 of lb (1920 * 2)
         */
-       if (mode && other_mode) {
-               if (mode->hdisplay > other_mode->hdisplay) {
-                       if (mode->hdisplay > 2560)
-                               tmp = 1; /* 3/4 */
-                       else
-                               tmp = 0; /* 1/2 */
-               } else if (other_mode->hdisplay > mode->hdisplay) {
-                       if (other_mode->hdisplay > 2560)
-                               tmp = 3; /* 1/4 */
-                       else
-                               tmp = 0; /* 1/2 */
-               } else
+       /* this can get tricky if we have two large displays on a paired group
+        * of crtcs.  Ideally for multiple large displays we'd assign them to
+        * non-linked crtcs for maximum line buffer allocation.
+        */
+       if (radeon_crtc->base.enabled && mode) {
+               if (other_mode)
                        tmp = 0; /* 1/2 */
-       } else if (mode)
-               tmp = 2; /* whole */
-       else if (other_mode)
-               tmp = 3; /* 1/4 */
+               else
+                       tmp = 2; /* whole */
+       } else
+               tmp = 0;
 
        /* second controller of the pair uses second half of the lb */
        if (radeon_crtc->crtc_id % 2)
                tmp += 4;
        WREG32(DC_LB_MEMORY_SPLIT + radeon_crtc->crtc_offset, tmp);
 
-       switch (tmp) {
-       case 0:
-       case 4:
-       default:
-               if (ASIC_IS_DCE5(rdev))
-                       return 4096 * 2;
-               else
-                       return 3840 * 2;
-       case 1:
-       case 5:
-               if (ASIC_IS_DCE5(rdev))
-                       return 6144 * 2;
-               else
-                       return 5760 * 2;
-       case 2:
-       case 6:
-               if (ASIC_IS_DCE5(rdev))
-                       return 8192 * 2;
-               else
-                       return 7680 * 2;
-       case 3:
-       case 7:
-               if (ASIC_IS_DCE5(rdev))
-                       return 2048 * 2;
-               else
-                       return 1920 * 2;
+       if (radeon_crtc->base.enabled && mode) {
+               switch (tmp) {
+               case 0:
+               case 4:
+               default:
+                       if (ASIC_IS_DCE5(rdev))
+                               return 4096 * 2;
+                       else
+                               return 3840 * 2;
+               case 1:
+               case 5:
+                       if (ASIC_IS_DCE5(rdev))
+                               return 6144 * 2;
+                       else
+                               return 5760 * 2;
+               case 2:
+               case 6:
+                       if (ASIC_IS_DCE5(rdev))
+                               return 8192 * 2;
+                       else
+                               return 7680 * 2;
+               case 3:
+               case 7:
+                       if (ASIC_IS_DCE5(rdev))
+                               return 2048 * 2;
+                       else
+                               return 1920 * 2;
+               }
        }
+
+       /* controller not enabled, so no lb used */
+       return 0;
 }
 
 static u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev)
@@ -869,9 +862,15 @@ int evergreen_pcie_gart_enable(struct radeon_device *rdev)
                SYSTEM_ACCESS_MODE_NOT_IN_SYS |
                SYSTEM_APERTURE_UNMAPPED_ACCESS_PASS_THRU |
                EFFECTIVE_L1_TLB_SIZE(5) | EFFECTIVE_L1_QUEUE_SIZE(5);
-       WREG32(MC_VM_MD_L1_TLB0_CNTL, tmp);
-       WREG32(MC_VM_MD_L1_TLB1_CNTL, tmp);
-       WREG32(MC_VM_MD_L1_TLB2_CNTL, tmp);
+       if (rdev->flags & RADEON_IS_IGP) {
+               WREG32(FUS_MC_VM_MD_L1_TLB0_CNTL, tmp);
+               WREG32(FUS_MC_VM_MD_L1_TLB1_CNTL, tmp);
+               WREG32(FUS_MC_VM_MD_L1_TLB2_CNTL, tmp);
+       } else {
+               WREG32(MC_VM_MD_L1_TLB0_CNTL, tmp);
+               WREG32(MC_VM_MD_L1_TLB1_CNTL, tmp);
+               WREG32(MC_VM_MD_L1_TLB2_CNTL, tmp);
+       }
        WREG32(MC_VM_MB_L1_TLB0_CNTL, tmp);
        WREG32(MC_VM_MB_L1_TLB1_CNTL, tmp);
        WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp);
@@ -2587,7 +2586,7 @@ static inline u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
        u32 wptr, tmp;
 
        if (rdev->wb.enabled)
-               wptr = rdev->wb.wb[R600_WB_IH_WPTR_OFFSET/4];
+               wptr = le32_to_cpu(rdev->wb.wb[R600_WB_IH_WPTR_OFFSET/4]);
        else
                wptr = RREG32(IH_RB_WPTR);
 
@@ -2930,11 +2929,6 @@ static int evergreen_startup(struct radeon_device *rdev)
                rdev->asic->copy = NULL;
                dev_warn(rdev->dev, "failed blitter (%d) falling back to memcpy\n", r);
        }
-       /* XXX: ontario has problems blitting to gart at the moment */
-       if (rdev->family == CHIP_PALM) {
-               rdev->asic->copy = NULL;
-               radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size);
-       }
 
        /* allocate wb buffer */
        r = radeon_wb_init(rdev);
@@ -3047,9 +3041,6 @@ int evergreen_init(struct radeon_device *rdev)
 {
        int r;
 
-       r = radeon_dummy_page_init(rdev);
-       if (r)
-               return r;
        /* This don't do much */
        r = radeon_gem_init(rdev);
        if (r)
@@ -3161,7 +3152,6 @@ void evergreen_fini(struct radeon_device *rdev)
        radeon_atombios_fini(rdev);
        kfree(rdev->bios);
        rdev->bios = NULL;
-       radeon_dummy_page_fini(rdev);
 }
 
 static void evergreen_pcie_gen2_enable(struct radeon_device *rdev)
index edde90b3755437db33ba79a1e52c721db010e900..23d36417158dc0a13af01a2c131f60b462ed8806 100644 (file)
@@ -442,7 +442,7 @@ static inline int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u3
        }
        ib = p->ib->ptr;
        switch (reg) {
-       /* force following reg to 0 in an attemp to disable out buffer
+       /* force following reg to 0 in an attempt to disable out buffer
         * which will need us to better understand how it works to perform
         * security check on it (Jerome)
         */
index 9aaa3f0c9372135e8d55c0cb79e925f1656264e1..94533849927e4ef473fcbfc19deb8f67b28464e8 100644 (file)
 #define        MC_VM_MD_L1_TLB0_CNTL                           0x2654
 #define        MC_VM_MD_L1_TLB1_CNTL                           0x2658
 #define        MC_VM_MD_L1_TLB2_CNTL                           0x265C
+
+#define        FUS_MC_VM_MD_L1_TLB0_CNTL                       0x265C
+#define        FUS_MC_VM_MD_L1_TLB1_CNTL                       0x2660
+#define        FUS_MC_VM_MD_L1_TLB2_CNTL                       0x2664
+
 #define        MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR              0x203C
 #define        MC_VM_SYSTEM_APERTURE_HIGH_ADDR                 0x2038
 #define        MC_VM_SYSTEM_APERTURE_LOW_ADDR                  0x2034
index 8713731fa014b239bd286afc28124277352401d0..55a7f190027ee425a00a9f902c7526d3ee6adb43 100644 (file)
@@ -437,7 +437,7 @@ int r300_asic_reset(struct radeon_device *rdev)
        status = RREG32(R_000E40_RBBM_STATUS);
        dev_info(rdev->dev, "(%s:%d) RBBM_STATUS=0x%08X\n", __func__, __LINE__, status);
        /* resetting the CP seems to be problematic sometimes it end up
-        * hard locking the computer, but it's necessary for successfull
+        * hard locking the computer, but it's necessary for successful
         * reset more test & playing is needed on R3XX/R4XX to find a
         * reliable (if any solution)
         */
index f0bce399c9f32b53716d5bf05e221ac9f3225d0e..00c0d2ba22d3c956a79e92d9f56b006598add5da 100644 (file)
  * My guess is that there are two bits for each zbias primitive
  * (FILL, LINE, POINT).
  *  One to enable depth test and one for depth write.
- * Yet this doesnt explain why depth writes work ...
+ * Yet this doesn't explain why depth writes work ...
  */
 #define R300_RE_OCCLUSION_CNTL             0x42B4
 #      define R300_OCCLUSION_ON                (1<<1)
 #      define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST        (6  <<  11)
 #      define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR         (10 <<  11)
 
-/* NOTE: NEAREST doesnt seem to exist.
+/* NOTE: NEAREST doesn't seem to exist.
  * Im not seting MAG_FILTER_MASK and (3 << 11) on for all
  * anisotropy modes because that would void selected mag filter
  */
index be271c42de4db0619957eca16583cba133ecdaac..6f27593901c7110752b9b2f39267f04546f544eb 100644 (file)
@@ -587,7 +587,7 @@ void r600_pm_misc(struct radeon_device *rdev)
 
        if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
                if (voltage->voltage != rdev->pm.current_vddc) {
-                       radeon_atom_set_voltage(rdev, voltage->voltage);
+                       radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC);
                        rdev->pm.current_vddc = voltage->voltage;
                        DRM_DEBUG_DRIVER("Setting: v: %d\n", voltage->voltage);
                }
@@ -2509,9 +2509,6 @@ int r600_init(struct radeon_device *rdev)
 {
        int r;
 
-       r = radeon_dummy_page_init(rdev);
-       if (r)
-               return r;
        if (r600_debugfs_mc_info_init(rdev)) {
                DRM_ERROR("Failed to register debugfs file for mc !\n");
        }
@@ -2625,7 +2622,6 @@ void r600_fini(struct radeon_device *rdev)
        radeon_atombios_fini(rdev);
        kfree(rdev->bios);
        rdev->bios = NULL;
-       radeon_dummy_page_fini(rdev);
 }
 
 
@@ -3235,7 +3231,7 @@ static inline u32 r600_get_ih_wptr(struct radeon_device *rdev)
        u32 wptr, tmp;
 
        if (rdev->wb.enabled)
-               wptr = rdev->wb.wb[R600_WB_IH_WPTR_OFFSET/4];
+               wptr = le32_to_cpu(rdev->wb.wb[R600_WB_IH_WPTR_OFFSET/4]);
        else
                wptr = RREG32(IH_RB_WPTR);
 
index 3324620b2db66f1ebc275f296e23a575e6d5f488..fd18be9871ab5b897cc93c4a309a9081653f9489 100644 (file)
@@ -921,7 +921,7 @@ static inline int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx
                return 0;
        ib = p->ib->ptr;
        switch (reg) {
-       /* force following reg to 0 in an attemp to disable out buffer
+       /* force following reg to 0 in an attempt to disable out buffer
         * which will need us to better understand how it works to perform
         * security check on it (Jerome)
         */
index 50db6d62eec2509ef88d950de8ae74901cabf89e..f5ac7e788d813b9b744c08cdbc0cee72c0d0ec09 100644 (file)
@@ -334,7 +334,7 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod
        r600_hdmi_videoinfoframe(encoder, RGB, 0, 0, 0, 0,
                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
 
-       /* it's unknown what these bits do excatly, but it's indeed quite usefull for debugging */
+       /* it's unknown what these bits do excatly, but it's indeed quite useful for debugging */
        WREG32(offset+R600_HDMI_AUDIO_DEBUG_0, 0x00FFFFFF);
        WREG32(offset+R600_HDMI_AUDIO_DEBUG_1, 0x007FFFFF);
        WREG32(offset+R600_HDMI_AUDIO_DEBUG_2, 0x00000001);
index cfe3af1a7935009b7c2d7d634507ee80395aa481..ba643b5760542e0e6ad3298464be1e7505995739 100644 (file)
@@ -177,7 +177,7 @@ void radeon_pm_suspend(struct radeon_device *rdev);
 void radeon_pm_resume(struct radeon_device *rdev);
 void radeon_combios_get_power_modes(struct radeon_device *rdev);
 void radeon_atombios_get_power_modes(struct radeon_device *rdev);
-void radeon_atom_set_voltage(struct radeon_device *rdev, u16 level);
+void radeon_atom_set_voltage(struct radeon_device *rdev, u16 voltage_level, u8 voltage_type);
 void rs690_pm_info(struct radeon_device *rdev);
 extern int rv6xx_get_temp(struct radeon_device *rdev);
 extern int rv770_get_temp(struct radeon_device *rdev);
@@ -679,11 +679,11 @@ struct radeon_wb {
  * @sideport_bandwidth: sideport bandwidth the gpu has (MByte/s) (IGP)
  * @ht_bandwidth:       ht bandwidth the gpu has (MByte/s) (IGP)
  * @core_bandwidth:     core GPU bandwidth the gpu has (MByte/s) (IGP)
- * @sclk:              GPU clock Mhz (core bandwith depends of this clock)
+ * @sclk:              GPU clock Mhz (core bandwidth depends of this clock)
  * @needed_bandwidth:   current bandwidth needs
  *
  * It keeps track of various data needed to take powermanagement decision.
- * Bandwith need is used to determine minimun clock of the GPU and memory.
+ * Bandwidth need is used to determine minimun clock of the GPU and memory.
  * Equation between gpu/memory clock and available bandwidth is hw dependent
  * (type of memory, bus size, efficiency, ...)
  */
@@ -767,7 +767,9 @@ struct radeon_voltage {
        u8 vddci_id; /* index into vddci voltage table */
        bool vddci_enabled;
        /* r6xx+ sw */
-       u32 voltage;
+       u16 voltage;
+       /* evergreen+ vddci */
+       u16 vddci;
 };
 
 /* clock mode flags */
@@ -835,10 +837,12 @@ struct radeon_pm {
        int                     default_power_state_index;
        u32                     current_sclk;
        u32                     current_mclk;
-       u32                     current_vddc;
+       u16                     current_vddc;
+       u16                     current_vddci;
        u32                     default_sclk;
        u32                     default_mclk;
-       u32                     default_vddc;
+       u16                     default_vddc;
+       u16                     default_vddci;
        struct radeon_i2c_chan *i2c_bus;
        /* selected pm method */
        enum radeon_pm_method     pm_method;
index eb888ee5f674d518a82f90dbae5c752019b549c4..ca576191d0588bb23356b2c40d25afa668736cb8 100644 (file)
@@ -94,7 +94,7 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
                rdev->mc_rreg = &rs600_mc_rreg;
                rdev->mc_wreg = &rs600_mc_wreg;
        }
-       if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_HEMLOCK)) {
+       if (rdev->family >= CHIP_R600) {
                rdev->pciep_rreg = &r600_pciep_rreg;
                rdev->pciep_wreg = &r600_pciep_wreg;
        }
index 02d5c415f499304633eae62289a7eba1ff11c3a3..f116516bfef79df732c6a52f4f1b8c3a902485b3 100644 (file)
@@ -675,7 +675,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
                                                        ATOM_ENCODER_CAP_RECORD *cap_record;
                                                        u16 caps = 0;
 
-                                                       while (record->ucRecordType > 0 &&
+                                                       while (record->ucRecordSize > 0 &&
+                                                              record->ucRecordType > 0 &&
                                                               record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) {
                                                                switch (record->ucRecordType) {
                                                                case ATOM_ENCODER_CAP_RECORD_TYPE:
@@ -720,7 +721,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
                                                                        break;
                                                        }
 
-                                                       while (record->ucRecordType > 0 &&
+                                                       while (record->ucRecordSize > 0 &&
+                                                              record->ucRecordType > 0 &&
                                                               record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) {
                                                                switch (record->ucRecordType) {
                                                                case ATOM_I2C_RECORD_TYPE:
@@ -782,10 +784,9 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
                                                ATOM_HPD_INT_RECORD *hpd_record;
                                                ATOM_I2C_ID_CONFIG_ACCESS *i2c_config;
 
-                                               while (record->ucRecordType > 0
-                                                      && record->
-                                                      ucRecordType <=
-                                                      ATOM_MAX_OBJECT_RECORD_NUMBER) {
+                                               while (record->ucRecordSize > 0 &&
+                                                      record->ucRecordType > 0 &&
+                                                      record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) {
                                                        switch (record->ucRecordType) {
                                                        case ATOM_I2C_RECORD_TYPE:
                                                                i2c_record =
@@ -1598,9 +1599,10 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
                                                        memcpy((u8 *)edid, (u8 *)&fake_edid_record->ucFakeEDIDString[0],
                                                               fake_edid_record->ucFakeEDIDLength);
 
-                                                       if (drm_edid_is_valid(edid))
+                                                       if (drm_edid_is_valid(edid)) {
                                                                rdev->mode_info.bios_hardcoded_edid = edid;
-                                                       else
+                                                               rdev->mode_info.bios_hardcoded_edid_size = edid_size;
+                                                       } else
                                                                kfree(edid);
                                                }
                                        }
@@ -2175,24 +2177,27 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r
        }
 }
 
-static u16 radeon_atombios_get_default_vddc(struct radeon_device *rdev)
+static void radeon_atombios_get_default_voltages(struct radeon_device *rdev,
+                                                u16 *vddc, u16 *vddci)
 {
        struct radeon_mode_info *mode_info = &rdev->mode_info;
        int index = GetIndexIntoMasterTable(DATA, FirmwareInfo);
        u8 frev, crev;
        u16 data_offset;
        union firmware_info *firmware_info;
-       u16 vddc = 0;
+
+       *vddc = 0;
+       *vddci = 0;
 
        if (atom_parse_data_header(mode_info->atom_context, index, NULL,
                                   &frev, &crev, &data_offset)) {
                firmware_info =
                        (union firmware_info *)(mode_info->atom_context->bios +
                                                data_offset);
-               vddc = le16_to_cpu(firmware_info->info_14.usBootUpVDDCVoltage);
+               *vddc = le16_to_cpu(firmware_info->info_14.usBootUpVDDCVoltage);
+               if ((frev == 2) && (crev >= 2))
+                       *vddci = le16_to_cpu(firmware_info->info_22.usBootUpVDDCIVoltage);
        }
-
-       return vddc;
 }
 
 static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rdev,
@@ -2202,7 +2207,9 @@ static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rde
        int j;
        u32 misc = le32_to_cpu(non_clock_info->ulCapsAndSettings);
        u32 misc2 = le16_to_cpu(non_clock_info->usClassification);
-       u16 vddc = radeon_atombios_get_default_vddc(rdev);
+       u16 vddc, vddci;
+
+       radeon_atombios_get_default_voltages(rdev, &vddc, &vddci);
 
        rdev->pm.power_state[state_index].misc = misc;
        rdev->pm.power_state[state_index].misc2 = misc2;
@@ -2243,6 +2250,7 @@ static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rde
                        rdev->pm.default_sclk = rdev->pm.power_state[state_index].clock_info[0].sclk;
                        rdev->pm.default_mclk = rdev->pm.power_state[state_index].clock_info[0].mclk;
                        rdev->pm.default_vddc = rdev->pm.power_state[state_index].clock_info[0].voltage.voltage;
+                       rdev->pm.default_vddci = rdev->pm.power_state[state_index].clock_info[0].voltage.vddci;
                } else {
                        /* patch the table values with the default slck/mclk from firmware info */
                        for (j = 0; j < mode_index; j++) {
@@ -2285,6 +2293,8 @@ static bool radeon_atombios_parse_pplib_clock_info(struct radeon_device *rdev,
                        VOLTAGE_SW;
                rdev->pm.power_state[state_index].clock_info[mode_index].voltage.voltage =
                        le16_to_cpu(clock_info->evergreen.usVDDC);
+               rdev->pm.power_state[state_index].clock_info[mode_index].voltage.vddci =
+                       le16_to_cpu(clock_info->evergreen.usVDDCI);
        } else {
                sclk = le16_to_cpu(clock_info->r600.usEngineClockLow);
                sclk |= clock_info->r600.ucEngineClockHigh << 16;
@@ -2576,25 +2586,25 @@ union set_voltage {
        struct _SET_VOLTAGE_PARAMETERS_V2 v2;
 };
 
-void radeon_atom_set_voltage(struct radeon_device *rdev, u16 level)
+void radeon_atom_set_voltage(struct radeon_device *rdev, u16 voltage_level, u8 voltage_type)
 {
        union set_voltage args;
        int index = GetIndexIntoMasterTable(COMMAND, SetVoltage);
-       u8 frev, crev, volt_index = level;
+       u8 frev, crev, volt_index = voltage_level;
 
        if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev))
                return;
 
        switch (crev) {
        case 1:
-               args.v1.ucVoltageType = SET_VOLTAGE_TYPE_ASIC_VDDC;
+               args.v1.ucVoltageType = voltage_type;
                args.v1.ucVoltageMode = SET_ASIC_VOLTAGE_MODE_ALL_SOURCE;
                args.v1.ucVoltageIndex = volt_index;
                break;
        case 2:
-               args.v2.ucVoltageType = SET_VOLTAGE_TYPE_ASIC_VDDC;
+               args.v2.ucVoltageType = voltage_type;
                args.v2.ucVoltageMode = SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE;
-               args.v2.usVoltageLevel = cpu_to_le16(level);
+               args.v2.usVoltageLevel = cpu_to_le16(voltage_level);
                break;
        default:
                DRM_ERROR("Unknown table version %d, %d\n", frev, crev);
index cf602e2d0718ed21539dafd566405c77b3d9a4ac..8caf546c8e92f189d6576939081b7afa1a7a33c2 100644 (file)
@@ -2079,6 +2079,19 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
                                            DRM_MODE_CONNECTOR_DVII, &ddc_i2c,
                                            CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I,
                                            &hpd);
+               /* TV - TV DAC */
+               ddc_i2c.valid = false;
+               hpd.hpd = RADEON_HPD_NONE;
+               radeon_add_legacy_encoder(dev,
+                                         radeon_get_encoder_enum(dev,
+                                                               ATOM_DEVICE_TV1_SUPPORT,
+                                                               2),
+                                         ATOM_DEVICE_TV1_SUPPORT);
+               radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
+                                           DRM_MODE_CONNECTOR_SVIDEO,
+                                           &ddc_i2c,
+                                           CONNECTOR_OBJECT_ID_SVIDEO,
+                                           &hpd);
                break;
        default:
                DRM_INFO("Connector table: %d (invalid)\n",
index 2ef6d513506404075307c5f5865e091b8e4653ea..5f45fa12bb8b88471f5a301e44a893c97a6f96b3 100644 (file)
@@ -1199,7 +1199,7 @@ radeon_add_atom_connector(struct drm_device *dev,
        if (router->ddc_valid || router->cd_valid) {
                radeon_connector->router_bus = radeon_i2c_lookup(rdev, &router->i2c_info);
                if (!radeon_connector->router_bus)
-                       goto failed;
+                       DRM_ERROR("Failed to assign router i2c bus! Check dmesg for i2c errors.\n");
        }
        switch (connector_type) {
        case DRM_MODE_CONNECTOR_VGA:
@@ -1208,7 +1208,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("VGA: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                radeon_connector->dac_load_detect = true;
                drm_connector_attach_property(&radeon_connector->base,
@@ -1226,7 +1226,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("DVIA: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                radeon_connector->dac_load_detect = true;
                drm_connector_attach_property(&radeon_connector->base,
@@ -1249,7 +1249,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("DVI: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                subpixel_order = SubPixelHorizontalRGB;
                drm_connector_attach_property(&radeon_connector->base,
@@ -1290,7 +1290,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("HDMI: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                drm_connector_attach_property(&radeon_connector->base,
                                              rdev->mode_info.coherent_mode_property,
@@ -1329,10 +1329,10 @@ radeon_add_atom_connector(struct drm_device *dev,
                        else
                                radeon_dig_connector->dp_i2c_bus = radeon_i2c_create_dp(dev, i2c_bus, "DP-auxch");
                        if (!radeon_dig_connector->dp_i2c_bus)
-                               goto failed;
+                               DRM_ERROR("DP: Failed to assign dp ddc bus! Check dmesg for i2c errors.\n");
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                subpixel_order = SubPixelHorizontalRGB;
                drm_connector_attach_property(&radeon_connector->base,
@@ -1381,7 +1381,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("LVDS: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                drm_connector_attach_property(&radeon_connector->base,
                                              dev->mode_config.scaling_mode_property,
@@ -1457,7 +1457,7 @@ radeon_add_legacy_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("VGA: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                radeon_connector->dac_load_detect = true;
                drm_connector_attach_property(&radeon_connector->base,
@@ -1475,7 +1475,7 @@ radeon_add_legacy_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("DVIA: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                radeon_connector->dac_load_detect = true;
                drm_connector_attach_property(&radeon_connector->base,
@@ -1493,7 +1493,7 @@ radeon_add_legacy_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("DVI: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                if (connector_type == DRM_MODE_CONNECTOR_DVII) {
                        radeon_connector->dac_load_detect = true;
@@ -1538,7 +1538,7 @@ radeon_add_legacy_connector(struct drm_device *dev,
                if (i2c_bus->valid) {
                        radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus);
                        if (!radeon_connector->ddc_bus)
-                               goto failed;
+                               DRM_ERROR("LVDS: Failed to assign ddc bus! Check dmesg for i2c errors.\n");
                }
                drm_connector_attach_property(&radeon_connector->base,
                                              dev->mode_config.scaling_mode_property,
@@ -1567,9 +1567,4 @@ radeon_add_legacy_connector(struct drm_device *dev,
                                radeon_legacy_backlight_init(radeon_encoder, connector);
                }
        }
-       return;
-
-failed:
-       drm_connector_cleanup(connector);
-       kfree(connector);
 }
index 3d599e33b9cc2884df314038d22de5a68945a546..75867792a4e2cfee86426304b47b995372f4c00e 100644 (file)
@@ -244,7 +244,7 @@ void radeon_write_agp_base(drm_radeon_private_t *dev_priv, u64 agp_base)
        u32 agp_base_lo = agp_base & 0xffffffff;
        u32 r6xx_agp_base = (agp_base >> 22) & 0x3ffff;
 
-       /* R6xx/R7xx must be aligned to a 4MB boundry */
+       /* R6xx/R7xx must be aligned to a 4MB boundary */
        if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RV770)
                RADEON_WRITE(R700_MC_VM_AGP_BASE, r6xx_agp_base);
        else if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600)
index 017ac54920fb4f3fb58f7c0f9a57e1efb46450f0..bdf2fa1189ae7a3c1aa5e1ae41a1ded25c96b9f7 100644 (file)
@@ -226,7 +226,7 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
                y += crtc->y;
                DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y);
 
-               /* avivo cursor image can't end on 128 pixel boundry or
+               /* avivo cursor image can't end on 128 pixel boundary or
                 * go past the end of the frame if both crtcs are enabled
                 */
                list_for_each_entry(crtc_p, &crtc->dev->mode_config.crtc_list, head) {
index f0209be7a34b13f0eeabe39693d755f61f1b35db..890217e678d37f7591e7004bb4253e0f06f2d998 100644 (file)
@@ -262,7 +262,7 @@ int radeon_wb_init(struct radeon_device *rdev)
  * Note: GTT start, end, size should be initialized before calling this
  * function on AGP platform.
  *
- * Note: We don't explictly enforce VRAM start to be aligned on VRAM size,
+ * Note: We don't explicitly enforce VRAM start to be aligned on VRAM size,
  * this shouldn't be a problem as we are using the PCI aperture as a reference.
  * Otherwise this would be needed for rv280, all r3xx, and all r4xx, but
  * not IGP.
index 4be58793dc17338ea3e8e5917b2c79f68430679f..bdbab5c43bdc05f3305155d35303ab1bfdf25a5e 100644 (file)
@@ -1492,7 +1492,7 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
  *
  * \return Flags, or'ed together as follows:
  *
- * DRM_SCANOUTPOS_VALID = Query successfull.
+ * DRM_SCANOUTPOS_VALID = Query successful.
  * DRM_SCANOUTPOS_INVBL = Inside vblank.
  * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of
  * this flag means that returned position may be offset by a constant but
index 5cba46b9779ac0d2c30745860727d69e36f190b6..a1b59ca96d01ab7d774b6370656c5825b567131b 100644 (file)
@@ -271,7 +271,7 @@ typedef struct drm_radeon_private {
 
        int have_z_offset;
 
-       /* starting from here on, data is preserved accross an open */
+       /* starting from here on, data is preserved across an open */
        uint32_t flags;         /* see radeon_chip_flags */
        resource_size_t fb_aper_offset;
 
index 9e59868d354e4a83e6f06d40663171416151a1f5..bbcd1dd7bac0eb27057f44b39add48528f701ffd 100644 (file)
@@ -79,7 +79,7 @@ static bool radeon_fence_poll_locked(struct radeon_device *rdev)
                        scratch_index = R600_WB_EVENT_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base;
                else
                        scratch_index = RADEON_WB_SCRATCH_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base;
-               seq = rdev->wb.wb[scratch_index/4];
+               seq = le32_to_cpu(rdev->wb.wb[scratch_index/4]);
        } else
                seq = RREG32(rdev->fence_drv.scratch_reg);
        if (seq != rdev->fence_drv.last_seq) {
index f0534ef2f3311d20f57976ff683dd24619127a51..8a955bbdb6082521c725b81bbf5ee0e34e7934b6 100644 (file)
@@ -285,4 +285,6 @@ void radeon_gart_fini(struct radeon_device *rdev)
        rdev->gart.pages = NULL;
        rdev->gart.pages_addr = NULL;
        rdev->gart.ttm_alloced = NULL;
+
+       radeon_dummy_page_fini(rdev);
 }
index ded2a45bc95cd5f2845b9d32009d98dc00105c5f..983cbac75af0159d493c7b81dbe2da1fd90866e6 100644 (file)
@@ -1062,7 +1062,7 @@ void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus,
                *val = in_buf[0];
                DRM_DEBUG("val = 0x%02x\n", *val);
        } else {
-               DRM_ERROR("i2c 0x%02x 0x%02x read failed\n",
+               DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n",
                          addr, *val);
        }
 }
@@ -1084,7 +1084,7 @@ void radeon_i2c_put_byte(struct radeon_i2c_chan *i2c_bus,
        out_buf[1] = val;
 
        if (i2c_transfer(&i2c_bus->adapter, &msg, 1) != 1)
-               DRM_ERROR("i2c 0x%02x 0x%02x write failed\n",
+               DRM_DEBUG("i2c 0x%02x 0x%02x write failed\n",
                          addr, val);
 }
 
@@ -1096,6 +1096,9 @@ void radeon_router_select_ddc_port(struct radeon_connector *radeon_connector)
        if (!radeon_connector->router.ddc_valid)
                return;
 
+       if (!radeon_connector->router_bus)
+               return;
+
        radeon_i2c_get_byte(radeon_connector->router_bus,
                            radeon_connector->router.i2c_addr,
                            0x3, &val);
@@ -1121,6 +1124,9 @@ void radeon_router_select_cd_port(struct radeon_connector *radeon_connector)
        if (!radeon_connector->router.cd_valid)
                return;
 
+       if (!radeon_connector->router_bus)
+               return;
+
        radeon_i2c_get_byte(radeon_connector->router_bus,
                            radeon_connector->router.i2c_addr,
                            0x3, &val);
index bf7d4c061451cc35c396cee0d739c40dca6f33eb..bd58af658581b3d3672aa363f7e5c7418abaaefa 100644 (file)
@@ -221,6 +221,22 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
                        return -EINVAL;
                }
                break;
+       case RADEON_INFO_NUM_TILE_PIPES:
+               if (rdev->family >= CHIP_CAYMAN)
+                       value = rdev->config.cayman.max_tile_pipes;
+               else if (rdev->family >= CHIP_CEDAR)
+                       value = rdev->config.evergreen.max_tile_pipes;
+               else if (rdev->family >= CHIP_RV770)
+                       value = rdev->config.rv770.max_tile_pipes;
+               else if (rdev->family >= CHIP_R600)
+                       value = rdev->config.r600.max_tile_pipes;
+               else {
+                       return -EINVAL;
+               }
+               break;
+       case RADEON_INFO_FUSION_GART_WORKING:
+               value = 1;
+               break;
        default:
                DRM_DEBUG_KMS("Invalid request %d\n", info->request);
                return -EINVAL;
index 5b54268ed6b2c9e881b664e04ba05d421eea404d..2f46e0c8df53256a9bf5d6271b55141be2f8b35a 100644 (file)
@@ -269,7 +269,7 @@ static const struct drm_encoder_helper_funcs radeon_legacy_lvds_helper_funcs = {
        .disable = radeon_legacy_encoder_disable,
 };
 
-#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
+#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
 
 #define MAX_RADEON_LEVEL 0xFF
 
index 7f8e778dba460d512f271867fe700ffb6fa87a7b..ede6c13628f27c06c0a106963c2c9b3a6a532b8b 100644 (file)
@@ -87,7 +87,7 @@ static inline void radeon_bo_unreserve(struct radeon_bo *bo)
  * Returns current GPU offset of the object.
  *
  * Note: object should either be pinned or reserved when calling this
- * function, it might be usefull to add check for this for debugging.
+ * function, it might be useful to add check for this for debugging.
  */
 static inline u64 radeon_bo_gpu_offset(struct radeon_bo *bo)
 {
index 08de669e025ab9bddf0bd118a457288bbb2b49e0..86eda1ea94dfc7a250d7add83ad2b25b8ae0dd76 100644 (file)
@@ -23,6 +23,7 @@
 #include "drmP.h"
 #include "radeon.h"
 #include "avivod.h"
+#include "atom.h"
 #ifdef CONFIG_ACPI
 #include <linux/acpi.h>
 #endif
@@ -535,7 +536,11 @@ void radeon_pm_resume(struct radeon_device *rdev)
        /* set up the default clocks if the MC ucode is loaded */
        if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) {
                if (rdev->pm.default_vddc)
-                       radeon_atom_set_voltage(rdev, rdev->pm.default_vddc);
+                       radeon_atom_set_voltage(rdev, rdev->pm.default_vddc,
+                                               SET_VOLTAGE_TYPE_ASIC_VDDC);
+               if (rdev->pm.default_vddci)
+                       radeon_atom_set_voltage(rdev, rdev->pm.default_vddci,
+                                               SET_VOLTAGE_TYPE_ASIC_VDDCI);
                if (rdev->pm.default_sclk)
                        radeon_set_engine_clock(rdev, rdev->pm.default_sclk);
                if (rdev->pm.default_mclk)
@@ -548,6 +553,7 @@ void radeon_pm_resume(struct radeon_device *rdev)
        rdev->pm.current_sclk = rdev->pm.default_sclk;
        rdev->pm.current_mclk = rdev->pm.default_mclk;
        rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage;
+       rdev->pm.current_vddci = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.vddci;
        if (rdev->pm.pm_method == PM_METHOD_DYNPM
            && rdev->pm.dynpm_state == DYNPM_STATE_SUSPENDED) {
                rdev->pm.dynpm_state = DYNPM_STATE_ACTIVE;
@@ -585,7 +591,8 @@ int radeon_pm_init(struct radeon_device *rdev)
                /* set up the default clocks if the MC ucode is loaded */
                if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) {
                        if (rdev->pm.default_vddc)
-                               radeon_atom_set_voltage(rdev, rdev->pm.default_vddc);
+                               radeon_atom_set_voltage(rdev, rdev->pm.default_vddc,
+                                                       SET_VOLTAGE_TYPE_ASIC_VDDC);
                        if (rdev->pm.default_sclk)
                                radeon_set_engine_clock(rdev, rdev->pm.default_sclk);
                        if (rdev->pm.default_mclk)
index bbc9cd8233346e1a65df6657c324e1c7313f1678..c6776e48fdde44d678880a1af436866cb24c8740 100644 (file)
@@ -248,7 +248,7 @@ void radeon_ib_pool_fini(struct radeon_device *rdev)
 void radeon_ring_free_size(struct radeon_device *rdev)
 {
        if (rdev->wb.enabled)
-               rdev->cp.rptr = rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4];
+               rdev->cp.rptr = le32_to_cpu(rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4]);
        else {
                if (rdev->family >= CHIP_R600)
                        rdev->cp.rptr = RREG32(R600_CP_RB_RPTR);
index 4ae5a3d1074e19c9a203f7433cfc12e1c7724042..92e7ea73b7c5eae76536f5bbab183e513f1426b8 100644 (file)
@@ -980,7 +980,7 @@ static void radeon_cp_dispatch_clear(struct drm_device * dev,
        }
 
        /* hyper z clear */
-       /* no docs available, based on reverse engeneering by Stephane Marchesin */
+       /* no docs available, based on reverse engineering by Stephane Marchesin */
        if ((flags & (RADEON_DEPTH | RADEON_STENCIL))
            && (flags & RADEON_CLEAR_FASTZ)) {
 
index af0da4ae3f55acb5223f2791940ec90c1db20bce..92f1900dc7caf10f14dba34edec2e34b721ff09d 100644 (file)
@@ -708,6 +708,7 @@ r600 0x9400
 0x00028D0C DB_RENDER_CONTROL
 0x00028D10 DB_RENDER_OVERRIDE
 0x0002880C DB_SHADER_CONTROL
+0x00028D28 DB_SRESULTS_COMPARE_STATE0
 0x00028D2C DB_SRESULTS_COMPARE_STATE1
 0x00028430 DB_STENCILREFMASK
 0x00028434 DB_STENCILREFMASK_BF
index 19763f5df5e15874ba2a21156a1f4c8169475e76..6e3b11e5abbe5a83842e4e9b1b49d6531e460d92 100644 (file)
@@ -48,17 +48,6 @@ int rs600_mc_wait_for_idle(struct radeon_device *rdev);
 
 void rs600_pre_page_flip(struct radeon_device *rdev, int crtc)
 {
-       struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc];
-       u32 tmp;
-
-       /* make sure flip is at vb rather than hb */
-       tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
-       tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN;
-       WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
-
-       /* set pageflip to happen anywhere in vblank interval */
-       WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
-
        /* enable the pflip int */
        radeon_irq_kms_pflip_irq_get(rdev, crtc);
 }
@@ -125,7 +114,7 @@ void rs600_pm_misc(struct radeon_device *rdev)
                                udelay(voltage->delay);
                }
        } else if (voltage->type == VOLTAGE_VDDC)
-               radeon_atom_set_voltage(rdev, voltage->vddc_id);
+               radeon_atom_set_voltage(rdev, voltage->vddc_id, SET_VOLTAGE_TYPE_ASIC_VDDC);
 
        dyn_pwrmgt_sclk_length = RREG32_PLL(DYN_PWRMGT_SCLK_LENGTH);
        dyn_pwrmgt_sclk_length &= ~REDUCED_POWER_SCLK_HILEN(0xf);
index b974ac7df8dfad511bad054bf121388842519435..ef8a5babe9f7679fce662775faa98afb4f1002a2 100644 (file)
@@ -106,7 +106,7 @@ void rv770_pm_misc(struct radeon_device *rdev)
 
        if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
                if (voltage->voltage != rdev->pm.current_vddc) {
-                       radeon_atom_set_voltage(rdev, voltage->voltage);
+                       radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC);
                        rdev->pm.current_vddc = voltage->voltage;
                        DRM_DEBUG("Setting: v: %d\n", voltage->voltage);
                }
@@ -1255,9 +1255,6 @@ int rv770_init(struct radeon_device *rdev)
 {
        int r;
 
-       r = radeon_dummy_page_init(rdev);
-       if (r)
-               return r;
        /* This don't do much */
        r = radeon_gem_init(rdev);
        if (r)
@@ -1372,7 +1369,6 @@ void rv770_fini(struct radeon_device *rdev)
        radeon_atombios_fini(rdev);
        kfree(rdev->bios);
        rdev->bios = NULL;
-       radeon_dummy_page_fini(rdev);
 }
 
 static void rv770_pcie_gen2_enable(struct radeon_device *rdev)
index 0b6a55ac2f871c8c16f6cb4e62bbcad312eb6c57..2e618b5ac465de3bb83348c2791becbc43d04bac 100644 (file)
@@ -1168,7 +1168,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
                uint32_t page_alignment,
                unsigned long buffer_start,
                bool interruptible,
-               struct file *persistant_swap_storage,
+               struct file *persistent_swap_storage,
                size_t acc_size,
                void (*destroy) (struct ttm_buffer_object *))
 {
@@ -1211,7 +1211,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
        bo->priv_flags = 0;
        bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED);
        bo->seq_valid = false;
-       bo->persistant_swap_storage = persistant_swap_storage;
+       bo->persistent_swap_storage = persistent_swap_storage;
        bo->acc_size = acc_size;
        atomic_inc(&bo->glob->bo_count);
 
@@ -1260,7 +1260,7 @@ int ttm_bo_create(struct ttm_bo_device *bdev,
                        uint32_t page_alignment,
                        unsigned long buffer_start,
                        bool interruptible,
-                       struct file *persistant_swap_storage,
+                       struct file *persistent_swap_storage,
                        struct ttm_buffer_object **p_bo)
 {
        struct ttm_buffer_object *bo;
@@ -1282,7 +1282,7 @@ int ttm_bo_create(struct ttm_bo_device *bdev,
 
        ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment,
                                buffer_start, interruptible,
-                               persistant_swap_storage, acc_size, NULL);
+                               persistent_swap_storage, acc_size, NULL);
        if (likely(ret == 0))
                *p_bo = bo;
 
@@ -1863,7 +1863,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
        if (bo->bdev->driver->swap_notify)
                bo->bdev->driver->swap_notify(bo);
 
-       ret = ttm_tt_swapout(bo->ttm, bo->persistant_swap_storage);
+       ret = ttm_tt_swapout(bo->ttm, bo->persistent_swap_storage);
 out:
 
        /**
index 737a2a2e46a58ca7ee66cbf67c0afd0583275ff6..9d9d92945f8c5e515adc87dc40e9f4b1f97427bc 100644 (file)
@@ -683,22 +683,14 @@ int ttm_get_pages(struct list_head *pages, int flags,
                        gfp_flags |= GFP_HIGHUSER;
 
                for (r = 0; r < count; ++r) {
-                       if ((flags & TTM_PAGE_FLAG_DMA32) && dma_address) {
-                               void *addr;
-                               addr = dma_alloc_coherent(NULL, PAGE_SIZE,
-                                                         &dma_address[r],
-                                                         gfp_flags);
-                               if (addr == NULL)
-                                       return -ENOMEM;
-                               p = virt_to_page(addr);
-                       } else
-                               p = alloc_page(gfp_flags);
+                       p = alloc_page(gfp_flags);
                        if (!p) {
 
                                printk(KERN_ERR TTM_PFX
                                       "Unable to allocate page.");
                                return -ENOMEM;
                        }
+
                        list_add(&p->lru, pages);
                }
                return 0;
@@ -746,24 +738,12 @@ void ttm_put_pages(struct list_head *pages, unsigned page_count, int flags,
        unsigned long irq_flags;
        struct ttm_page_pool *pool = ttm_get_pool(flags, cstate);
        struct page *p, *tmp;
-       unsigned r;
 
        if (pool == NULL) {
                /* No pool for this memory type so free the pages */
 
-               r = page_count-1;
                list_for_each_entry_safe(p, tmp, pages, lru) {
-                       if ((flags & TTM_PAGE_FLAG_DMA32) && dma_address) {
-                               void *addr = page_address(p);
-                               WARN_ON(!addr || !dma_address[r]);
-                               if (addr)
-                                       dma_free_coherent(NULL, PAGE_SIZE,
-                                                         addr,
-                                                         dma_address[r]);
-                               dma_address[r] = 0;
-                       } else
-                               __free_page(p);
-                       r--;
+                       __free_page(p);
                }
                /* Make the pages list empty */
                INIT_LIST_HEAD(pages);
index 86d5b1745a45a09cc0dd977a0cf6b1b655bc99cd..90e23e0bfadb054ffbcf8ee65c6cbac98881790a 100644 (file)
@@ -332,7 +332,7 @@ void ttm_tt_destroy(struct ttm_tt *ttm)
                ttm_tt_free_page_directory(ttm);
        }
 
-       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP) &&
+       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP) &&
            ttm->swap_storage)
                fput(ttm->swap_storage);
 
@@ -503,7 +503,7 @@ static int ttm_tt_swapin(struct ttm_tt *ttm)
                page_cache_release(from_page);
        }
 
-       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP))
+       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP))
                fput(swap_storage);
        ttm->swap_storage = NULL;
        ttm->page_flags &= ~TTM_PAGE_FLAG_SWAPPED;
@@ -514,7 +514,7 @@ out_err:
        return ret;
 }
 
-int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
+int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
 {
        struct address_space *swap_space;
        struct file *swap_storage;
@@ -540,7 +540,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
                return 0;
        }
 
-       if (!persistant_swap_storage) {
+       if (!persistent_swap_storage) {
                swap_storage = shmem_file_setup("ttm swap",
                                                ttm->num_pages << PAGE_SHIFT,
                                                0);
@@ -549,7 +549,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
                        return PTR_ERR(swap_storage);
                }
        } else
-               swap_storage = persistant_swap_storage;
+               swap_storage = persistent_swap_storage;
 
        swap_space = swap_storage->f_path.dentry->d_inode->i_mapping;
 
@@ -577,12 +577,12 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
        ttm_tt_free_alloced_pages(ttm);
        ttm->swap_storage = swap_storage;
        ttm->page_flags |= TTM_PAGE_FLAG_SWAPPED;
-       if (persistant_swap_storage)
-               ttm->page_flags |= TTM_PAGE_FLAG_PERSISTANT_SWAP;
+       if (persistent_swap_storage)
+               ttm->page_flags |= TTM_PAGE_FLAG_PERSISTENT_SWAP;
 
        return 0;
 out_err:
-       if (!persistant_swap_storage)
+       if (!persistent_swap_storage)
                fput(swap_storage);
 
        return ret;
index cceeb42789b655e82e5431d9810b9fa033f883fd..dfe32e62bd90cc083a6667a3090b02c694984e92 100644 (file)
@@ -245,7 +245,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
                /* TODO handle none page aligned offsets */
                /* TODO handle partial uploads and pitch != 256 */
                /* TODO handle more then one copy (size != 64) */
-               DRM_ERROR("lazy programer, cant handle wierd stuff\n");
+               DRM_ERROR("lazy programmer, can't handle weird stuff\n");
                return;
        }
 
index 70e60a4bb678e0c1ed669badc4ceb3e69be5c9e5..419917955bf6cef7466aee105bb1c322c4e92468 100644 (file)
@@ -5,6 +5,7 @@ config STUB_POULSBO
        # Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled
        # but for select to work, need to select ACPI_VIDEO's dependencies, ick
        select BACKLIGHT_CLASS_DEVICE if ACPI
+       select VIDEO_OUTPUT_CONTROL if ACPI
        select INPUT if ACPI
        select ACPI_VIDEO if ACPI
        select THERMAL if ACPI
index ace2b1623b214671d6e49e115d4b3c2f3755230e..be8d4cb5861cbce7999a2c09bc7305c1ba3b558f 100644 (file)
@@ -151,7 +151,7 @@ static inline void vga_irq_set_state(struct vga_device *vgadev, bool state)
 static void vga_check_first_use(void)
 {
        /* we should inform all GPUs in the system that
-        * VGA arb has occured and to try and disable resources
+        * VGA arb has occurred and to try and disable resources
         * if they can */
        if (!vga_arbiter_used) {
                vga_arbiter_used = true;
@@ -774,7 +774,7 @@ static ssize_t vga_arb_read(struct file *file, char __user * buf,
         */
        spin_lock_irqsave(&vga_lock, flags);
 
-       /* If we are targetting the default, use it */
+       /* If we are targeting the default, use it */
        pdev = priv->target;
        if (pdev == NULL || pdev == PCI_INVALID_CARD) {
                spin_unlock_irqrestore(&vga_lock, flags);
index b7ec4057841d15971840d4c31bd1190d14ebf2bc..9de9e97149ec313a7cbffa4fd01f527e1cf7fe28 100644 (file)
@@ -185,7 +185,7 @@ config HID_EZKEY
        Support for Ezkey BTC 8193 keyboard.
 
 config HID_KEYTOUCH
-       tristate "Keyoutch HID devices"
+       tristate "Keytouch HID devices"
        depends on USB_HID
        ---help---
        Support for Keytouch HID devices not fully compliant with
@@ -340,10 +340,17 @@ config HID_NTRIG
        Support for N-Trig touch screen.
 
 config HID_ORTEK
-       tristate "Ortek PKB-1700/WKB-2000 wireless keyboard and mouse trackpad"
+       tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad"
        depends on USB_HID
        ---help---
-       Support for Ortek PKB-1700/WKB-2000 wireless keyboard + mouse trackpad.
+       There are certain devices which have LogicalMaximum wrong in the keyboard
+       usage page of their report descriptor. The most prevailing ones so far
+       are manufactured by Ortek, thus the name of the driver. Currently
+       supported devices by this driver are
+
+          - Ortek PKB-1700
+          - Ortek WKB-2000
+          - Skycable wireless presenter
 
 config HID_PANTHERLORD
        tristate "Pantherlord/GreenAsia game controller"
index e9687768a335d5461e1ed7785d0d8bd551af3724..408c4bea4d8d5278a9004af757e3bb11cc03695f 100644 (file)
@@ -306,7 +306,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
        case HID_GLOBAL_ITEM_TAG_PUSH:
 
                if (parser->global_stack_ptr == HID_GLOBAL_STACK_SIZE) {
-                       dbg_hid("global enviroment stack overflow\n");
+                       dbg_hid("global environment stack overflow\n");
                        return -1;
                }
 
@@ -317,7 +317,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
        case HID_GLOBAL_ITEM_TAG_POP:
 
                if (!parser->global_stack_ptr) {
-                       dbg_hid("global enviroment stack underflow\n");
+                       dbg_hid("global environment stack underflow\n");
                        return -1;
                }
 
@@ -1449,8 +1449,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
index 555382fc74179c8bb5e2c3bc3deffe9653132b36..bae48745bb4281da2d77ee429882fa52093e60e2 100644 (file)
@@ -341,7 +341,7 @@ static const struct hid_usage_entry hid_usage_table[] = {
     { 0x85, 0x83, "DesignCapacity" },
     { 0x85, 0x85, "ManufacturerDate" },
     { 0x85, 0x89, "iDeviceChemistry" },
-    { 0x85, 0x8b, "Rechargable" },
+    { 0x85, 0x8b, "Rechargeable" },
     { 0x85, 0x8f, "iOEMInformation" },
     { 0x85, 0x8d, "CapacityGranularity1" },
     { 0x85, 0xd0, "ACPresent" },
index 65ac53d7aeccf86a9f3a0c1e7a6a9c00af0a470f..00a94b535d287cb6fc498dfef9a4a881fd323480 100644 (file)
 #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01
 
 #define USB_VENDOR_ID_CH               0x068e
+#define USB_DEVICE_ID_CH_PRO_THROTTLE  0x00f1
 #define USB_DEVICE_ID_CH_PRO_PEDALS    0x00f2
 #define USB_DEVICE_ID_CH_COMBATSTICK   0x00f4
 #define USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE       0x0051
 #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE        0x0001
 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE       0x0600
 
+#define USB_VENDOR_ID_SKYCABLE                 0x1223
+#define        USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER       0x3F07
+
 #define USB_VENDOR_ID_SONY                     0x054c
 #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE      0x024b
 #define USB_DEVICE_ID_SONY_PS3_CONTROLLER      0x0268
index 90d0ef2c92be9030664d348e6f59ad05af7c7dad..f099079ca6b9f8819210aca297bfe38fa8422e45 100644 (file)
@@ -73,6 +73,8 @@ static const struct dev_type devices[] = {
        { 0x046d, 0xc293, ff_joystick },
        { 0x046d, 0xc294, ff_wheel },
        { 0x046d, 0xc295, ff_joystick },
+       { 0x046d, 0xc298, ff_wheel },
+       { 0x046d, 0xc299, ff_wheel },
        { 0x046d, 0xca03, ff_wheel },
 };
 
index 318cc40df92d6c8ba4ab39535f9c3e9a793da315..0ec91c18a4216a52a4a3c7d85292a22f61a6e828 100644 (file)
@@ -76,7 +76,7 @@ MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state fie
  * This is true when single_touch_id is equal to NO_TOUCHES. If multiple touches
  * are down and the touch providing for single touch emulation is lifted,
  * single_touch_id is equal to SINGLE_TOUCH_UP. While single touch emulation is
- * occuring, single_touch_id corresponds with the tracking id of the touch used.
+ * occurring, single_touch_id corresponds with the tracking id of the touch used.
  */
 #define NO_TOUCHES -1
 #define SINGLE_TOUCH_UP -2
@@ -418,6 +418,8 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
                        input_set_abs_params(input, ABS_MT_POSITION_Y, -2456,
                                2565, 4, 0);
                }
+
+               input_set_events_per_packet(input, 60);
        }
 
        if (report_undeciphered) {
index f9b7dd4f607f9c7a4403cdead7f1cd40d28ea501..0ffa1d2d64f0b8fe0c8e9931b6afc86ddd866397 100644 (file)
@@ -1,8 +1,14 @@
 /*
- *  HID driver for Ortek PKB-1700/WKB-2000 (wireless keyboard + mouse trackpad).
- *  Fixes LogicalMaximum error in HID report description.
+ *  HID driver for various devices which are apparently based on the same chipset
+ *  from certain vendor which produces chips that contain wrong LogicalMaximum
+ *  value in their HID report descriptor. Currently supported devices are:
+ *
+ *    Ortek PKB-1700
+ *    Ortek WKB-2000
+ *    Skycable wireless presenter
  *
  *  Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com>
+ *  Copyright (c) 2011 Jiri Kosina
  */
 
 /*
@@ -22,8 +28,11 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
                unsigned int *rsize)
 {
        if (*rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x01) {
-               hid_info(hdev, "Fixing up Ortek WKB-2000 report descriptor\n");
+               hid_info(hdev, "Fixing up logical minimum in report descriptor (Ortek)\n");
                rdesc[55] = 0x92;
+       } else if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {
+               hid_info(hdev, "Fixing up logical minimum in report descriptor (Skycable)\n");
+               rdesc[53] = 0x65;
        }
        return rdesc;
 }
@@ -31,6 +40,7 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 static const struct hid_device_id ortek_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
        { }
 };
 MODULE_DEVICE_TABLE(hid, ortek_devices);
index 657da5a3d5c6213040dbea89f2de4339bf19dfd8..b2f56a13bcf57b17f974dbf09dd1555ae67fc2c3 100644 (file)
@@ -1806,13 +1806,13 @@ static ssize_t picolcd_debug_flash_write(struct file *f, const char __user *u,
 /*
  * Notes:
  * - concurrent writing is prevented by mutex and all writes must be
- *   n*64 bytes and 64-byte aligned, each write being preceeded by an
+ *   n*64 bytes and 64-byte aligned, each write being preceded by an
  *   ERASE which erases a 64byte block.
  *   If less than requested was written or an error is returned for an
  *   otherwise correct write request the next 64-byte block which should
  *   have been written is in undefined state (mostly: original, erased,
  *   (half-)written with write error)
- * - reading can happend without special restriction
+ * - reading can happen without special restriction
  */
 static const struct file_operations picolcd_debug_flash_fops = {
        .owner    = THIS_MODULE,
index 64abb5b8a59a5909a759f3ef37e232a8991fb902..4109a028e138be2317c7510d2daefb26d7bb86e3 100644 (file)
@@ -166,7 +166,7 @@ enum kone_mouse_events {
        /* osd events are thought to be display on screen */
        kone_mouse_event_osd_dpi = 0xa0,
        kone_mouse_event_osd_profile = 0xb0,
-       /* TODO clarify meaning and occurence of kone_mouse_event_calibration */
+       /* TODO clarify meaning and occurrence of kone_mouse_event_calibration */
        kone_mouse_event_calibration = 0xc0,
        kone_mouse_event_call_overlong_macro = 0xe0,
        /* switch events notify if user changed values with mousebutton click */
index 160f481344f6673e22be30bf4232b89feac278ac..38280c055a1929a319e32d8111908f580c420f86 100644 (file)
@@ -652,7 +652,8 @@ static int pyra_raw_event(struct hid_device *hdev, struct hid_report *report,
 static const struct hid_device_id pyra_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT,
                        USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
-       /* TODO add USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS after testing */
+       { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT,
+                       USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) },
        { }
 };
 
index 9a94b643ccde7e7b62423d8b1ea0f878f3366be1..a8426f15e9ab1780fd2837ec28267829de756d53 100644 (file)
@@ -59,6 +59,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_THROTTLE, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
index 060ef63278763f2a96da76365f6a2a617f84f191..50e40dbd8bb64877a66a0f2d70d71053b972aad8 100644 (file)
@@ -110,8 +110,7 @@ config SENSORS_ADM1021
        help
          If you say yes here you get support for Analog Devices ADM1021
          and ADM1023 sensor chips and clones: Maxim MAX1617 and MAX1617A,
-         Genesys Logic GL523SM, National Semiconductor LM84, TI THMC10,
-         and the XEON processor built-in sensor.
+         Genesys Logic GL523SM, National Semiconductor LM84 and TI THMC10.
 
          This driver can also be built as a module.  If so, the module
          will be called adm1021.
@@ -618,10 +617,10 @@ config SENSORS_LM90
        depends on I2C
        help
          If you say yes here you get support for National Semiconductor LM90,
-         LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, Maxim
-         MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
-         MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, and Winbond/Nuvoton
-         W83L771W/G/AWG/ASG sensor chips.
+         LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A,
+         Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
+         MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008,
+         and Winbond/Nuvoton W83L771W/G/AWG/ASG sensor chips.
 
          This driver can also be built as a module.  If so, the module
          will be called lm90.
index 0e05aa179eaa09c1c52763be60a84d1d41d3d3db..e7d4c4687f022dc57546776d00ad3c0d371f6e50 100644 (file)
@@ -1422,7 +1422,7 @@ static int __init abituguru_detect(void)
           at DATA and 0xAC, when this driver has already been loaded once
           DATA will hold 0x08. For most uGuru's CMD will hold 0xAC in either
           scenario but some will hold 0x00.
-          Some uGuru's initally hold 0x09 at DATA and will only hold 0x08
+          Some uGuru's initially hold 0x09 at DATA and will only hold 0x08
           after reading CMD first, so CMD must be read first! */
        u8 cmd_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_CMD);
        u8 data_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_DATA);
index 034cebfcd273cec998779f3c50b5da473f696d1a..e89d572e33202a45c7d2fc4c444f740d44eec87b 100644 (file)
@@ -151,7 +151,7 @@ struct abituguru3_data {
        /* Pointer to the sensors info for the detected motherboard */
        const struct abituguru3_sensor_info *sensors;
 
-       /* The abituguru3 supports upto 48 sensors, and thus has registers
+       /* The abituguru3 supports up to 48 sensors, and thus has registers
           sets for 48 sensors, for convienence reasons / simplicity of the
           code we always read and store all registers for all 48 sensors */
 
index be0fdd58aa29301fbe15f9186580d724ba769544..0531867484f417e7692d92b44066bdfc7c7758d8 100644 (file)
@@ -175,7 +175,7 @@ static u16 ADM1026_REG_TEMP_OFFSET[] = { 0x1e, 0x6e, 0x6f };
  * these macros are called: arguments may be evaluated more than once.
  */
 
-/* IN are scaled acording to built-in resistors.  These are the
+/* IN are scaled according to built-in resistors.  These are the
  *   voltages corresponding to 3/4 of full scale (192 or 0xc0)
  *   NOTE: The -12V input needs an additional factor to account
  *      for the Vref pullup resistor.
index cf47e6e476eddb35a5dbc98441ea6b533227f5ae..da72dc12068c11f85769f93aa57a6370ffa2ffd0 100644 (file)
@@ -130,7 +130,7 @@ enum chips {
    these macros are called: arguments may be evaluated more than once.
  */
 
-/* IN are scaled acording to built-in resistors */
+/* IN are scaled according to built-in resistors */
 static const int lm85_scaling[] = {  /* .001 Volts */
        2500, 2250, 3300, 5000, 12000,
        3300, 1500, 1800 /*EMC6D100*/
@@ -1094,6 +1094,7 @@ static struct attribute *lm85_attributes_minctl[] = {
        &sensor_dev_attr_pwm1_auto_pwm_minctl.dev_attr.attr,
        &sensor_dev_attr_pwm2_auto_pwm_minctl.dev_attr.attr,
        &sensor_dev_attr_pwm3_auto_pwm_minctl.dev_attr.attr,
+       NULL
 };
 
 static const struct attribute_group lm85_group_minctl = {
@@ -1104,6 +1105,7 @@ static struct attribute *lm85_attributes_temp_off[] = {
        &sensor_dev_attr_temp1_auto_temp_off.dev_attr.attr,
        &sensor_dev_attr_temp2_auto_temp_off.dev_attr.attr,
        &sensor_dev_attr_temp3_auto_temp_off.dev_attr.attr,
+       NULL
 };
 
 static const struct attribute_group lm85_group_temp_off = {
@@ -1329,11 +1331,11 @@ static int lm85_probe(struct i2c_client *client,
        if (data->type != emc6d103s) {
                err = sysfs_create_group(&client->dev.kobj, &lm85_group_minctl);
                if (err)
-                       goto err_kfree;
+                       goto err_remove_files;
                err = sysfs_create_group(&client->dev.kobj,
                                         &lm85_group_temp_off);
                if (err)
-                       goto err_kfree;
+                       goto err_remove_files;
        }
 
        /* The ADT7463/68 have an optional VRM 10 mode where pin 21 is used
index 812781c655a7a9e952653909812472807580bb6e..2f94f9504804f29963a17b9327abd860be851436 100644 (file)
  * chips, but support three temperature sensors instead of two. MAX6695
  * and MAX6696 only differ in the pinout so they can be treated identically.
  *
- * This driver also supports the ADT7461 chip from Analog Devices.
- * It's supported in both compatibility and extended mode. It is mostly
- * compatible with LM90 except for a data format difference for the
- * temperature value registers.
+ * This driver also supports ADT7461 and ADT7461A from Analog Devices as well as
+ * NCT1008 from ON Semiconductor. The chips are supported in both compatibility
+ * and extended mode. They are mostly compatible with LM90 except for a data
+ * format difference for the temperature value registers.
  *
  * Since the LM90 was the first chipset supported by this driver, most
  * comments will refer to this chipset, but are actually general and
  * Addresses to scan
  * Address is fully defined internally and cannot be changed except for
  * MAX6659, MAX6680 and MAX6681.
- * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, MAX6649, MAX6657,
- * MAX6658 and W83L771 have address 0x4c.
- * ADM1032-2, ADT7461-2, LM89-1, LM99-1 and MAX6646 have address 0x4d.
+ * LM86, LM89, LM90, LM99, ADM1032, ADM1032-1, ADT7461, ADT7461A, MAX6649,
+ * MAX6657, MAX6658, NCT1008 and W83L771 have address 0x4c.
+ * ADM1032-2, ADT7461-2, ADT7461A-2, LM89-1, LM99-1, MAX6646, and NCT1008D
+ * have address 0x4d.
  * MAX6647 has address 0x4e.
  * MAX6659 can have address 0x4c, 0x4d or 0x4e.
  * MAX6680 and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
@@ -174,6 +175,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
 static const struct i2c_device_id lm90_id[] = {
        { "adm1032", adm1032 },
        { "adt7461", adt7461 },
+       { "adt7461a", adt7461 },
        { "lm90", lm90 },
        { "lm86", lm86 },
        { "lm89", lm86 },
@@ -188,6 +190,7 @@ static const struct i2c_device_id lm90_id[] = {
        { "max6681", max6680 },
        { "max6695", max6696 },
        { "max6696", max6696 },
+       { "nct1008", adt7461 },
        { "w83l771", w83l771 },
        { }
 };
@@ -356,7 +359,7 @@ static int lm90_read16(struct i2c_client *client, u8 regh, u8 regl, u16 *value)
        /*
         * There is a trick here. We have to read two registers to have the
         * sensor temperature, but we have to beware a conversion could occur
-        * inbetween the readings. The datasheet says we should either use
+        * between the readings. The datasheet says we should either use
         * the one-shot conversion register, which we don't want to do
         * (disables hardware monitoring) or monitor the busy bit, which is
         * impossible (we can't read the values and monitor that bit at the
@@ -1153,6 +1156,11 @@ static int lm90_detect(struct i2c_client *new_client,
                 && (reg_config1 & 0x1B) == 0x00
                 && reg_convrate <= 0x0A) {
                        name = "adt7461";
+               } else
+               if (chip_id == 0x57 /* ADT7461A, NCT1008 */
+                && (reg_config1 & 0x1B) == 0x00
+                && reg_convrate <= 0x0A) {
+                       name = "adt7461a";
                }
        } else
        if (man_id == 0x4D) { /* Maxim */
index edfb92e41735df7f713a2283a12a299e764423ca..196ffafafd88ff3cebf37de7bae8d37494d2dc34 100644 (file)
@@ -139,7 +139,6 @@ struct pmbus_data {
         * A single status register covers multiple attributes,
         * so we keep them all together.
         */
-       u8 status_bits;
        u8 status[PB_NUM_STATUS_REG];
 
        u8 currpage;
index 1a9c32d6893a83b2c6603b70c0bfa1e0428488d7..f4e617adb220ac0573b798628b320dac0a9e9295 100644 (file)
@@ -52,7 +52,7 @@
 #define SHT15_TSU              150     /* data setup time */
 
 /**
- * struct sht15_temppair - elements of voltage dependant temp calc
+ * struct sht15_temppair - elements of voltage dependent temp calc
  * @vdd:       supply voltage in microvolts
  * @d1:                see data sheet
  */
@@ -251,7 +251,7 @@ static inline int sht15_update_single_val(struct sht15_data *data,
        enable_irq(gpio_to_irq(data->pdata->gpio_data));
        if (gpio_get_value(data->pdata->gpio_data) == 0) {
                disable_irq_nosync(gpio_to_irq(data->pdata->gpio_data));
-               /* Only relevant if the interrupt hasn't occured. */
+               /* Only relevant if the interrupt hasn't occurred. */
                if (!atomic_read(&data->interrupt_handled))
                        schedule_work(&data->read_work);
        }
@@ -452,7 +452,7 @@ static void sht15_bh_read_data(struct work_struct *work_s)
                */
                atomic_set(&data->interrupt_handled, 0);
                enable_irq(gpio_to_irq(data->pdata->gpio_data));
-               /* If still not occured or another handler has been scheduled */
+               /* If still not occurred or another handler has been scheduled */
                if (gpio_get_value(data->pdata->gpio_data)
                    || atomic_read(&data->interrupt_handled))
                        return;
index 93187c3cb5e7949a72b5599bb127fce61701ec49..5bd19496880146cf74630d85ace282e8d7986314 100644 (file)
@@ -166,7 +166,7 @@ static int __devinit tmp102_probe(struct i2c_client *client,
 
        if (!i2c_check_functionality(client->adapter,
                                     I2C_FUNC_SMBUS_WORD_DATA)) {
-               dev_err(&client->dev, "adapter doesnt support SMBus word "
+               dev_err(&client->dev, "adapter doesn't support SMBus word "
                        "transactions\n");
                return -ENODEV;
        }
index de5819199e2e35cd65d8b2816431328a3ddd58cf..57240740b161d190329b5ca3b7dfaf0d049ef02e 100644 (file)
@@ -98,7 +98,6 @@ static const struct attribute_group twl4030_madc_group = {
 static int __devinit twl4030_madc_hwmon_probe(struct platform_device *pdev)
 {
        int ret;
-       int status;
        struct device *hwmon;
 
        ret = sysfs_create_group(&pdev->dev.kobj, &twl4030_madc_group);
@@ -107,7 +106,7 @@ static int __devinit twl4030_madc_hwmon_probe(struct platform_device *pdev)
        hwmon = hwmon_device_register(&pdev->dev);
        if (IS_ERR(hwmon)) {
                dev_err(&pdev->dev, "hwmon_device_register failed.\n");
-               status = PTR_ERR(hwmon);
+               ret = PTR_ERR(hwmon);
                goto err_reg;
        }
 
index 400a88bde278dc2d6778993e27c2849c629c799c..17cf1ab95521448c28f024ea9ace6f48e391b471 100644 (file)
@@ -556,7 +556,7 @@ static ssize_t show_fan_div(struct device *dev, struct device_attribute *attr,
 
 /* Note: we save and restore the fan minimum here, because its value is
    determined in part by the fan divisor.  This follows the principle of
-   least suprise; the user doesn't expect the fan minimum to change just
+   least surprise; the user doesn't expect the fan minimum to change just
    because the divisor changed. */
 static ssize_t store_fan_div(struct device *dev, struct device_attribute *attr,
                                const char *buf, size_t count)
index 63841f8cec07c92e2accd6eca297dfef9a0f590d..f3e7130c4cdad0a54f50c13acbbefe1b682f6339 100644 (file)
@@ -244,7 +244,7 @@ FAN_TO_REG(long rpm, int div)
 #define TEMP1_TO_REG(val)      (SENSORS_LIMIT(((val) < 0 ? (val)+0x100*1000 \
                                        : (val)) / 1000, 0, 0xff))
 #define TEMP1_FROM_REG(val)    (((val) & 0x80 ? (val)-0x100 : (val)) * 1000)
-/* for temp2 and temp3, because they need addtional resolution */
+/* for temp2 and temp3, because they need additional resolution */
 #define TEMP_ADD_FROM_REG(val1, val2) \
        ((((val1) & 0x80 ? (val1)-0x100 \
                : (val1)) * 1000) + ((val2 & 0x80) ? 500 : 0))
index e3bdedfb534708eabcc006c9933fd54b699af9d7..854f9117f1aac2f976f91e5b9b45b13f39298a92 100644 (file)
@@ -1921,7 +1921,7 @@ static void w83793_update_nonvolatile(struct device *dev)
        struct w83793_data *data = i2c_get_clientdata(client);
        int i, j;
        /*
-          They are somewhat "stable" registers, and to update them everytime
+          They are somewhat "stable" registers, and to update them every time
           takes so much time, it's just not worthy. Update them in a long
           interval to avoid exception.
         */
index 38319a69bd0a9de978fc688bded38fa3dea90def..d6d58684712bc8b68cafb662316fe123e53b270d 100644 (file)
@@ -232,9 +232,17 @@ static int i2c_inb(struct i2c_adapter *i2c_adap)
  * Sanity check for the adapter hardware - check the reaction of
  * the bus lines only if it seems to be idle.
  */
-static int test_bus(struct i2c_algo_bit_data *adap, char *name)
+static int test_bus(struct i2c_adapter *i2c_adap)
 {
-       int scl, sda;
+       struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
+       const char *name = i2c_adap->name;
+       int scl, sda, ret;
+
+       if (adap->pre_xfer) {
+               ret = adap->pre_xfer(i2c_adap);
+               if (ret < 0)
+                       return -ENODEV;
+       }
 
        if (adap->getscl == NULL)
                pr_info("%s: Testing SDA only, SCL is not readable\n", name);
@@ -297,11 +305,19 @@ static int test_bus(struct i2c_algo_bit_data *adap, char *name)
                       "while pulling SCL high!\n", name);
                goto bailout;
        }
+
+       if (adap->post_xfer)
+               adap->post_xfer(i2c_adap);
+
        pr_info("%s: Test OK\n", name);
        return 0;
 bailout:
        sdahi(adap);
        sclhi(adap);
+
+       if (adap->post_xfer)
+               adap->post_xfer(i2c_adap);
+
        return -ENODEV;
 }
 
@@ -607,7 +623,7 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,
        int ret;
 
        if (bit_test) {
-               ret = test_bus(bit_adap, adap->name);
+               ret = test_bus(adap);
                if (ret < 0)
                        return -ENODEV;
        }
index 2b9a8f54bb2c9e2f08dae3516e95bc70817f41c1..4ca9cf9cde73db2ab35538bd0cdd058b0d8505ea 100644 (file)
@@ -343,7 +343,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,
 
        ret = curmsg;
  out:
-       DEB1("}}} transfered %d/%d messages. "
+       DEB1("}}} transferred %d/%d messages. "
             "status is %#04x. control is %#04x\n",
             curmsg, num, pca_status(adap),
             pca_get_con(adap));
index 906a3ca50db6c0d49bcb6f5ad85824c15d6ee87e..dd364171f9c5deedd88094288bd5c4d4a6573530 100644 (file)
@@ -295,7 +295,7 @@ static int ali1535_transaction(struct i2c_adapter *adap)
        }
 
        /* Unfortunately the ALI SMB controller maps "no response" and "bus
-        * collision" into a single bit. No reponse is the usual case so don't
+        * collision" into a single bit. No response is the usual case so don't
         * do a printk.  This means that bus collisions go unreported.
         */
        if (temp & ALI1535_STS_BUSERR) {
index b14f6d68221de37d2310c4279afd306bc8d0ec08..83e8a60cdc86ba8cc87d4d0463d0d3cf859c35e7 100644 (file)
@@ -318,7 +318,7 @@ static int ali15x3_transaction(struct i2c_adapter *adap)
 
        /*
          Unfortunately the ALI SMB controller maps "no response" and "bus
-         collision" into a single bit. No reponse is the usual case so don't
+         collision" into a single bit. No response is the usual case so don't
          do a printk.
          This means that bus collisions go unreported.
        */
index 5795c8398c7c3a25af82319a0ce1d46741def8b2..a76d85fa3ad781d15a90f73875a1c857703d14a8 100644 (file)
@@ -355,7 +355,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
        /*
         * Write mode register first as needed for correct behaviour
         * on OMAP-L138, but don't set STT yet to avoid a race with XRDY
-        * occuring before we have loaded DXR
+        * occurring before we have loaded DXR
         */
        davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag);
 
index b664ed8bbdb3883ce3fde9bfe4f9dafd79a966a1..b7a51c43b185018289271d6e1db44f5453c76bce 100644 (file)
@@ -178,7 +178,7 @@ static char *abort_sources[] = {
  * @lock: protect this struct and IO registers
  * @clk: input reference clock
  * @cmd_err: run time hadware error code
- * @msgs: points to an array of messages currently being transfered
+ * @msgs: points to an array of messages currently being transferred
  * @msgs_num: the number of elements in msgs
  * @msg_write_idx: the element index of the current tx message in the msgs
  *     array
index e5b1a3bf5b8071ce034de739f25845c99aa332ba..37e2e82a9c8876d9344b66b040c26e139fd625e7 100644 (file)
@@ -22,7 +22,7 @@
 /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
    Frodo Looijaard <frodol@dds.nl> */
 
-/* Partialy rewriten by Oleg I. Vdovikin for mmapped support of
+/* Partially rewriten by Oleg I. Vdovikin for mmapped support of
    for Alpha Processor Inc. UP-2000(+) boards */
 
 #include <linux/kernel.h>
index ed2e0c5ea37c7b53ee1b67a20881caff26e7797d..455e909bc768637a1a7f6d793f626baef082f46d 100644 (file)
@@ -96,7 +96,7 @@
 #define SMBHSTCFG_SMB_SMI_EN   2
 #define SMBHSTCFG_I2C_EN       4
 
-/* Auxillary control register bits, ICH4+ only */
+/* Auxiliary control register bits, ICH4+ only */
 #define SMBAUXCTL_CRC          1
 #define SMBAUXCTL_E32B         2
 
                                 SMBHSTSTS_BUS_ERR | SMBHSTSTS_DEV_ERR | \
                                 SMBHSTSTS_INTR)
 
+/* Older devices have their ID defined in <linux/pci_ids.h> */
+#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS  0x1c22
+#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS     0x1d22
 /* Patsburg also has three 'Integrated Device Function' SMBus controllers */
 #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0        0x1d70
 #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1        0x1d71
 #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2        0x1d72
+#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS     0x2330
+#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS        0x3b30
 
 struct i801_priv {
        struct i2c_adapter adapter;
index e4f88dca99b5d1fc4bbc0346fd2ea5ce13ef8d9b..3c110fbc409bb2c2ecd0cc2d7c6f9048914256cf 100644 (file)
@@ -494,7 +494,7 @@ static int iic_xfer_bytes(struct ibm_iic_private* dev, struct i2c_msg* pm,
                if (unlikely(ret < 0))
                        break;
                else if (unlikely(ret != count)){
-                       DBG("%d: xfer_bytes, requested %d, transfered %d\n",
+                       DBG("%d: xfer_bytes, requested %d, transferred %d\n",
                                dev->idx, count, ret);
 
                        /* If it's not a last part of xfer, abort it */
@@ -593,7 +593,7 @@ static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
        if (unlikely((in_8(&iic->extsts) & EXTSTS_BCS_MASK) != EXTSTS_BCS_FREE)){
                DBG("%d: iic_xfer, bus is not free\n", dev->idx);
 
-               /* Usually it means something serious has happend.
+               /* Usually it means something serious has happened.
                 * We *cannot* have unfinished previous transfer
                 * so it doesn't make any sense to try to stop it.
                 * Probably we were not able to recover from the
index c71492782bbd4dda6e1f4a585adbba419ce4694d..e828ac85cfa7298c68e1c5d6396ce13bc051aa14 100644 (file)
@@ -170,8 +170,8 @@ struct intel_mid_i2c_private {
 /* Raw Interrupt Status Register */
 #define IC_RAW_INTR_STAT       0x34            /* Read Only */
 #define GEN_CALL               (1 << 11)       /* General call */
-#define START_DET              (1 << 10)       /* (RE)START occured */
-#define STOP_DET               (1 << 9)        /* STOP occured */
+#define START_DET              (1 << 10)       /* (RE)START occurred */
+#define STOP_DET               (1 << 9)        /* STOP occurred */
 #define ACTIVITY               (1 << 8)        /* Bus busy */
 #define RX_DONE                        (1 << 7)        /* Not used in Master mode */
 #define        TX_ABRT                 (1 << 6)        /* Transmit Abort */
@@ -375,7 +375,7 @@ static int intel_mid_i2c_disable(struct i2c_adapter *adap)
  * I2C should be disabled prior to other register operation. If failed, an
  * errno is returned. Mask and Clear all interrpts, this should be done at
  * first.  Set common registers which will not be modified during normal
- * transfers, including: controll register, FIFO threshold and clock freq.
+ * transfers, including: control register, FIFO threshold and clock freq.
  * Check APB data width at last.
  */
 static int intel_mid_i2c_hwinit(struct intel_mid_i2c_private *i2c)
@@ -455,7 +455,7 @@ static inline bool intel_mid_i2c_address_neq(const struct i2c_msg *p1,
  *
  * By reading register IC_TX_ABRT_SOURCE, various transfer errors can be
  * distingushed. At present, no circumstances have been found out that
- * multiple errors would be occured simutaneously, so we simply use the
+ * multiple errors would be occurred simutaneously, so we simply use the
  * register value directly.
  *
  * At last the error bits are cleared. (Note clear ABRT_SBYTE_NORSTRT bit need
@@ -469,7 +469,7 @@ static void intel_mid_i2c_abort(struct intel_mid_i2c_private *i2c)
 
        /* Single transfer error check:
         * According to databook, TX/RX FIFOs would be flushed when
-        * the abort interrupt occured.
+        * the abort interrupt occurred.
         */
        if (abort & ABRT_MASTER_DIS)
                dev_err(&adap->dev,
@@ -569,7 +569,7 @@ static int xfer_read(struct i2c_adapter *adap, unsigned char *buf, int length)
  * Return Values:
  * 0   if the read transfer succeeds
  * -ETIMEDOUT  if we cannot read the "raw" interrupt register
- * -EINVAL     if a transfer abort occured
+ * -EINVAL     if a transfer abort occurred
  *
  * For every byte, a "WRITE" command will be loaded into IC_DATA_CMD prior to
  * data transfer. The actual "write" operation will be performed when the
@@ -697,7 +697,7 @@ static int intel_mid_i2c_setup(struct i2c_adapter *adap,  struct i2c_msg *pmsg)
  * @num: number of i2c_msg
  *
  * Return Values:
- * +           number of messages transfered
+ * +           number of messages transferred
  * -ETIMEDOUT  If cannot disable I2C controller or read IC_STATUS
  * -EINVAL     If the address in i2c_msg is invalid
  *
index ddc258edb34f64156a7572d4519c07c71072e9de..0682f8f277b013847b5545f597f68114920f408d 100644 (file)
@@ -141,7 +141,7 @@ static int sch_transaction(void)
  * This is the main access entry for i2c-sch access
  * adap is i2c_adapter pointer, addr is the i2c device bus address, read_write
  * (0 for read and 1 for write), size is i2c transaction type and data is the
- * union of transaction for data to be transfered or data read from bus.
+ * union of transaction for data to be transferred or data read from bus.
  * return 0 for success and others for failure.
  */
 static s32 sch_access(struct i2c_adapter *adap, u16 addr,
index caf96dc8ca1b9ba5aca46b4fcf7f7a91147d565b..7e78f7c87857c7f0d7af5417064f19e822b4a5f4 100644 (file)
@@ -149,7 +149,7 @@ static void mxs_i2c_pioq_setup_write(struct mxs_i2c_dev *i2c,
         * We have to copy the slave address (u8) and buffer (arbitrary number
         * of u8) into the data register (u32). To achieve that, the u8 are put
         * into the MSBs of 'data' which is then shifted for the next u8. When
-        * apropriate, 'data' is written to MXS_I2C_DATA. So, the first u32
+        * appropriate, 'data' is written to MXS_I2C_DATA. So, the first u32
         * looks like this:
         *
         *  3          2          1          0
index 594ed5059c4a34d63766674fd519dfccd0c523d6..e10e5cf3751a211058588bd33e66320b3dc48779 100644 (file)
@@ -126,9 +126,9 @@ enum i2c_operation {
 /**
  * struct i2c_nmk_client - client specific data
  * @slave_adr: 7-bit slave address
- * @count: no. bytes to be transfered
+ * @count: no. bytes to be transferred
  * @buffer: client data buffer
- * @xfer_bytes: bytes transfered till now
+ * @xfer_bytes: bytes transferred till now
  * @operation: current I2C operation
  */
 struct i2c_nmk_client {
@@ -330,7 +330,7 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)
         * slsu defines the data setup time after SCL clock
         * stretching in terms of i2c clk cycles. The
         * needed setup time for the three modes are 250ns,
-        * 100ns, 10ns repectively thus leading to the values
+        * 100ns, 10ns respectively thus leading to the values
         * of 14, 6, 2 for a 48 MHz i2c clk.
         */
        writel(dev->cfg.slsu << 16, dev->virtbase + I2C_SCR);
@@ -364,7 +364,7 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)
        /*
         * set the speed mode. Currently we support
         * only standard and fast mode of operation
-        * TODO - support for fast mode plus (upto 1Mb/s)
+        * TODO - support for fast mode plus (up to 1Mb/s)
         * and high speed (up to 3.4 Mb/s)
         */
        if (dev->cfg.sm > I2C_FREQ_MODE_FAST) {
index 0eb1515541e72446a4e81e3bf54702bcf0635347..2dbba163b10202cf51aba175f7ffbf9cfd57aea2 100644 (file)
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------ *
  * i2c-parport.c I2C bus over parallel port                                 *
  * ------------------------------------------------------------------------ *
-   Copyright (C) 2003-2010 Jean Delvare <khali@linux-fr.org>
+   Copyright (C) 2003-2011 Jean Delvare <khali@linux-fr.org>
    
    Based on older i2c-philips-par.c driver
    Copyright (C) 1995-2000 Simon G. Vogl
@@ -33,6 +33,8 @@
 #include <linux/i2c-algo-bit.h>
 #include <linux/i2c-smbus.h>
 #include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/mutex.h>
 #include "i2c-parport.h"
 
 /* ----- Device list ------------------------------------------------------ */
@@ -43,10 +45,11 @@ struct i2c_par {
        struct i2c_algo_bit_data algo_data;
        struct i2c_smbus_alert_setup alert_data;
        struct i2c_client *ara;
-       struct i2c_par *next;
+       struct list_head node;
 };
 
-static struct i2c_par *adapter_list;
+static LIST_HEAD(adapter_list);
+static DEFINE_MUTEX(adapter_list_lock);
 
 /* ----- Low-level parallel port access ----------------------------------- */
 
@@ -228,8 +231,9 @@ static void i2c_parport_attach (struct parport *port)
        }
 
        /* Add the new adapter to the list */
-       adapter->next = adapter_list;
-       adapter_list = adapter;
+       mutex_lock(&adapter_list_lock);
+       list_add_tail(&adapter->node, &adapter_list);
+       mutex_unlock(&adapter_list_lock);
         return;
 
 ERROR1:
@@ -241,11 +245,11 @@ ERROR0:
 
 static void i2c_parport_detach (struct parport *port)
 {
-       struct i2c_par *adapter, *prev;
+       struct i2c_par *adapter, *_n;
 
        /* Walk the list */
-       for (prev = NULL, adapter = adapter_list; adapter;
-            prev = adapter, adapter = adapter->next) {
+       mutex_lock(&adapter_list_lock);
+       list_for_each_entry_safe(adapter, _n, &adapter_list, node) {
                if (adapter->pdev->port == port) {
                        if (adapter->ara) {
                                parport_disable_irq(port);
@@ -259,14 +263,11 @@ static void i2c_parport_detach (struct parport *port)
                                
                        parport_release(adapter->pdev);
                        parport_unregister_device(adapter->pdev);
-                       if (prev)
-                               prev->next = adapter->next;
-                       else
-                               adapter_list = adapter->next;
+                       list_del(&adapter->node);
                        kfree(adapter);
-                       return;
                }
        }
+       mutex_unlock(&adapter_list_lock);
 }
 
 static struct parport_driver i2c_parport_driver = {
index cadc0216e02f9837448a31211453a8c8e9bf76ca..cb5d01e279c6606b69c448bf42f45a3388747b74 100644 (file)
@@ -318,7 +318,7 @@ static int __devinit s6i2c_probe(struct platform_device *dev)
        rc = request_irq(iface->irq, s6i2c_interrupt_entry,
                         IRQF_SHARED, dev->name, iface);
        if (rc) {
-               dev_err(&p_adap->dev, "s6i2c: cant get IRQ %d\n", iface->irq);
+               dev_err(&p_adap->dev, "s6i2c: can't get IRQ %d\n", iface->irq);
                goto err_clk_dis;
        }
 
index 266135ddf7fa3eeb84cc4e40516688a149cb16d0..99879617e68675f4a0a0317d4aac03edeb90afd3 100644 (file)
@@ -497,7 +497,7 @@ static int stu300_set_clk(struct stu300_dev *dev, unsigned long clkrate)
        u32 val;
        int i = 0;
 
-       /* Locate the apropriate clock setting */
+       /* Locate the appropriate clock setting */
        while (i < ARRAY_SIZE(stu300_clktable) - 1 &&
               stu300_clktable[i].rate < clkrate)
                i++;
@@ -644,7 +644,7 @@ static int stu300_send_address(struct stu300_dev *dev,
        ret = stu300_await_event(dev, STU300_EVENT_6);
 
        /*
-        * Clear any pending EVENT 6 no matter what happend during
+        * Clear any pending EVENT 6 no matter what happened during
         * await_event.
         */
        val = stu300_r8(dev->virtbase + I2C_CR);
index 3921f664c9c3d82353fa892d3d5d9b42700fdd33..b4ab39b741eb768bd1a0d733b9329546fd0fe428 100644 (file)
@@ -386,7 +386,7 @@ static irqreturn_t tegra_i2c_isr(int irq, void *dev_id)
                dvc_writel(i2c_dev, DVC_STATUS_I2C_DONE_INTR, DVC_STATUS);
        return IRQ_HANDLED;
 err:
-       /* An error occured, mask all interrupts */
+       /* An error occurred, mask all interrupts */
        tegra_i2c_mask_irq(i2c_dev, I2C_INT_NO_ACK | I2C_INT_ARBITRATION_LOST |
                I2C_INT_PACKET_XFER_COMPLETE | I2C_INT_TX_FIFO_DATA_REQ |
                I2C_INT_RX_FIFO_DATA_REQ);
index 9fbd7e6fe32ececfee1c01928cf584ffc1f0bc65..e9d5ff4d14966c2a47bb98d57277933efd24b153 100644 (file)
@@ -21,7 +21,7 @@
  * to the automotive development board Russellville. The copyright holder
  * as seen in the header is Intel corporation.
  * Mocean Laboratories forked off the GNU/Linux platform work into a
- * separate company called Pelagicore AB, which commited the code to the
+ * separate company called Pelagicore AB, which committed the code to the
  * kernel.
  */
 
index e5f76a0372fd6f6e9d1fa063b60a07ffb08fb781..9a58994ff7ea54bd46cf6b576e9e43b10e736b79 100644 (file)
@@ -348,7 +348,7 @@ EXPORT_SYMBOL(i2c_verify_client);
 
 
 /* This is a permissive address validity check, I2C address map constraints
- * are purposedly not enforced, except for the general call address. */
+ * are purposely not enforced, except for the general call address. */
 static int i2c_check_client_addr_validity(const struct i2c_client *client)
 {
        if (client->flags & I2C_CLIENT_TEN) {
@@ -797,7 +797,8 @@ static int i2c_do_add_adapter(struct i2c_driver *driver,
 
        /* Let legacy drivers scan this bus for matching devices */
        if (driver->attach_adapter) {
-               dev_warn(&adap->dev, "attach_adapter method is deprecated\n");
+               dev_warn(&adap->dev, "%s: attach_adapter method is deprecated\n",
+                        driver->driver.name);
                dev_warn(&adap->dev, "Please use another way to instantiate "
                         "your i2c_client\n");
                /* We ignore the return code; if it fails, too bad */
@@ -984,7 +985,8 @@ static int i2c_do_del_adapter(struct i2c_driver *driver,
 
        if (!driver->detach_adapter)
                return 0;
-       dev_warn(&adapter->dev, "detach_adapter method is deprecated\n");
+       dev_warn(&adapter->dev, "%s: detach_adapter method is deprecated\n",
+                driver->driver.name);
        res = driver->detach_adapter(adapter);
        if (res)
                dev_err(&adapter->dev, "detach_adapter failed (%d) "
index 9383f67deae19c5924bda306e930a6cef38397f4..3be60da5212376358f2ac6c8a6181c63e3601dc7 100644 (file)
@@ -67,7 +67,7 @@ static void cy82c693_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 
        /*
         * note: below we set the value for Bus Master IDE TimeOut Register
-        * I'm not absolutly sure what this does, but it solved my problem
+        * I'm not absolutely sure what this does, but it solved my problem
         * with IDE DMA and sound, so I now can play sound and work with
         * my IDE driver at the same time :-)
         *
index fd1e117991373853d5b51d8827f99157fabd3b55..a5ec5a7cb381bbffac45a13c9e2cdccfd0a7d8b0 100644 (file)
@@ -1782,7 +1782,6 @@ static int ide_cd_probe(ide_drive_t *drive)
        ide_cd_read_toc(drive, &sense);
        g->fops = &idecd_ops;
        g->flags |= GENHD_FL_REMOVABLE;
-       g->events = DISK_EVENT_MEDIA_CHANGE;
        add_disk(g);
        return 0;
 
index 2a6bc50e8a41e8918da5ad8aca49686d68da318c..02caa7dd51c83f99e34e05de972f67020945a2d6 100644 (file)
@@ -79,6 +79,12 @@ int ide_cdrom_drive_status(struct cdrom_device_info *cdi, int slot_nr)
        return CDS_DRIVE_NOT_READY;
 }
 
+/*
+ * ide-cd always generates media changed event if media is missing, which
+ * makes it impossible to use for proper event reporting, so disk->events
+ * is cleared to 0 and the following function is used only to trigger
+ * revalidation and never propagated to userland.
+ */
 unsigned int ide_cdrom_check_events_real(struct cdrom_device_info *cdi,
                                         unsigned int clearing, int slot_nr)
 {
index 5406b6ea3ad1d2118996a405da5b33ac1359e4ad..5a702d02c848a172dc031a2ac53adca6882b6510 100644 (file)
@@ -107,7 +107,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc)
 static void ide_floppy_report_error(struct ide_disk_obj *floppy,
                                    struct ide_atapi_pc *pc)
 {
-       /* supress error messages resulting from Medium not present */
+       /* suppress error messages resulting from Medium not present */
        if (floppy->sense_key == 0x02 &&
            floppy->asc       == 0x3a &&
            floppy->ascq      == 0x00)
index c4ffd4888939a7f4e67ee7f1191a08d485c85e44..70ea8763567dcc7b1b7fd946275dea49303534f6 100644 (file)
@@ -298,6 +298,12 @@ static unsigned int ide_gd_check_events(struct gendisk *disk,
                return 0;
        }
 
+       /*
+        * The following is used to force revalidation on the first open on
+        * removeable devices, and never gets reported to userland as
+        * genhd->events is 0.  This is intended as removeable ide disk
+        * can't really detect MEDIA_CHANGE events.
+        */
        ret = drive->dev_flags & IDE_DFLAG_MEDIA_CHANGED;
        drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED;
 
@@ -413,7 +419,6 @@ static int ide_gd_probe(ide_drive_t *drive)
        if (drive->dev_flags & IDE_DFLAG_REMOVABLE)
                g->flags = GENHD_FL_REMOVABLE;
        g->fops = &ide_gd_ops;
-       g->events = DISK_EVENT_MEDIA_CHANGE;
        add_disk(g);
        return 0;
 
index 0e406d73b2c8226da821bd3b2b7fb480354ed2cc..177db6d5b2f58972e5dbcf3f5cc1f99cf4f27079 100644 (file)
@@ -430,6 +430,26 @@ static inline void ide_unlock_host(struct ide_host *host)
        }
 }
 
+static void __ide_requeue_and_plug(struct request_queue *q, struct request *rq)
+{
+       if (rq)
+               blk_requeue_request(q, rq);
+       if (rq || blk_peek_request(q)) {
+               /* Use 3ms as that was the old plug delay */
+               blk_delay_queue(q, 3);
+       }
+}
+
+void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
+{
+       struct request_queue *q = drive->queue;
+       unsigned long flags;
+
+       spin_lock_irqsave(q->queue_lock, flags);
+       __ide_requeue_and_plug(q, rq);
+       spin_unlock_irqrestore(q->queue_lock, flags);
+}
+
 /*
  * Issue a new request to a device.
  */
@@ -550,28 +570,7 @@ plug_device:
        ide_unlock_host(host);
 plug_device_2:
        spin_lock_irq(q->queue_lock);
-
-       if (rq) {
-               blk_requeue_request(q, rq);
-               blk_delay_queue(q, queue_run_ms);
-       }
-}
-
-void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
-{
-       struct request_queue *q = drive->queue;
-       unsigned long flags;
-
-       spin_lock_irqsave(q->queue_lock, flags);
-
-       if (rq)
-               blk_requeue_request(q, rq);
-
-       spin_unlock_irqrestore(q->queue_lock, flags);
-
-       /* Use 3ms as that was the old plug delay */
-       if (rq)
-               blk_delay_queue(q, 3);
+       __ide_requeue_and_plug(q, rq);
 }
 
 static int drive_is_ready(ide_drive_t *drive)
index 34b9872f35d1238b623ce00373e2f040dd5bd248..600c89a3d13759f47ddc82caa06b41dbd039401d 100644 (file)
@@ -201,7 +201,7 @@ static u8 wait_drive_not_busy(ide_drive_t *drive)
        u8 stat;
 
        /*
-        * Last sector was transfered, wait until device is ready.  This can
+        * Last sector was transferred, wait until device is ready.  This can
         * take up to 6 ms on some ATAPI devices, so we will wait max 10 ms.
         */
        for (retries = 0; retries < 1000; retries++) {
index 1bdca49e5a0352f8c9f0fdadd281de7e653b96dd..b59d04c720517d722633f9feef63a42505f86625 100644 (file)
@@ -8,8 +8,8 @@
  *
  * Documentation:
  *
- *     Publically available from Intel web site. Errata documentation
- * is also publically available. As an aide to anyone hacking on this
+ *     Publicly available from Intel web site. Errata documentation
+ * is also publicly available. As an aide to anyone hacking on this
  * driver the list of errata that are relevant is below.going back to
  * PIIX4. Older device documentation is now a bit tricky to find.
  *
index db7f4e761dbc490ee0941a371d37dc926bc90a17..4a00225677584ac8ff0a19577b83592ea8593f2a 100644 (file)
@@ -53,7 +53,7 @@
 
 #define DRV_NAME "sis5513"
 
-/* registers layout and init values are chipset family dependant */
+/* registers layout and init values are chipset family dependent */
 
 #define ATA_16         0x01
 #define ATA_33         0x02
@@ -406,7 +406,7 @@ static int __devinit sis_find_family(struct pci_dev *dev)
                                        pci_name(dev));
                                chipset_family = ATA_133;
 
-                               /* Check for 5513 compability mapping
+                               /* Check for 5513 compatibility mapping
                                 * We must use this, else the port enabled code will fail,
                                 * as it expects the enablebits at 0x4a.
                                 */
index 7953447eae0fb8fcfadd179f2b446c6666e1adc6..e53a1b78378b02c414c0c292c954974c763d880d 100644 (file)
@@ -22,7 +22,7 @@
  * Loosely based on the piix & svwks drivers.
  *
  * Documentation:
- *     Not publically available.
+ *     Not publicly available.
  */
 
 #include <linux/types.h>
index d2a0997b78f8325988c47234debb81b3514da1ba..f46f49cfcc28a25aed707d0d57a69e87b93409b5 100644 (file)
@@ -14,7 +14,7 @@
  *     Andre Hedrick
  *
  * Documentation:
- *     Obsolete device documentation publically available from via.com.tw
+ *     Obsolete device documentation publicly available from via.com.tw
  *     Current device documentation available under NDA only
  */
 
index 62af74295dbeb814a2d6158d4e7a274c0318ca8b..24f9e3a90e8eade353ca579dedecbc834b9cdd04 100644 (file)
@@ -157,7 +157,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
        int status;
 
        /*
-        * retreive the message
+        * retrieve the message
         */
        wr = c2_mq_consume(mq);
        if (!wr)
index d8f4bb8bf42e71f332abf85dd2cf846441455815..0d7b6f23caffdc7857da68b23fd2f12fd2a58aec 100644 (file)
@@ -612,7 +612,7 @@ void c2_free_qp(struct c2_dev *c2dev, struct c2_qp *qp)
        c2_unlock_cqs(send_cq, recv_cq);
 
        /*
-        * Destory qp in the rnic...
+        * Destroy qp in the rnic...
         */
        destroy_qp(c2dev, qp);
 
index c65fbdd6e469d9576ef3cc133615a48ffd874b6f..8d4b4ca463cab698ae6cdd795c5dbcc1df8e60ae 100644 (file)
@@ -131,7 +131,7 @@ enum c2wr_ids {
         *          All the preceding IDs are fixed, and must not change.
         *          You can add new IDs, but must not remove or reorder
         *          any IDs. If you do, YOU will ruin any hope of
-        *          compatability between versions.
+        *          compatibility between versions.
         */
        CCWR_LAST,
 
@@ -242,7 +242,7 @@ enum c2_acf {
 /*
  *  to fix bug 1815 we define the max size allowable of the
  *  terminate message (per the IETF spec).Refer to the IETF
- *  protocal specification, section 12.1.6, page 64)
+ *  protocol specification, section 12.1.6, page 64)
  *  The message is prefixed by 20 types of DDP info.
  *
  *  Then the message has 6 bytes for the terminate control
index 47db4bf346284033fea9cc653d2dfe7e7d2a0cf4..58c0e417bc30d78c16aba42aafd2b7253c627d12 100644 (file)
@@ -2392,7 +2392,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd)
        /*
         * clear SerdesEnable and turn the leds off; do this here because
         * we are unloading, so don't count on interrupts to move along
-        * Turn the LEDs off explictly for the same reason.
+        * Turn the LEDs off explicitly for the same reason.
         */
        dd->ipath_f_quiet_serdes(dd);
 
index 6d4b29c4cd89d38e1d2a4caa5917fc410c73d207..ee79a2d97b14f2e701ae931349153e1d8a3b9f7b 100644 (file)
@@ -1972,7 +1972,7 @@ static int ipath_do_user_init(struct file *fp,
         * 0 to 1.  So for those chips, we turn it off and then back on.
         * This will (very briefly) affect any other open ports, but the
         * duration is very short, and therefore isn't an issue.  We
-        * explictly set the in-memory tail copy to 0 beforehand, so we
+        * explicitly set the in-memory tail copy to 0 beforehand, so we
         * don't have to wait to be sure the DMA update has happened
         * (chip resets head/tail to 0 on transition to enable).
         */
index fef0f4201257a34eb3484da0513ccde98b349ed5..7c1eebe8c7c945e44d72a30ad7e9a4b8c02965d8 100644 (file)
@@ -335,7 +335,7 @@ done:
  * @dd: the infinipath device
  *
  * sanity check at least some of the values after reset, and
- * ensure no receive or transmit (explictly, in case reset
+ * ensure no receive or transmit (explicitly, in case reset
  * failed
  */
 static int init_chip_reset(struct ipath_devdata *dd)
index 7420715256a987246816f36dd4308f7cc5bfef9e..e8a2a915251e81d1236b8cb1abec368bbaf911a0 100644 (file)
@@ -86,7 +86,7 @@ static void ipath_ud_loopback(struct ipath_qp *sqp, struct ipath_swqe *swqe)
        }
 
        /*
-        * A GRH is expected to preceed the data even if not
+        * A GRH is expected to precede the data even if not
         * present on the wire.
         */
        length = swqe->length;
@@ -515,7 +515,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
        }
 
        /*
-        * A GRH is expected to preceed the data even if not
+        * A GRH is expected to precede the data even if not
         * present on the wire.
         */
        wc.byte_len = tlen + sizeof(struct ib_grh);
index be78f6643c066b3d0436f5708263a95aa7da07bb..f5cb13b2144566229c03be75e31623cb19942d45 100644 (file)
@@ -236,7 +236,7 @@ static int ipath_user_sdma_num_pages(const struct iovec *iov)
        return 1 + ((epage - spage) >> PAGE_SHIFT);
 }
 
-/* truncate length to page boundry */
+/* truncate length to page boundary */
 static int ipath_user_sdma_page_length(unsigned long addr, unsigned long len)
 {
        const unsigned long offset = addr & ~PAGE_MASK;
index cfa3a2b22232e81f179693abf7664b62eaaff9d6..33c7eedaba6c28abfe21ab599bc356d67f055ad3 100644 (file)
@@ -1397,7 +1397,7 @@ static void handle_fin_pkt(struct nes_cm_node *cm_node)
                cleanup_retrans_entry(cm_node);
                cm_node->state = NES_CM_STATE_CLOSING;
                send_ack(cm_node, NULL);
-               /* Wait for ACK as this is simultanous close..
+               /* Wait for ACK as this is simultaneous close..
                * After we receive ACK, do not send anything..
                * Just rm the node.. Done.. */
                break;
index 08c194861af5d9b99a3b247e4be084977d354697..10d0a5ec9add4f50e6dd0f9a89edb27f7db91965 100644 (file)
@@ -80,7 +80,7 @@ static void nes_terminate_start_timer(struct nes_qp *nesqp);
 
 #ifdef CONFIG_INFINIBAND_NES_DEBUG
 static unsigned char *nes_iwarp_state_str[] = {
-       "Non-Existant",
+       "Non-Existent",
        "Idle",
        "RTS",
        "Closing",
@@ -91,7 +91,7 @@ static unsigned char *nes_iwarp_state_str[] = {
 };
 
 static unsigned char *nes_tcp_state_str[] = {
-       "Non-Existant",
+       "Non-Existent",
        "Closed",
        "Listen",
        "SYN Sent",
index 2c9c1933bbe3b537c2a93b99f984508f35f7ea49..e96b8fb5d44ce042071bf58c9fe6ce28507b8dba 100644 (file)
@@ -902,7 +902,7 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
                nes_write_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL, nic_active);
        }
 
-       nes_debug(NES_DBG_NIC_RX, "Number of MC entries = %d, Promiscous = %d, All Multicast = %d.\n",
+       nes_debug(NES_DBG_NIC_RX, "Number of MC entries = %d, Promiscuous = %d, All Multicast = %d.\n",
                  mc_count, !!(netdev->flags & IFF_PROMISC),
                  !!(netdev->flags & IFF_ALLMULTI));
        if (!mc_all_on) {
index 73225eee3cc60c31e239a5c8a9cfab87cd14a4d1..769a1d9da4b7a6b8ab844b6a1576851b93c1530f 100644 (file)
@@ -653,7 +653,7 @@ struct diag_observer_list_elt;
 
 /* device data struct now contains only "general per-device" info.
  * fields related to a physical IB port are in a qib_pportdata struct,
- * described above) while fields only used by a particualr chip-type are in
+ * described above) while fields only used by a particular chip-type are in
  * a qib_chipdata struct, whose contents are opaque to this file.
  */
 struct qib_devdata {
index 75bfad16c11494a16bcbbaeace6583cfabefd4e6..406fca50d036f0f261fed384b9a207a5d8428cc6 100644 (file)
@@ -1539,7 +1539,7 @@ done_chk_sdma:
 
                /*
                 * If process has NOT already set it's affinity, select and
-                * reserve a processor for it, as a rendevous for all
+                * reserve a processor for it, as a rendezvous for all
                 * users of the driver.  If they don't actually later
                 * set affinity to this cpu, or set it to some other cpu,
                 * it just means that sooner or later we don't recommend
@@ -1657,7 +1657,7 @@ static int qib_do_user_init(struct file *fp,
         * 0 to 1.  So for those chips, we turn it off and then back on.
         * This will (very briefly) affect any other open ctxts, but the
         * duration is very short, and therefore isn't an issue.  We
-        * explictly set the in-memory tail copy to 0 beforehand, so we
+        * explicitly set the in-memory tail copy to 0 beforehand, so we
         * don't have to wait to be sure the DMA update has happened
         * (chip resets head/tail to 0 on transition to enable).
         */
index 774dea897e9c08b8dea72f2557203bcfa60f484c..d8ca0a0b970d39879e7d981acbf5cb1647dca424 100644 (file)
@@ -1799,7 +1799,7 @@ static int qib_6120_setup_reset(struct qib_devdata *dd)
        /*
         * Keep chip from being accessed until we are ready.  Use
         * writeq() directly, to allow the write even though QIB_PRESENT
-        * isnt' set.
+        * isn't set.
         */
        dd->flags &= ~(QIB_INITTED | QIB_PRESENT);
        dd->int_counter = 0; /* so we check interrupts work again */
@@ -2171,7 +2171,7 @@ static void rcvctrl_6120_mod(struct qib_pportdata *ppd, unsigned int op,
                 * Init the context registers also; if we were
                 * disabled, tail and head should both be zero
                 * already from the enable, but since we don't
-                * know, we have to do it explictly.
+                * know, we have to do it explicitly.
                 */
                val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt);
                qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt);
index de799f17cb9ec61c268ec4a8bae5a46692f439df..c765a2eb04cf27ba3b28ef4eb33e5e99ed6027ba 100644 (file)
@@ -2111,7 +2111,7 @@ static int qib_setup_7220_reset(struct qib_devdata *dd)
        /*
         * Keep chip from being accessed until we are ready.  Use
         * writeq() directly, to allow the write even though QIB_PRESENT
-        * isnt' set.
+        * isn't set.
         */
        dd->flags &= ~(QIB_INITTED | QIB_PRESENT);
        dd->int_counter = 0; /* so we check interrupts work again */
@@ -2479,7 +2479,7 @@ static int qib_7220_set_ib_cfg(struct qib_pportdata *ppd, int which, u32 val)
                 * we command the link down.  As with width, only write the
                 * actual register if the link is currently down, otherwise
                 * takes effect on next link change.  Since setting is being
-                * explictly requested (via MAD or sysfs), clear autoneg
+                * explicitly requested (via MAD or sysfs), clear autoneg
                 * failure status if speed autoneg is enabled.
                 */
                ppd->link_speed_enabled = val;
@@ -2778,7 +2778,7 @@ static void rcvctrl_7220_mod(struct qib_pportdata *ppd, unsigned int op,
                 * Init the context registers also; if we were
                 * disabled, tail and head should both be zero
                 * already from the enable, but since we don't
-                * know, we have to do it explictly.
+                * know, we have to do it explicitly.
                 */
                val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt);
                qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt);
index 4a2d21e15a70afe04e462607dd0e899e1b03cd64..6bab3eaea70f3588f31de57c69703ac5da736935 100644 (file)
@@ -3299,7 +3299,7 @@ static int qib_do_7322_reset(struct qib_devdata *dd)
        /*
         * Keep chip from being accessed until we are ready.  Use
         * writeq() directly, to allow the write even though QIB_PRESENT
-        * isnt' set.
+        * isn't set.
         */
        dd->flags &= ~(QIB_INITTED | QIB_PRESENT | QIB_BADINTR);
        dd->flags |= QIB_DOING_RESET;
@@ -3727,7 +3727,7 @@ static int qib_7322_set_ib_cfg(struct qib_pportdata *ppd, int which, u32 val)
                /*
                 * As with width, only write the actual register if the
                 * link is currently down, otherwise takes effect on next
-                * link change.  Since setting is being explictly requested
+                * link change.  Since setting is being explicitly requested
                 * (via MAD or sysfs), clear autoneg failure status if speed
                 * autoneg is enabled.
                 */
@@ -4163,7 +4163,7 @@ static void rcvctrl_7322_mod(struct qib_pportdata *ppd, unsigned int op,
                 * Init the context registers also; if we were
                 * disabled, tail and head should both be zero
                 * already from the enable, but since we don't
-                * know, we have to do it explictly.
+                * know, we have to do it explicitly.
                 */
                val = qib_read_ureg32(dd, ur_rcvegrindextail, ctxt);
                qib_write_ureg(dd, ur_rcvegrindexhead, val, ctxt);
@@ -7483,7 +7483,7 @@ static int serdes_7322_init_new(struct qib_pportdata *ppd)
        /*       Baseline Wander Correction Gain [13:4-0] (leave as default) */
        /*       Baseline Wander Correction Gain [3:7-5] (leave as default) */
        /*       Data Rate Select [5:7-6] (leave as default) */
-       /*       RX Parralel Word Width [3:10-8] (leave as default) */
+       /*       RX Parallel Word Width [3:10-8] (leave as default) */
 
        /* RX REST */
        /*       Single- or Multi-channel reset */
index ffefb78b894919e483dac74a3f3df3597434502c..a01f3fce8eb3f10616efe2e31e6ec2b660df9c65 100644 (file)
@@ -346,7 +346,7 @@ done:
  * @dd: the qlogic_ib device
  *
  * sanity check at least some of the values after reset, and
- * ensure no receive or transmit (explictly, in case reset
+ * ensure no receive or transmit (explicitly, in case reset
  * failed
  */
 static int init_after_reset(struct qib_devdata *dd)
index 147aff9117d7f0485326ef46c1f9506a1bad793f..7840ab593bcfedc2f8aa99b5f89ab633e949a326 100644 (file)
@@ -73,7 +73,7 @@ struct ib_mad_notice_attr {
 
                struct {
                        __be16  reserved;
-                       __be16  lid;            /* LID where change occured */
+                       __be16  lid;            /* LID where change occurred */
                        u8      reserved2;
                        u8      local_changes;  /* low bit - local changes */
                        __be32  new_cap_mask;   /* new capability mask */
index 6f31ca5039db1520d5eaab931fb8f7a4cd023982..ddde72e11edbcf9abb83c8d2ba30c737b5fd3ddf 100644 (file)
@@ -41,7 +41,7 @@
  * QLogic_IB "Two Wire Serial Interface" driver.
  * Originally written for a not-quite-i2c serial eeprom, which is
  * still used on some supported boards. Later boards have added a
- * variety of other uses, most board-specific, so teh bit-boffing
+ * variety of other uses, most board-specific, so the bit-boffing
  * part has been split off to this file, while the other parts
  * have been moved to chip-specific files.
  *
index 4a51fd1e9cb7de7e9aa1723e91fc100d819ba52f..828609fa4d2810ce7bdb65f721120a1512a6cec5 100644 (file)
@@ -116,7 +116,7 @@ static void qib_ud_loopback(struct qib_qp *sqp, struct qib_swqe *swqe)
        }
 
        /*
-        * A GRH is expected to preceed the data even if not
+        * A GRH is expected to precede the data even if not
         * present on the wire.
         */
        length = swqe->length;
@@ -520,7 +520,7 @@ void qib_ud_rcv(struct qib_ibport *ibp, struct qib_ib_header *hdr,
                goto drop;
 
        /*
-        * A GRH is expected to preceed the data even if not
+        * A GRH is expected to precede the data even if not
         * present on the wire.
         */
        wc.byte_len = tlen + sizeof(struct ib_grh);
index 66208bcd7c138f5f26d4a3565e596d88bab51ed7..82442085cbe64ccbea4f5e46565b492d864ade89 100644 (file)
@@ -239,7 +239,7 @@ static int qib_user_sdma_num_pages(const struct iovec *iov)
 }
 
 /*
- * Truncate length to page boundry.
+ * Truncate length to page boundary.
  */
 static int qib_user_sdma_page_length(unsigned long addr, unsigned long len)
 {
index f1df01567bb68cb66511237d2e8c9366d2b7a999..2f02ab0ccc1eb7e93c9a77aae44501646bc27ad8 100644 (file)
@@ -91,7 +91,7 @@
 #define SIZE_4K        (1UL << SHIFT_4K)
 #define MASK_4K        (~(SIZE_4K-1))
 
-                                       /* support upto 512KB in one RDMA */
+                                       /* support up to 512KB in one RDMA */
 #define ISCSI_ISER_SG_TABLESIZE         (0x80000 >> SHIFT_4K)
 #define ISER_DEF_CMD_PER_LUN           128
 
index 7f42d3a454d2d6aaebdc41e0e5a8c6700d6a00df..88d8e4cb419a1d0d6cc17828894dc4d3b67e0201 100644 (file)
@@ -39,13 +39,13 @@ struct evdev {
 };
 
 struct evdev_client {
-       int head;
-       int tail;
+       unsigned int head;
+       unsigned int tail;
        spinlock_t buffer_lock; /* protects access to buffer, head and tail */
        struct fasync_struct *fasync;
        struct evdev *evdev;
        struct list_head node;
-       int bufsize;
+       unsigned int bufsize;
        struct input_event buffer[];
 };
 
@@ -55,16 +55,25 @@ static DEFINE_MUTEX(evdev_table_mutex);
 static void evdev_pass_event(struct evdev_client *client,
                             struct input_event *event)
 {
-       /*
-        * Interrupts are disabled, just acquire the lock.
-        * Make sure we don't leave with the client buffer
-        * "empty" by having client->head == client->tail.
-        */
+       /* Interrupts are disabled, just acquire the lock. */
        spin_lock(&client->buffer_lock);
-       do {
-               client->buffer[client->head++] = *event;
-               client->head &= client->bufsize - 1;
-       } while (client->head == client->tail);
+
+       client->buffer[client->head++] = *event;
+       client->head &= client->bufsize - 1;
+
+       if (unlikely(client->head == client->tail)) {
+               /*
+                * This effectively "drops" all unconsumed events, leaving
+                * EV_SYN/SYN_DROPPED plus the newest event in the queue.
+                */
+               client->tail = (client->head - 2) & (client->bufsize - 1);
+
+               client->buffer[client->tail].time = event->time;
+               client->buffer[client->tail].type = EV_SYN;
+               client->buffer[client->tail].code = SYN_DROPPED;
+               client->buffer[client->tail].value = 0;
+       }
+
        spin_unlock(&client->buffer_lock);
 
        if (event->type == EV_SYN)
index d6e8bd8a851c26d0e4718d10d30977451bb28009..ebbceedc92f4fb8a9f8bc959734be4b442586d01 100644 (file)
@@ -1746,6 +1746,42 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int
 }
 EXPORT_SYMBOL(input_set_capability);
 
+static unsigned int input_estimate_events_per_packet(struct input_dev *dev)
+{
+       int mt_slots;
+       int i;
+       unsigned int events;
+
+       if (dev->mtsize) {
+               mt_slots = dev->mtsize;
+       } else if (test_bit(ABS_MT_TRACKING_ID, dev->absbit)) {
+               mt_slots = dev->absinfo[ABS_MT_TRACKING_ID].maximum -
+                          dev->absinfo[ABS_MT_TRACKING_ID].minimum + 1,
+               clamp(mt_slots, 2, 32);
+       } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
+               mt_slots = 2;
+       } else {
+               mt_slots = 0;
+       }
+
+       events = mt_slots + 1; /* count SYN_MT_REPORT and SYN_REPORT */
+
+       for (i = 0; i < ABS_CNT; i++) {
+               if (test_bit(i, dev->absbit)) {
+                       if (input_is_mt_axis(i))
+                               events += mt_slots;
+                       else
+                               events++;
+               }
+       }
+
+       for (i = 0; i < REL_CNT; i++)
+               if (test_bit(i, dev->relbit))
+                       events++;
+
+       return events;
+}
+
 #define INPUT_CLEANSE_BITMASK(dev, type, bits)                         \
        do {                                                            \
                if (!test_bit(EV_##type, dev->evbit))                   \
@@ -1793,6 +1829,10 @@ int input_register_device(struct input_dev *dev)
        /* Make sure that bitmasks not mentioned in dev->evbit are clean. */
        input_cleanse_bitmasks(dev);
 
+       if (!dev->hint_events_per_packet)
+               dev->hint_events_per_packet =
+                               input_estimate_events_per_packet(dev);
+
        /*
         * If delay and period are pre-set by the driver, then autorepeating
         * is handled by the driver itself and we don't do it in input.c.
index 3182c9cd1b0ed4989d8617d7c3fb49b219c58612..5688b5c88f2491a15b173b0a6f6a6e1c7998a5e5 100644 (file)
@@ -758,7 +758,7 @@ static void joydev_remove_chrdev(struct joydev *joydev)
 }
 
 /*
- * Mark device non-existant. This disables writes, ioctls and
+ * Mark device non-existent. This disables writes, ioctls and
  * prevents new users from opening the device. Already posted
  * blocking reads will stay, however new ones will fail.
  */
@@ -777,7 +777,7 @@ static void joydev_cleanup(struct joydev *joydev)
        joydev_hangup(joydev);
        joydev_remove_chrdev(joydev);
 
-       /* joydev is marked dead so noone else accesses joydev->open */
+       /* joydev is marked dead so no one else accesses joydev->open */
        if (joydev->open)
                input_close_device(handle);
 }
index d259b41354b89ddf33a4d59d7ebe41222e4a2213..1639ab2b94b7326e46a87503d98bcd2e6f3a71cb 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 /*
- * FP-Gaming Assasin 3D joystick driver for Linux
+ * FP-Gaming Assassin 3D joystick driver for Linux
  */
 
 /*
@@ -34,7 +34,7 @@
 #include <linux/input.h>
 #include <linux/jiffies.h>
 
-#define DRIVER_DESC    "FP-Gaming Assasin 3D joystick driver"
+#define DRIVER_DESC    "FP-Gaming Assassin 3D joystick driver"
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
 MODULE_DESCRIPTION(DRIVER_DESC);
index a91ee941b5c1f0a5f36a6064dd59c30c85c93567..cd89d17162a33121ed1ebcd13fddb4a06c1d4c4e 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Author: Miguel Aguilar <miguel.aguilar@ridgerun.com>
  *
- * Intial Code: Sandeep Paulraj <s-paulraj@ti.com>
+ * Initial Code: Sandeep Paulraj <s-paulraj@ti.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index bee03d64c4536b0c5c857b9dc124d95fdcb98920..d712dffd215712ee9bb419d7df062d066dcf1eac 100644 (file)
@@ -69,7 +69,7 @@ static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
        u8 sts, val;
 
        sts = readb(kbd->io_base + STATUS_REG);
-       if (sts & DATA_AVAIL)
+       if (!(sts & DATA_AVAIL))
                return IRQ_NONE;
 
        if (kbd->last_key != KEY_RESERVED) {
index 09bef79d9da1c6e3aecd6efe40c0d4c4c900ba0b..a26922cf0e84d3049d972b7dc0d79b986b3645fb 100644 (file)
@@ -332,18 +332,20 @@ static int __devinit twl4030_kp_program(struct twl4030_keypad *kp)
 static int __devinit twl4030_kp_probe(struct platform_device *pdev)
 {
        struct twl4030_keypad_data *pdata = pdev->dev.platform_data;
-       const struct matrix_keymap_data *keymap_data = pdata->keymap_data;
+       const struct matrix_keymap_data *keymap_data;
        struct twl4030_keypad *kp;
        struct input_dev *input;
        u8 reg;
        int error;
 
-       if (!pdata || !pdata->rows || !pdata->cols ||
+       if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data ||
            pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) {
                dev_err(&pdev->dev, "Invalid platform_data\n");
                return -EINVAL;
        }
 
+       keymap_data = pdata->keymap_data;
+
        kp = kzalloc(sizeof(*kp), GFP_KERNEL);
        input = input_allocate_device();
        if (!kp || !input) {
index de5900d50788b91ac78091991d19a888da56da01..144ddbdeb9b32de3fa16527b8c4ff1693d868181 100644 (file)
@@ -716,7 +716,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
        pdata = dev->platform_data;
        if (!pdata) {
                dev_dbg(dev,
-                       "No platfrom data: Using default initialization\n");
+                       "No platform data: Using default initialization\n");
                pdata = &adxl34x_default_init;
        }
 
index a93c525475c6e3945eb9cdc2d5a0db4203c8fb69..fc62256c963f6ff60167de1e84a8ae9c636a59b1 100644 (file)
@@ -312,7 +312,7 @@ static void keyspan_check_data(struct usb_keyspan *remote)
                        remote->data.tester = remote->data.tester >> 5;
                        remote->data.bits_left -= 5;
                } else {
-                       err("Bad message recieved, no stop bit found.\n");
+                       err("Bad message received, no stop bit found.\n");
                }
 
                dev_dbg(&remote->udev->dev,
index 364bdf43a381d8a052c730eb38eb005c0f006c0c..736056897e5008219cf12ba0f3bbcafee5e1c164 100644 (file)
@@ -302,10 +302,14 @@ static int uinput_validate_absbits(struct input_dev *dev)
        int retval = 0;
 
        for (cnt = 0; cnt < ABS_CNT; cnt++) {
+               int min, max;
                if (!test_bit(cnt, dev->absbit))
                        continue;
 
-               if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) {
+               min = input_abs_get_min(dev, cnt);
+               max = input_abs_get_max(dev, cnt);
+
+               if ((min != 0 || max != 0) && max <= min) {
                        printk(KERN_DEBUG
                                "%s: invalid abs[%02x] min:%d max:%d\n",
                                UINPUT_NAME, cnt,
index 12501de0c5cd36bbcc425abd84f0276607d5cbf9..52b41934898379a1d40dcea6bd283a8f50ca8d9a 100644 (file)
@@ -274,7 +274,7 @@ static struct key_entry keymap_fs_amilo_pro_v3505[] __initdata = {
        { KE_BLUETOOTH, 0x30 },                      /* Fn+F10 */
        { KE_KEY,       0x31, {KEY_MAIL} },          /* mail button */
        { KE_KEY,       0x36, {KEY_WWW} },           /* www button */
-       { KE_WIFI,      0x78 },                      /* satelite dish button */
+       { KE_WIFI,      0x78 },                      /* satellite dish button */
        { KE_END,       0 }
 };
 
index 7077f9bf5ead88a15eb65699e71d00e49715fc84..62bae99424e6e436defda3723654816c44be2609 100644 (file)
@@ -303,7 +303,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
                                   enum xenbus_state backend_state)
 {
        struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
-       int val;
+       int ret, val;
 
        switch (backend_state) {
        case XenbusStateInitialising:
@@ -316,6 +316,17 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
 
        case XenbusStateInitWait:
 InitWait:
+               ret = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+                                  "feature-abs-pointer", "%d", &val);
+               if (ret < 0)
+                       val = 0;
+               if (val) {
+                       ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
+                                           "request-abs-pointer", "1");
+                       if (ret)
+                               pr_warning("xenkbd: can't request abs-pointer");
+               }
+
                xenbus_switch_state(dev, XenbusStateConnected);
                break;
 
index 3aead91bacc851d283458a2f48064ab36ec01320..3126983c004a96860d4b042295eec0cce7b09ef1 100644 (file)
@@ -639,7 +639,7 @@ exit:
  * device, resulting in trackpad malfunction under certain
  * circumstances. To get around this problem, there is at least one
  * example that utilizes the USB_QUIRK_RESET_RESUME quirk in order to
- * recieve a reset_resume request rather than the normal resume.
+ * receive a reset_resume request rather than the normal resume.
  * Since the implementation of reset_resume is equal to mode switch
  * plus start_traffic, it seems easier to always do the switch when
  * starting traffic on the device.
index aa186cf6c514526fec46d40d4d5a47bbe38af0e9..e06e045bf907a4a77ed33998b94ad29438e6c542 100644 (file)
@@ -836,8 +836,8 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
                },
 
        },
-       { }
 #endif
+       { }
 };
 
 static bool broken_olpc_ec;
@@ -851,8 +851,8 @@ static const struct dmi_system_id __initconst olpc_dmi_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
                },
        },
-       { }
 #endif
+       { }
 };
 
 void __init synaptics_module_init(void)
index f6aa26d305edd4e4922517610fbd8437aab62367..cba3c84d2f21a30e54aaba064d6d727a02bb8148 100644 (file)
@@ -462,7 +462,7 @@ static void synaptics_i2c_work_handler(struct work_struct *work)
         * While interrupt driven, there is no real need to poll the device.
         * But touchpads are very sensitive, so there could be errors
         * related to physical environment and the attention line isn't
-        * neccesarily asserted. In such case we can lose the touchpad.
+        * necessarily asserted. In such case we can lose the touchpad.
         * We poll the device once in THREAD_IRQ_SLEEP_SECS and
         * if error is detected, we try to reset and reconfigure the touchpad.
         */
index bf2c0c80d6ccb1d8b29d16da4cf1ae9a8bdd2099..eb9a3cfbeefaacba0f646cd7bd225a535303a816 100644 (file)
@@ -334,7 +334,7 @@ static void vsxxxaa_handle_POR_packet(struct vsxxxaa *mouse)
         * M: manufacturer location code
         * R: revision code
         * E: Error code. If it's in the range of 0x00..0x1f, only some
-        *    minor problem occured. Errors >= 0x20 are considered bad
+        *    minor problem occurred. Errors >= 0x20 are considered bad
         *    and the device may not work properly...
         * D: <0010> == mouse, <0100> == tablet
         */
index 8c0b51c31424ce2e0c9b15a2a9eb467424e9b3ec..42206205e4f53700a9fcfb13200666381c3402c1 100644 (file)
@@ -955,7 +955,7 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
        INIT_DELAYED_WORK(&moduleloader_work, request_module_delayed);
 
        ret = hp_sdc_init();
-       /* after successfull initialization give SDC some time to settle
+       /* after successful initialization give SDC some time to settle
         * and then load the hp_sdc_mlc upper layer driver */
        if (!ret)
                schedule_delayed_work(&moduleloader_work,
index ac4c93689ab90d7a5a85f7e643873310dba26968..d37a48e099d0d0c63441f28c6da2a77488797cfd 100644 (file)
@@ -869,15 +869,15 @@ static int i8042_controller_selftest(void)
        do {
 
                if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
-                       pr_err("i8042 controller self test timeout\n");
+                       pr_err("i8042 controller selftest timeout\n");
                        return -ENODEV;
                }
 
                if (param == I8042_RET_CTL_TEST)
                        return 0;
 
-               pr_err("i8042 controller selftest failed. (%#x != %#x)\n",
-                      param, I8042_RET_CTL_TEST);
+               dbg("i8042 controller selftest: %#x != %#x\n",
+                   param, I8042_RET_CTL_TEST);
                msleep(50);
        } while (i++ < 5);
 
@@ -891,6 +891,7 @@ static int i8042_controller_selftest(void)
        pr_info("giving up on controller selftest, continuing anyway...\n");
        return 0;
 #else
+       pr_err("i8042 controller selftest failed\n");
        return -EIO;
 #endif
 }
index 9da6fbcaaa7e8d2ffbc0b7d3c84abee821d5d5e3..7ec3c97dc1b9b5f2198af4338db7c48ca7ec9abd 100644 (file)
@@ -90,7 +90,7 @@ static int rpckbd_open(struct serio *port)
 
        if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) {
                printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n");
-               free_irq(IRQ_KEYBOARDRX, NULL);
+               free_irq(IRQ_KEYBOARDRX, port);
                return -EBUSY;
        }
 
index 7540bafc95cf0c484aeca708116f1e94bcec3ef4..80baa53da5b169dd0d9f071b1009fdf8906d08fa 100644 (file)
@@ -225,7 +225,7 @@ static void sxps2_close(struct serio *pserio)
 /**
  * xps2_of_probe - probe method for the PS/2 device.
  * @of_dev:    pointer to OF device structure
- * @match:     pointer to the stucture used for matching a device
+ * @match:     pointer to the structure used for matching a device
  *
  * This function probes the PS/2 device in the device tree.
  * It initializes the driver data structure and the hardware.
index 337bf51bc984253abf9a77b558eb36c8c10deb53..fdb6a3976f94cbfb821aa58841d3075afe08f50f 100644 (file)
@@ -208,6 +208,12 @@ int sparse_keymap_setup(struct input_dev *dev,
                }
        }
 
+       if (test_bit(EV_KEY, dev->evbit)) {
+               __set_bit(KEY_UNKNOWN, dev->keybit);
+               __set_bit(EV_MSC, dev->evbit);
+               __set_bit(MSC_SCAN, dev->mscbit);
+       }
+
        dev->keycode = map;
        dev->keycodemax = map_size;
        dev->getkeycode = sparse_keymap_getkeycode;
@@ -268,6 +274,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k
 {
        switch (ke->type) {
        case KE_KEY:
+               input_event(dev, EV_MSC, MSC_SCAN, ke->code);
                input_report_key(dev, ke->keycode, value);
                input_sync(dev);
                if (value && autorelease) {
@@ -305,12 +312,19 @@ bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code,
 {
        const struct key_entry *ke =
                sparse_keymap_entry_from_scancode(dev, code);
+       struct key_entry unknown_ke;
 
        if (ke) {
                sparse_keymap_report_entry(dev, ke, value, autorelease);
                return true;
        }
 
+       /* Report an unknown key event as a debugging aid */
+       unknown_ke.type = KE_KEY;
+       unknown_ke.code = code;
+       unknown_ke.keycode = KEY_UNKNOWN;
+       sparse_keymap_report_entry(dev, &unknown_ke, value, true);
+
        return false;
 }
 EXPORT_SYMBOL(sparse_keymap_report_event);
index 5597637cfd41895181176f627f072ac3f0c39a77..08ba5ad9c9be76a232effefffd6dba4fd7be0429 100644 (file)
 #include "wacom.h"
 #include <linux/input/mt.h>
 
+/* resolution for penabled devices */
+#define WACOM_PL_RES           20
+#define WACOM_PENPRTN_RES      40
+#define WACOM_VOLITO_RES       50
+#define WACOM_GRAPHIRE_RES     80
+#define WACOM_INTUOS_RES       100
+#define WACOM_INTUOS3_RES      200
+
 static int wacom_penpartner_irq(struct wacom_wac *wacom)
 {
        unsigned char *data = wacom->data;
@@ -1055,6 +1063,19 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
        input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max,
                             features->pressure_fuzz, 0);
 
+       if (features->device_type == BTN_TOOL_PEN) {
+               /* penabled devices have fixed resolution for each model */
+               input_abs_set_res(input_dev, ABS_X, features->x_resolution);
+               input_abs_set_res(input_dev, ABS_Y, features->y_resolution);
+       } else {
+               input_abs_set_res(input_dev, ABS_X,
+                       wacom_calculate_touch_res(features->x_max,
+                                               features->x_phy));
+               input_abs_set_res(input_dev, ABS_Y,
+                       wacom_calculate_touch_res(features->y_max,
+                                               features->y_phy));
+       }
+
        __set_bit(ABS_MISC, input_dev->absbit);
 
        switch (wacom_wac->features.type) {
@@ -1171,15 +1192,9 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
        case TABLETPC:
                __clear_bit(ABS_MISC, input_dev->absbit);
 
-               if (features->device_type != BTN_TOOL_PEN) {
-                       input_abs_set_res(input_dev, ABS_X,
-                               wacom_calculate_touch_res(features->x_max,
-                                                       features->x_phy));
-                       input_abs_set_res(input_dev, ABS_Y,
-                               wacom_calculate_touch_res(features->y_max,
-                                                       features->y_phy));
+               if (features->device_type != BTN_TOOL_PEN)
                        break;  /* no need to process stylus stuff */
-               }
+
                /* fall through */
 
        case PL:
@@ -1216,12 +1231,6 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
                        input_set_abs_params(input_dev, ABS_MT_PRESSURE,
                                             0, features->pressure_max,
                                             features->pressure_fuzz, 0);
-                       input_abs_set_res(input_dev, ABS_X,
-                               wacom_calculate_touch_res(features->x_max,
-                                                       features->x_phy));
-                       input_abs_set_res(input_dev, ABS_Y,
-                               wacom_calculate_touch_res(features->y_max,
-                                                       features->y_phy));
                } else if (features->device_type == BTN_TOOL_PEN) {
                        __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
                        __set_bit(BTN_TOOL_PEN, input_dev->keybit);
@@ -1233,161 +1242,242 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
 }
 
 static const struct wacom_features wacom_features_0x00 =
-       { "Wacom Penpartner",     WACOM_PKGLEN_PENPRTN,    5040,  3780,  255,  0, PENPARTNER };
+       { "Wacom Penpartner",     WACOM_PKGLEN_PENPRTN,    5040,  3780,  255,
+         0, PENPARTNER, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES };
 static const struct wacom_features wacom_features_0x10 =
-       { "Wacom Graphire",       WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511, 63, GRAPHIRE };
+       { "Wacom Graphire",       WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x11 =
-       { "Wacom Graphire2 4x5",  WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511, 63, GRAPHIRE };
+       { "Wacom Graphire2 4x5",  WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x12 =
-       { "Wacom Graphire2 5x7",  WACOM_PKGLEN_GRAPHIRE,  13918, 10206,  511, 63, GRAPHIRE };
+       { "Wacom Graphire2 5x7",  WACOM_PKGLEN_GRAPHIRE,  13918, 10206,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x13 =
-       { "Wacom Graphire3",      WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511, 63, GRAPHIRE };
+       { "Wacom Graphire3",      WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x14 =
-       { "Wacom Graphire3 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511, 63, GRAPHIRE };
+       { "Wacom Graphire3 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x15 =
-       { "Wacom Graphire4 4x5",  WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511, 63, WACOM_G4 };
+       { "Wacom Graphire4 4x5",  WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511,
+         63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x16 =
-       { "Wacom Graphire4 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511, 63, WACOM_G4 };
+       { "Wacom Graphire4 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511,
+         63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x17 =
-       { "Wacom BambooFun 4x5",  WACOM_PKGLEN_BBFUN,     14760,  9225,  511, 63, WACOM_MO };
+       { "Wacom BambooFun 4x5",  WACOM_PKGLEN_BBFUN,     14760,  9225,  511,
+         63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x18 =
-       { "Wacom BambooFun 6x8",  WACOM_PKGLEN_BBFUN,     21648, 13530,  511, 63, WACOM_MO };
+       { "Wacom BambooFun 6x8",  WACOM_PKGLEN_BBFUN,     21648, 13530,  511,
+         63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x19 =
-       { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511, 63, GRAPHIRE };
+       { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x60 =
-       { "Wacom Volito",         WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511, 63, GRAPHIRE };
+       { "Wacom Volito",         WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x61 =
-       { "Wacom PenStation2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  255, 63, GRAPHIRE };
+       { "Wacom PenStation2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  255,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x62 =
-       { "Wacom Volito2 4x5",    WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511, 63, GRAPHIRE };
+       { "Wacom Volito2 4x5",    WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x63 =
-       { "Wacom Volito2 2x3",    WACOM_PKGLEN_GRAPHIRE,   3248,  2320,  511, 63, GRAPHIRE };
+       { "Wacom Volito2 2x3",    WACOM_PKGLEN_GRAPHIRE,   3248,  2320,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x64 =
-       { "Wacom PenPartner2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  511, 63, GRAPHIRE };
+       { "Wacom PenPartner2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x65 =
-       { "Wacom Bamboo",         WACOM_PKGLEN_BBFUN,     14760,  9225,  511, 63, WACOM_MO };
+       { "Wacom Bamboo",         WACOM_PKGLEN_BBFUN,     14760,  9225,  511,
+         63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x69 =
-       { "Wacom Bamboo1",        WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511, 63, GRAPHIRE };
+       { "Wacom Bamboo1",        WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511,
+         63, GRAPHIRE, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES };
 static const struct wacom_features wacom_features_0x20 =
-       { "Wacom Intuos 4x5",     WACOM_PKGLEN_INTUOS,    12700, 10600, 1023, 31, INTUOS };
+       { "Wacom Intuos 4x5",     WACOM_PKGLEN_INTUOS,    12700, 10600, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x21 =
-       { "Wacom Intuos 6x8",     WACOM_PKGLEN_INTUOS,    20320, 16240, 1023, 31, INTUOS };
+       { "Wacom Intuos 6x8",     WACOM_PKGLEN_INTUOS,    20320, 16240, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x22 =
-       { "Wacom Intuos 9x12",    WACOM_PKGLEN_INTUOS,    30480, 24060, 1023, 31, INTUOS };
+       { "Wacom Intuos 9x12",    WACOM_PKGLEN_INTUOS,    30480, 24060, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x23 =
-       { "Wacom Intuos 12x12",   WACOM_PKGLEN_INTUOS,    30480, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos 12x12",   WACOM_PKGLEN_INTUOS,    30480, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x24 =
-       { "Wacom Intuos 12x18",   WACOM_PKGLEN_INTUOS,    45720, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos 12x18",   WACOM_PKGLEN_INTUOS,    45720, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x30 =
-       { "Wacom PL400",          WACOM_PKGLEN_GRAPHIRE,   5408,  4056,  255,  0, PL };
+       { "Wacom PL400",          WACOM_PKGLEN_GRAPHIRE,   5408,  4056,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x31 =
-       { "Wacom PL500",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  255,  0, PL };
+       { "Wacom PL500",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x32 =
-       { "Wacom PL600",          WACOM_PKGLEN_GRAPHIRE,   6126,  4604,  255,  0, PL };
+       { "Wacom PL600",          WACOM_PKGLEN_GRAPHIRE,   6126,  4604,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x33 =
-       { "Wacom PL600SX",        WACOM_PKGLEN_GRAPHIRE,   6260,  5016,  255,  0, PL };
+       { "Wacom PL600SX",        WACOM_PKGLEN_GRAPHIRE,   6260,  5016,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x34 =
-       { "Wacom PL550",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  511,  0, PL };
+       { "Wacom PL550",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x35 =
-       { "Wacom PL800",          WACOM_PKGLEN_GRAPHIRE,   7220,  5780,  511,  0, PL };
+       { "Wacom PL800",          WACOM_PKGLEN_GRAPHIRE,   7220,  5780,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x37 =
-       { "Wacom PL700",          WACOM_PKGLEN_GRAPHIRE,   6758,  5406,  511,  0, PL };
+       { "Wacom PL700",          WACOM_PKGLEN_GRAPHIRE,   6758,  5406,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x38 =
-       { "Wacom PL510",          WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,  0, PL };
+       { "Wacom PL510",          WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x39 =
-       { "Wacom DTU710",         WACOM_PKGLEN_GRAPHIRE,  34080, 27660,  511,  0, PL };
+       { "Wacom DTU710",         WACOM_PKGLEN_GRAPHIRE,  34080, 27660,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0xC4 =
-       { "Wacom DTF521",         WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,  0, PL };
+       { "Wacom DTF521",         WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0xC0 =
-       { "Wacom DTF720",         WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,  0, PL };
+       { "Wacom DTF720",         WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0xC2 =
-       { "Wacom DTF720a",        WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,  0, PL };
+       { "Wacom DTF720a",        WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x03 =
-       { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE,  20480, 15360,  511,  0, PTU };
+       { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE,  20480, 15360,  511,
+         0, PTU, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x41 =
-       { "Wacom Intuos2 4x5",    WACOM_PKGLEN_INTUOS,    12700, 10600, 1023, 31, INTUOS };
+       { "Wacom Intuos2 4x5",    WACOM_PKGLEN_INTUOS,    12700, 10600, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x42 =
-       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023, 31, INTUOS };
+       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x43 =
-       { "Wacom Intuos2 9x12",   WACOM_PKGLEN_INTUOS,    30480, 24060, 1023, 31, INTUOS };
+       { "Wacom Intuos2 9x12",   WACOM_PKGLEN_INTUOS,    30480, 24060, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x44 =
-       { "Wacom Intuos2 12x12",  WACOM_PKGLEN_INTUOS,    30480, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos2 12x12",  WACOM_PKGLEN_INTUOS,    30480, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x45 =
-       { "Wacom Intuos2 12x18",  WACOM_PKGLEN_INTUOS,    45720, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos2 12x18",  WACOM_PKGLEN_INTUOS,    45720, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xB0 =
-       { "Wacom Intuos3 4x5",    WACOM_PKGLEN_INTUOS,    25400, 20320, 1023, 63, INTUOS3S };
+       { "Wacom Intuos3 4x5",    WACOM_PKGLEN_INTUOS,    25400, 20320, 1023,
+         63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB1 =
-       { "Wacom Intuos3 6x8",    WACOM_PKGLEN_INTUOS,    40640, 30480, 1023, 63, INTUOS3 };
+       { "Wacom Intuos3 6x8",    WACOM_PKGLEN_INTUOS,    40640, 30480, 1023,
+         63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB2 =
-       { "Wacom Intuos3 9x12",   WACOM_PKGLEN_INTUOS,    60960, 45720, 1023, 63, INTUOS3 };
+       { "Wacom Intuos3 9x12",   WACOM_PKGLEN_INTUOS,    60960, 45720, 1023,
+         63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB3 =
-       { "Wacom Intuos3 12x12",  WACOM_PKGLEN_INTUOS,    60960, 60960, 1023, 63, INTUOS3L };
+       { "Wacom Intuos3 12x12",  WACOM_PKGLEN_INTUOS,    60960, 60960, 1023,
+         63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB4 =
-       { "Wacom Intuos3 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 1023, 63, INTUOS3L };
+       { "Wacom Intuos3 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 1023,
+         63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB5 =
-       { "Wacom Intuos3 6x11",   WACOM_PKGLEN_INTUOS,    54204, 31750, 1023, 63, INTUOS3 };
+       { "Wacom Intuos3 6x11",   WACOM_PKGLEN_INTUOS,    54204, 31750, 1023,
+         63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB7 =
-       { "Wacom Intuos3 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 1023, 63, INTUOS3S };
+       { "Wacom Intuos3 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 1023,
+         63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB8 =
-       { "Wacom Intuos4 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 2047, 63, INTUOS4S };
+       { "Wacom Intuos4 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 2047,
+         63, INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB9 =
-       { "Wacom Intuos4 6x9",    WACOM_PKGLEN_INTUOS,    44704, 27940, 2047, 63, INTUOS4 };
+       { "Wacom Intuos4 6x9",    WACOM_PKGLEN_INTUOS,    44704, 27940, 2047,
+         63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xBA =
-       { "Wacom Intuos4 8x13",   WACOM_PKGLEN_INTUOS,    65024, 40640, 2047, 63, INTUOS4L };
+       { "Wacom Intuos4 8x13",   WACOM_PKGLEN_INTUOS,    65024, 40640, 2047,
+         63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xBB =
-       { "Wacom Intuos4 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 2047, 63, INTUOS4L };
+       { "Wacom Intuos4 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 2047,
+         63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xBC =
-       { "Wacom Intuos4 WL",     WACOM_PKGLEN_INTUOS,    40840, 25400, 2047, 63, INTUOS4 };
+       { "Wacom Intuos4 WL",     WACOM_PKGLEN_INTUOS,    40840, 25400, 2047,
+         63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0x3F =
-       { "Wacom Cintiq 21UX",    WACOM_PKGLEN_INTUOS,    87200, 65600, 1023, 63, CINTIQ };
+       { "Wacom Cintiq 21UX",    WACOM_PKGLEN_INTUOS,    87200, 65600, 1023,
+         63, CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xC5 =
-       { "Wacom Cintiq 20WSX",   WACOM_PKGLEN_INTUOS,    86680, 54180, 1023, 63, WACOM_BEE };
+       { "Wacom Cintiq 20WSX",   WACOM_PKGLEN_INTUOS,    86680, 54180, 1023,
+         63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xC6 =
-       { "Wacom Cintiq 12WX",    WACOM_PKGLEN_INTUOS,    53020, 33440, 1023, 63, WACOM_BEE };
+       { "Wacom Cintiq 12WX",    WACOM_PKGLEN_INTUOS,    53020, 33440, 1023,
+         63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xC7 =
-       { "Wacom DTU1931",        WACOM_PKGLEN_GRAPHIRE,  37832, 30305,  511,  0, PL };
+       { "Wacom DTU1931",        WACOM_PKGLEN_GRAPHIRE,  37832, 30305,  511,
+         0, PL, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xCE =
-       { "Wacom DTU2231",        WACOM_PKGLEN_GRAPHIRE,  47864, 27011,  511,  0, DTU };
+       { "Wacom DTU2231",        WACOM_PKGLEN_GRAPHIRE,  47864, 27011,  511,
+         0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xF0 =
-       { "Wacom DTU1631",        WACOM_PKGLEN_GRAPHIRE,  34623, 19553,  511,  0, DTU };
+       { "Wacom DTU1631",        WACOM_PKGLEN_GRAPHIRE,  34623, 19553,  511,
+         0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xCC =
-       { "Wacom Cintiq 21UX2",   WACOM_PKGLEN_INTUOS,    87200, 65600, 2047, 63, WACOM_21UX2 };
+       { "Wacom Cintiq 21UX2",   WACOM_PKGLEN_INTUOS,    87200, 65600, 2047,
+         63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0x90 =
-       { "Wacom ISDv4 90",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 90",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x93 =
-       { "Wacom ISDv4 93",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 93",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x9A =
-       { "Wacom ISDv4 9A",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 9A",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x9F =
-       { "Wacom ISDv4 9F",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 9F",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xE2 =
-       { "Wacom ISDv4 E2",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,  0, TABLETPC2FG };
+       { "Wacom ISDv4 E2",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,
+         0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xE3 =
-       { "Wacom ISDv4 E3",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,  0, TABLETPC2FG };
+       { "Wacom ISDv4 E3",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,
+         0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xE6 =
+       { "Wacom ISDv4 E6",       WACOM_PKGLEN_TPC2FG,    27760, 15694,  255,
+         0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x47 =
-       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023, 31, INTUOS };
-static struct wacom_features wacom_features_0xD0 =
-       { "Wacom Bamboo 2FG",     WACOM_PKGLEN_BBFUN,     14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD1 =
-       { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN,     14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD2 =
-       { "Wacom Bamboo Craft",   WACOM_PKGLEN_BBFUN,     14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD3 =
-       { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN,     21648, 13530, 1023, 63, BAMBOO_PT };
+       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD0 =
+       { "Wacom Bamboo 2FG",     WACOM_PKGLEN_BBFUN,     14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD1 =
+       { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN,     14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD2 =
+       { "Wacom Bamboo Craft",   WACOM_PKGLEN_BBFUN,     14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD3 =
+       { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN,     21648, 13530, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xD4 =
-       { "Wacom Bamboo Pen",     WACOM_PKGLEN_BBFUN,     14720,  9200,  255, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD6 =
-       { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN,   14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD7 =
-       { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD8 =
-       { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN,   21648, 13530, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xDA =
-       { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN,  14720,  9200, 1023, 63, BAMBOO_PT };
+       { "Wacom Bamboo Pen",     WACOM_PKGLEN_BBFUN,     14720,  9200,  255,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD6 =
+       { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN,   14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD7 =
+       { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD8 =
+       { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN,   21648, 13530, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xDA =
+       { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN,  14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static struct wacom_features wacom_features_0xDB =
-       { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN,  21648, 13530, 1023, 63, BAMBOO_PT };
+       { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN,  21648, 13530, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x6004 =
-       { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800, 8000, 255, 0, TABLETPC };
+       { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 
 #define USB_DEVICE_WACOM(prod)                                 \
        USB_DEVICE(USB_VENDOR_ID_WACOM, prod),                  \
@@ -1474,6 +1564,7 @@ const struct usb_device_id wacom_ids[] = {
        { USB_DEVICE_WACOM(0x9F) },
        { USB_DEVICE_WACOM(0xE2) },
        { USB_DEVICE_WACOM(0xE3) },
+       { USB_DEVICE_WACOM(0xE6) },
        { USB_DEVICE_WACOM(0x47) },
        { USB_DEVICE_LENOVO(0x6004) },
        { }
index 835f756b150c193fb9b46b4cd3ae6cccefa0a851..53eb71b6833099ad0a23aed0a3943553231794f1 100644 (file)
@@ -74,6 +74,8 @@ struct wacom_features {
        int pressure_max;
        int distance_max;
        int type;
+       int x_resolution;
+       int y_resolution;
        int device_type;
        int x_phy;
        int y_phy;
index b4d7f63deff106a6d08c0507c7e3febe0662e783..45f93d0f5592e2c3adcdcfdad32ce83696312647 100644 (file)
@@ -62,7 +62,7 @@ MODULE_LICENSE("GPL");
         Programmer has no control over these numbers.
         TODO there are holes - specifically  1,7,0x0a
 */
-#define VERSION_ID              0       /* Get Version (request/respose) */
+#define VERSION_ID              0       /* Get Version (request/response) */
 #define KEYBD_ID                2       /* Keyboard (event) */
 #define TOUCHS_ID               3       /* Touch Screen (event)*/
 #define EEPROM_READ_ID          4       /* (request/response) */
@@ -399,31 +399,34 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv)
                        IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) {
                printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n");
                err = -EBUSY;
-               goto fail2;
+               goto fail1;
        }
 
        if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler,
                        IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) {
                printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n");
                err = -EBUSY;
-               goto fail3;
+               goto fail2;
        }
 
        serio_set_drvdata(serio, ts);
 
        err = serio_open(serio, drv);
        if (err)
-               return err;
+               goto fail3;
 
        //h3600_flite_control(1, 25);     /* default brightness */
-       input_register_device(ts->dev);
+       err = input_register_device(ts->dev);
+       if (err)
+               goto fail4;
 
        return 0;
 
-fail3: free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts->dev);
+fail4: serio_close(serio);
+fail3: serio_set_drvdata(serio, NULL);
+       free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts->dev);
 fail2: free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts->dev);
-fail1: serio_set_drvdata(serio, NULL);
-       input_free_device(input_dev);
+fail1: input_free_device(input_dev);
        kfree(ts);
        return err;
 }
index c0307b22d86fe78f9c74fdb27225b4971567232c..66c96bfc5522d64f79298c9a2ea5a61a9ce3d1e5 100644 (file)
@@ -542,7 +542,7 @@ static int __devinit mrstouch_adc_init(struct mrstouch_dev *tsdev)
         * ADC power on, start, enable PENDET and set loop delay
         * ADC loop delay is set to 4.5 ms approximately
         * Loop delay more than this results in jitter in adc readings
-        * Setting loop delay to 0 (continous loop) in MAXIM stops PENDET
+        * Setting loop delay to 0 (continuous loop) in MAXIM stops PENDET
         * interrupt generation sometimes.
         */
 
index 028a5363eea14612a15dee19f0f61c858d4fe87a..3b5b5df04dd686ec77b20d32c16141ce44bc0865 100644 (file)
@@ -6,7 +6,7 @@
  *  Copyright: MontaVista Software, Inc.
  *
  * Spliting done by: Marek Vasut <marek.vasut@gmail.com>
- * If something doesnt work and it worked before spliting, e-mail me,
+ * If something doesn't work and it worked before spliting, e-mail me,
  * dont bother Nicolas please ;-)
  *
  * This program is free software; you can redistribute it and/or modify
index 6ae054f8e0aa50b5e07f7d43f21f582bb19cf98f..9175d49d25469d0eaa7794960580c14d7740b9a9 100644 (file)
@@ -68,8 +68,23 @@ struct wm831x_ts {
        unsigned int pd_irq;
        bool pressure;
        bool pen_down;
+       struct work_struct pd_data_work;
 };
 
+static void wm831x_pd_data_work(struct work_struct *work)
+{
+       struct wm831x_ts *wm831x_ts =
+               container_of(work, struct wm831x_ts, pd_data_work);
+
+       if (wm831x_ts->pen_down) {
+               enable_irq(wm831x_ts->data_irq);
+               dev_dbg(wm831x_ts->wm831x->dev, "IRQ PD->DATA done\n");
+       } else {
+               enable_irq(wm831x_ts->pd_irq);
+               dev_dbg(wm831x_ts->wm831x->dev, "IRQ DATA->PD done\n");
+       }
+}
+
 static irqreturn_t wm831x_ts_data_irq(int irq, void *irq_data)
 {
        struct wm831x_ts *wm831x_ts = irq_data;
@@ -110,6 +125,9 @@ static irqreturn_t wm831x_ts_data_irq(int irq, void *irq_data)
        }
 
        if (!wm831x_ts->pen_down) {
+               /* Switch from data to pen down */
+               dev_dbg(wm831x->dev, "IRQ DATA->PD\n");
+
                disable_irq_nosync(wm831x_ts->data_irq);
 
                /* Don't need data any more */
@@ -128,6 +146,10 @@ static irqreturn_t wm831x_ts_data_irq(int irq, void *irq_data)
                                         ABS_PRESSURE, 0);
 
                input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 0);
+
+               schedule_work(&wm831x_ts->pd_data_work);
+       } else {
+               input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 1);
        }
 
        input_sync(wm831x_ts->input_dev);
@@ -141,6 +163,11 @@ static irqreturn_t wm831x_ts_pen_down_irq(int irq, void *irq_data)
        struct wm831x *wm831x = wm831x_ts->wm831x;
        int ena = 0;
 
+       if (wm831x_ts->pen_down)
+               return IRQ_HANDLED;
+
+       disable_irq_nosync(wm831x_ts->pd_irq);
+
        /* Start collecting data */
        if (wm831x_ts->pressure)
                ena |= WM831X_TCH_Z_ENA;
@@ -149,14 +176,14 @@ static irqreturn_t wm831x_ts_pen_down_irq(int irq, void *irq_data)
                        WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA | WM831X_TCH_Z_ENA,
                        WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA | ena);
 
-       input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 1);
-       input_sync(wm831x_ts->input_dev);
-
        wm831x_set_bits(wm831x, WM831X_INTERRUPT_STATUS_1,
                        WM831X_TCHPD_EINT, WM831X_TCHPD_EINT);
 
        wm831x_ts->pen_down = true;
-       enable_irq(wm831x_ts->data_irq);
+
+       /* Switch from pen down to data */
+       dev_dbg(wm831x->dev, "IRQ PD->DATA\n");
+       schedule_work(&wm831x_ts->pd_data_work);
 
        return IRQ_HANDLED;
 }
@@ -182,13 +209,28 @@ static void wm831x_ts_input_close(struct input_dev *idev)
        struct wm831x_ts *wm831x_ts = input_get_drvdata(idev);
        struct wm831x *wm831x = wm831x_ts->wm831x;
 
+       /* Shut the controller down, disabling all other functionality too */
        wm831x_set_bits(wm831x, WM831X_TOUCH_CONTROL_1,
-                       WM831X_TCH_ENA | WM831X_TCH_CVT_ENA |
-                       WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA |
-                       WM831X_TCH_Z_ENA, 0);
+                       WM831X_TCH_ENA | WM831X_TCH_X_ENA |
+                       WM831X_TCH_Y_ENA | WM831X_TCH_Z_ENA, 0);
 
-       if (wm831x_ts->pen_down)
+       /* Make sure any pending IRQs are done, the above will prevent
+        * new ones firing.
+        */
+       synchronize_irq(wm831x_ts->data_irq);
+       synchronize_irq(wm831x_ts->pd_irq);
+
+       /* Make sure the IRQ completion work is quiesced */
+       flush_work_sync(&wm831x_ts->pd_data_work);
+
+       /* If we ended up with the pen down then make sure we revert back
+        * to pen detection state for the next time we start up.
+        */
+       if (wm831x_ts->pen_down) {
                disable_irq(wm831x_ts->data_irq);
+               enable_irq(wm831x_ts->pd_irq);
+               wm831x_ts->pen_down = false;
+       }
 }
 
 static __devinit int wm831x_ts_probe(struct platform_device *pdev)
@@ -198,7 +240,7 @@ static __devinit int wm831x_ts_probe(struct platform_device *pdev)
        struct wm831x_pdata *core_pdata = dev_get_platdata(pdev->dev.parent);
        struct wm831x_touch_pdata *pdata = NULL;
        struct input_dev *input_dev;
-       int error;
+       int error, irqf;
 
        if (core_pdata)
                pdata = core_pdata->touch;
@@ -212,6 +254,7 @@ static __devinit int wm831x_ts_probe(struct platform_device *pdev)
 
        wm831x_ts->wm831x = wm831x;
        wm831x_ts->input_dev = input_dev;
+       INIT_WORK(&wm831x_ts->pd_data_work, wm831x_pd_data_work);
 
        /*
         * If we have a direct IRQ use it, otherwise use the interrupt
@@ -270,9 +313,14 @@ static __devinit int wm831x_ts_probe(struct platform_device *pdev)
        wm831x_set_bits(wm831x, WM831X_TOUCH_CONTROL_1,
                        WM831X_TCH_RATE_MASK, 6);
 
+       if (pdata && pdata->data_irqf)
+               irqf = pdata->data_irqf;
+       else
+               irqf = IRQF_TRIGGER_HIGH;
+
        error = request_threaded_irq(wm831x_ts->data_irq,
                                     NULL, wm831x_ts_data_irq,
-                                    IRQF_ONESHOT,
+                                    irqf | IRQF_ONESHOT,
                                     "Touchscreen data", wm831x_ts);
        if (error) {
                dev_err(&pdev->dev, "Failed to request data IRQ %d: %d\n",
@@ -281,9 +329,14 @@ static __devinit int wm831x_ts_probe(struct platform_device *pdev)
        }
        disable_irq(wm831x_ts->data_irq);
 
+       if (pdata && pdata->pd_irqf)
+               irqf = pdata->pd_irqf;
+       else
+               irqf = IRQF_TRIGGER_HIGH;
+
        error = request_threaded_irq(wm831x_ts->pd_irq,
                                     NULL, wm831x_ts_pen_down_irq,
-                                    IRQF_ONESHOT,
+                                    irqf | IRQF_ONESHOT,
                                     "Touchscreen pen down", wm831x_ts);
        if (error) {
                dev_err(&pdev->dev, "Failed to request pen down IRQ %d: %d\n",
index 6b5be742c27dac15fd5b11734b2759638b8046f0..98e61175d3f516ae23ca39de24435426e2bd5298 100644 (file)
@@ -306,7 +306,7 @@ static int wm9705_acc_enable(struct wm97xx *wm, int enable)
        dig2 = wm->dig[2];
 
        if (enable) {
-               /* continous mode */
+               /* continuous mode */
                if (wm->mach_ops->acc_startup &&
                    (ret = wm->mach_ops->acc_startup(wm)) < 0)
                        return ret;
index 7490b05c356651cf8aa6e2d0e1ee1b1621096cd6..2bc2fb801009d47211e6f4f6bc4d0a987c44a3a2 100644 (file)
@@ -419,7 +419,7 @@ static int wm9712_acc_enable(struct wm97xx *wm, int enable)
        dig2 = wm->dig[2];
 
        if (enable) {
-               /* continous mode */
+               /* continuous mode */
                if (wm->mach_ops->acc_startup) {
                        ret = wm->mach_ops->acc_startup(wm);
                        if (ret < 0)
index 238b5132712eef7b4986636b16ce78c070df15b0..73ec99568f1285dd8176428e512e6042b83e7f9f 100644 (file)
@@ -431,7 +431,7 @@ static int wm9713_acc_enable(struct wm97xx *wm, int enable)
        dig3 = wm->dig[2];
 
        if (enable) {
-               /* continous mode */
+               /* continuous mode */
                if (wm->mach_ops->acc_startup &&
                        (ret = wm->mach_ops->acc_startup(wm)) < 0)
                        return ret;
index 6b75c9f660ae213294ac656e91e4b961fbb8f083..5dbe73af2f8f06e9ee200bb58eb6a401e6e75ca1 100644 (file)
@@ -335,7 +335,7 @@ static void wm97xx_pen_irq_worker(struct work_struct *work)
         */
        if (!wm->mach_ops->acc_enabled || wm->mach_ops->acc_pen_down) {
                if (wm->pen_is_down && !pen_was_down) {
-                       /* Data is not availiable immediately on pen down */
+                       /* Data is not available immediately on pen down */
                        queue_delayed_work(wm->ts_workq, &wm->ts_reader, 1);
                }
 
@@ -354,7 +354,7 @@ static void wm97xx_pen_irq_worker(struct work_struct *work)
  * Codec PENDOWN irq handler
  *
  * We have to disable the codec interrupt in the handler because it
- * can take upto 1ms to clear the interrupt source. We schedule a task
+ * can take up to 1ms to clear the interrupt source. We schedule a task
  * in a work queue to do the actual interaction with the chip.  The
  * interrupt is then enabled again in the slow handler when the source
  * has been cleared.
index 9f5b68037a268a23d5c257f9d9aa011f4240fb6b..e330da0c5fc0b2c63820049fe065236f15e03ae6 100644 (file)
@@ -673,7 +673,7 @@ struct async_s {
 
 
 /*------------------------------------------------------------------*/
-/* auxilliary states for supplementary services                     */
+/* auxiliary states for supplementary services                     */
 /*------------------------------------------------------------------*/
 
 #define IDLE                0
index 0c6c650d76bb731b6a186dc1a0d8406e68fd5b0e..a6f175596364d82b7d96a27387a360d6b7501aa3 100644 (file)
@@ -60,7 +60,7 @@ typedef struct _diva_xdi_capi_cfg {
   -------------------------------------------------------------------------- */
 struct _ISDN_ADAPTER {
  void             (* DIRequest)(PISDN_ADAPTER, ENTITY *) ;
- int                 State ; /* from NT4 1.srv, a good idea, but  a poor achievment */
+ int                 State ; /* from NT4 1.srv, a good idea, but  a poor achievement */
  int                 Initialized ;
  int         RegisteredWithDidd ;
  int                 Unavailable ;  /* callback function possible? */
index 341ef17c22acb279848ced2d08747189cf128bc2..8c5c563c4f123fc4e61780433c1a44481887b9e5 100644 (file)
@@ -2639,7 +2639,7 @@ static byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
     }
     else
     {
-      /* local reply if assign unsuccessfull
+      /* local reply if assign unsuccessful
          or B3 protocol allows only one layer 3 connection
            and already connected
              or B2 protocol not any LAPD
@@ -8189,7 +8189,7 @@ static word add_b23(PLCI *plci, API_PARSE *bp)
       dlc[ 0] = 15;
       if(b2_config->length >= 8) { /* PIAFS control abilities */
         dlc[ 7] = 10; 
-        dlc[16] = 2; /* Length of PIAFS extention */
+        dlc[16] = 2; /* Length of PIAFS extension */
         dlc[17] = PIAFS_UDATA_ABILITIES; /* control (UDATA) ability */
         dlc[18] = b2_config_parms[4].info[0]; /* value */
         dlc[ 0] = 18;
index 1c6945768a35f1ba55203dc08718cf94f7f833ca..bf6b0181240044d5309f53a0a4e7735f587efe11 100644 (file)
@@ -701,7 +701,7 @@ Byte | 8 7 6 5 4 3 2 1
 #define PROTCAP_FREE12    0x1000  /* not used                            */
 #define PROTCAP_FREE13    0x2000  /* not used                            */
 #define PROTCAP_FREE14    0x4000  /* not used                            */
-#define PROTCAP_EXTENSION 0x8000  /* used for future extentions          */
+#define PROTCAP_EXTENSION 0x8000  /* used for future extensions          */
 /* -----------------------------------------------------------* */
 /* Onhook data transmission ETS30065901 */
 /* Message Type */
index 6563db998d061388afea1eda81f68af3fcd43838..ac0bdd1f23fa0ef1c02b7b18775623bf87209546 100644 (file)
@@ -363,7 +363,7 @@ int diva_um_idi_read(void *entity,
 
                if ((ret = (*cp_fn) (os_handle, dst, data, length)) >= 0) {
                        /*
-                          Acknowledge only if read was successfull
+                          Acknowledge only if read was successful
                         */
                        diva_data_q_ack_segment4read(q);
                }
index 4e3780d78ac7e94d959f32b372a4235c6762d028..f6f3c87cc7c2f071ed7d2577f7e7315f5c1e7a6a 100644 (file)
  *     -> See hfc_multi.h for HFC_IO_MODE_* values
  *     By default, the IO mode is pci memory IO (MEMIO).
  *     Some cards require specific IO mode, so it cannot be changed.
- *     It may be usefull to set IO mode to register io (REGIO) to solve
+ *     It may be useful to set IO mode to register io (REGIO) to solve
  *     PCI bridge problems.
  *     If unsure, don't give this parameter.
  *
@@ -903,7 +903,7 @@ vpm_echocan_off(struct hfc_multi *hc, int ch)
 /*
  * Speech Design resync feature
  * NOTE: This is called sometimes outside interrupt handler.
- * We must lock irqsave, so no other interrupt (other card) will occurr!
+ * We must lock irqsave, so no other interrupt (other card) will occur!
  * Also multiple interrupts may nest, so must lock each access (lists, card)!
  */
 static inline void
index 15d323b8be60df928b911986e047dc88ce854287..4343abac0b1396c07118fe40295a2466927e71c0 100644 (file)
@@ -272,7 +272,7 @@ reset_hfcpci(struct hfc_pci *hc)
         * D- and monitor/CI channel are not enabled
         * STIO1 is used as output for data, B1+B2 from ST->IOM+HFC
         * STIO2 is used as data input, B1+B2 from IOM->ST
-        * ST B-channel send disabled -> continous 1s
+        * ST B-channel send disabled -> continuous 1s
         * The IOM slots are always enabled
         */
        if (test_bit(HFC_CFG_PCM, &hc->cfg)) {
index 3147020d188be82f8e03d4dccc7d4c762e2a372c..0cb0546ead88b9d7a355c2f96c0dbbf541301d64 100644 (file)
@@ -146,7 +146,7 @@ reset_hfcpci(struct IsdnCardState *cs)
        /* D- and monitor/CI channel are not enabled */
        /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */
        /* STIO2 is used as data input, B1+B2 from IOM->ST */
-       /* ST B-channel send disabled -> continous 1s */
+       /* ST B-channel send disabled -> continuous 1s */
        /* The IOM slots are always enabled */
        cs->hw.hfcpci.conn = 0x36;      /* set data flow directions */
        Write_hfc(cs, HFCPCI_CONNECT, cs->hw.hfcpci.conn);
index 1235b7131ae16e8f886eb5ddddd5aef8417bf2b9..156d7c63d944cab5ed911b67b3ce485c2a64acec 100644 (file)
@@ -399,7 +399,7 @@ reset_hfcsx(struct IsdnCardState *cs)
        /* D- and monitor/CI channel are not enabled */
        /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */
        /* STIO2 is used as data input, B1+B2 from IOM->ST */
-       /* ST B-channel send disabled -> continous 1s */
+       /* ST B-channel send disabled -> continuous 1s */
        /* The IOM slots are always enabled */
        cs->hw.hfcsx.conn = 0x36;       /* set data flow directions */
        Write_hfc(cs, HFCSX_CONNECT, cs->hw.hfcsx.conn);
index e79f56568d301fa224f025e64cc966f063ff0201..2f581c0b469399962313ef24f75e9c471c341fd4 100644 (file)
@@ -126,7 +126,7 @@ static struct hfcusb_symbolic_list urb_errlist[] = {
 
 
 /*
- * device dependant information to support different
+ * device dependent information to support different
  * ISDN Ta's using the HFC-S USB chip
  */
 
index cc6ee2d398803a6785241968c678d5272edc9c58..8e2fd02ecce0edd164c377f2e742f37533c8419e 100644 (file)
@@ -1595,7 +1595,7 @@ l3dss1_setup(struct l3_process *pc, u_char pr, void *arg)
         * Bearer Capabilities
         */
        p = skb->data;
-       /* only the first occurence 'll be detected ! */
+       /* only the first occurrence 'll be detected ! */
        if ((p = findie(p, skb->len, 0x04, 0))) {
                if ((p[1] < 2) || (p[1] > 11))
                        err = 1;
@@ -2161,7 +2161,7 @@ static void l3dss1_redir_req_early(struct l3_process *pc, u_char pr, void *arg)
 
 /***********************************************/
 /* handle special commands for this protocol.  */
-/* Examples are call independant services like */
+/* Examples are call independent services like */
 /* remote operations with dummy  callref.      */
 /***********************************************/
 static int l3dss1_cmd_global(struct PStack *st, isdn_ctrl *ic)
index f9584491fe8e42eca96560967892f31d0d53d8f4..7b229c0ce1151b29e99bcf25c784bf80a9608a3b 100644 (file)
@@ -1449,7 +1449,7 @@ l3ni1_setup(struct l3_process *pc, u_char pr, void *arg)
         * Bearer Capabilities
         */
        p = skb->data;
-       /* only the first occurence 'll be detected ! */
+       /* only the first occurrence 'll be detected ! */
        if ((p = findie(p, skb->len, 0x04, 0))) {
                if ((p[1] < 2) || (p[1] > 11))
                        err = 1;
@@ -2017,7 +2017,7 @@ static void l3ni1_redir_req_early(struct l3_process *pc, u_char pr, void *arg)
 
 /***********************************************/
 /* handle special commands for this protocol.  */
-/* Examples are call independant services like */
+/* Examples are call independent services like */
 /* remote operations with dummy  callref.      */
 /***********************************************/
 static int l3ni1_cmd_global(struct PStack *st, isdn_ctrl *ic)
index 2344e7b3344833263ee9c42fe3db93ea3ca660f2..a1b89524b50531ee959d2def44ea42f2bb6fa378 100644 (file)
@@ -167,7 +167,7 @@ static int __devinit njs_pci_probe(struct pci_dev *dev_netjet,
                return(0);
        }
        /* the TJ300 and TJ320 must be detected, the IRQ handling is different
-        * unfortunatly the chips use the same device ID, but the TJ320 has
+        * unfortunately the chips use the same device ID, but the TJ320 has
         * the bit20 in status PCI cfg register set
         */
        pci_read_config_dword(dev_netjet, 0x04, &cfg);
index e56e5af889b63402dc5e3a09d9b1e2e6f70a42c2..ed4bc564dc634f455613f57a854995daf51b49e9 100644 (file)
@@ -124,7 +124,7 @@ static void usb_b_out(struct st5481_bcs *bcs,int buf_nr)
 }
 
 /*
- * Start transfering (flags or data) on the B channel, since
+ * Start transferring (flags or data) on the B channel, since
  * FIFO counters has been set to a non-zero value.
  */
 static void st5481B_start_xfer(void *context)
index 10d41c5d73ed7c9a848b0f2de4096959dd514834..159e8fa00fd67b223b76cb325b5699ae095bb343 100644 (file)
@@ -470,7 +470,7 @@ void st5481_release_isocpipes(struct urb* urb[2])
 
 /*
  * Decode frames received on the B/D channel.
- * Note that this function will be called continously
+ * Note that this function will be called continuously
  * with 64Kbit/s / 16Kbit/s of data and hence it will be 
  * called 50 times per second with 20 ISOC descriptors. 
  * Called at interrupt.
index 282a4467ef19571c803f296aee3b82b2e5883c20..aa25e183bf794947e6687fcc10d599f72fe0385c 100644 (file)
@@ -9,7 +9,7 @@
     Also inspired by ELSA PCMCIA driver 
     by Klaus Lichtenwalder <Lichtenwalder@ACM.org>
     
-    Extentions to new hisax_pcmcia by Karsten Keil
+    Extensions to new hisax_pcmcia by Karsten Keil
 
     minor changes to be compatible with kernel 2.4.x
     by Jan.Schubert@GMX.li
index 81db4a190d410360e9544bb752bef801515898ad..3674d30d6a0362c4c0708fbe0011bc753c4046af 100644 (file)
@@ -143,7 +143,7 @@ hysdn_sched_tx(hysdn_card *card, unsigned char *buf,
 /* send one config line to the card and return 0 if successful, otherwise a */
 /* negative error code.                                                      */
 /* The function works with timeouts perhaps not giving the greatest speed    */
-/* sending the line, but this should be meaningless beacuse only some lines  */
+/* sending the line, but this should be meaningless because only some lines  */
 /* are to be sent and this happens very seldom.                              */
 /*****************************************************************************/
 int
index afeede7ee2954237251865dd7e879055fa320f9e..2a7d17c194894ff472ce9d173bb59bc89b528420 100644 (file)
@@ -1530,7 +1530,7 @@ isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data)
                printk (KERN_WARNING
                                "UPDOWN: Line protocol on Interface %s,"
                                " changed state to down\n", lp->netdev->dev->name);
-               /* should stop routing higher-level data accross */
+               /* should stop routing higher-level data across */
        } else if ((!lp->cisco_line_state) &&
                (myseq_diff >= 0) && (myseq_diff <= 2)) {
                /* line down -> up */
@@ -1538,7 +1538,7 @@ isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data)
                printk (KERN_WARNING
                                "UPDOWN: Line protocol on Interface %s,"
                                " changed state to up\n", lp->netdev->dev->name);
-               /* restart routing higher-level data accross */
+               /* restart routing higher-level data across */
        }
 
        if (lp->cisco_debserint)
index 9e8162c80bb06580d3945c0990e79bfa4876b396..1b002b0002a4eed4815db25d8dc98000115b8fd0 100644 (file)
@@ -1514,7 +1514,7 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp)
 #define MP_LONGSEQ_MAXBIT      ((MP_LONGSEQ_MASK+1)>>1)
 #define MP_SHORTSEQ_MAXBIT     ((MP_SHORTSEQ_MASK+1)>>1)
 
-/* sequence-wrap safe comparisions (for long sequence)*/ 
+/* sequence-wrap safe comparisons (for long sequence)*/
 #define MP_LT(a,b)     ((a-b)&MP_LONGSEQ_MAXBIT)
 #define MP_LE(a,b)     !((b-a)&MP_LONGSEQ_MAXBIT)
 #define MP_GT(a,b)     ((b-a)&MP_LONGSEQ_MAXBIT)
@@ -1746,7 +1746,7 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp,
                 * then next fragment should be the start of new reassembly
                 * if sequence is contiguous, but we haven't reassembled yet,
                 * keep going.
-                * if sequence is not contiguous, either clear everyting
+                * if sequence is not contiguous, either clear everything
                 * below low watermark and set start to the next frag or
                 * clear start ptr.
                 */ 
index 3d88f15aa218bc318d9a4e5c790d5c0029edf703..607d846ae0635c6caefea06f5173c4d814d94fbf 100644 (file)
@@ -792,7 +792,7 @@ isdn_tty_suspend(char *id, modem_info * info, atemu * m)
 }
 
 /* isdn_tty_resume() tries to resume a suspended call
- * setup of the lower levels before that. unfortunatly here is no
+ * setup of the lower levels before that. unfortunately here is no
  * checking for compatibility of used protocols implemented by Q931
  * It does the same things like isdn_tty_dial, the last command
  * is different, may be we can merge it.
index b8a1098b66edfb07c62c3810dbe8d52beec7f8cb..d497db0a26d0f4cb5daebcb937423b899319a347 100644 (file)
@@ -954,7 +954,7 @@ isdnloop_parse_cmd(isdnloop_card * card)
 /*
  * Put command-strings into the of the 'card'. In reality, execute them
  * right in place by calling isdnloop_parse_cmd(). Also copy every
- * command to the read message ringbuffer, preceeding it with a '>'.
+ * command to the read message ringbuffer, preceding it with a '>'.
  * These mesagges can be read at /dev/isdnctrl.
  *
  * Parameter:
index 18af86879c054456eff40f6c35f70836cabbfa40..8549431430f02ae5a3bb5e2de91c3780c2e76eb4 100644 (file)
@@ -21,7 +21,7 @@
 /* options may be:
  *
  * bit 0 = use ulaw instead of alaw
- * bit 1 = enable hfc hardware accelleration for all channels
+ * bit 1 = enable hfc hardware acceleration for all channels
  *
  */
 #define DSP_OPT_ULAW           (1<<0)
index 309bacf1fadc4ad46d16f647cd2003d921612c57..4d395dea32f3ebedd3c3db7d5e2bbbb3161d51b8 100644 (file)
@@ -1513,7 +1513,7 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
        /* -> if echo is NOT enabled */
        if (!dsp->echo.software) {
                /*
-                * -> substract rx-data from conf-data,
+                * -> subtract rx-data from conf-data,
                 * if tx-data is available, mix
                 */
                while (r != rr && t != tt) {
@@ -1572,7 +1572,7 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
 send_packet:
        /*
         * send tx-data if enabled - don't filter,
-        * becuase we want what we send, not what we filtered
+        * because we want what we send, not what we filtered
         */
        if (dsp->tx_data) {
                if (tx_data_only) {
index 6f5b548642837b44c93c18ed5318fc907e6a2192..2877291a9ed8a852937b25ebe59e09043097376d 100644 (file)
  *
  * The CMX has special functions for conferences with one, two and more
  * members. It will allow different types of data flow. Receive and transmit
- * data to/form upper layer may be swithed on/off individually without loosing
+ * data to/form upper layer may be swithed on/off individually without losing
  * features of CMX, Tones and DTMF.
  *
  * Echo Cancellation: Sometimes we like to cancel echo from the interface.
  *
  * If all used features can be realized in hardware, and if transmit and/or
  * receive data ist disabled, the card may not send/receive any data at all.
- * Not receiving is usefull if only announcements are played. Not sending is
- * usefull if an answering machine records audio. Not sending and receiving is
- * usefull during most states of the call. If supported by hardware, tones
+ * Not receiving is useful if only announcements are played. Not sending is
+ * useful if an answering machine records audio. Not sending and receiving is
+ * useful during most states of the call. If supported by hardware, tones
  * will be played without cpu load. Small PBXs and NT-Mode applications will
  * not need expensive hardware when processing calls.
  *
index 9ae2d33b06f7c5a819157d20bfce9ad5d81bca19..5b484c3f4af6072bf3f93b611ba21a29877687ae 100644 (file)
@@ -106,7 +106,7 @@ void dsp_dtmf_hardware(struct dsp *dsp)
  * tested it allot. it even works with very short tones (40ms). the only
  * disadvantage is, that it doesn't work good with different volumes of both
  * tones. this will happen, if accoustically coupled dialers are used.
- * it sometimes detects tones during speach, which is normal for decoders.
+ * it sometimes detects tones during speech, which is normal for decoders.
  * use sequences to given commands during calls.
  *
  * dtmf - points to a structure of the current dtmf state
@@ -244,7 +244,7 @@ coefficients:
                if (result[i] < tresh) {
                        lowgroup = -1;
                        highgroup = -1;
-                       break;  /* noise inbetween */
+                       break;  /* noise in between */
                }
                /* good level found. This is allowed only one time per group */
                if (i < NCOEFF/2) {
index 7dbe54ed1debf77231cd7c6e6f91841e2367904d..4e4440e8bae52ec13738a9cf79a70d9ce1f65e20 100644 (file)
@@ -394,7 +394,7 @@ void dsp_tone_copy(struct dsp *dsp, u8 *data, int len)
        while (len) {
                /* find sample to start with */
                while (42) {
-                       /* warp arround */
+                       /* wrap around */
                        if (!pat->seq[index]) {
                                count = 0;
                                index = 0;
index bd526f664a3966217f0317497a943deba197982e..22f8ec8b9247af6de560b9bc1e095c66cf6668b5 100644 (file)
@@ -179,7 +179,7 @@ NOTE: A value of 0 equals 256 bytes of data.
 - Time Base = Timestamp of first sample in frame
 The "Time Base" is used to rearange packets and to detect packet loss.
 The 16 bits are sent in network order (MSB first) and count 1/8000 th of a
-second. This causes a wrap arround each 8,192 seconds. There is no requirement
+second. This causes a wrap around each 8,192 seconds. There is no requirement
 for the initial "Time Base", but 0 should be used for the first packet.
 In case of HDLC data, this timestamp counts the packet or byte number.
 
@@ -205,7 +205,7 @@ On Demand:
 
 If the ondemand parameter is given, the remote IP is set to 0 on timeout.
 This will stop keepalive traffic to remote. If the remote is online again,
-traffic will continue to the remote address. This is usefull for road warriors.
+traffic will continue to the remote address. This is useful for road warriors.
 This feature only works with ID set, otherwhise it is highly unsecure.
 
 
@@ -590,7 +590,7 @@ multiframe:
                        return;
                }
        } else
-               mlen = len-2; /* single frame, substract timebase */
+               mlen = len-2; /* single frame, subtract timebase */
 
        if (len < 2) {
                printk(KERN_WARNING "%s: packet error - packet too short, time "
index 4ae75053c9d2a9e572f0fb760caabac9ce4b3e28..d0aeb44ee7c00741070dbc9a90894925ee9cba2c 100644 (file)
@@ -1864,7 +1864,7 @@ ph_data_indication(struct layer2 *l2, struct mISDNhead *hh, struct sk_buff *skb)
                psapi >>= 2;
                ptei >>= 1;
                if (psapi != l2->sapi) {
-                       /* not our bussiness */
+                       /* not our business */
                        if (*debug & DEBUG_L2)
                                printk(KERN_DEBUG "%s: sapi %d/%d mismatch\n",
                                        __func__, psapi, l2->sapi);
@@ -1872,7 +1872,7 @@ ph_data_indication(struct layer2 *l2, struct mISDNhead *hh, struct sk_buff *skb)
                        return 0;
                }
                if ((ptei != l2->tei) && (ptei != GROUP_TEI)) {
-                       /* not our bussiness */
+                       /* not our business */
                        if (*debug & DEBUG_L2)
                                printk(KERN_DEBUG "%s: tei %d/%d mismatch\n",
                                        __func__, ptei, l2->tei);
index afac338d50251fbc17b5d9609bc8ea24ac7611d6..5bf63af09ddf04adb63dac74bfa97b8882e0c754 100644 (file)
@@ -58,7 +58,7 @@ static struct i2c_driver pca9532_driver = {
        .id_table = pca9532_id,
 };
 
-/* We have two pwm/blinkers, but 16 possible leds to drive. Additionaly,
+/* We have two pwm/blinkers, but 16 possible leds to drive. Additionally,
  * the clever Thecus people are using one pwm to drive the beeper. So,
  * as a compromise we average one pwm to the values requested by all
  * leds that are not ON/OFF.
index 3790816643bef85bee2dd1824bcb29818a693f86..8497f56f8e461cf70d8d1b8692e04b11e353323c 100644 (file)
@@ -178,6 +178,10 @@ static int __devinit regulator_led_probe(struct platform_device *pdev)
        led->cdev.flags |= LED_CORE_SUSPENDRESUME;
        led->vcc = vcc;
 
+       /* to handle correctly an already enabled regulator */
+       if (regulator_is_enabled(led->vcc))
+               led->enabled = 1;
+
        mutex_init(&led->mutex);
        INIT_WORK(&led->work, led_work);
 
index a04523273282c76b247740b65d9a43fc452352ac..f14edd82cb004475e67fe493f71ee269ee9cd0c7 100644 (file)
@@ -215,13 +215,13 @@ static int wm8350_led_probe(struct platform_device *pdev)
 
        isink = regulator_get(&pdev->dev, "led_isink");
        if (IS_ERR(isink)) {
-               printk(KERN_ERR "%s: cant get ISINK\n", __func__);
+               printk(KERN_ERR "%s: can't get ISINK\n", __func__);
                return PTR_ERR(isink);
        }
 
        dcdc = regulator_get(&pdev->dev, "led_vcc");
        if (IS_ERR(dcdc)) {
-               printk(KERN_ERR "%s: cant get DCDC\n", __func__);
+               printk(KERN_ERR "%s: can't get DCDC\n", __func__);
                ret = PTR_ERR(dcdc);
                goto err_isink;
        }
index 3c781cdddda97f52f10b7daa72d5bd41e1436fc4..948c547b8e9e0d721bb440a5a3e4cc3bf3521067 100644 (file)
@@ -130,7 +130,7 @@ static int add_eventfd(struct lguest *lg, unsigned long addr, int fd)
        rcu_assign_pointer(lg->eventfds, new);
 
        /*
-        * We're not in a big hurry.  Wait until noone's looking at old
+        * We're not in a big hurry.  Wait until no one's looking at old
         * version, then free it.
         */
        synchronize_rcu();
index 5396c67ba0a45c9b7cc1196590d1cffe18b49f60..09d72bb00d12c7756b2ba8c09012f2860f91f128 100644 (file)
@@ -328,7 +328,7 @@ adbhid_input_keycode(int id, int scancode, int repeat)
        switch (keycode) {
        case ADB_KEY_CAPSLOCK:
                if (!restore_capslock_events) {
-                       /* Generate down/up events for CapsLock everytime. */
+                       /* Generate down/up events for CapsLock every time. */
                        input_report_key(ahid->input, KEY_CAPSLOCK, 1);
                        input_sync(ahid->input);
                        input_report_key(ahid->input, KEY_CAPSLOCK, 0);
index bd6da7a9c55bf77f040de2cb4b5314d163eb3b42..b6ef8f590764926a238051115ae655af7a61942e 100644 (file)
@@ -147,7 +147,7 @@ static int macio_adb_reset_bus(void)
 
        /* Hrm... we may want to not lock interrupts for so
         * long ... oh well, who uses that chip anyway ? :)
-        * That function will be seldomly used during boot
+        * That function will be seldom used during boot
         * on rare machines, so...
         */
        spin_lock_irqsave(&macio_lock, flags);
index 9e3e2c56659870a824c7ea3a110adfcfa218b920..02367308ff2e781da67bc4ceb03f0e9463463894 100644 (file)
@@ -662,7 +662,7 @@ static void thermostat_create_files(void)
                err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
        if (err)
                printk(KERN_WARNING
-                       "Failed to create tempertaure attribute file(s).\n");
+                       "Failed to create temperature attribute file(s).\n");
 }
 
 static void thermostat_remove_files(void)
index c987033714f6acbfcdf307c77e514c2c24baf8bb..bb8b722a9783d20e2d18412724f55076660e43a7 100644 (file)
@@ -91,7 +91,7 @@
  *
  *  Mar. 10, 2005 : 1.2
  *     - Add basic support for Xserve G5
- *     - Retreive pumps min/max from EEPROM image in device-tree (broken)
+ *     - Retrieve pumps min/max from EEPROM image in device-tree (broken)
  *     - Use min/max macros here or there
  *     - Latest darwin updated U3H min fan speed to 20% PWM
  *
@@ -375,7 +375,7 @@ static int read_smon_adc(struct cpu_pid_state *state, int chan)
                rc = i2c_master_send(state->monitor, buf, 2);
                if (rc <= 0)
                        goto error;
-               /* Wait for convertion */
+               /* Wait for conversion */
                msleep(1);
                /* Switch to data register */
                buf[0] = 4;
@@ -1192,7 +1192,7 @@ static int init_processor_state(struct cpu_pid_state *state, int index)
                err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_intake_fan_rpm);
        }
        if (err)
-               printk(KERN_WARNING "Failed to create some of the atribute"
+               printk(KERN_WARNING "Failed to create some of the attribute"
                        "files for CPU %d\n", index);
 
        return 0;
index d37819fd5ad31e2d5f9341f74a950ec20847d4d8..46c4e95f10d6a904445e643942e632dfc69f016f 100644 (file)
@@ -45,7 +45,7 @@
 #include <asm/sections.h>
 #include <asm/macio.h>
 
-#define LOG_TEMP               0                       /* continously log temperature */
+#define LOG_TEMP               0                       /* continuously log temperature */
 
 static struct {
        volatile int            running;
index 931a7a7c3796e5f389537579c65fa9364a0567b8..d0aeaf46d932017505e4b3728cfa1ca3c9e6fe3c 100644 (file)
@@ -45,7 +45,7 @@
  *
  * The counter counts pending write requests, plus the on-disk bit.
  * When the counter is '1' and the resync bits are clear, the on-disk
- * bit can be cleared aswell, thus setting the counter to 0.
+ * bit can be cleared as well, thus setting the counter to 0.
  * When we set a bit, or in the counter (to start a write), if the fields is
  * 0, we first set the disk bit and set the counter to 1.
  *
index 5ef136cdba91dd4a891f00920029962a54185d63..e5d8904fc8f647162d4a7d79150491797cfda6d2 100644 (file)
@@ -390,13 +390,6 @@ static int raid_is_congested(struct dm_target_callbacks *cb, int bits)
        return md_raid5_congested(&rs->md, bits);
 }
 
-static void raid_unplug(struct dm_target_callbacks *cb)
-{
-       struct raid_set *rs = container_of(cb, struct raid_set, callbacks);
-
-       md_raid5_kick_device(rs->md.private);
-}
-
 /*
  * Construct a RAID4/5/6 mapping:
  * Args:
@@ -487,7 +480,6 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
        }
 
        rs->callbacks.congested_fn = raid_is_congested;
-       rs->callbacks.unplug_fn = raid_unplug;
        dm_table_add_target_callbacks(ti->table, &rs->callbacks);
 
        return 0;
index dad011aed0c929f2075bb8412f606c89be8869bc..7771ed2121820ac50c026f45e2f6c0a288ffba85 100644 (file)
@@ -419,7 +419,7 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio)
        /*
         * Possible cases:
         *   1) DM_RH_DIRTY
-        *   2) DM_RH_NOSYNC: was dirty, other preceeding writes failed
+        *   2) DM_RH_NOSYNC: was dirty, other preceding writes failed
         *   3) DM_RH_RECOVERING: flushing pending writes
         * Either case, the region should have not been connected to list.
         */
index 416d4e258df6df536d2cd7d38795e8e58b94efbc..cb8380c9767fd3d5bb815d7fec4a46308b0270c5 100644 (file)
@@ -926,21 +926,81 @@ static int dm_table_build_index(struct dm_table *t)
        return r;
 }
 
+/*
+ * Get a disk whose integrity profile reflects the table's profile.
+ * If %match_all is true, all devices' profiles must match.
+ * If %match_all is false, all devices must at least have an
+ * allocated integrity profile; but uninitialized is ok.
+ * Returns NULL if integrity support was inconsistent or unavailable.
+ */
+static struct gendisk * dm_table_get_integrity_disk(struct dm_table *t,
+                                                   bool match_all)
+{
+       struct list_head *devices = dm_table_get_devices(t);
+       struct dm_dev_internal *dd = NULL;
+       struct gendisk *prev_disk = NULL, *template_disk = NULL;
+
+       list_for_each_entry(dd, devices, list) {
+               template_disk = dd->dm_dev.bdev->bd_disk;
+               if (!blk_get_integrity(template_disk))
+                       goto no_integrity;
+               if (!match_all && !blk_integrity_is_initialized(template_disk))
+                       continue; /* skip uninitialized profiles */
+               else if (prev_disk &&
+                        blk_integrity_compare(prev_disk, template_disk) < 0)
+                       goto no_integrity;
+               prev_disk = template_disk;
+       }
+
+       return template_disk;
+
+no_integrity:
+       if (prev_disk)
+               DMWARN("%s: integrity not set: %s and %s profile mismatch",
+                      dm_device_name(t->md),
+                      prev_disk->disk_name,
+                      template_disk->disk_name);
+       return NULL;
+}
+
 /*
  * Register the mapped device for blk_integrity support if
- * the underlying devices support it.
+ * the underlying devices have an integrity profile.  But all devices
+ * may not have matching profiles (checking all devices isn't reliable
+ * during table load because this table may use other DM device(s) which
+ * must be resumed before they will have an initialized integity profile).
+ * Stacked DM devices force a 2 stage integrity profile validation:
+ * 1 - during load, validate all initialized integrity profiles match
+ * 2 - during resume, validate all integrity profiles match
  */
 static int dm_table_prealloc_integrity(struct dm_table *t, struct mapped_device *md)
 {
-       struct list_head *devices = dm_table_get_devices(t);
-       struct dm_dev_internal *dd;
+       struct gendisk *template_disk = NULL;
 
-       list_for_each_entry(dd, devices, list)
-               if (bdev_get_integrity(dd->dm_dev.bdev)) {
-                       t->integrity_supported = 1;
-                       return blk_integrity_register(dm_disk(md), NULL);
-               }
+       template_disk = dm_table_get_integrity_disk(t, false);
+       if (!template_disk)
+               return 0;
 
+       if (!blk_integrity_is_initialized(dm_disk(md))) {
+               t->integrity_supported = 1;
+               return blk_integrity_register(dm_disk(md), NULL);
+       }
+
+       /*
+        * If DM device already has an initalized integrity
+        * profile the new profile should not conflict.
+        */
+       if (blk_integrity_is_initialized(template_disk) &&
+           blk_integrity_compare(dm_disk(md), template_disk) < 0) {
+               DMWARN("%s: conflict with existing integrity profile: "
+                      "%s profile mismatch",
+                      dm_device_name(t->md),
+                      template_disk->disk_name);
+               return 1;
+       }
+
+       /* Preserve existing initialized integrity profile */
+       t->integrity_supported = 1;
        return 0;
 }
 
@@ -1094,41 +1154,27 @@ combine_limits:
 
 /*
  * Set the integrity profile for this device if all devices used have
- * matching profiles.
+ * matching profiles.  We're quite deep in the resume path but still
+ * don't know if all devices (particularly DM devices this device
+ * may be stacked on) have matching profiles.  Even if the profiles
+ * don't match we have no way to fail (to resume) at this point.
  */
 static void dm_table_set_integrity(struct dm_table *t)
 {
-       struct list_head *devices = dm_table_get_devices(t);
-       struct dm_dev_internal *prev = NULL, *dd = NULL;
+       struct gendisk *template_disk = NULL;
 
        if (!blk_get_integrity(dm_disk(t->md)))
                return;
 
-       list_for_each_entry(dd, devices, list) {
-               if (prev &&
-                   blk_integrity_compare(prev->dm_dev.bdev->bd_disk,
-                                         dd->dm_dev.bdev->bd_disk) < 0) {
-                       DMWARN("%s: integrity not set: %s and %s mismatch",
-                              dm_device_name(t->md),
-                              prev->dm_dev.bdev->bd_disk->disk_name,
-                              dd->dm_dev.bdev->bd_disk->disk_name);
-                       goto no_integrity;
-               }
-               prev = dd;
+       template_disk = dm_table_get_integrity_disk(t, true);
+       if (!template_disk &&
+           blk_integrity_is_initialized(dm_disk(t->md))) {
+               DMWARN("%s: device no longer has a valid integrity profile",
+                      dm_device_name(t->md));
+               return;
        }
-
-       if (!prev || !bdev_get_integrity(prev->dm_dev.bdev))
-               goto no_integrity;
-
        blk_integrity_register(dm_disk(t->md),
-                              bdev_get_integrity(prev->dm_dev.bdev));
-
-       return;
-
-no_integrity:
-       blk_integrity_register(dm_disk(t->md), NULL);
-
-       return;
+                              blk_get_integrity(template_disk));
 }
 
 void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
index 339fdc670751c086e760d89cedd22937b5639a7f..23078dabb6df0a741f1223fcae7f728a9b19958a 100644 (file)
@@ -30,7 +30,7 @@
  *
  * Different modes can be active at a time, but only
  * one can be set at array creation.  Others can be added later.
- * A mode can be one-shot or recurrent with the recurrance being
+ * A mode can be one-shot or recurrent with the recurrence being
  * once in every N requests.
  * The bottom 5 bits of the "layout" indicate the mode.  The
  * remainder indicate a period, or 0 for one-shot.
index 8b66e04c2ea6a833930ffbe57608911e16a494b2..7d6f7f18a92052e3258ffeae719c377b2df4fb78 100644 (file)
@@ -447,48 +447,59 @@ EXPORT_SYMBOL(md_flush_request);
 
 /* Support for plugging.
  * This mirrors the plugging support in request_queue, but does not
- * require having a whole queue
+ * require having a whole queue or request structures.
+ * We allocate an md_plug_cb for each md device and each thread it gets
+ * plugged on.  This links tot the private plug_handle structure in the
+ * personality data where we keep a count of the number of outstanding
+ * plugs so other code can see if a plug is active.
  */
-static void plugger_work(struct work_struct *work)
-{
-       struct plug_handle *plug =
-               container_of(work, struct plug_handle, unplug_work);
-       plug->unplug_fn(plug);
-}
-static void plugger_timeout(unsigned long data)
-{
-       struct plug_handle *plug = (void *)data;
-       kblockd_schedule_work(NULL, &plug->unplug_work);
-}
-void plugger_init(struct plug_handle *plug,
-                 void (*unplug_fn)(struct plug_handle *))
-{
-       plug->unplug_flag = 0;
-       plug->unplug_fn = unplug_fn;
-       init_timer(&plug->unplug_timer);
-       plug->unplug_timer.function = plugger_timeout;
-       plug->unplug_timer.data = (unsigned long)plug;
-       INIT_WORK(&plug->unplug_work, plugger_work);
-}
-EXPORT_SYMBOL_GPL(plugger_init);
+struct md_plug_cb {
+       struct blk_plug_cb cb;
+       mddev_t *mddev;
+};
 
-void plugger_set_plug(struct plug_handle *plug)
+static void plugger_unplug(struct blk_plug_cb *cb)
 {
-       if (!test_and_set_bit(PLUGGED_FLAG, &plug->unplug_flag))
-               mod_timer(&plug->unplug_timer, jiffies + msecs_to_jiffies(3)+1);
+       struct md_plug_cb *mdcb = container_of(cb, struct md_plug_cb, cb);
+       if (atomic_dec_and_test(&mdcb->mddev->plug_cnt))
+               md_wakeup_thread(mdcb->mddev->thread);
+       kfree(mdcb);
 }
-EXPORT_SYMBOL_GPL(plugger_set_plug);
 
-int plugger_remove_plug(struct plug_handle *plug)
+/* Check that an unplug wakeup will come shortly.
+ * If not, wakeup the md thread immediately
+ */
+int mddev_check_plugged(mddev_t *mddev)
 {
-       if (test_and_clear_bit(PLUGGED_FLAG, &plug->unplug_flag)) {
-               del_timer(&plug->unplug_timer);
-               return 1;
-       } else
+       struct blk_plug *plug = current->plug;
+       struct md_plug_cb *mdcb;
+
+       if (!plug)
                return 0;
-}
-EXPORT_SYMBOL_GPL(plugger_remove_plug);
 
+       list_for_each_entry(mdcb, &plug->cb_list, cb.list) {
+               if (mdcb->cb.callback == plugger_unplug &&
+                   mdcb->mddev == mddev) {
+                       /* Already on the list, move to top */
+                       if (mdcb != list_first_entry(&plug->cb_list,
+                                                   struct md_plug_cb,
+                                                   cb.list))
+                               list_move(&mdcb->cb.list, &plug->cb_list);
+                       return 1;
+               }
+       }
+       /* Not currently on the callback list */
+       mdcb = kmalloc(sizeof(*mdcb), GFP_ATOMIC);
+       if (!mdcb)
+               return 0;
+
+       mdcb->mddev = mddev;
+       mdcb->cb.callback = plugger_unplug;
+       atomic_inc(&mddev->plug_cnt);
+       list_add(&mdcb->cb.list, &plug->cb_list);
+       return 1;
+}
+EXPORT_SYMBOL_GPL(mddev_check_plugged);
 
 static inline mddev_t *mddev_get(mddev_t *mddev)
 {
@@ -538,6 +549,7 @@ void mddev_init(mddev_t *mddev)
        atomic_set(&mddev->active, 1);
        atomic_set(&mddev->openers, 0);
        atomic_set(&mddev->active_io, 0);
+       atomic_set(&mddev->plug_cnt, 0);
        spin_lock_init(&mddev->write_lock);
        atomic_set(&mddev->flush_pending, 0);
        init_waitqueue_head(&mddev->sb_wait);
@@ -3158,6 +3170,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
        mddev->layout = mddev->new_layout;
        mddev->chunk_sectors = mddev->new_chunk_sectors;
        mddev->delta_disks = 0;
+       mddev->degraded = 0;
        if (mddev->pers->sync_request == NULL) {
                /* this is now an array without redundancy, so
                 * it must always be in_sync
@@ -4723,7 +4736,6 @@ static void md_clean(mddev_t *mddev)
        mddev->bitmap_info.chunksize = 0;
        mddev->bitmap_info.daemon_sleep = 0;
        mddev->bitmap_info.max_write_behind = 0;
-       mddev->plug = NULL;
 }
 
 static void __md_stop_writes(mddev_t *mddev)
@@ -6266,7 +6278,7 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev)
         * rt is a sector_t, so could be 32bit or 64bit.
         * So we divide before multiply in case it is 32bit and close
         * to the limit.
-        * We scale the divisor (db) by 32 to avoid loosing precision
+        * We scale the divisor (db) by 32 to avoid losing precision
         * near the end of resync when the number of remaining sectors
         * is close to 'db'.
         * We then divide rt by 32 after multiplying by db to compensate.
@@ -6688,12 +6700,6 @@ int md_allow_write(mddev_t *mddev)
 }
 EXPORT_SYMBOL_GPL(md_allow_write);
 
-void md_unplug(mddev_t *mddev)
-{
-       if (mddev->plug)
-               mddev->plug->unplug_fn(mddev->plug);
-}
-
 #define SYNC_MARKS     10
 #define        SYNC_MARK_STEP  (3*HZ)
 void md_do_sync(mddev_t *mddev)
index 12215d437fcc28b4d195c1544747ff51d2142bc3..0b1fd3f1d85b5decfaaba4ab8b70595fffbaba1f 100644 (file)
 typedef struct mddev_s mddev_t;
 typedef struct mdk_rdev_s mdk_rdev_t;
 
-/* generic plugging support - like that provided with request_queue,
- * but does not require a request_queue
- */
-struct plug_handle {
-       void                    (*unplug_fn)(struct plug_handle *);
-       struct timer_list       unplug_timer;
-       struct work_struct      unplug_work;
-       unsigned long           unplug_flag;
-};
-#define        PLUGGED_FLAG 1
-void plugger_init(struct plug_handle *plug,
-                 void (*unplug_fn)(struct plug_handle *));
-void plugger_set_plug(struct plug_handle *plug);
-int plugger_remove_plug(struct plug_handle *plug);
-static inline void plugger_flush(struct plug_handle *plug)
-{
-       del_timer_sync(&plug->unplug_timer);
-       cancel_work_sync(&plug->unplug_work);
-}
-
 /*
  * MD's 'extended' device
  */
@@ -94,7 +74,7 @@ struct mdk_rdev_s
 #define        In_sync         2               /* device is in_sync with rest of array */
 #define        WriteMostly     4               /* Avoid reading if at all possible */
 #define        AutoDetected    7               /* added by auto-detect */
-#define Blocked                8               /* An error occured on an externally
+#define Blocked                8               /* An error occurred on an externally
                                         * managed array, don't allow writes
                                         * until it is cleared */
        wait_queue_head_t blocked_wait;
@@ -199,6 +179,9 @@ struct mddev_s
        int                             delta_disks, new_level, new_layout;
        int                             new_chunk_sectors;
 
+       atomic_t                        plug_cnt;       /* If device is expecting
+                                                        * more bios soon.
+                                                        */
        struct mdk_thread_s             *thread;        /* management thread */
        struct mdk_thread_s             *sync_thread;   /* doing resync or reconstruct */
        sector_t                        curr_resync;    /* last block scheduled */
@@ -336,7 +319,6 @@ struct mddev_s
        struct list_head                all_mddevs;
 
        struct attribute_group          *to_remove;
-       struct plug_handle              *plug; /* if used by personality */
 
        struct bio_set                  *bio_set;
 
@@ -516,7 +498,6 @@ extern int md_integrity_register(mddev_t *mddev);
 extern void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev);
 extern int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale);
 extern void restore_bitmap_write_access(struct file *file);
-extern void md_unplug(mddev_t *mddev);
 
 extern void mddev_init(mddev_t *mddev);
 extern int md_run(mddev_t *mddev);
@@ -530,4 +511,5 @@ extern struct bio *bio_clone_mddev(struct bio *bio, gfp_t gfp_mask,
                                   mddev_t *mddev);
 extern struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs,
                                   mddev_t *mddev);
+extern int mddev_check_plugged(mddev_t *mddev);
 #endif /* _MD_MD_H */
index c2a21ae56d977d6249f9c8501f124e50c48f15dd..2b7a7ff401dc6fba50047bbc3f0fb1980055da13 100644 (file)
@@ -565,12 +565,6 @@ static void flush_pending_writes(conf_t *conf)
                spin_unlock_irq(&conf->device_lock);
 }
 
-static void md_kick_device(mddev_t *mddev)
-{
-       blk_flush_plug(current);
-       md_wakeup_thread(mddev->thread);
-}
-
 /* Barriers....
  * Sometimes we need to suspend IO while we do something else,
  * either some resync/recovery, or reconfigure the array.
@@ -600,7 +594,7 @@ static void raise_barrier(conf_t *conf)
 
        /* Wait until no block IO is waiting */
        wait_event_lock_irq(conf->wait_barrier, !conf->nr_waiting,
-                           conf->resync_lock, md_kick_device(conf->mddev));
+                           conf->resync_lock, );
 
        /* block any new IO from starting */
        conf->barrier++;
@@ -608,7 +602,7 @@ static void raise_barrier(conf_t *conf)
        /* Now wait for all pending IO to complete */
        wait_event_lock_irq(conf->wait_barrier,
                            !conf->nr_pending && conf->barrier < RESYNC_DEPTH,
-                           conf->resync_lock, md_kick_device(conf->mddev));
+                           conf->resync_lock, );
 
        spin_unlock_irq(&conf->resync_lock);
 }
@@ -630,7 +624,7 @@ static void wait_barrier(conf_t *conf)
                conf->nr_waiting++;
                wait_event_lock_irq(conf->wait_barrier, !conf->barrier,
                                    conf->resync_lock,
-                                   md_kick_device(conf->mddev));
+                                   );
                conf->nr_waiting--;
        }
        conf->nr_pending++;
@@ -666,8 +660,7 @@ static void freeze_array(conf_t *conf)
        wait_event_lock_irq(conf->wait_barrier,
                            conf->nr_pending == conf->nr_queued+1,
                            conf->resync_lock,
-                           ({ flush_pending_writes(conf);
-                              md_kick_device(conf->mddev); }));
+                           flush_pending_writes(conf));
        spin_unlock_irq(&conf->resync_lock);
 }
 static void unfreeze_array(conf_t *conf)
@@ -729,6 +722,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)
        const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
        const unsigned long do_flush_fua = (bio->bi_rw & (REQ_FLUSH | REQ_FUA));
        mdk_rdev_t *blocked_rdev;
+       int plugged;
 
        /*
         * Register the new request and wait if the reconstruction
@@ -820,6 +814,8 @@ static int make_request(mddev_t *mddev, struct bio * bio)
         * inc refcount on their rdev.  Record them by setting
         * bios[x] to bio
         */
+       plugged = mddev_check_plugged(mddev);
+
        disks = conf->raid_disks;
  retry_write:
        blocked_rdev = NULL;
@@ -925,7 +921,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)
        /* In case raid1d snuck in to freeze_array */
        wake_up(&conf->wait_barrier);
 
-       if (do_sync || !bitmap)
+       if (do_sync || !bitmap || !plugged)
                md_wakeup_thread(mddev->thread);
 
        return 0;
@@ -1516,13 +1512,16 @@ static void raid1d(mddev_t *mddev)
        conf_t *conf = mddev->private;
        struct list_head *head = &conf->retry_list;
        mdk_rdev_t *rdev;
+       struct blk_plug plug;
 
        md_check_recovery(mddev);
-       
+
+       blk_start_plug(&plug);
        for (;;) {
                char b[BDEVNAME_SIZE];
 
-               flush_pending_writes(conf);
+               if (atomic_read(&mddev->plug_cnt) == 0)
+                       flush_pending_writes(conf);
 
                spin_lock_irqsave(&conf->device_lock, flags);
                if (list_empty(head)) {
@@ -1593,6 +1592,7 @@ static void raid1d(mddev_t *mddev)
                }
                cond_resched();
        }
+       blk_finish_plug(&plug);
 }
 
 
@@ -2039,7 +2039,6 @@ static int stop(mddev_t *mddev)
 
        md_unregister_thread(mddev->thread);
        mddev->thread = NULL;
-       blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
        if (conf->r1bio_pool)
                mempool_destroy(conf->r1bio_pool);
        kfree(conf->mirrors);
index f7b62370b37446a96d5595e8f247b84b3689b145..8e9462626ec5cb8d7441b46ddae9a848772153fe 100644 (file)
@@ -5,7 +5,7 @@
  *
  * RAID-10 support for md.
  *
- * Base on code in raid1.c.  See raid1.c for futher copyright information.
+ * Base on code in raid1.c.  See raid1.c for further copyright information.
  *
  *
  * This program is free software; you can redistribute it and/or modify
@@ -340,14 +340,14 @@ static void raid10_end_write_request(struct bio *bio, int error)
 
 /*
  * RAID10 layout manager
- * Aswell as the chunksize and raid_disks count, there are two
+ * As well as the chunksize and raid_disks count, there are two
  * parameters: near_copies and far_copies.
  * near_copies * far_copies must be <= raid_disks.
  * Normally one of these will be 1.
  * If both are 1, we get raid0.
  * If near_copies == raid_disks, we get raid1.
  *
- * Chunks are layed out in raid0 style with near_copies copies of the
+ * Chunks are laid out in raid0 style with near_copies copies of the
  * first chunk, followed by near_copies copies of the next chunk and
  * so on.
  * If far_copies > 1, then after 1/far_copies of the array has been assigned
@@ -634,12 +634,6 @@ static void flush_pending_writes(conf_t *conf)
                spin_unlock_irq(&conf->device_lock);
 }
 
-static void md_kick_device(mddev_t *mddev)
-{
-       blk_flush_plug(current);
-       md_wakeup_thread(mddev->thread);
-}
-
 /* Barriers....
  * Sometimes we need to suspend IO while we do something else,
  * either some resync/recovery, or reconfigure the array.
@@ -669,15 +663,15 @@ static void raise_barrier(conf_t *conf, int force)
 
        /* Wait until no block IO is waiting (unless 'force') */
        wait_event_lock_irq(conf->wait_barrier, force || !conf->nr_waiting,
-                           conf->resync_lock, md_kick_device(conf->mddev));
+                           conf->resync_lock, );
 
        /* block any new IO from starting */
        conf->barrier++;
 
-       /* No wait for all pending IO to complete */
+       /* Now wait for all pending IO to complete */
        wait_event_lock_irq(conf->wait_barrier,
                            !conf->nr_pending && conf->barrier < RESYNC_DEPTH,
-                           conf->resync_lock, md_kick_device(conf->mddev));
+                           conf->resync_lock, );
 
        spin_unlock_irq(&conf->resync_lock);
 }
@@ -698,7 +692,7 @@ static void wait_barrier(conf_t *conf)
                conf->nr_waiting++;
                wait_event_lock_irq(conf->wait_barrier, !conf->barrier,
                                    conf->resync_lock,
-                                   md_kick_device(conf->mddev));
+                                   );
                conf->nr_waiting--;
        }
        conf->nr_pending++;
@@ -734,8 +728,8 @@ static void freeze_array(conf_t *conf)
        wait_event_lock_irq(conf->wait_barrier,
                            conf->nr_pending == conf->nr_queued+1,
                            conf->resync_lock,
-                           ({ flush_pending_writes(conf);
-                              md_kick_device(conf->mddev); }));
+                           flush_pending_writes(conf));
+
        spin_unlock_irq(&conf->resync_lock);
 }
 
@@ -762,6 +756,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)
        const unsigned long do_fua = (bio->bi_rw & REQ_FUA);
        unsigned long flags;
        mdk_rdev_t *blocked_rdev;
+       int plugged;
 
        if (unlikely(bio->bi_rw & REQ_FLUSH)) {
                md_flush_request(mddev, bio);
@@ -870,6 +865,8 @@ static int make_request(mddev_t *mddev, struct bio * bio)
         * inc refcount on their rdev.  Record them by setting
         * bios[x] to bio
         */
+       plugged = mddev_check_plugged(mddev);
+
        raid10_find_phys(conf, r10_bio);
  retry_write:
        blocked_rdev = NULL;
@@ -946,9 +943,8 @@ static int make_request(mddev_t *mddev, struct bio * bio)
        /* In case raid10d snuck in to freeze_array */
        wake_up(&conf->wait_barrier);
 
-       if (do_sync || !mddev->bitmap)
+       if (do_sync || !mddev->bitmap || !plugged)
                md_wakeup_thread(mddev->thread);
-
        return 0;
 }
 
@@ -1640,9 +1636,11 @@ static void raid10d(mddev_t *mddev)
        conf_t *conf = mddev->private;
        struct list_head *head = &conf->retry_list;
        mdk_rdev_t *rdev;
+       struct blk_plug plug;
 
        md_check_recovery(mddev);
 
+       blk_start_plug(&plug);
        for (;;) {
                char b[BDEVNAME_SIZE];
 
@@ -1716,6 +1714,7 @@ static void raid10d(mddev_t *mddev)
                }
                cond_resched();
        }
+       blk_finish_plug(&plug);
 }
 
 
index 2316ac2e8e218c6a97c96ebd35d99172e0bcb4fc..944b1104d3b447c4437e847ad9e268e5c3fb0715 100644 (file)
@@ -17,8 +17,8 @@ struct r10_private_data_s {
        spinlock_t              device_lock;
 
        /* geometry */
-       int                     near_copies;  /* number of copies layed out raid0 style */
-       int                     far_copies;   /* number of copies layed out
+       int                     near_copies;  /* number of copies laid out raid0 style */
+       int                     far_copies;   /* number of copies laid out
                                               * at large strides across drives
                                               */
        int                     far_offset;   /* far_copies are offset by 1 stripe
index e867ee42b15239707c0dfede4be71d2bc9a72e20..49bf5f8914353a1c7972beaa27d6b5caee1031cc 100644 (file)
  *
  * We group bitmap updates into batches.  Each batch has a number.
  * We may write out several batches at once, but that isn't very important.
- * conf->bm_write is the number of the last batch successfully written.
- * conf->bm_flush is the number of the last batch that was closed to
+ * conf->seq_write is the number of the last batch successfully written.
+ * conf->seq_flush is the number of the last batch that was closed to
  *    new additions.
  * When we discover that we will need to write to any block in a stripe
  * (in add_stripe_bio) we update the in-memory bitmap and record in sh->bm_seq
- * the number of the batch it will be in. This is bm_flush+1.
+ * the number of the batch it will be in. This is seq_flush+1.
  * When we are ready to do a write, if that batch hasn't been written yet,
  *   we plug the array and queue the stripe for later.
  * When an unplug happens, we increment bm_flush, thus closing the current
@@ -199,14 +199,12 @@ static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
                BUG_ON(!list_empty(&sh->lru));
                BUG_ON(atomic_read(&conf->active_stripes)==0);
                if (test_bit(STRIPE_HANDLE, &sh->state)) {
-                       if (test_bit(STRIPE_DELAYED, &sh->state)) {
+                       if (test_bit(STRIPE_DELAYED, &sh->state))
                                list_add_tail(&sh->lru, &conf->delayed_list);
-                               plugger_set_plug(&conf->plug);
-                       } else if (test_bit(STRIPE_BIT_DELAY, &sh->state) &&
-                                  sh->bm_seq - conf->seq_write > 0) {
+                       else if (test_bit(STRIPE_BIT_DELAY, &sh->state) &&
+                                  sh->bm_seq - conf->seq_write > 0)
                                list_add_tail(&sh->lru, &conf->bitmap_list);
-                               plugger_set_plug(&conf->plug);
-                       } else {
+                       else {
                                clear_bit(STRIPE_BIT_DELAY, &sh->state);
                                list_add_tail(&sh->lru, &conf->handle_list);
                        }
@@ -461,7 +459,7 @@ get_active_stripe(raid5_conf_t *conf, sector_t sector,
                                                     < (conf->max_nr_stripes *3/4)
                                                     || !conf->inactive_blocked),
                                                    conf->device_lock,
-                                                   md_raid5_kick_device(conf));
+                                                   );
                                conf->inactive_blocked = 0;
                        } else
                                init_stripe(sh, sector, previous);
@@ -1470,7 +1468,7 @@ static int resize_stripes(raid5_conf_t *conf, int newsize)
                wait_event_lock_irq(conf->wait_for_stripe,
                                    !list_empty(&conf->inactive_list),
                                    conf->device_lock,
-                                   blk_flush_plug(current));
+                                   );
                osh = get_free_stripe(conf);
                spin_unlock_irq(&conf->device_lock);
                atomic_set(&nsh->count, 1);
@@ -3623,8 +3621,7 @@ static void raid5_activate_delayed(raid5_conf_t *conf)
                                atomic_inc(&conf->preread_active_stripes);
                        list_add_tail(&sh->lru, &conf->hold_list);
                }
-       } else
-               plugger_set_plug(&conf->plug);
+       }
 }
 
 static void activate_bit_delay(raid5_conf_t *conf)
@@ -3641,21 +3638,6 @@ static void activate_bit_delay(raid5_conf_t *conf)
        }
 }
 
-void md_raid5_kick_device(raid5_conf_t *conf)
-{
-       blk_flush_plug(current);
-       raid5_activate_delayed(conf);
-       md_wakeup_thread(conf->mddev->thread);
-}
-EXPORT_SYMBOL_GPL(md_raid5_kick_device);
-
-static void raid5_unplug(struct plug_handle *plug)
-{
-       raid5_conf_t *conf = container_of(plug, raid5_conf_t, plug);
-
-       md_raid5_kick_device(conf);
-}
-
 int md_raid5_congested(mddev_t *mddev, int bits)
 {
        raid5_conf_t *conf = mddev->private;
@@ -3945,6 +3927,7 @@ static int make_request(mddev_t *mddev, struct bio * bi)
        struct stripe_head *sh;
        const int rw = bio_data_dir(bi);
        int remaining;
+       int plugged;
 
        if (unlikely(bi->bi_rw & REQ_FLUSH)) {
                md_flush_request(mddev, bi);
@@ -3963,6 +3946,7 @@ static int make_request(mddev_t *mddev, struct bio * bi)
        bi->bi_next = NULL;
        bi->bi_phys_segments = 1;       /* over-loaded to count active stripes */
 
+       plugged = mddev_check_plugged(mddev);
        for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) {
                DEFINE_WAIT(w);
                int disks, data_disks;
@@ -4057,7 +4041,7 @@ static int make_request(mddev_t *mddev, struct bio * bi)
                                 * add failed due to overlap.  Flush everything
                                 * and wait a while
                                 */
-                               md_raid5_kick_device(conf);
+                               md_wakeup_thread(mddev->thread);
                                release_stripe(sh);
                                schedule();
                                goto retry;
@@ -4077,6 +4061,9 @@ static int make_request(mddev_t *mddev, struct bio * bi)
                }
                        
        }
+       if (!plugged)
+               md_wakeup_thread(mddev->thread);
+
        spin_lock_irq(&conf->device_lock);
        remaining = raid5_dec_bi_phys_segments(bi);
        spin_unlock_irq(&conf->device_lock);
@@ -4478,24 +4465,30 @@ static void raid5d(mddev_t *mddev)
        struct stripe_head *sh;
        raid5_conf_t *conf = mddev->private;
        int handled;
+       struct blk_plug plug;
 
        pr_debug("+++ raid5d active\n");
 
        md_check_recovery(mddev);
 
+       blk_start_plug(&plug);
        handled = 0;
        spin_lock_irq(&conf->device_lock);
        while (1) {
                struct bio *bio;
 
-               if (conf->seq_flush != conf->seq_write) {
-                       int seq = conf->seq_flush;
+               if (atomic_read(&mddev->plug_cnt) == 0 &&
+                   !list_empty(&conf->bitmap_list)) {
+                       /* Now is a good time to flush some bitmap updates */
+                       conf->seq_flush++;
                        spin_unlock_irq(&conf->device_lock);
                        bitmap_unplug(mddev->bitmap);
                        spin_lock_irq(&conf->device_lock);
-                       conf->seq_write = seq;
+                       conf->seq_write = conf->seq_flush;
                        activate_bit_delay(conf);
                }
+               if (atomic_read(&mddev->plug_cnt) == 0)
+                       raid5_activate_delayed(conf);
 
                while ((bio = remove_bio_from_retry(conf))) {
                        int ok;
@@ -4525,6 +4518,7 @@ static void raid5d(mddev_t *mddev)
        spin_unlock_irq(&conf->device_lock);
 
        async_tx_issue_pending_all();
+       blk_finish_plug(&plug);
 
        pr_debug("--- raid5d inactive\n");
 }
@@ -5141,8 +5135,6 @@ static int run(mddev_t *mddev)
                       mdname(mddev));
        md_set_array_sectors(mddev, raid5_size(mddev, 0, 0));
 
-       plugger_init(&conf->plug, raid5_unplug);
-       mddev->plug = &conf->plug;
        if (mddev->queue) {
                int chunk_size;
                /* read-ahead size must cover two whole stripes, which
@@ -5159,7 +5151,6 @@ static int run(mddev_t *mddev)
 
                mddev->queue->backing_dev_info.congested_data = mddev;
                mddev->queue->backing_dev_info.congested_fn = raid5_congested;
-               mddev->queue->queue_lock = &conf->device_lock;
 
                chunk_size = mddev->chunk_sectors << 9;
                blk_queue_io_min(mddev->queue, chunk_size);
@@ -5192,7 +5183,6 @@ static int stop(mddev_t *mddev)
        mddev->thread = NULL;
        if (mddev->queue)
                mddev->queue->backing_dev_info.congested_fn = NULL;
-       plugger_flush(&conf->plug); /* the unplug fn references 'conf'*/
        free_conf(conf);
        mddev->private = NULL;
        mddev->to_remove = &raid5_attrs_group;
@@ -5688,6 +5678,7 @@ static void raid5_quiesce(mddev_t *mddev, int state)
 static void *raid45_takeover_raid0(mddev_t *mddev, int level)
 {
        struct raid0_private_data *raid0_priv = mddev->private;
+       sector_t sectors;
 
        /* for raid0 takeover only one zone is supported */
        if (raid0_priv->nr_strip_zones > 1) {
@@ -5696,6 +5687,9 @@ static void *raid45_takeover_raid0(mddev_t *mddev, int level)
                return ERR_PTR(-EINVAL);
        }
 
+       sectors = raid0_priv->strip_zone[0].zone_end;
+       sector_div(sectors, raid0_priv->strip_zone[0].nb_dev);
+       mddev->dev_sectors = sectors;
        mddev->new_level = level;
        mddev->new_layout = ALGORITHM_PARITY_N;
        mddev->new_chunk_sectors = mddev->chunk_sectors;
index 8d563a4f022a778a6d9354a3c1bf514c6f5e10b6..3ca77a2613ba0a544ffa9c4aca4e12122d77cc96 100644 (file)
@@ -400,8 +400,6 @@ struct raid5_private_data {
                                            * Cleared when a sync completes.
                                            */
 
-       struct plug_handle      plug;
-
        /* per cpu variables */
        struct raid5_percpu {
                struct page     *spare_page; /* Used when checking P/Q in raid6 */
index 74ee172b5bc992d8dd151338b67ab5d9d65cb271..b2ba9dc0dd6dc1cd81bbc5c242b7ed3f1f6fb449 100644 (file)
@@ -161,7 +161,7 @@ static int saa7146_i2c_reset(struct saa7146_dev *dev)
                msleep(SAA7146_I2C_DELAY);
        }
 
-       /* if any error is still present, a fatal error has occured ... */
+       /* if any error is still present, a fatal error has occurred ... */
        status = saa7146_i2c_status(dev);
        if ( dev->i2c_bitrate != status ) {
                DEB_I2C(("fatal error. status:0x%08x\n",status));
@@ -326,9 +326,9 @@ static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *m
                        if ( 0 != err) {
                                /* this one is unsatisfying: some i2c slaves on some
                                   dvb cards don't acknowledge correctly, so the saa7146
-                                  thinks that an address error occured. in that case, the
+                                  thinks that an address error occurred. in that case, the
                                   transaction should be retrying, even if an address error
-                                  occured. analog saa7146 based cards extensively rely on
+                                  occurred. analog saa7146 based cards extensively rely on
                                   i2c address probing, however, and address errors indicate that a
                                   device is really *not* there. retrying in that case
                                   increases the time the device needs to probe greatly, so
@@ -365,7 +365,7 @@ static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *m
        DEB_I2C(("transmission successful. (msg:%d).\n",err));
 out:
        /* another bug in revision 0: the i2c-registers get uploaded randomly by other
-          uploads, so we better clear them out before continueing */
+          uploads, so we better clear them out before continuing */
        if( 0 == dev->revision ) {
                __le32 zero = 0;
                saa7146_i2c_reset(dev);
index 605e28b73263677684a1b554fe245d85ed1ef378..0d6e09419044b6e2c0dc421b6126223fdc36e411 100644 (file)
@@ -106,7 +106,7 @@ enum {
 /* MXL5005 Tuner Register Struct */
 struct TunerReg {
        u16 Reg_Num;    /* Tuner Register Address */
-       u16 Reg_Val;    /* Current sw programmed value waiting to be writen */
+       u16 Reg_Val;    /* Current sw programmed value waiting to be written */
 };
 
 enum {
index 3abb221f3d0745ff5b57eaaff6f4ac28b19a1a45..50cfa8cebb9309043e63059c350d7091e877e24c 100644 (file)
@@ -98,7 +98,7 @@ struct tda18271_config {
        /* output options that can be disabled */
        enum tda18271_output_options output_opt;
 
-       /* some i2c providers cant write all 39 registers at once */
+       /* some i2c providers can't write all 39 registers at once */
        enum tda18271_small_i2c small_i2c;
 
        /* force rf tracking filter calibration on startup */
index 4f3e3ceaa7c90cec428e06561e661b14cc880485..03f96d6ca8946ecafc837295cee0bc41ec51b666 100644 (file)
@@ -58,7 +58,7 @@ struct flexcop_pci {
 
        int active_dma1_addr; /* 0 = addr0 of dma1; 1 = addr1 of dma1 */
        u32 last_dma1_cur_pos;
-       /* position of the pointer last time the timer/packet irq occured */
+       /* position of the pointer last time the timer/packet irq occurred */
        int count;
        int count_prev;
        int stream_problem;
index 78fc469f0f6976b0077fcbad6e407b87852c078f..1e1106dcd063ebd687d552bcc493873fcd5c8a8b 100644 (file)
@@ -427,10 +427,10 @@ static void or51211_reset(struct dvb_frontend * fe)
        struct dvb_bt8xx_card *bt = fe->dvb->priv;
 
        /* RESET DEVICE
-        * reset is controled by GPIO-0
+        * reset is controlled by GPIO-0
         * when set to 0 causes reset and when to 1 for normal op
         * must remain reset for 128 clock cycles on a 50Mhz clock
-        * also PRM1 PRM2 & PRM4 are controled by GPIO-1,GPIO-2 & GPIO-4
+        * also PRM1 PRM2 & PRM4 are controlled by GPIO-1,GPIO-2 & GPIO-4
         * We assume that the reset has be held low long enough or we
         * have been reset by a power on.  When the driver is unloaded
         * reset set to 0 so if reloaded we have been reset.
index cad6634610ea5fb0d6ea59e6c86e322bd1e9638e..31e2c0d45db32777f58bd6bbcd0be502dd94ffd0 100644 (file)
@@ -1638,7 +1638,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
        case FE_READ_STATUS: {
                fe_status_t* status = parg;
 
-               /* if retune was requested but hasn't occured yet, prevent
+               /* if retune was requested but hasn't occurred yet, prevent
                 * that user get signal state from previous tuning */
                if (fepriv->state == FESTATE_RETUNE ||
                    fepriv->state == FESTATE_ERROR) {
@@ -1729,7 +1729,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
                         * Dish network legacy switches (as used by Dish500)
                         * are controlled by sending 9-bit command words
                         * spaced 8msec apart.
-                        * the actual command word is switch/port dependant
+                        * the actual command word is switch/port dependent
                         * so it is up to the userspace application to send
                         * the right command.
                         * The command must always start with a '0' after
index 199ece0d48837125da59e7495e81ad2035f47a47..6ad94745bbdd1f90bcd895e84f4a784870237cad 100644 (file)
@@ -580,7 +580,7 @@ static int af9005_fe_program_cfoe(struct dvb_usb_device *d, fe_bandwidth_t bw)
                NS_coeff2_8k = 0x724925;
                break;
        default:
-               err("Invalid bandwith %d.", bw);
+               err("Invalid bandwidth %d.", bw);
                return -EINVAL;
        }
 
@@ -789,7 +789,7 @@ static int af9005_fe_select_bw(struct dvb_usb_device *d, fe_bandwidth_t bw)
                temp = 2;
                break;
        default:
-               err("Invalid bandwith %d.", bw);
+               err("Invalid bandwidth %d.", bw);
                return -EINVAL;
        }
        return af9005_write_register_bits(d, xd_g_reg_bw, reg_bw_pos,
@@ -930,7 +930,7 @@ static int af9005_fe_init(struct dvb_frontend *fe)
        if (ret)
                return ret;
 
-       /* init other parameters: program cfoe and select bandwith */
+       /* init other parameters: program cfoe and select bandwidth */
        deb_info("program cfoe\n");
        if ((ret = af9005_fe_program_cfoe(state->d, BANDWIDTH_6_MHZ)))
                return ret;
@@ -1167,7 +1167,7 @@ static int af9005_fe_set_frontend(struct dvb_frontend *fe,
        if (ret)
                return ret;
 
-       /* select bandwith */
+       /* select bandwidth */
        deb_info("select bandwidth");
        ret = af9005_fe_select_bw(state->d, fep->u.ofdm.bandwidth);
        if (ret)
index af8d55e390fb758742fefba1fffd907949cae03f..0f461ca10cb941dc255126bfa5b2ef54bd7f5245 100644 (file)
@@ -20,7 +20,7 @@
  *         Frontend:                             comtech JDVBT-90502
  *             (tuner PLL:                       tua6034, I2C addr:(0xC0 >> 1))
  *             (OFDM demodulator:                TC90502, I2C addr:(0x30 >> 1))
- *         LED x3 (+LNB) controll:               PIC 16F676
+ *         LED x3 (+LNB) control               PIC 16F676
  *         EEPROM:                               24C08
  *
  *        (USB smart card reader:                AU9522)
index cd26e7c1536a674d235430c80d8fe37a8b5bbd46..f2db01212ca12068082422a4ecd2f720f926fab8 100644 (file)
@@ -321,7 +321,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
        lme_int->lme_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 
        usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
-       info("INT Interupt Service Started");
+       info("INT Interrupt Service Started");
 
        return 0;
 }
@@ -482,7 +482,7 @@ static int lme2510_msg(struct dvb_usb_device *d,
                        break;
                }
 
-               deb_info(4, "I2C From Interupt Message out(%02x) in(%02x)",
+               deb_info(4, "I2C From Interrupt Message out(%02x) in(%02x)",
                                wbuf[3], rbuf[1]);
 
        }
@@ -632,11 +632,11 @@ static int lme2510_int_service(struct dvb_usb_adapter *adap)
        }
        d->rc_dev = rc;
 
-       /* Start the Interupt */
+       /* Start the Interrupt */
        ret = lme2510_int_read(adap);
        if (ret < 0) {
                rc_unregister_device(rc);
-               info("INT Unable to start Interupt Service");
+               info("INT Unable to start Interrupt Service");
                return -ENODEV;
        }
 
@@ -1003,7 +1003,7 @@ static int dm04_lme2510_tuner(struct dvb_usb_adapter *adap)
                return -ENODEV;
        }
 
-       /* Start the Interupt & Remote*/
+       /* Start the Interrupt & Remote*/
        ret = lme2510_int_service(adap);
 
        return ret;
@@ -1171,7 +1171,7 @@ void *lme2510_exit_int(struct dvb_usb_device *d)
                usb_kill_urb(st->lme_urb);
                usb_free_coherent(d->udev, 5000, st->buffer,
                                  st->lme_urb->transfer_dma);
-               info("Interupt Service Stopped");
+               info("Interrupt Service Stopped");
                rc_unregister_device(d->rc_dev);
                info("Remote Stopped");
        }
index e8149f393300e7276014b85b4befa9b29377e7ab..024273374bd8983e33eef4eb853c4977a6503d64 100644 (file)
@@ -39,7 +39,7 @@ struct atbm8830_config {
        /* parallel or serial transport stream */
        u8 serial_ts;
 
-       /* transport stream clock output only when receving valid stream */
+       /* transport stream clock output only when receiving valid stream */
        u8 ts_clk_gated;
 
        /* Decoder sample TS data at rising edge of clock */
index 65f6a36dfb21b1047807002af182f4cedbd9e073..1d572940e243637994b302f16a56bdb5b7caa7c6 100644 (file)
@@ -635,7 +635,7 @@ static int au8522_led_gpio_enable(struct au8522_state *state, int onoff)
        struct au8522_led_config *led_config = state->config->led_cfg;
        u8 val;
 
-       /* bail out if we cant control an LED */
+       /* bail out if we can't control an LED */
        if (!led_config || !led_config->gpio_output ||
            !led_config->gpio_output_enable || !led_config->gpio_output_disable)
                return 0;
@@ -665,7 +665,7 @@ static int au8522_led_ctrl(struct au8522_state *state, int led)
        struct au8522_led_config *led_config = state->config->led_cfg;
        int i, ret = 0;
 
-       /* bail out if we cant control an LED */
+       /* bail out if we can't control an LED */
        if (!led_config || !led_config->gpio_leds ||
            !led_config->num_led_states || !led_config->led_states)
                return 0;
@@ -803,7 +803,7 @@ static int au8522_led_status(struct au8522_state *state, const u16 *snr)
        int led;
        u16 strong;
 
-       /* bail out if we cant control an LED */
+       /* bail out if we can't control an LED */
        if (!led_config)
                return 0;
 
index cf5e576dfdcfaa6c836f3fb2d8af6433bb45fb72..8aff5868a5e1f4b814c084a93bf3185c397224bc 100644 (file)
@@ -155,7 +155,7 @@ static int bcm3510_hab_send_request(struct bcm3510_state *st, u8 *buf, int len)
        unsigned long t;
 
 /* Check if any previous HAB request still needs to be serviced by the
- * Aquisition Processor before sending new request */
+ * Acquisition Processor before sending new request */
        if ((ret = bcm3510_readB(st,0xa8,&v)) < 0)
                return ret;
        if (v.HABSTAT_a8.HABR) {
@@ -361,7 +361,7 @@ static int bcm3510_tuner_cmd(struct bcm3510_state* st,u8 bc, u16 n, u8 a)
 /* Set duration of the initial state of TUNCTL = 3.34 micro Sec */
        c.TUNCTL_state = 0x40;
 
-/* PRESCALER DEVIDE RATIO | BC1_2_3_4; (band switch), 1stosc REFERENCE COUNTER REF_S12 and REF_S11 */
+/* PRESCALER DIVIDE RATIO | BC1_2_3_4; (band switch), 1stosc REFERENCE COUNTER REF_S12 and REF_S11 */
        c.ctl_dat[0].ctrl.size = BITS_8;
        c.ctl_dat[0].data      = 0x80 | bc;
 
@@ -397,7 +397,7 @@ static int bcm3510_tuner_cmd(struct bcm3510_state* st,u8 bc, u16 n, u8 a)
        c.ctl_dat[7].ctrl.cs0  = 1;
        c.ctl_dat[7].data      = 0x40;
 
-/* PRESCALER DEVIDE RATIO, 2ndosc REFERENCE COUNTER REF_S12 and REF_S11 */
+/* PRESCALER DIVIDE RATIO, 2ndosc REFERENCE COUNTER REF_S12 and REF_S11 */
        c.ctl_dat[8].ctrl.size = BITS_8;
        c.ctl_dat[8].data      = 0x80;
 
index 5fbc0fc37ecd4785c41547216e9722ae8e69c5ab..0142214b013363735ce084a8ed63871908fccd3c 100644 (file)
@@ -179,7 +179,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet
        cx22700_writereg (state, 0x06, val);
 
        cx22700_writereg (state, 0x08, 0x04 | 0x02);  /* use user tps parameters */
-       cx22700_writereg (state, 0x08, 0x04);         /* restart aquisition */
+       cx22700_writereg (state, 0x08, 0x04);         /* restart acquisition */
 
        return 0;
 }
index ff6c4983051c3d20adf3052a0e62e2f90ecc9172..3139558148bacb1f92a972dbaff2baf27ef4f18a 100644 (file)
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(debug, "Enable verbose debug messages");
 
 /* Register values to initialise the demod */
 static const u8 init_tab[] = {
-       0x00, 0x00, /* Stop aquisition */
+       0x00, 0x00, /* Stop acquisition */
        0x0B, 0x06,
        0x09, 0x01,
        0x0D, 0x41,
@@ -310,7 +310,7 @@ static int cx22702_set_tps(struct dvb_frontend *fe,
                        & 0xfc);
                cx22702_writereg(state, 0x0C,
                        (cx22702_readreg(state, 0x0C) & 0xBF) | 0x40);
-               cx22702_writereg(state, 0x00, 0x01); /* Begin aquisition */
+               cx22702_writereg(state, 0x00, 0x01); /* Begin acquisition */
                dprintk("%s: Autodetecting\n", __func__);
                return 0;
        }
@@ -424,7 +424,7 @@ static int cx22702_set_tps(struct dvb_frontend *fe,
        cx22702_writereg(state, 0x0C,
                (cx22702_readreg(state, 0x0C) & 0xBF) | 0x40);
 
-       /* Begin channel aquisition */
+       /* Begin channel acquisition */
        cx22702_writereg(state, 0x00, 0x01);
 
        return 0;
index 7a1a5bc337d8e8bb01034f5a0550fcaf537833a2..bf9c999aa47051d7b71420cd20be6e3f2a781589 100644 (file)
@@ -544,7 +544,7 @@ static int cx24110_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
        cx24110_set_inversion (state, p->inversion);
        cx24110_set_fec (state, p->u.qpsk.fec_inner);
        cx24110_set_symbolrate (state, p->u.qpsk.symbol_rate);
-       cx24110_writereg(state,0x04,0x05); /* start aquisition */
+       cx24110_writereg(state,0x04,0x05); /* start acquisition */
 
        return 0;
 }
index 5de0f7ffd8d2491014a14c09f6d6daa5b62a76db..01eb7b9c28f44060a56cde421621a69adda99854 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Driver for Conexant CX24113/CX24128 Tuner (Satelite)
+ *  Driver for Conexant CX24113/CX24128 Tuner (Satellite)
  *
  *  Copyright (C) 2007-8 Patrick Boettcher <pb@linuxtv.org>
  *
index fad6a990a39bcc1bfd3c0db0fdabf43a773d2389..b1dd8acc607a4d70133524501f643e3deb89f081 100644 (file)
@@ -949,7 +949,7 @@ static int cx24123_set_frontend(struct dvb_frontend *fe,
        else
                err("it seems I don't have a tuner...");
 
-       /* Enable automatic aquisition and reset cycle */
+       /* Enable automatic acquisition and reset cycle */
        cx24123_writereg(state, 0x03, (cx24123_readreg(state, 0x03) | 0x07));
        cx24123_writereg(state, 0x00, 0x10);
        cx24123_writereg(state, 0x00, 0);
index a05007c80985c1311080d82a008f099f065eba23..536f02b17338289174e486669eab806c30dc2715 100644 (file)
@@ -1097,7 +1097,7 @@ static int drx397x_init(struct dvb_frontend *fe)
        s->config.ifagc.w0A = 0x3ff;
        s->config.ifagc.w0C = 0x388;
 
-       /* for signal strenght calculations */
+       /* for signal strength calculations */
        s->config.ss76 = 820;
        s->config.ss78 = 2200;
        s->config.ss7A = 150;
index 33b63235b86e993f32e8489a87d2be7879d41641..c283112051b16cd6b9596c03644961ed0ff23f13 100644 (file)
@@ -1630,7 +1630,7 @@ static enum dvbfe_search mb86a16_search(struct dvb_frontend *fe,
        state->srate = p->u.qpsk.symbol_rate / 1000;
 
        if (!mb86a16_set_fe(state)) {
-               dprintk(verbose, MB86A16_ERROR, 1, "Succesfully acquired LOCK");
+               dprintk(verbose, MB86A16_ERROR, 1, "Successfully acquired LOCK");
                return DVBFE_ALGO_SEARCH_SUCCESS;
        }
 
index cc4acd2f920d6e1efd0842dbe49545f8b02ca360..0f867a5055fb95b3368bc65ce744fd221caf8b83 100644 (file)
@@ -406,7 +406,7 @@ err:
                printk(KERN_INFO "mb86a20s: Init failed. Will try again later\n");
        } else {
                state->need_init = false;
-               dprintk("Initialization succeded.\n");
+               dprintk("Initialization succeeded.\n");
        }
        return rc;
 }
index 472907d43460f8c6536d83d0152ee269de0ad635..83e6f1a1b7009cae02fb0c3579901a2d032be126 100644 (file)
@@ -670,7 +670,7 @@ static int mt312_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
                if (ret < 0)
                        goto error;
 
-               /* preserve this bit to not accidently shutdown ADC */
+               /* preserve this bit to not accidentally shutdown ADC */
                val &= 0x80;
                break;
        }
index e87b747ea99c4f84d9b1b808b528f4799355bdcd..17f8cdf8afefe041a3be5ecbd11cf009f93f0e3f 100644 (file)
@@ -225,7 +225,7 @@ static int s5h1420_recv_slave_reply (struct dvb_frontend* fe,
        unsigned long timeout;
        int result = 0;
 
-       /* setup for DISEQC recieve */
+       /* setup for DISEQC receive */
        val = s5h1420_readreg(state, 0x3b);
        s5h1420_writereg(state, 0x3b, 0x82); /* FIXME: guess - do we need to set DIS_RDY(0x08) in receive mode? */
        msleep(15);
index 64673b8b64a2ff0232c67de5f0e6f428c3e3b52e..bc1a8af4f6e105181670ee33ebe111f98425e0ff 100644 (file)
@@ -360,7 +360,7 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency)
        else
                odiv = 0;
 
-       /* VCO enabled, seach clock off as per LL3.7, 3.4.1 */
+       /* VCO enabled, search clock off as per LL3.7, 3.4.1 */
        regs[STB6100_VCO] = 0xe0 | (odiv << STB6100_VCO_ODIV_SHIFT);
 
        /* OSM  */
index 4fd7479bb62b98fdba6d933cd1f34ac14ef9b6b3..84d88f33275e060f690ffdf5b288d038431b561b 100644 (file)
@@ -435,7 +435,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
                return -EINVAL;
        }
 
-       // determine inversion dependant parameters
+       // determine inversion dependent parameters
        inversion = p->inversion;
        if (state->config->invert)
                inversion = (inversion == INVERSION_ON) ? INVERSION_OFF : INVERSION_ON;
index 4e0e6a873b8cab67f958033d6e7cb9d9d6be224b..e57ab53e2e27a7ad6bde437afdbdbc00a7278d85 100644 (file)
@@ -1328,7 +1328,7 @@ stv0367_ter_signal_type stv0367ter_lock_algo(struct stv0367_state *state)
 
        /*guard=stv0367_readbits(state,F367TER_SYR_GUARD); */
 
-       /*supress EPQ auto for SYR_GARD 1/16 or 1/32
+       /*suppress EPQ auto for SYR_GARD 1/16 or 1/32
        and set channel predictor in automatic */
 #if 0
        switch (guard) {
index b62b0f0a4fef9f2625a6fe8cfaa4f7173d71bf7d..e0ea74c8e09327cf7813650f06144770325be971 100644 (file)
@@ -238,7 +238,7 @@ enum fe_stv0900_demod_mode {
 };
 
 struct stv0900_init_params{
-       u32     dmd_ref_clk;/* Refrence,Input clock for the demod in Hz */
+       u32     dmd_ref_clk;/* Reference,Input clock for the demod in Hz */
 
        /* Demodulator Type (single demod or dual demod) */
        enum fe_stv0900_demod_mode      demod_mode;
index 41d0f0a6655d522c4c5eaf376746e1fbe950cedb..52d8712411e5ce1672a75202efc64d499821e8a1 100644 (file)
@@ -1424,7 +1424,7 @@ static int stv090x_start_search(struct stv090x_state *state)
                        if (STV090x_WRITE_DEMOD(state, CFRLOW0, 0x00) < 0)
                                goto err;
 
-                       /*enlarge the timing bandwith for Low SR*/
+                       /*enlarge the timing bandwidth for Low SR*/
                        if (STV090x_WRITE_DEMOD(state, RTCS2, 0x68) < 0)
                                goto err;
                } else {
@@ -1432,17 +1432,17 @@ static int stv090x_start_search(struct stv090x_state *state)
                        Set The carrier search up and low to auto mode */
                        if (STV090x_WRITE_DEMOD(state, CARCFG, 0xc4) < 0)
                                goto err;
-                       /*reduce the timing bandwith for high SR*/
+                       /*reduce the timing bandwidth for high SR*/
                        if (STV090x_WRITE_DEMOD(state, RTCS2, 0x44) < 0)
                                goto err;
                }
        } else {
                /* >= Cut 3 */
                if (state->srate <= 5000000) {
-                       /* enlarge the timing bandwith for Low SR */
+                       /* enlarge the timing bandwidth for Low SR */
                        STV090x_WRITE_DEMOD(state, RTCS2, 0x68);
                } else {
-                       /* reduce timing bandwith for high SR */
+                       /* reduce timing bandwidth for high SR */
                        STV090x_WRITE_DEMOD(state, RTCS2, 0x44);
                }
 
@@ -2482,7 +2482,7 @@ static int stv090x_sw_algo(struct stv090x_state *state)
                                        dvbs2_fly_wheel = STV090x_GETFIELD_Px(reg, FLYWHEEL_CPT_FIELD);
                                }
                                if (dvbs2_fly_wheel < 0xd) {
-                                       /*FALSE lock, The demod is loosing lock */
+                                       /*FALSE lock, The demod is losing lock */
                                        lock = 0;
                                        if (trials < 2) {
                                                if (state->internal->dev_ver >= 0x20) {
@@ -3202,7 +3202,7 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state)
                        goto err;
                if (STV090x_WRITE_DEMOD(state, CORRELMANT, 0x70) < 0)
                        goto err;
-               if (stv090x_set_srate(state, 1000000) < 0) /* inital srate = 1Msps */
+               if (stv090x_set_srate(state, 1000000) < 0) /* initial srate = 1Msps */
                        goto err;
        } else {
                /* known srate */
index 97b889e8a341969017480dea347700a8e5255767..f807c8ba26e4828298ec53d50a9a38dbac198b2c 100644 (file)
@@ -172,7 +172,7 @@ int mantis_uart_init(struct mantis_pci *mantis)
        mmwrite(mmread(MANTIS_UART_CTL) | MANTIS_UART_RXINT, MANTIS_UART_CTL);
 
        schedule_work(&mantis->uart_work);
-       dprintk(MANTIS_DEBUG, 1, "UART succesfully initialized");
+       dprintk(MANTIS_DEBUG, 1, "UART successfully initialized");
 
        return 0;
 }
index 96307056589d559e4ad87aa8d1e54b64c4f3458a..6927c726ce35b4ec1c8139eb838e7822dded28da 100644 (file)
@@ -122,7 +122,7 @@ static void demux_tasklet(unsigned long data)
                                                Cur->ngeneBuffer.SR.Flags &=
                                                        ~0x40;
                                                break;
-                                               /* Stop proccessing stream */
+                                               /* Stop processing stream */
                                        }
                                } else {
                                        /* We got a valid buffer,
@@ -133,7 +133,7 @@ static void demux_tasklet(unsigned long data)
                                printk(KERN_ERR DEVICE_NAME ": OOPS\n");
                                if (chan->HWState == HWSTATE_RUN) {
                                        Cur->ngeneBuffer.SR.Flags &= ~0x40;
-                                       break;  /* Stop proccessing stream */
+                                       break;  /* Stop processing stream */
                                }
                        }
                        if (chan->AudioDTOUpdated) {
index 6ca6713d527ada0b1c0e487aa850655864a43977..7cb79ec685f0735afeac740eb62a9ae23220d642 100644 (file)
@@ -294,13 +294,13 @@ static void pluto_dma_end(struct pluto *pluto, unsigned int nbpackets)
 
        /* Workaround for broken hardware:
         * [1] On startup NBPACKETS seems to contain an uninitialized value,
-        *     but no packets have been transfered.
+        *     but no packets have been transferred.
         * [2] Sometimes (actually very often) NBPACKETS stays at zero
-        *     although one packet has been transfered.
+        *     although one packet has been transferred.
         * [3] Sometimes (actually rarely), the card gets into an erroneous
         *     mode where it continuously generates interrupts, claiming it
-        *     has recieved nbpackets>TS_DMA_PACKETS packets, but no packet
-        *     has been transfered. Only a reset seems to solve this
+        *     has received nbpackets>TS_DMA_PACKETS packets, but no packet
+        *     has been transferred. Only a reset seems to solve this
         */
        if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) {
                unsigned int i = 0;
@@ -332,7 +332,7 @@ static irqreturn_t pluto_irq(int irq, void *dev_id)
        struct pluto *pluto = dev_id;
        u32 tscr;
 
-       /* check whether an interrupt occured on this device */
+       /* check whether an interrupt occurred on this device */
        tscr = pluto_readreg(pluto, REG_TSCR);
        if (!(tscr & (TSCR_DE | TSCR_OVR)))
                return IRQ_NONE;
index b80d09b035a1ad56f5f746213f34cbd289c16262..37c594f827825af53364797fea1c8b219588af30 100644 (file)
@@ -650,7 +650,7 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe,
                if (status & FE_HAS_LOCK)
                        return ret;
 
-               /* previous tune didnt lock - enable LNA and tune again */
+               /* previous tune didn't lock - enable LNA and tune again */
                sms_board_lna_control(client->coredev, 1);
        }
 
index fc0a60f8a1e14b8e2fe9d200604f681b86b20389..3d20719fce1a114d7c630560235ce53b1e022b4b 100644 (file)
@@ -2332,7 +2332,7 @@ static int frontend_init(struct av7110 *av7110)
  * increment. That's how the 7146 is programmed to do event
  * counting in this budget-patch.c
  * I *think* HPS setting has something to do with the phase
- * of HS but I cant be 100% sure in that.
+ * of HS but I can't be 100% sure in that.
  *
  * hardware debug note: a working budget card (including budget patch)
  * with vpeirq() interrupt setup in mode "0x90" (every 64K) will
index 57983559069015b2ee0b1b8160ef5f2bfa540740..3395d1a9051699c64f9a67fe6f173d415aff0d22 100644 (file)
@@ -539,7 +539,7 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
 **      increment. That's how the 7146 is programmed to do event
 **      counting in this budget-patch.c
 **      I *think* HPS setting has something to do with the phase
-**      of HS but I cant be 100% sure in that.
+**      of HS but I can't be 100% sure in that.
 
 **      hardware debug note: a working budget card (including budget patch)
 **      with vpeirq() interrupt setup in mode "0x90" (every 64K) will
index fe1b8037b247995a6740071d4f50e196fe127c26..f893bffa08a3833e6b03c96b8f334d5372c8b58c 100644 (file)
@@ -234,7 +234,7 @@ static void ttusb_dec_handle_irq( struct urb *urb)
                 * (with buffer[3] == 0x40) in an intervall of ~100ms.
                 * But to handle this correctly we had to imlemenent some
                 * kind of timer which signals a 'key up' event if no
-                * keyrepeat signal is recieved for lets say 200ms.
+                * keyrepeat signal is received for lets say 200ms.
                 * this should/could be added later ...
                 * for now lets report each signal as a key down and up*/
                dprintk("%s:rc signal:%d\n", __func__, buffer[4]);
index e6b2d085a449ae0a7ba4a424a70014e5a03b7112..b3a635b9582013d92fd91f8f5aa51c3e0ce48d01 100644 (file)
@@ -99,7 +99,7 @@ devices, that would be 76 and 91.  */
 
 /*
  * Commands that device should understand
- * List isnt full and will be updated with implementation of new functions
+ * List isn't full and will be updated with implementation of new functions
  */
 #define AMRADIO_SET_FREQ       0xa4
 #define AMRADIO_SET_MUTE       0xab
index dc3f04c52d5e11e923829e74a548d78d1b3e6cad..87bad7678d92f63bab822d6e8a244a6d6729fd69 100644 (file)
@@ -170,7 +170,7 @@ static int fmr2_setfreq(struct fmr2 *dev)
        return 0;
 }
 
-/* !!! not tested, in my card this does't work !!! */
+/* !!! not tested, in my card this doesn't work !!! */
 static int fmr2_setvolume(struct fmr2 *dev)
 {
        int vol[16] = { 0x021, 0x084, 0x090, 0x104,
index 0fab6f8f7e24281cf74359679ab2a157ad85810e..deca2e06ff2203bba0caae2e5737499fd0f9cdc2 100644 (file)
@@ -481,7 +481,7 @@ unlock:
 }
 
 /*
- * si4713_wait_stc - Waits STC interrupt and clears status bits. Usefull
+ * si4713_wait_stc - Waits STC interrupt and clears status bits. Useful
  *                  for TX_TUNE_POWER, TX_TUNE_FREQ and TX_TUNE_MEAS
  * @sdev: si4713_device structure for the device we are communicating
  * @usecs: timeout to wait for STC interrupt signal
index ecfd9fb167d80487d5fb0adaec1d534deda7b85f..5991ab60303dcafda387ce7d6d304ef039aa39db 100644 (file)
@@ -352,7 +352,7 @@ static void send_tasklet(unsigned long arg)
        if (!atomic_read(&fmdev->tx_cnt))
                return;
 
-       /* Check, is there any timeout happenned to last transmitted packet */
+       /* Check, is there any timeout happened to last transmitted packet */
        if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) {
                fmerr("TX timeout occurred\n");
                atomic_set(&fmdev->tx_cnt, 1);
@@ -478,7 +478,7 @@ u32 fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload,
                return -ETIMEDOUT;
        }
        if (!fmdev->resp_skb) {
-               fmerr("Reponse SKB is missing\n");
+               fmerr("Response SKB is missing\n");
                return -EFAULT;
        }
        spin_lock_irqsave(&fmdev->resp_skb_lock, flags);
@@ -1598,7 +1598,7 @@ u32 fmc_release(struct fmdev *fmdev)
                fmdbg("FM Core is already down\n");
                return 0;
        }
-       /* Sevice pending read */
+       /* Service pending read */
        wake_up_interruptible(&fmdev->rx.rds.read_queue);
 
        tasklet_kill(&fmdev->tx_task);
index 427c4164cecefc51addba47e38e28ec8b3e76ec2..aee243bb6630d550e018b3f37e2d6d5a986cba9c 100644 (file)
@@ -362,7 +362,7 @@ struct fm_event_msg_hdr {
 #define FM_TX_PREEMPH_50US             0
 #define FM_TX_PREEMPH_75US             2
 
-/* FM TX antenna impedence values */
+/* FM TX antenna impedance values */
 #define FM_TX_ANT_IMP_50               0
 #define FM_TX_ANT_IMP_200              1
 #define FM_TX_ANT_IMP_500              2
index 1ac49139158df8086148d77ec9695a00b08a628d..a43ed6c41bfc475361fd9b0155826dfd69a3746e 100644 (file)
@@ -520,7 +520,7 @@ static void ene_rx_disable(struct ene_device *dev)
        dev->rx_enabled = false;
 }
 
-/* This resets the receiver. Usefull to stop stream of spaces at end of
+/* This resets the receiver. Useful to stop stream of spaces at end of
  * transmission
  */
 static void ene_rx_reset(struct ene_device *dev)
@@ -1089,7 +1089,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
        if (error < 0)
                goto error;
 
-       ene_notice("driver has been succesfully loaded");
+       ene_notice("driver has been successfully loaded");
        return 0;
 error:
        if (dev && dev->irq >= 0)
index 3ca86594feb841358823c02f5ecc37844bc84885..8fc0f081b4701ddaf3c7ab0e79b7944f5fede297 100644 (file)
@@ -1311,7 +1311,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
         * contain a position coordinate (x,y), with each component ranging
         * from -14 to 14. We want to down-sample this to only 4 discrete values
         * for up/down/left/right arrow keys. Also, when you get too close to
-        * diagonals, it has a tendancy to jump back and forth, so lets try to
+        * diagonals, it has a tendency to jump back and forth, so lets try to
         * ignore when they get too close.
         */
        if (ictx->product != 0xffdc) {
index 01f258a2a57adfd17a287153c9991183ab064342..11c19d8d0ee0a7edad7aeb3ea241130585a6d381 100644 (file)
@@ -153,7 +153,7 @@ EXPORT_SYMBOL_GPL(ir_raw_event_store_edge);
  * @type:      the type of the event that has occurred
  *
  * This routine (which may be called from an interrupt context) works
- * in similiar manner to ir_raw_event_store_edge.
+ * in similar manner to ir_raw_event_store_edge.
  * This routine is intended for devices with limited internal buffer
  * It automerges samples of same type, and handles timeouts
  */
index 9485dac359867497cf402f21ac6ee0121c001b9d..43908a70bd8b8df31e6965844883d68004328726 100644 (file)
@@ -42,6 +42,7 @@
 #include <linux/bitops.h>
 #include <media/rc-core.h>
 #include <linux/pci_ids.h>
+#include <linux/delay.h>
 
 #include "ite-cir.h"
 
index 3c1913926c1af1608ba9d0db829f5faa59931b89..afae14fd152ea26289c67135f017e09858560326 100644 (file)
@@ -55,7 +55,7 @@ static struct rc_map_table lme2510_rc[] = {
        { 0xff40fb04, KEY_MEDIA_REPEAT}, /* Recall */
        { 0xff40e51a, KEY_PAUSE }, /* Timeshift */
        { 0xff40fd02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */
-       { 0xff40f906, KEY_VOLUMEDOWN }, /* Volumne defined as right hand*/
+       { 0xff40f906, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/
        { 0xff40fe01, KEY_CHANNELUP },
        { 0xff40fa05, KEY_CHANNELDOWN },
        { 0xff40eb14, KEY_ZOOM },
@@ -76,7 +76,7 @@ static struct rc_map_table lme2510_rc[] = {
        { 0xff00bb44, KEY_MEDIA_REPEAT}, /* Recall */
        { 0xff00b54a, KEY_PAUSE }, /* Timeshift */
        { 0xff00b847, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */
-       { 0xff00bc43, KEY_VOLUMEDOWN }, /* Volumne defined as right hand*/
+       { 0xff00bc43, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/
        { 0xff00b946, KEY_CHANNELUP },
        { 0xff00bf40, KEY_CHANNELDOWN },
        { 0xff00f708, KEY_ZOOM },
index 18b37facb0dd4902185d0e0e2e1ab265482b2c35..fdd213ff1adf862da69d916e522d381ff9a0b668 100644 (file)
@@ -29,7 +29,7 @@ static struct rc_map_table msi_tvanywhere[] = {
 
        { 0x0c, KEY_MUTE },
        { 0x0f, KEY_SCREEN },           /* Full Screen */
-       { 0x10, KEY_FN },               /* Funtion */
+       { 0x10, KEY_FN },               /* Function */
        { 0x11, KEY_TIME },             /* Time shift */
        { 0x12, KEY_POWER },
        { 0x13, KEY_MEDIA },            /* MTS */
index f1c1281fbc170c0e43371b6c79d14578b780b8d9..f9f2fa2819b808a7bd694bb6571550237758c369 100644 (file)
@@ -49,7 +49,7 @@ static struct rc_map_table norwood[] = {
        { 0x37, KEY_PLAY },             /* Play                */
        { 0x36, KEY_PAUSE },            /* Pause               */
        { 0x2b, KEY_STOP },             /* Stop                */
-       { 0x67, KEY_FASTFORWARD },      /* Foward              */
+       { 0x67, KEY_FASTFORWARD },      /* Forward              */
        { 0x66, KEY_REWIND },           /* Rewind              */
        { 0x3e, KEY_SEARCH },           /* Auto Scan           */
        { 0x2e, KEY_CAMERA },           /* Capture Video       */
index 33afd98938da5ad7f86be58efccf3d1889dc2c4f..a2706648e3651f30468310fcb9213bd7af7c4658 100644 (file)
@@ -255,7 +255,7 @@ static unsigned int ir_update_mapping(struct rc_dev *dev,
  * @rc_map:    scancode table to be searched
  * @scancode:  the desired scancode
  * @resize:    controls whether we allowed to resize the table to
- *             accomodate not yet present scancodes
+ *             accommodate not yet present scancodes
  * @return:    index of the mapping containing scancode in question
  *             or -1U in case of failure.
  *
@@ -1039,7 +1039,7 @@ int rc_register_device(struct rc_dev *dev)
                goto out_table;
 
        /*
-        * Default delay of 250ms is too short for some protocols, expecially
+        * Default delay of 250ms is too short for some protocols, especially
         * since the timeout is currently set to 250ms. Increase it to 500ms,
         * to avoid wrong repetition of the keycodes. Note that this must be
         * set after the call to input_register_device().
index 6ad83a15d073c07cb9ed0eda2029df155eb5cc15..c03eb29a9ee6976fba68ae19b8a9dd6ebcb4b6b7 100644 (file)
@@ -502,7 +502,7 @@ static inline void vbi_get_next_buf(struct au0828_dmaqueue *dma_q,
 
        /* Get the next buffer */
        *buf = list_entry(dma_q->active.next, struct au0828_buffer, vb.queue);
-       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       /* Cleans up buffer - Useful for testing for frame/URB loss */
        outp = videobuf_to_vmalloc(&(*buf)->vb);
        memset(outp, 0x00, (*buf)->vb.size);
 
index 242f0d512238b2139594be31b4a443e3d8e1c493..3c9e6c7e7b52313b82a229535fc23d7962fbfc62 100644 (file)
@@ -2244,8 +2244,8 @@ struct tvcard bttv_tvcards[] = {
        },
        [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
                /*Eric DEBIEF <debief@telemsa.com>*/
-               /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
-               /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
+               /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/
+               /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the following declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
                /*0x79 in bttv.h*/
                .name           = "Euresys Picolo Tetra",
                .video_inputs   = 4,
@@ -4567,7 +4567,7 @@ static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
  * at one input while the monitor is looking at another.
  *
  * Since I've couldn't be bothered figuring out how to add an
- * independant muxsel for the monitor bus, I've just set it to
+ * independent muxsel for the monitor bus, I've just set it to
  * whatever the card is looking at.
  *
  *  OUT0 of the TDA8540's is connected to MUX0         (0x03)
index fd604d32bbb9ae767bde852e94f8111f5633961e..13ce72c04b33879b9b59dbad08b5a992219a10be 100644 (file)
@@ -3,7 +3,7 @@
     bttv-gpio.c  --  gpio sub drivers
 
     sysfs-based sub driver interface for bttv
-    mainly intented for gpio access
+    mainly intended for gpio access
 
 
     Copyright (C) 1996,97,98 Ralph  Metzler (rjkm@thp.uni-koeln.de)
index 55ffd60ffa7ff05b99099108937d61e8eafdeb00..66470339849329b9a197c9b81b6c21f73de93d50 100644 (file)
@@ -383,7 +383,7 @@ static int cafe_smbus_write_data(struct cafe_camera *cam,
         * causes the device to die.
         * Use a busy-wait because we often send a large quantity of small
         * commands at-once; using msleep() would cause a lot of context
-        * switches which take longer than 2ms, resulting in a noticable
+        * switches which take longer than 2ms, resulting in a noticeable
         * boot-time and capture-start delays.
         */
        mdelay(2);
index 188c9c3d2db10727daf71bbf723bf1e4b2c7cd5e..e9c69d9c9e4ad41d7f1674337f05ddd21e958f77 100644 (file)
@@ -109,7 +109,7 @@ struct cx18_av_state {
        int is_initialized;
 
        /*
-        * The VBI slicer starts operating and counting lines, begining at
+        * The VBI slicer starts operating and counting lines, beginning at
         * slicer line count of 1, at D lines after the deassertion of VRESET.
         * This staring field line, S, is 6 (& 319) or 10 (& 273) for 625 or 525
         * line systems respectively.  Sliced ancillary data captured on VBI
index 86c30b9963e534d14ce3e5000927876c901daf42..4f041c033c54420dc69caa106c0dcbf778232719 100644 (file)
@@ -312,7 +312,7 @@ static int cx18_s_fmt_vbi_cap(struct file *file, void *fh,
 
        /*
         * Set the digitizer registers for raw active VBI.
-        * Note cx18_av_vbi_wipes out alot of the passed in fmt under valid
+        * Note cx18_av_vbi_wipes out a lot of the passed in fmt under valid
         * calling conditions
         */
        ret = v4l2_subdev_call(cx->sd_av, vbi, s_raw_fmt, &fmt->fmt.vbi);
index 582227522cf0821482d01179fe7a9f1978729fea..6d3121ff45a24d59791758bf15ccc5eb203177ea 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Raster Reference/Protection (RP) bytes, used in Start/End Active
  * Video codes emitted from the digitzer in VIP 1.x mode, that flag the start
- * of VBI sample or VBI ancilliary data regions in the digitial ratser line.
+ * of VBI sample or VBI ancillary data regions in the digitial ratser line.
  *
  * Task FieldEven VerticalBlank HorizontalBlank 0 0 0 0
  */
index 62843d39817cacb5f7368cf927d0566d3f81e3aa..280df43ca446458f639879bf5e3aa18f2229579d 100644 (file)
@@ -2577,7 +2577,7 @@ int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type)
                        break;
 
                case 6: /* ts1 parallel mode */
-                       cx231xx_info("%s: set ts1 parrallel mode registers\n",
+                       cx231xx_info("%s: set ts1 parallel mode registers\n",
                                     __func__);
                        status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100);
                        status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400);
index 1d914488dbb352c0f4db4db50a8451c9978a0520..1c7a4daafecf56f2dc382ebc60b291f197dbbb45 100644 (file)
@@ -631,7 +631,7 @@ static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q,
        /* Get the next buffer */
        *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue);
 
-       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       /* Cleans up buffer - Useful for testing for frame/URB loss */
        outp = videobuf_to_vmalloc(&(*buf)->vb);
        memset(outp, 0, (*buf)->vb.size);
 
index ffd5af914c448fa0aae422526bbd9c90c4e3a379..a69c24d8db060c93f41f2085212304220de0a462 100644 (file)
@@ -309,7 +309,7 @@ static inline void get_next_buf(struct cx231xx_dmaqueue *dma_q,
        /* Get the next buffer */
        *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue);
 
-       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       /* Cleans up buffer - Useful for testing for frame/URB loss */
        outp = videobuf_to_vmalloc(&(*buf)->vb);
        memset(outp, 0, (*buf)->vb.size);
 
index 209b971bd267add702469bbf07d5c92492006fa8..c9f15d6dec40ffa0cc4844313b6a5f7ce56d6946 100644 (file)
@@ -449,7 +449,7 @@ int netup_ci_init(struct cx23885_tsport *port)
                0x04, /* ack active low */
                0x00, /* LOCK = 0 */
                0x33, /* serial mode, rising in, rising out, MSB first*/
-               0x31, /* syncronization */
+               0x31, /* synchronization */
        };
        int ret;
 
index 8db2797bc7c34892cd4bdd01b9ef966260d62e58..c186473fc5706207c3abd529e994b549b44ced0b 100644 (file)
@@ -214,7 +214,7 @@ struct cx23885_board {
 
        /* Vendors can and do run the PCIe bridge at different
         * clock rates, driven physically by crystals on the PCBs.
-        * The core has to accomodate this. This allows the user
+        * The core has to accommodate this. This allows the user
         * to add new boards with new frequencys. The value is
         * expressed in Hz.
         *
index 35796e0352475b6536bfd47315107e418e6716fa..b7ee2ae70583decb1c2afabbfdca62949532e699 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2004 Ulf Eklund
  *
- * Based on the saa7115 driver and on the first verison of Chris Kennedy's
+ * Based on the saa7115 driver and on the first version of Chris Kennedy's
  * cx25840 driver.
  *
  * Changes by Tyler Trafford <tatrafford@comcast.net>
@@ -445,7 +445,7 @@ static void cx25840_initialize(struct i2c_client *client)
        cx25840_write(client, 0x918, 0xa0);
        cx25840_write(client, 0x919, 0x01);
 
-       /* stereo prefered */
+       /* stereo preferred */
        cx25840_write(client, 0x809, 0x04);
        /* AC97 shift */
        cx25840_write(client, 0x8cf, 0x0f);
@@ -546,7 +546,7 @@ static void cx23885_initialize(struct i2c_client *client)
         * Aux PLL
         * Initial setup for audio sample clock:
         * 48 ksps, 16 bits/sample, x160 multiplier = 122.88 MHz
-        * Intial I2S output/master clock(?):
+        * Initial I2S output/master clock(?):
         * 48 ksps, 16 bits/sample, x16 multiplier = 12.288 MHz
         */
        switch (state->id) {
@@ -903,7 +903,7 @@ static void input_change(struct i2c_client *client)
        } else if (std & V4L2_STD_PAL) {
                /* Autodetect audio standard and audio system */
                cx25840_write(client, 0x808, 0xff);
-               /* Since system PAL-L is pretty much non-existant and
+               /* Since system PAL-L is pretty much non-existent and
                   not used by any public broadcast network, force
                   6.5 MHz carrier to be interpreted as System DK,
                   this avoids DK audio detection instability */
@@ -1851,7 +1851,7 @@ static u32 get_cx2388x_ident(struct i2c_client *client)
                        ret = V4L2_IDENT_CX23885_AV;
                } else {
                        /* CX23887 has a broken DIF, but the registers
-                        * appear valid (but unsed), good enough to detect. */
+                        * appear valid (but unused), good enough to detect. */
                        ret = V4L2_IDENT_CX23887_AV;
                }
        } else if (cx25840_read4(client, 0x300) & 0x0fffffff) {
index 490aafb34e2f1588ed40b34cfce5f957db503bf0..c8b32c1c7386168a60aa5e6f82cb51ebf294385d 100644 (file)
@@ -258,7 +258,7 @@ static int ccdc_update_raw_params(struct ccdc_config_params_raw *raw_params)
        /*
         * Allocate memory for FPC table if current
         * FPC table buffer is not big enough to
-        * accomodate FPC Number requested
+        * accommodate FPC Number requested
         */
        if (raw_params->fault_pxl.fp_num != config_params->fault_pxl.fp_num) {
                if (fpc_physaddr != NULL) {
@@ -436,7 +436,7 @@ void ccdc_config_ycbcr(void)
 
        /*
         * configure the horizontal line offset. This should be a
-        * on 32 byte bondary. So clear LSB 5 bits
+        * on 32 byte boundary. So clear LSB 5 bits
         */
        regw(((params->win.width * 2  + 31) & ~0x1f), CCDC_HSIZE_OFF);
 
index 71e961e53a56184b07bbbcdd5f752754313b8930..5b38fc93ff280c7fe8fa3e22f386ccaa31c9d824 100644 (file)
@@ -1691,7 +1691,7 @@ static int vpfe_s_crop(struct file *file, void *priv,
                goto unlock_out;
        }
 
-       /* adjust the width to 16 pixel boundry */
+       /* adjust the width to 16 pixel boundary */
        crop->c.width = ((crop->c.width + 15) & ~0xf);
 
        /* make sure parameters are valid */
index a83131bd00b2b13e2808b06386fb6a816b3b60e7..7b6461d2d1ff3f1a2ef9b25560772d7a34909b08 100644 (file)
@@ -377,7 +377,7 @@ static inline void get_next_buf(struct em28xx_dmaqueue *dma_q,
        /* Get the next buffer */
        *buf = list_entry(dma_q->active.next, struct em28xx_buffer, vb.queue);
 
-       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       /* Cleans up buffer - Useful for testing for frame/URB loss */
        outp = videobuf_to_vmalloc(&(*buf)->vb);
        memset(outp, 0, (*buf)->vb.size);
 
@@ -404,7 +404,7 @@ static inline void vbi_get_next_buf(struct em28xx_dmaqueue *dma_q,
 
        /* Get the next buffer */
        *buf = list_entry(dma_q->active.next, struct em28xx_buffer, vb.queue);
-       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       /* Cleans up buffer - Useful for testing for frame/URB loss */
        outp = videobuf_to_vmalloc(&(*buf)->vb);
        memset(outp, 0x00, (*buf)->vb.size);
 
index c276a7debdec9fdde3f0b3fa6d421b7c3864b7bf..b57160e04866de7d7840982c38387a6a7f85b9e9 100644 (file)
@@ -201,7 +201,7 @@ void mi1320_init_settings(struct gspca_dev *gspca_dev)
        sd->vmax.backlight  =  2;
        sd->vmax.brightness =  8;
        sd->vmax.sharpness  =  7;
-       sd->vmax.contrast   =  0; /* 10 but not working with tihs driver */
+       sd->vmax.contrast   =  0; /* 10 but not working with this driver */
        sd->vmax.gamma      = 40;
        sd->vmax.hue        =  5 + 1;
        sd->vmax.saturation =  8;
index 9c6a643caf01c3d64aa64993947456c746c29266..e526aa3dedaf582e9b21a9f049462ab9e6f2a790 100644 (file)
@@ -857,7 +857,7 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
                }
 
                /* the bandwidth is not wide enough
-                * negociate or try a lower alternate setting */
+                * negotiate or try a lower alternate setting */
                PDEBUG(D_ERR|D_STREAM,
                        "bandwidth not wide enough - trying again");
                msleep(20);     /* wait for kill complete */
@@ -2346,7 +2346,7 @@ void gspca_disconnect(struct usb_interface *intf)
        usb_set_intfdata(intf, NULL);
 
        /* release the device */
-       /* (this will call gspca_release() immediatly or on last close) */
+       /* (this will call gspca_release() immediately or on last close) */
        video_unregister_device(&gspca_dev->vdev);
 
 /*     PDEBUG(D_PROBE, "disconnect complete"); */
index cb4d0bf0d784787c68a8ee3ff3954e5b06a79f41..0196209a948a879846fcbb660b11a0fe91feddc0 100644 (file)
@@ -361,7 +361,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
                mi_w(gspca_dev, i + 1, mi_data[i]);
 
        data[0] = 0x00;
-       data[1] = 0x4d;         /* ISOC transfering enable... */
+       data[1] = 0x4d;         /* ISOC transferring enable... */
        reg_w(gspca_dev, 2);
 
        gspca_dev->ctrl_inac = 0; /* activate the illuminator controls */
index 3884c9d300c5ed766f34eed7060cb59161494c77..97e50796743425c78cb99e762428322ebc1a4179 100644 (file)
@@ -469,7 +469,7 @@ static void lcd_stop(struct gspca_dev *gspca_dev)
 static int isoc_enable(struct gspca_dev *gspca_dev)
 {
        gspca_dev->usb_buf[0] = 0x00;
-       gspca_dev->usb_buf[1] = 0x4d;  /* ISOC transfering enable... */
+       gspca_dev->usb_buf[1] = 0x4d;  /* ISOC transferring enable... */
        return mr_write(gspca_dev, 2);
 }
 
index fd1b6082c96daec8b4312ac67106bac4ad7b13ac..36a46fc787341b86dbd8ceaa1fef5c1ab21541b7 100644 (file)
@@ -381,7 +381,7 @@ static const struct v4l2_pix_format ov519_sif_mode[] = {
    larger then necessary, however they need to be this big as the ov511 /
    ov518 always fills the entire isoc frame, using 0 padding bytes when
    it doesn't have any data. So with low framerates the amount of data
-   transfered can become quite large (libv4l will remove all the 0 padding
+   transferred can become quite large (libv4l will remove all the 0 padding
    in userspace). */
 static const struct v4l2_pix_format ov518_vga_mode[] = {
        {320, 240, V4L2_PIX_FMT_OV518, V4L2_FIELD_NONE,
@@ -4368,7 +4368,7 @@ static void ov511_pkt_scan(struct gspca_dev *gspca_dev,
                                gspca_dev->last_packet_type = DISCARD_PACKET;
                                return;
                        }
-                       /* Add 11 byte footer to frame, might be usefull */
+                       /* Add 11 byte footer to frame, might be useful */
                        gspca_frame_add(gspca_dev, LAST_PACKET, in, 11);
                        return;
                } else {
index 5a08738fba3068a4aa37766ddbe1475f8b7f572c..146b459b08d575e2eeff52d721c48b6e6aa3f09e 100644 (file)
@@ -827,7 +827,7 @@ static void setexposure(struct gspca_dev *gspca_dev)
                   possible to use less exposure then what the fps maximum
                   allows by setting register 10. register 10 configures the
                   actual exposure as quotient of the full exposure, with 0
-                  being no exposure at all (not very usefull) and reg10_max
+                  being no exposure at all (not very useful) and reg10_max
                   being max exposure possible at that framerate.
 
                   The code maps our 0 - 510 ms exposure ctrl to these 2
index 45552c3ff8d9ce701c36e3c75070260673911cfe..3e76951e3c1926066ee09451608898074538b7ac 100644 (file)
@@ -607,7 +607,7 @@ static void spca500_reinit(struct gspca_dev *gspca_dev)
        reg_w(gspca_dev, 0x00, 0x8880, 2);
        /* family cam Quicksmart stuff */
        reg_w(gspca_dev, 0x00, 0x800a, 0x00);
-       /* Set agc transfer: synced inbetween frames */
+       /* Set agc transfer: synced between frames */
        reg_w(gspca_dev, 0x00, 0x820f, 0x01);
        /* Init SDRAM - needed for SDRAM access */
        reg_w(gspca_dev, 0x00, 0x870a, 0x04);
@@ -831,7 +831,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
 
                /* familycam Quicksmart pocketDV stuff */
                reg_w(gspca_dev, 0x00, 0x800a, 0x00);
-               /* Set agc transfer: synced inbetween frames */
+               /* Set agc transfer: synced between frames */
                reg_w(gspca_dev, 0x00, 0x820f, 0x01);
                /* Init SDRAM - needed for SDRAM access */
                reg_w(gspca_dev, 0x00, 0x870a, 0x04);
index 348319371523849da40357078c7f812a22689c9b..41dce49fb43db1ea698109e172fe010ff3f47beb 100644 (file)
@@ -592,7 +592,7 @@ static const u16 spca508_sightcam_init_data[][2] = {
 /* This line seems to setup the frame/canvas */
        {0x000f, 0x8402},
 
-/* Theese 6 lines are needed to startup the webcam */
+/* These 6 lines are needed to startup the webcam */
        {0x0090, 0x8110},
        {0x0001, 0x8114},
        {0x0001, 0x8114},
index 2e9c06175192cac3a2d5940ede21cbe57c15f2b5..5ba96aff2252994e3265c873a04dbf530362e733 100644 (file)
@@ -22,7 +22,7 @@
  * History and Acknowledgments
  *
  * The original Linux driver for SQ905 based cameras was written by
- * Marcell Lengyel and furter developed by many other contributers
+ * Marcell Lengyel and furter developed by many other contributors
  * and is available from http://sourceforge.net/projects/sqcam/
  *
  * This driver takes advantage of the reverse engineering work done for
index 17531b41a073cebcd8c0d0e5fa26d83d2a8b174c..b8156855f2b759e7df9f934e5540c5d87a68308e 100644 (file)
@@ -569,7 +569,7 @@ static int hdcs_init(struct sd *sd)
        if (err < 0)
                return err;
 
-       /* Enable continous frame capture, bit 2: stop when frame complete */
+       /* Enable continuous frame capture, bit 2: stop when frame complete */
        err = stv06xx_write_sensor(sd, HDCS_REG_CONFIG(sd), BIT(3));
        if (err < 0)
                return err;
index cdf8b191f71097f0647cf2309779a915088698b8..cbc505a2fc29cecf838ed92592db2e576fb021ec 100644 (file)
@@ -261,7 +261,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
 
 /* the saa7146 provides some controls (brightness, contrast, saturation)
    which gets registered *after* this function. because of this we have
-   to return with a value != 0 even if the function succeded.. */
+   to return with a value != 0 even if the function succeeded.. */
 static int vidioc_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qc)
 {
        struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
index 4df01947a7df04311668aba78dd0d6956b387bea..14a1cea1d70da6bdcefc06184d4153f804348de8 100644 (file)
@@ -179,7 +179,7 @@ static volatile struct ivtv_mailbox __iomem *ivtv_search_mailbox(const volatile
 {
        int i;
 
-       /* mailbox is preceeded by a 16 byte 'magic cookie' starting at a 256-byte
+       /* mailbox is preceded by a 16 byte 'magic cookie' starting at a 256-byte
           address boundary */
        for (i = 0; i < size; i += 0x100) {
                if (readl(mem + i)      == 0x12345678 &&
@@ -377,7 +377,7 @@ int ivtv_firmware_check(struct ivtv *itv, char *where)
                          "Reloading\n", where);
                res = ivtv_firmware_restart(itv);
                /*
-                * Even if restarted ok, still signal a problem had occured.
+                * Even if restarted ok, still signal a problem had occurred.
                 * The caller can come through this function again to check
                 * if things are really ok after the restart.
                 */
index f0316d02f09f6df1297a6f3e5e6ed4e0c1b8ff1f..17247451c69326f3159cb6913e7eabaa152d72fc 100644 (file)
@@ -1080,7 +1080,7 @@ static int ivtvfb_init_vidmode(struct ivtv *itv)
                kmalloc(sizeof(u32) * 16, GFP_KERNEL|__GFP_NOWARN);
 
        if (!oi->ivtvfb_info.pseudo_palette) {
-               IVTVFB_ERR("abort, unable to alloc pseudo pallete\n");
+               IVTVFB_ERR("abort, unable to alloc pseudo palette\n");
                return -ENOMEM;
        }
 
index b1763ac93ab3d7a2b24c254f44c1648c94a56f2e..8126622fb4f53dbe26f5d09d60142953bea00843 100644 (file)
@@ -69,7 +69,7 @@ MODULE_LICENSE("GPL");
 /* module parameters */
 static int opmode   = OPMODE_AUTO;
 int msp_debug;          /* msp_debug output */
-int msp_once;           /* no continous stereo monitoring */
+int msp_once;           /* no continuous stereo monitoring */
 int msp_amsound;        /* hard-wire AM sound at 6.5 Hz (france),
                            the autoscan seems work well only with FM... */
 int msp_standard = 1;    /* Override auto detect of audio msp_standard,
@@ -551,7 +551,7 @@ static int msp_log_status(struct v4l2_subdev *sd)
        switch (state->mode) {
                case MSP_MODE_AM_DETECT: p = "AM (for carrier detect)"; break;
                case MSP_MODE_FM_RADIO: p = "FM Radio"; break;
-               case MSP_MODE_FM_TERRA: p = "Terrestial FM-mono/stereo"; break;
+               case MSP_MODE_FM_TERRA: p = "Terrestrial FM-mono/stereo"; break;
                case MSP_MODE_FM_SAT: p = "Satellite FM-mono"; break;
                case MSP_MODE_FM_NICAM1: p = "NICAM/FM (B/G, D/K)"; break;
                case MSP_MODE_FM_NICAM2: p = "NICAM/FM (I)"; break;
index b376fcdee6523e1292182b37c2e9f37e42fe81be..80387e2c3eca1e5f43945f0d472bdbb524cf79d0 100644 (file)
@@ -87,7 +87,7 @@ static struct msp3400c_init_data_dem {
                {-8, -8, 4, 6, 78, 107},
                MSP_CARRIER(10.7), MSP_CARRIER(10.7),
                0x00d0, 0x0480, 0x0020, 0x3000
-       }, {    /* Terrestial FM-mono + FM-stereo */
+       }, {    /* Terrestrial FM-mono + FM-stereo */
                {3, 18, 27, 48, 66, 72},
                {3, 18, 27, 48, 66, 72},
                MSP_CARRIER(5.5), MSP_CARRIER(5.5),
index 029a4babfd61b98075bcb511d13c383fd09bed45..d4fe7bc92a1d82525f77a43f31e4d9ef856bdbde 100644 (file)
@@ -473,7 +473,7 @@ static int omap_vout_vrfb_buffer_setup(struct omap_vout_device *vout,
 /*
  * Convert V4L2 rotation to DSS rotation
  *     V4L2 understand 0, 90, 180, 270.
- *     Convert to 0, 1, 2 and 3 repsectively for DSS
+ *     Convert to 0, 1, 2 and 3 respectively for DSS
  */
 static int v4l2_rot_to_dss_rot(int v4l2_rotation,
                        enum dss_rotation *rotation, bool mirror)
@@ -1142,7 +1142,7 @@ static int omap_vout_buffer_prepare(struct videobuf_queue *q,
 }
 
 /*
- * Buffer queue funtion will be called from the videobuf layer when _QBUF
+ * Buffer queue function will be called from the videobuf layer when _QBUF
  * ioctl is called. It is used to enqueue buffer, which is ready to be
  * displayed.
  */
index b941c761eef9d661c8989694cbaabf9c602aa8ed..2aa6a76c5e593742090843242dfdb578a38d2df2 100644 (file)
@@ -53,7 +53,7 @@ EXPORT_SYMBOL_GPL(omap_vout_default_crop);
 /* Given a new render window in new_win, adjust the window to the
  * nearest supported configuration.  The adjusted window parameters are
  * returned in new_win.
- * Returns zero if succesful, or -EINVAL if the requested window is
+ * Returns zero if successful, or -EINVAL if the requested window is
  * impossible and cannot reasonably be adjusted.
  */
 int omap_vout_try_window(struct v4l2_framebuffer *fbuf,
@@ -101,7 +101,7 @@ EXPORT_SYMBOL_GPL(omap_vout_try_window);
  * will also be adjusted if necessary.  Preference is given to keeping the
  * the window as close to the requested configuration as possible.  If
  * successful, new_win, vout->win, and crop are updated.
- * Returns zero if succesful, or -EINVAL if the requested preview window is
+ * Returns zero if successful, or -EINVAL if the requested preview window is
  * impossible and cannot reasonably be adjusted.
  */
 int omap_vout_new_window(struct v4l2_rect *crop,
@@ -155,7 +155,7 @@ EXPORT_SYMBOL_GPL(omap_vout_new_window);
  * window would fall outside the display boundaries, the cropping rectangle
  * will also be adjusted to maintain the rescaling ratios.  If successful, crop
  * and win are updated.
- * Returns zero if succesful, or -EINVAL if the requested cropping rectangle is
+ * Returns zero if successful, or -EINVAL if the requested cropping rectangle is
  * impossible and cannot reasonably be adjusted.
  */
 int omap_vout_new_crop(struct v4l2_pix_format *pix,
index eab31cbd68eb354ffb5685bec2e738c88981b633..5954b9306630b38552c577ae97a433f2c9b143d8 100644 (file)
@@ -687,7 +687,7 @@ static void videobuf_done(struct omap1_cam_dev *pcdev,
                 * In CONTIG mode, the current buffer parameters had already
                 * been entered into the DMA programming register set while the
                 * buffer was fetched with prepare_next_vb(), they may have also
-                * been transfered into the runtime set and already active if
+                * been transferred into the runtime set and already active if
                 * the DMA still running.
                 */
        } else {
@@ -835,7 +835,7 @@ static irqreturn_t cam_isr(int irq, void *data)
                                /*
                                 * If exactly 2 sgbufs from the next sglist have
                                 * been programmed into the DMA engine (the
-                                * frist one already transfered into the DMA
+                                * first one already transferred into the DMA
                                 * runtime register set, the second one still
                                 * in the programming set), then we are in sync.
                                 */
index de2dec50666350f96e988bc90ac31bae19b97a67..472a69359e609c16c67b014da479e7bbeb2c29ed 100644 (file)
@@ -1295,7 +1295,7 @@ static void __isp_subclk_update(struct isp_device *isp)
                clk |= ISPCTRL_RSZ_CLK_EN;
 
        /* NOTE: For CCDC & Preview submodules, we need to affect internal
-        *       RAM aswell.
+        *       RAM as well.
         */
        if (isp->subclk_resources & OMAP3_ISP_SUBCLK_CCDC)
                clk |= ISPCTRL_CCDC_CLK_EN | ISPCTRL_CCDC_RAM_EN;
@@ -1443,7 +1443,7 @@ static int isp_get_clocks(struct isp_device *isp)
  * Increment the reference count on the ISP. If the first reference is taken,
  * enable clocks and power-up all submodules.
  *
- * Return a pointer to the ISP device structure, or NULL if an error occured.
+ * Return a pointer to the ISP device structure, or NULL if an error occurred.
  */
 struct isp_device *omap3isp_get(struct isp_device *isp)
 {
index d403af5d31d27795330af0886538b63b17597790..483a19cac1ad9497ee9d1598eed3bf9f00830d45 100644 (file)
@@ -150,7 +150,7 @@ struct ispccdc_lsc {
  * @input: Active input
  * @output: Active outputs
  * @video_out: Output video node
- * @error: A hardware error occured during capture
+ * @error: A hardware error occurred during capture
  * @alaw: A-law compression enabled (1) or disabled (0)
  * @lpf: Low pass filter enabled (1) or disabled (0)
  * @obclamp: Optical-black clamp enabled (1) or disabled (0)
@@ -163,7 +163,7 @@ struct ispccdc_lsc {
  * @shadow_update: Controls update in progress by userspace
  * @syncif: Interface synchronization configuration
  * @vpcfg: Video port configuration
- * @underrun: A buffer underrun occured and a new buffer has been queued
+ * @underrun: A buffer underrun occurred and a new buffer has been queued
  * @state: Streaming state
  * @lock: Serializes shadow_update with interrupt handler
  * @wait: Wait queue used to stop the module
index 0efef2e78d93a2474aeb48989bd317d363d47340..0e16cab8e0890a64d8b175f4ece607db63951c13 100644 (file)
@@ -772,7 +772,7 @@ static int ccp2_enum_frame_size(struct v4l2_subdev *sd,
  * @sd    : pointer to v4l2 subdev structure
  * @fh    : V4L2 subdev file handle
  * @fmt   : pointer to v4l2 subdev format structure
- * return -EINVAL or zero on sucess
+ * return -EINVAL or zero on success
  */
 static int ccp2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
                              struct v4l2_subdev_format *fmt)
index fb503f3db3bea06015559b327c216cbc5adb5308..69161a682b3d18158cb0a0e6507fd080f8fa56b9 100644 (file)
@@ -969,7 +969,7 @@ static int csi2_enum_frame_size(struct v4l2_subdev *sd,
  * @sd : pointer to v4l2 subdev structure
  * @fh : V4L2 subdev file handle
  * @fmt: pointer to v4l2 subdev format structure
- * return -EINVAL or zero on sucess
+ * return -EINVAL or zero on success
  */
 static int csi2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
                           struct v4l2_subdev_format *fmt)
index 6af0f231702d7405002f8eabb2c1db40bb273cc7..aba537af87e43fec1109c5d2dfada0ac88464eca 100644 (file)
@@ -34,7 +34,7 @@
 #include "ispreg.h"
 #include "isppreview.h"
 
-/* Default values in Office Flourescent Light for RGBtoRGB Blending */
+/* Default values in Office Fluorescent Light for RGBtoRGB Blending */
 static struct omap3isp_prev_rgbtorgb flr_rgb2rgb = {
        {       /* RGB-RGB Matrix */
                {0x01E2, 0x0F30, 0x0FEE},
@@ -44,7 +44,7 @@ static struct omap3isp_prev_rgbtorgb flr_rgb2rgb = {
        {0x0000, 0x0000, 0x0000}
 };
 
-/* Default values in Office Flourescent Light for RGB to YUV Conversion*/
+/* Default values in Office Fluorescent Light for RGB to YUV Conversion*/
 static struct omap3isp_prev_csc flr_prev_csc = {
        {       /* CSC Coef Matrix */
                {66, 129, 25},
@@ -54,22 +54,22 @@ static struct omap3isp_prev_csc flr_prev_csc = {
        {0x0, 0x0, 0x0}
 };
 
-/* Default values in Office Flourescent Light for CFA Gradient*/
+/* Default values in Office Fluorescent Light for CFA Gradient*/
 #define FLR_CFA_GRADTHRS_HORZ  0x28
 #define FLR_CFA_GRADTHRS_VERT  0x28
 
-/* Default values in Office Flourescent Light for Chroma Suppression*/
+/* Default values in Office Fluorescent Light for Chroma Suppression*/
 #define FLR_CSUP_GAIN          0x0D
 #define FLR_CSUP_THRES         0xEB
 
-/* Default values in Office Flourescent Light for Noise Filter*/
+/* Default values in Office Fluorescent Light for Noise Filter*/
 #define FLR_NF_STRGTH          0x03
 
 /* Default values for White Balance */
 #define FLR_WBAL_DGAIN         0x100
 #define FLR_WBAL_COEF          0x20
 
-/* Default values in Office Flourescent Light for Black Adjustment*/
+/* Default values in Office Fluorescent Light for Black Adjustment*/
 #define FLR_BLKADJ_BLUE                0x0
 #define FLR_BLKADJ_GREEN       0x0
 #define FLR_BLKADJ_RED         0x0
@@ -137,7 +137,7 @@ preview_enable_invalaw(struct isp_prev_device *prev, u8 enable)
  * @enable: 1 - Enable, 0 - Disable
  *
  * NOTE: PRV_WSDR_ADDR and PRV_WADD_OFFSET must be set also
- * The proccess is applied for each captured frame.
+ * The process is applied for each captured frame.
  */
 static void
 preview_enable_drkframe_capture(struct isp_prev_device *prev, u8 enable)
@@ -157,7 +157,7 @@ preview_enable_drkframe_capture(struct isp_prev_device *prev, u8 enable)
  * @enable: 1 - Acquires memory bandwidth since the pixels in each frame is
  *          subtracted with the pixels in the current frame.
  *
- * The proccess is applied for each captured frame.
+ * The process is applied for each captured frame.
  */
 static void
 preview_enable_drkframe(struct isp_prev_device *prev, u8 enable)
@@ -1528,7 +1528,7 @@ static long preview_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
  * preview_set_stream - Enable/Disable streaming on preview subdev
  * @sd    : pointer to v4l2 subdev structure
  * @enable: 1 == Enable, 0 == Disable
- * return -EINVAL or zero on sucess
+ * return -EINVAL or zero on success
  */
 static int preview_set_stream(struct v4l2_subdev *sd, int enable)
 {
@@ -1780,7 +1780,7 @@ static int preview_enum_frame_size(struct v4l2_subdev *sd,
  * @sd : pointer to v4l2 subdev structure
  * @fh : V4L2 subdev file handle
  * @fmt: pointer to v4l2 subdev format structure
- * return -EINVAL or zero on sucess
+ * return -EINVAL or zero on success
  */
 static int preview_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
                              struct v4l2_subdev_format *fmt)
index f2d63ca4bd6f60c71a64d3bd83494ef48fb8502a..fa943bd05c7fa3559cb05d7944c6cff55f9abd5b 100644 (file)
@@ -163,7 +163,7 @@ struct isptables_update {
  * @output: Bitmask of the active output
  * @video_in: Input video entity
  * @video_out: Output video entity
- * @error: A hardware error occured during capture
+ * @error: A hardware error occurred during capture
  * @params: Module configuration data
  * @shadow_update: If set, update the hardware configured in the next interrupt
  * @underrun: Whether the preview entity has queued buffers on the output
index 251de3e1679dd591e6c75fcf8a6b8703bbd6202b..92c5a12157d56ecd63861f131088904870868a0a 100644 (file)
@@ -46,9 +46,9 @@ struct scatterlist;
  *     device yet.
  * @ISP_BUF_STATE_ACTIVE: The buffer is in use for an active video transfer.
  * @ISP_BUF_STATE_ERROR: The device is done with the buffer and an error
- *     occured. For capture device the buffer likely contains corrupted data or
+ *     occurred. For capture device the buffer likely contains corrupted data or
  *     no data at all.
- * @ISP_BUF_STATE_DONE: The device is done with the buffer and no error occured.
+ * @ISP_BUF_STATE_DONE: The device is done with the buffer and no error occurred.
  *     For capture devices the buffer contains valid data.
  */
 enum isp_video_buffer_state {
index 70897ce5dced7731f862ec10aae297220a127b57..0bb0f8cd36f51c312979719b1515b8b52f029929 100644 (file)
@@ -782,7 +782,7 @@ static void resizer_print_status(struct isp_res_device *res)
  * ratio will thus result in a resizing factor slightly larger than the
  * requested value.
  *
- * To accomodate that, and make sure the TRM equations are satisfied exactly, we
+ * To accommodate that, and make sure the TRM equations are satisfied exactly, we
  * compute the input crop rectangle as the last step.
  *
  * As if the situation wasn't complex enough, the maximum output width depends
@@ -1431,7 +1431,7 @@ static int resizer_enum_frame_size(struct v4l2_subdev *sd,
  * @sd    : pointer to v4l2 subdev structure
  * @fh    : V4L2 subdev file handle
  * @fmt   : pointer to v4l2 subdev format structure
- * return -EINVAL or zero on sucess
+ * return -EINVAL or zero on success
  */
 static int resizer_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
                              struct v4l2_subdev_format *fmt)
index 6e18cee274c743edc417f4155c7ebc550fa637f3..9cd8f1aa567b9ce2f094b00a4d42f7c6132dd92c 100644 (file)
@@ -574,12 +574,12 @@ static const struct isp_video_queue_operations isp_video_queue_ops = {
 /*
  * omap3isp_video_buffer_next - Complete the current buffer and return the next
  * @video: ISP video object
- * @error: Whether an error occured during capture
+ * @error: Whether an error occurred during capture
  *
  * Remove the current video buffer from the DMA queue and fill its timestamp,
  * field count and state fields before waking up its completion handler.
  *
- * The buffer state is set to VIDEOBUF_DONE if no error occured (@error is 0)
+ * The buffer state is set to VIDEOBUF_DONE if no error occurred (@error is 0)
  * or VIDEOBUF_ERROR otherwise (@error is non-zero).
  *
  * The DMA queue is expected to contain at least one buffer.
@@ -658,7 +658,7 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video,
 /*
  * omap3isp_video_resume - Perform resume operation on the buffers
  * @video: ISP video object
- * @continuous: Pipeline is in single shot mode if 0 or continous mode otherwise
+ * @continuous: Pipeline is in single shot mode if 0 or continuous mode otherwise
  *
  * This function is intended to be used on suspend/resume scenario. It
  * requests video queue layer to discard buffers marked as DONE if it's in
index fe8e3ebd9ce4c1687752c56143e131fbf6c3b208..456d9ad9ae5aa01d7ce713e738ad93f5cdd2a773 100644 (file)
@@ -1038,7 +1038,7 @@ static int ov6650_reset(struct i2c_client *client)
        ret = ov6650_reg_rmw(client, REG_COMA, COMA_RESET, 0);
        if (ret)
                dev_err(&client->dev,
-                       "An error occured while entering soft reset!\n");
+                       "An error occurred while entering soft reset!\n");
 
        return ret;
 }
index 53d88a2ab92061031fe01d1b2d11eba14fcacfce..5173ac449dd82c4b9c764c737cf20a328b53a01b 100644 (file)
@@ -273,7 +273,7 @@ static int ov9640_reset(struct i2c_client *client)
        ret = ov9640_reg_write(client, OV9640_COM7, OV9640_COM7_SCCB_RESET);
        if (ret)
                dev_err(&client->dev,
-                       "An error occured while entering soft reset!\n");
+                       "An error occurred while entering soft reset!\n");
 
        return ret;
 }
index aeed1c2945fb2cb4cd8705777a4747c99d75207b..9515f3a68f8fc4b326062eda49b6832065e25037 100644 (file)
@@ -32,7 +32,7 @@
 
    Read and analyze data in the eeprom.  Use tveeprom to figure out
    the packet structure, since this is another Hauppauge device and
-   internally it has a family resemblence to ivtv-type devices
+   internally it has a family resemblance to ivtv-type devices
 
 */
 
index 51d3009ab57f34f912dfdb6e9b8e07345b455898..d7753ae9ff46bed8b0c91bf438a9e9d3ff39120f 100644 (file)
@@ -75,7 +75,7 @@ enum pvr2_v4l_type {
  *  (but it might still on the bus).  In this state there's nothing we can
  *  do; it must be replugged in order to recover.
  *
- *  COLD - Device is in an unusuable state, needs microcontroller firmware.
+ *  COLD - Device is in an unusable state, needs microcontroller firmware.
  *
  *  WARM - We can communicate with the device and the proper
  *  microcontroller firmware is running, but other device initialization is
index 02686771740d1381ef39103ddf02eb4424a49e2b..c1ee09a043ba4f577246d31726c1ceb6d5ef4b5b 100644 (file)
@@ -714,7 +714,7 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev,
  *
  * The DMA chaining is done with DMA running. This means a tiny temporal window
  * remains, where a buffer is queued on the chain, while the chain is already
- * stopped. This means the tailed buffer would never be transfered by DMA.
+ * stopped. This means the tailed buffer would never be transferred by DMA.
  * This function restarts the capture for this corner case, where :
  *  - DADR() == DADDR_STOP
  *  - a videobuffer is queued on the pcdev->capture list
index 4d929a3945217bf432f94704c0adc3c9d43fbde8..4893b2d91d84606520f4901eebb1db5167254f0a 100644 (file)
@@ -356,7 +356,7 @@ void fimc_hw_en_capture(struct fimc_ctx *ctx)
                /* one shot mode */
                cfg |= S5P_CIIMGCPT_CPT_FREN_ENABLE | S5P_CIIMGCPT_IMGCPTEN;
        } else {
-               /* Continous frame capture mode (freerun). */
+               /* Continuous frame capture mode (freerun). */
                cfg &= ~(S5P_CIIMGCPT_CPT_FREN_ENABLE |
                         S5P_CIIMGCPT_CPT_FRMOD_CNT);
                cfg |= S5P_CIIMGCPT_IMGCPTEN;
index 61c6007c8ea63eafce840f12f5ab7cf73c0d7999..50f1be05ebd304de743ae191ebcb1d818520d806 100644 (file)
@@ -7460,7 +7460,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                                dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
                                break;
                        default:
-                               printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);
+                               printk(KERN_ERR "%s Can't determine tuner type %x from EEPROM\n", dev->name, tuner_t);
                        }
                } else if ((data[1] != 0) && (data[1] != 0xff)) {
                        /* new config structure */
@@ -7480,7 +7480,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                                        printk(KERN_INFO "%s Board has DVB-T\n", dev->name);
                                break;
                        default:
-                               printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);
+                               printk(KERN_ERR "%s Can't determine tuner type %x from EEPROM\n", dev->name, tuner_t);
                        }
                } else {
                        printk(KERN_ERR "%s unexpected config structure\n", dev->name);
index 6a4c217ed3a7632bf332026cf557a9041cff9759..62fac7f9d04e14201fe140a20468a283fcb7afa9 100644 (file)
@@ -257,7 +257,7 @@ out:
 }
 
 /* Wait for a signal event, without holding a mutex. Either return TIMEOUT if
- * the event never occured, or SAA_OK if it was signaled during the wait.
+ * the event never occurred, or SAA_OK if it was signaled during the wait.
  */
 int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno)
 {
index b369300cce0695eae159acd664d31de0e6dd6d70..a266bf0169e6a7d339dd7e946f536a25a3915918 100644 (file)
@@ -444,7 +444,7 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev)
                printk(KERN_INFO " .Reserved = 0x%x\n", hdr->reserved);
                printk(KERN_INFO " .Version = 0x%x\n", hdr->version);
 
-               /* Retreive bootloader if reqd */
+               /* Retrieve bootloader if reqd */
                if ((hdr->firmwaresize == 0) && (hdr->bslsize == 0))
                        /* Second bootloader in the firmware file */
                        filesize = hdr->reserved * 16;
index df1d2997fa6ceadc0a200a2ce194705be5327155..1d2140a3eb38e17cd9699a62f1bbd8a459ee880b 100644 (file)
@@ -412,7 +412,7 @@ struct tmComResVBIFormatDescrHeader {
        u8      StartLine; /* NTSC Start = 10 */
        u8      EndLine; /* NTSC = 21 */
        u8      FieldRate; /* 60 for NTSC */
-       u8      bNumLines; /* Unsed - scheduled for removal */
+       u8      bNumLines; /* Unused - scheduled for removal */
 } __attribute__((packed));
 
 struct tmComResProbeCommit {
index ce56a1cdbf0a6bf1065f75a7de5e322416e5e4b5..0e07c493e6f0ddf0d61d87351d9744c02c5d041e 100644 (file)
@@ -1810,7 +1810,7 @@ static int sn9c102_open(struct file *filp)
                /*
                   We will not release the "open_mutex" lock, so that only one
                   process can be in the wait queue below. This way the process
-                  will be sleeping while holding the lock, without loosing its
+                  will be sleeping while holding the lock, without losing its
                   priority after any wake_up().
                */
                err = wait_event_interruptible_exclusive(cam->wait_open,
index 7f38549715b6bac625aa01451a31e42e3bcf976a..3679970dba2c9cb33ef745f8b616757411dbbd94 100644 (file)
@@ -180,7 +180,7 @@ struct sn9c102_sensor {
           It should be used to initialize the sensor only, but may also
           configure part of the SN9C1XX chip if necessary. You don't need to
           setup picture settings like brightness, contrast, etc.. here, if
-          the corrisponding controls are implemented (see below), since
+          the corresponding controls are implemented (see below), since
           they are adjusted in the core driver by calling the set_ctrl()
           method after init(), where the arguments are the default values
           specified in the v4l2_queryctrl list of supported controls;
index 54681a5358222df6a722451e92d9fd9e627d22f8..b6ee1bd342dc10bf4134f4bc4bc8495f9de6e687 100644 (file)
@@ -493,7 +493,7 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s,
        int val, r;
        struct vcontrol *lvc;
 
-       /* exposure time is special, spread accross 2 registers */
+       /* exposure time is special, spread across 2 registers */
        if (vc->id == V4L2_CID_EXPOSURE) {
                int val_lower, val_upper;
 
@@ -538,7 +538,7 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s,
        struct vcontrol *lvc;
        int val = vc->value;
 
-       /* exposure time is special, spread accross 2 registers */
+       /* exposure time is special, spread across 2 registers */
        if (vc->id == V4L2_CID_EXPOSURE) {
                int val_lower, val_upper;
                val_lower = val & TCM825X_MASK(TCM825X_ESRSPD_L);
index a25e2b5e1944390edf408a79d48c192b8db75a86..c46a3bb95852a7da7ad866387ec1b602c29bc5a6 100644 (file)
@@ -1058,11 +1058,11 @@ static int tda9874a_initialize(struct CHIPSTATE *chip)
 #define TDA9875_MVR         0x1b  /* Main volume droite */
 #define TDA9875_MBA         0x1d  /* Main Basse */
 #define TDA9875_MTR         0x1e  /* Main treble */
-#define TDA9875_ACS         0x1f  /* Auxilary channel select (FM) 0b0000000*/
-#define TDA9875_AVL         0x20  /* Auxilary volume gauche */
-#define TDA9875_AVR         0x21  /* Auxilary volume droite */
-#define TDA9875_ABA         0x22  /* Auxilary Basse */
-#define TDA9875_ATR         0x23  /* Auxilary treble */
+#define TDA9875_ACS         0x1f  /* Auxiliary channel select (FM) 0b0000000*/
+#define TDA9875_AVL         0x20  /* Auxiliary volume gauche */
+#define TDA9875_AVR         0x21  /* Auxiliary volume droite */
+#define TDA9875_ABA         0x22  /* Auxiliary Basse */
+#define TDA9875_ATR         0x23  /* Auxiliary treble */
 
 #define TDA9875_MSR         0x02  /* Monitor select register */
 #define TDA9875_C1MSB       0x03  /* Carrier 1 (FM) frequency register MSB */
index 545c0294813d9bb9a9293e61792236d396b1bbc3..fc766b9f24c529e3b1083dbe0b7e37f365550669 100644 (file)
@@ -394,11 +394,11 @@ int uvc_commit_video(struct uvc_streaming *stream,
  *
  * uvc_video_decode_end is called with header data at the end of a bulk or
  * isochronous payload. It performs any additional header data processing and
- * returns 0 or a negative error code if an error occured. As header data have
+ * returns 0 or a negative error code if an error occurred. As header data have
  * already been processed by uvc_video_decode_start, this functions isn't
  * required to perform sanity checks a second time.
  *
- * For isochronous transfers where a payload is always transfered in a single
+ * For isochronous transfers where a payload is always transferred in a single
  * URB, the three functions will be called in a row.
  *
  * To let the decoder process header data and update its internal state even
@@ -658,7 +658,7 @@ static void uvc_video_decode_bulk(struct urb *urb, struct uvc_streaming *stream,
                                                            buf);
                } while (ret == -EAGAIN);
 
-               /* If an error occured skip the rest of the payload. */
+               /* If an error occurred skip the rest of the payload. */
                if (ret < 0 || buf == NULL) {
                        stream->bulk.skip_payload = 1;
                } else {
@@ -821,7 +821,7 @@ static int uvc_alloc_urb_buffers(struct uvc_streaming *stream,
                return stream->urb_size / psize;
 
        /* Compute the number of packets. Bulk endpoints might transfer UVC
-        * payloads accross multiple URBs.
+        * payloads across multiple URBs.
         */
        npackets = DIV_ROUND_UP(size, psize);
        if (npackets > UVC_MAX_PACKETS)
index a01ed39e6c168a292a1994b9ef7e440687525c72..506edcc2ddeb722eedae63934ab4be34b65371f3 100644 (file)
@@ -48,7 +48,7 @@
                        printk(KERN_CONT "%s: " fmt, vfd->name, ## arg);\
                } while (0)
 
-/* Zero out the end of the struct pointed to by p.  Everthing after, but
+/* Zero out the end of the struct pointed to by p.  Everything after, but
  * not including, the specified field is cleared. */
 #define CLEAR_AFTER_FIELD(p, field) \
        memset((u8 *)(p) + offsetof(typeof(*(p)), field) + sizeof((p)->field), \
index c4742fc15529a97cf4472dde06717f9ef7d31233..c9691115f2d26787fa9d85ae98382539d78a8a98 100644 (file)
@@ -300,7 +300,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
 
        vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
        retval = remap_pfn_range(vma, vma->vm_start,
-                                PFN_DOWN(virt_to_phys(mem->vaddr)),
+                                mem->dma_handle >> PAGE_SHIFT,
                                 size, vma->vm_page_prot);
        if (retval) {
                dev_err(q->dev, "mmap: remap failed with error %d. ", retval);
index 75301d10a8389f4854e1dd7da7cf7735008b7db8..ca372eb911d0d5905ffcfc76481fe9e99f52272b 100644 (file)
@@ -354,7 +354,7 @@ static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
 
        /* Here we back up the input selection because it gets
           overwritten when we fill the registers with the
-          choosen video norm */
+          chosen video norm */
        temp_input = vpx3220_fp_read(sd, 0xf2);
 
        v4l2_dbg(1, debug, sd, "s_std %llx\n", (unsigned long long)std);
index b654bfff87407a28ba980c2d303bb6c1e42b2361..def55585ad2321901c19f4c709eb6caa924b6d4f 100644 (file)
@@ -57,7 +57,7 @@
    therfor they may not be initialized.
 
    The other functions are just for convenience, as they are for sure used by
-   most/all of the codecs. The last ones may be ommited, too.
+   most/all of the codecs. The last ones may be omitted, too.
 
    See the structure declaration below for more information and which data has
    to be set up for the master and the slave.
index 4bb368e6fd4726561a98b92266dcf3e6d7142862..f3f64001492866d49610091e70a996dae2838d1d 100644 (file)
@@ -259,7 +259,7 @@ struct card_info {
        struct vfe_polarity vfe_pol;
        u8 gpio_pol[ZR_GPIO_MAX];
 
-       /* is the /GWS line conected? */
+       /* is the /GWS line connected? */
        u8 gws_not_connected;
 
        /* avs6eyes mux setting */
index 7c3921de95894ed273f4ebbd6b10d3ebd183c871..2771d818406e7d629de256a709302b0cbaf0d742 100644 (file)
@@ -1254,7 +1254,7 @@ static int setup_overlay(struct zoran_fh *fh, int on)
 {
        struct zoran *zr = fh->zr;
 
-       /* If there is nothing to do, return immediatly */
+       /* If there is nothing to do, return immediately */
        if ((on && fh->overlay_active != ZORAN_FREE) ||
            (!on && fh->overlay_active == ZORAN_FREE))
                return 0;
index 57b42bfc7d232f529f9dfdb499580cf36ab716a9..4a1909a32b6021827a46e9b9db87467ae9c545c5 100644 (file)
@@ -973,7 +973,7 @@ try_again:
 }
 
 /* Memory allocated for attributes by this function should be freed by
- * mspro_block_data_clear, no matter if the initialization process succeded
+ * mspro_block_data_clear, no matter if the initialization process succeeded
  * or failed.
  */
 static int mspro_block_read_attributes(struct memstick_dev *card)
index 700d420a59ace300276c07eb69cd29e9a30c896e..668f5c6a0399f932743cbf16a8c03f1264c78b50 100644 (file)
@@ -796,7 +796,7 @@ static int r592_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if (memstick_add_host(host))
                goto error7;
 
-       message("driver succesfully loaded");
+       message("driver successfully loaded");
        return 0;
 error7:
        free_irq(dev->irq, dev);
index eee264e6028f27b9f20b9c8b8d6661771653509c..c5726c1e88324ad874883434ec55bae882058b9b 100644 (file)
 
                                                        /* Error detection via CRC */
 #define R592_STATUS_SEND_ERR           (1 << 24)       /* Send failed */
-#define R592_STATUS_RECV_ERR           (1 << 25)       /* Recieve failed */
+#define R592_STATUS_RECV_ERR           (1 << 25)       /* Receive failed */
 
                                                        /* Card state */
-#define R592_STATUS_RDY                        (1 << 28)       /* RDY signal recieved */
+#define R592_STATUS_RDY                        (1 << 28)       /* RDY signal received */
 #define R592_STATUS_CED                        (1 << 29)       /* INT: Command done (serial mode)*/
-#define R592_STATUS_SFIFO_INPUT                (1 << 30)       /* Small fifo recieved data*/
+#define R592_STATUS_SFIFO_INPUT                (1 << 30)       /* Small fifo received data*/
 
 #define R592_SFIFO_SIZE                        32              /* total size of small fifo is 32 bytes */
 #define R592_SFIFO_PACKET              8               /* packet size of small fifo */
index face6e7acc728109f79827d88094463d7892ce86..03be8b217709df7aaba73c3354affea36ea75591 100644 (file)
@@ -38,8 +38,8 @@ typedef enum _MpiIocLogInfoFc
 {
     MPI_IOCLOGINFO_FC_INIT_BASE                     = 0x20000000,
     MPI_IOCLOGINFO_FC_INIT_ERROR_OUT_OF_ORDER_FRAME = 0x20000001, /* received an out of order frame - unsupported */
-    MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primative */
-    MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME   = 0x20000003, /* Bad Rx Frame, bad end of frame primative */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primitive */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME   = 0x20000003, /* Bad Rx Frame, bad end of frame primitive */
     MPI_IOCLOGINFO_FC_INIT_ERROR_OVER_RUN           = 0x20000004, /* Bad Rx Frame, overrun */
     MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OTHER           = 0x20000005, /* Other errors caught by IOC which require retries */
     MPI_IOCLOGINFO_FC_INIT_ERROR_SUBPROC_DEAD       = 0x20000006, /* Main processor could not initialize sub-processor */
index 8b04810df469f58209960f5d123ab71e11cef52a..f62960b5d527c1ac96d0e982311ace4c5d5d9f7e 100644 (file)
@@ -56,9 +56,9 @@
 #define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE         (0x0003E000) /* Tried to upload from flash, but there is none */
 #define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE         (0x0003E001) /* ImageType field contents were invalid */
 #define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE           (0x0003E002) /* ImageSize field in TCSGE was bad/offset in MfgPg 4 was wrong */
-#define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occured while attempting to upload the entire flash */
-#define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED       (0x0003E004) /* Error occured while attempting to upload single flash region */
-#define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE                (0x0003E005) /* Problem occured while DMAing FW to host memory */
+#define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occurred while attempting to upload the entire flash */
+#define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED       (0x0003E004) /* Error occurred while attempting to upload single flash region */
+#define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE                (0x0003E005) /* Problem occurred while DMAing FW to host memory */
 
 #define IOP_LOGINFO_CODE_DIAG_MSG_ERROR                      (0x00040000) /* Error handling diag msg - or'd with diag status */
 
 #define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD   (0x00005000)
 
 #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE          (0x00200000) /* Can't get SMP Frame */
-#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR             (0x00200010) /* Error occured on SMP Read */
-#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR            (0x00200020) /* Error occured on SMP Write */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR             (0x00200010) /* Error occurred on SMP Read */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR            (0x00200020) /* Error occurred on SMP Write */
 #define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL      (0x00200040) /* Encl Mgmt services not available for this WWID */
 #define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED    (0x00200050) /* Address Mode not suppored */
 #define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM               (0x00200060) /* Invalid Slot Number in SEP Msg */
 #define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE           (0x00200103) /* SEP NACK'd, it is busy */
 #define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK                (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */
 #define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM              (0x00200105) /* SEP stopped or sent bad chksum in Hdr */
-#define PL_LOGINFO_DA_SEP_STOP_ON_DATA                       (0x00200106) /* SEP stopped while transfering data */
-#define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA                 (0x00200107) /* SEP stopped while transfering sense data */
+#define PL_LOGINFO_DA_SEP_STOP_ON_DATA                       (0x00200106) /* SEP stopped while transferring data */
+#define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA                 (0x00200107) /* SEP stopped while transferring sense data */
 #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1          (0x00200108) /* SEP returned unknown scsi status */
 #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2          (0x00200109) /* SEP returned unknown scsi status */
 #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP            (0x0020010A) /* SEP returned bad chksum after STOP */
index ec8080c980810a639900cbca6d8ce891a1690aef..fa15e853d4e834067eb213d95c3734ef8854894a 100644 (file)
@@ -3435,7 +3435,7 @@ SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
  *     If memory has already been allocated, the same (cached) value
  *     is returned.
  *
- *     Return 0 if successfull, or non-zero for failure
+ *     Return 0 if successful, or non-zero for failure
  **/
 int
 mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size)
@@ -6932,7 +6932,7 @@ EXPORT_SYMBOL(mpt_halt_firmware);
  *     Message Unit Reset - instructs the IOC to reset the Reply Post and
  *     Free FIFO's. All the Message Frames on Reply Free FIFO are discarded.
  *     All posted buffers are freed, and event notification is turned off.
- *     IOC doesnt reply to any outstanding request. This will transfer IOC
+ *     IOC doesn't reply to any outstanding request. This will transfer IOC
  *     to READY state.
  **/
 int
@@ -7905,7 +7905,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info)
                    "Owner",                                    /* 15h */
                "Open Transmit DMA Abort",                      /* 16h */
                "IO Device Missing Delay Retry",                /* 17h */
-               "IO Cancelled Due to Recieve Error",            /* 18h */
+               "IO Cancelled Due to Receive Error",            /* 18h */
                NULL,                                           /* 19h */
                NULL,                                           /* 1Ah */
                NULL,                                           /* 1Bh */
index 878bda0cce70b014ce49051da37d96e4f601248b..6e6e16aab9dae36e8a1d736ba436c3e0431ca749 100644 (file)
@@ -985,7 +985,7 @@ retry_wait:
        ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply;
        iocstat = le16_to_cpu(ReplyMsg->IOCStatus) & MPI_IOCSTATUS_MASK;
        if (iocstat == MPI_IOCSTATUS_SUCCESS) {
-               printk(MYIOC_s_INFO_FMT "F/W update successfull!\n", iocp->name);
+               printk(MYIOC_s_INFO_FMT "F/W update successful!\n", iocp->name);
                return 0;
        } else if (iocstat == MPI_IOCSTATUS_INVALID_FUNCTION) {
                printk(MYIOC_s_WARN_FMT "Hmmm...  F/W download not supported!?!\n",
@@ -2407,7 +2407,7 @@ done_free_mem:
        }
 
        /* mf is null if command issued successfully
-        * otherwise, failure occured after mf acquired.
+        * otherwise, failure occurred after mf acquired.
         */
        if (mf)
                mpt_free_msg_frame(ioc, mf);
index f5a14afad2cda7eedf2d5298877b9f5bda0d2a43..66f94125de4e9baaa3996438363081df9316bf14 100644 (file)
@@ -307,7 +307,7 @@ mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
        spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
 }
 
-/* free memory assoicated to a sas firmware event */
+/* free memory associated to a sas firmware event */
 static void
 mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event)
 {
@@ -1094,7 +1094,7 @@ mptsas_block_io_starget(struct scsi_target *starget)
 /**
  * mptsas_target_reset_queue
  *
- * Receive request for TARGET_RESET after recieving an firmware
+ * Receive request for TARGET_RESET after receiving an firmware
  * event NOT_RESPONDING_EVENT, then put command in link list
  * and queue if task_queue already in use.
  *
@@ -1403,7 +1403,7 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure,
 /**
  *     mptsas_add_end_device - report a new end device to sas transport layer
  *     @ioc: Pointer to MPT_ADAPTER structure
- *     @phy_info: decribes attached device
+ *     @phy_info: describes attached device
  *
  *     return (0) success (1) failure
  *
@@ -1481,7 +1481,7 @@ mptsas_add_end_device(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info)
 /**
  *     mptsas_del_end_device - report a deleted end device to sas transport layer
  *     @ioc: Pointer to MPT_ADAPTER structure
- *     @phy_info: decribes attached device
+ *     @phy_info: describes attached device
  *
  **/
 static void
index 911fc3021e3bc71d921139ceee08778e024487c2..f072a8eb3041cda50be4bbc4ee4e11945249dd9e 100644 (file)
@@ -53,7 +53,7 @@ Symbios Logic (Now LSI)
 BoxHill Corporation
        Loan of initial FibreChannel disk array used for development work.
 
-European Comission
+European Commission
        Funding the work done by the University of Helsinki
 
 SysKonnect
index 0ee4264f5db772a6cb27594b5ce51906901fe3cf..4547db99f7da7d6e321894419a15f5ec3c6413b8 100644 (file)
@@ -65,7 +65,7 @@ int i2o_device_claim(struct i2o_device *dev)
 
        rc = i2o_device_issue_claim(dev, I2O_CMD_UTIL_CLAIM, I2O_CLAIM_PRIMARY);
        if (!rc)
-               pr_debug("i2o: claim of device %d succeded\n",
+               pr_debug("i2o: claim of device %d succeeded\n",
                         dev->lct_data.tid);
        else
                pr_debug("i2o: claim of device %d failed %d\n",
@@ -110,7 +110,7 @@ int i2o_device_claim_release(struct i2o_device *dev)
        }
 
        if (!rc)
-               pr_debug("i2o: claim release of device %d succeded\n",
+               pr_debug("i2o: claim release of device %d succeeded\n",
                         dev->lct_data.tid);
        else
                pr_debug("i2o: claim release of device %d failed %d\n",
@@ -248,7 +248,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
                        goto unreg_dev;
        }
 
-       /* create user entries refering to this device */
+       /* create user entries referring to this device */
        list_for_each_entry(tmp, &c->devices, list)
            if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
                && (tmp != i2o_dev)) {
@@ -267,7 +267,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
                        goto rmlink1;
        }
 
-       /* create parent entries refering to this device */
+       /* create parent entries referring to this device */
        list_for_each_entry(tmp, &c->devices, list)
            if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
                && (tmp != i2o_dev)) {
index 47ec5bc0ed2167b080652ade6b47804dbab49ee0..643ad52e3ca2fe49399a6de0682a495789c32dde 100644 (file)
@@ -610,7 +610,7 @@ static int i2o_block_release(struct gendisk *disk, fmode_t mode)
 
        /*
         * This is to deail with the case of an application
-        * opening a device and then the device dissapears while
+        * opening a device and then the device disappears while
         * it's in use, and then the application tries to release
         * it.  ex: Unmounting a deleted RAID volume at reboot.
         * If we send messages, it will just cause FAILs since
@@ -717,7 +717,7 @@ static unsigned int i2o_block_check_events(struct gendisk *disk,
 
 /**
  *     i2o_block_transfer - Transfer a request to/from the I2O controller
- *     @req: the request which should be transfered
+ *     @req: the request which should be transferred
  *
  *     This function converts the request into a I2O message. The necessary
  *     DMA buffers are allocated and after everything is setup post the message
index 67f921b4419b687b898e9655a52e70a08c289f30..cf8873cbca3f23bedfbda5797734edef23eba96e 100644 (file)
@@ -73,7 +73,7 @@ struct i2o_block_device {
        struct i2o_device *i2o_dev;     /* pointer to I2O device */
        struct gendisk *gd;
        spinlock_t lock;        /* queue lock */
-       struct list_head open_queue;    /* list of transfered, but unfinished
+       struct list_head open_queue;    /* list of transferred, but unfinished
                                           requests */
        unsigned int open_queue_depth;  /* number of requests in the queue */
 
index 97bdf82ec9059ddced228220d21bbb3e64dc2b99..f003957e8e1cfba6269c044098e30199b5d5e91f 100644 (file)
@@ -204,7 +204,7 @@ static int i2o_scsi_remove(struct device *dev)
  *     i2o_scsi_probe - verify if dev is a I2O SCSI device and install it
  *     @dev: device to verify if it is a I2O SCSI device
  *
- *     Retrieve channel, id and lun for I2O device. If everthing goes well
+ *     Retrieve channel, id and lun for I2O device. If everything goes well
  *     register the I2O device as SCSI device on the I2O SCSI controller.
  *
  *     Returns 0 on success or negative error code on failure.
index e2fea580585a2645481a4c79e8f1ea394c35ad75..3ed3ff06be5d7e93d8e276ab78623a81610b30fa 100644 (file)
@@ -201,7 +201,7 @@ config TWL4030_POWER
          as clock request handshaking.
 
          This driver uses board-specific data to initialize the resources
-         and load scripts controling which resources are switched off/on
+         and load scripts controlling which resources are switched off/on
          or reset when a sleep, wakeup or warm reset event occurs.
 
 config TWL4030_CODEC
index bc93b2e8230cec9382bcacdf9425e5c429703610..6421ad1160de2084c2a9a03b69a628c55681f893 100644 (file)
@@ -314,7 +314,7 @@ int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 input)
        /* wait for completion of conversion */
        if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, 2*HZ)) {
                dev_err(gpadc->dev,
-                       "timeout: didnt recieve GPADC conversion interrupt\n");
+                       "timeout: didn't receive GPADC conversion interrupt\n");
                ret = -EINVAL;
                goto out;
        }
index f2f4029e21a081b5c511d768df594f7d6c89bc67..43a76c41cfcc9fe39084dd2967eaba23a4e87a52 100644 (file)
@@ -185,7 +185,7 @@ static void pcap_isr_work(struct work_struct *work)
                ezx_pcap_read(pcap, PCAP_REG_MSR, &msr);
                ezx_pcap_read(pcap, PCAP_REG_ISR, &isr);
 
-               /* We cant service/ack irqs that are assigned to port 2 */
+               /* We can't service/ack irqs that are assigned to port 2 */
                if (!(pdata->config & PCAP_SECOND_PORT)) {
                        ezx_pcap_read(pcap, PCAP_REG_INT_SEL, &int_sel);
                        isr &= ~int_sel;
@@ -457,7 +457,7 @@ static int __devinit ezx_pcap_probe(struct spi_device *spi)
        pcap->workqueue = create_singlethread_workqueue("pcapd");
        if (!pcap->workqueue) {
                ret = -ENOMEM;
-               dev_err(&spi->dev, "cant create pcap thread\n");
+               dev_err(&spi->dev, "can't create pcap thread\n");
                goto free_pcap;
        }
 
index d01574d98870a0473b56be995cd0341786b9b767..f4c8c844b913060c6e0bb12f35db8cba983a81dc 100644 (file)
@@ -55,6 +55,19 @@ int mfd_cell_disable(struct platform_device *pdev)
 }
 EXPORT_SYMBOL(mfd_cell_disable);
 
+static int mfd_platform_add_cell(struct platform_device *pdev,
+                                const struct mfd_cell *cell)
+{
+       if (!cell)
+               return 0;
+
+       pdev->mfd_cell = kmemdup(cell, sizeof(*cell), GFP_KERNEL);
+       if (!pdev->mfd_cell)
+               return -ENOMEM;
+
+       return 0;
+}
+
 static int mfd_add_device(struct device *parent, int id,
                          const struct mfd_cell *cell,
                          struct resource *mem_base,
@@ -75,7 +88,7 @@ static int mfd_add_device(struct device *parent, int id,
 
        pdev->dev.parent = parent;
 
-       ret = platform_device_add_data(pdev, cell, sizeof(*cell));
+       ret = mfd_platform_add_cell(pdev, cell);
        if (ret)
                goto fail_res;
 
@@ -123,7 +136,6 @@ static int mfd_add_device(struct device *parent, int id,
 
        return 0;
 
-/*     platform_device_del(pdev); */
 fail_res:
        kfree(res);
 fail_device:
index cb01209754e07db23db087712a2304c708f2b5af..53450f433f1018dbf042b2dbf1ccaa490f802b60 100644 (file)
@@ -332,7 +332,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
        int                             i;
 
        if (!pdata) {
-               dev_err(dev, "Missing platfrom data\n");
+               dev_err(dev, "Missing platform data\n");
                ret = -ENOMEM;
                goto end_probe;
        }
index c7687f6a78a0ef9d1799801f667689ca2b214124..57868416c76069d6e4d5ded2043a2a0403098e7a 100644 (file)
@@ -51,7 +51,7 @@ static int __pcf50633_write(struct pcf50633 *pcf, u8 reg, int num, u8 *data)
 
 }
 
-/* Read a block of upto 32 regs  */
+/* Read a block of up to 32 regs  */
 int pcf50633_read_block(struct pcf50633 *pcf, u8 reg,
                                        int nr_regs, u8 *data)
 {
@@ -65,7 +65,7 @@ int pcf50633_read_block(struct pcf50633 *pcf, u8 reg,
 }
 EXPORT_SYMBOL_GPL(pcf50633_read_block);
 
-/* Write a block of upto 32 regs  */
+/* Write a block of up to 32 regs  */
 int pcf50633_write_block(struct pcf50633 *pcf , u8 reg,
                                        int nr_regs, u8 *data)
 {
index fa937052fbab996b564e46ed17f3fefdae422010..dfbae34e18046c69d28f04fa502172a9346cb585 100644 (file)
@@ -229,7 +229,7 @@ int twl6030_mmc_card_detect_config(void)
        twl6030_interrupt_unmask(TWL6030_MMCDETECT_INT_MASK,
                                                REG_INT_MSK_STS_B);
        /*
-        * Intially Configuring MMC_CTRL for receving interrupts &
+        * Initially Configuring MMC_CTRL for receiving interrupts &
         * Card status on TWL6030 for MMC1
         */
        ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &reg_val, TWL6030_MMCCTRL);
@@ -275,7 +275,7 @@ int twl6030_mmc_card_detect(struct device *dev, int slot)
                /* TWL6030 provide's Card detect support for
                 * only MMC1 controller.
                 */
-               pr_err("Unkown MMC controller %d in %s\n", pdev->id, __func__);
+               pr_err("Unknown MMC controller %d in %s\n", pdev->id, __func__);
                return ret;
        }
        /*
index d73f84ba0f08b364e484d0b26c17ce0d255c2cd9..daf69527ed83dc6e3c883c75f2fa55383887448d 100644 (file)
@@ -8,7 +8,7 @@
  *  Copyright: MontaVista Software, Inc.
  *
  * Spliting done by: Marek Vasut <marek.vasut@gmail.com>
- * If something doesnt work and it worked before spliting, e-mail me,
+ * If something doesn't work and it worked before spliting, e-mail me,
  * dont bother Nicolas please ;-)
  *
  * This program is free software; you can redistribute it and/or modify
index ecd276ad6b193452dec2e3ed993d04ca68ac2415..5f898cb706a6453ed79582c54296f2bd95bae6eb 100644 (file)
@@ -2,7 +2,7 @@
 
     This driver supports the bmp085 digital barometric pressure
     and temperature sensor from Bosch Sensortec. The datasheet
-    is avaliable from their website:
+    is available from their website:
     http://www.bosch-sensortec.com/content/language1/downloads/BST-BMP085-DS000-05.pdf
 
     A pressure measurement is issued by reading from pressure0_input.
@@ -429,7 +429,7 @@ static int __devinit bmp085_probe(struct i2c_client *client,
        if (err)
                goto exit_free;
 
-       dev_info(&data->client->dev, "Succesfully initialized bmp085!\n");
+       dev_info(&data->client->dev, "Successfully initialized bmp085!\n");
        goto exit;
 
 exit_free:
index 338dcc1215079774946affff8e78bef8ee65a2e9..778fc3fdfb9b98f9cee22b1f38748474658654f9 100644 (file)
@@ -41,7 +41,7 @@ static void duramar2150_c2port_access(struct c2port_device *dev, int status)
                outb(v | (C2D | C2CK), DIR_PORT);
        else
                /* When access is "off" is important that both lines are set
-                * as inputs or hi-impedence */
+                * as inputs or hi-impedance */
                outb(v & ~(C2D | C2CK), DIR_PORT);
 
        mutex_unlock(&update_lock);
index 72acf5af7a2a8d725c4dda1ab50d0ff420e4b0c1..00dbf1d4373a935c5d0378f1028bc4b14f13a98c 100644 (file)
@@ -20,7 +20,7 @@
  *
  * Author: Max Asböck <amax@us.ibm.com>
  *
- * Orignally written by Pete Reynolds
+ * Originally written by Pete Reynolds
  */
 
 #ifndef _IBMASM_REMOTE_H_
index 727af07f1fbd3afd3b892ecbb39213a4cb0ba465..b1f4563be9aecb92f946e7fc6795ad80e7cc0fae 100644 (file)
@@ -268,7 +268,7 @@ static void iwmct_irq_read_worker(struct work_struct *ws)
                LOG_INFO(priv, IRQ, "ACK barker arrived "
                                "- starting FW download\n");
        } else { /* REBOOT barker */
-               LOG_INFO(priv, IRQ, "Recieved reboot barker: %x\n", barker);
+               LOG_INFO(priv, IRQ, "Received reboot barker: %x\n", barker);
                priv->barker = barker;
 
                if (barker & BARKER_DNLOAD_SYNC_MSK) {
index 27dc463097f37c5e75a3f5859e8f82c65193f81f..74f16f167b8e1dcce5faaa41d75b1a2452f0eb5f 100644 (file)
@@ -645,7 +645,7 @@ static int validate_simple_test(char *put_str)
 
        while (*chk_str != '\0' && *put_str != '\0') {
                /* If someone does a * to match the rest of the string, allow
-                * it, or stop if the recieved string is complete.
+                * it, or stop if the received string is complete.
                 */
                if (*put_str == '#' || *chk_str == '*')
                        return 0;
index 20e4e9395b61ca1c6d85b09511b88f535a8ec120..ecafa4ba238b3ca4991a20dc5e6bb88458aee8de 100644 (file)
@@ -348,15 +348,15 @@ static unsigned long gru_chiplet_cpu_to_mmr(int chiplet, int cpu, int *corep)
 
 static int gru_irq_count[GRU_CHIPLETS_PER_BLADE];
 
-static void gru_noop(unsigned int irq)
+static void gru_noop(struct irq_data *d)
 {
 }
 
 static struct irq_chip gru_chip[GRU_CHIPLETS_PER_BLADE] = {
        [0 ... GRU_CHIPLETS_PER_BLADE - 1] {
-               .mask           = gru_noop,
-               .unmask         = gru_noop,
-               .ack            = gru_noop
+               .irq_mask       = gru_noop,
+               .irq_unmask     = gru_noop,
+               .irq_ack        = gru_noop
        }
 };
 
index 34749ee88dfa8966c7c453aaaf8dcec980206223..9e9bddaa95ae50a7e8440a73d4ae582cf70bb9be 100644 (file)
@@ -229,7 +229,7 @@ again:
        bid = blade_id < 0 ? uv_numa_blade_id() : blade_id;
        bs = gru_base[bid];
 
-       /* Handle the case where migration occured while waiting for the sema */
+       /* Handle the case where migration occurred while waiting for the sema */
        down_read(&bs->bs_kgts_sema);
        if (blade_id < 0 && bid != uv_numa_blade_id()) {
                up_read(&bs->bs_kgts_sema);
index 7a8b9068ea03e552075354290d6fe44b83b2c671..5c3ce24596753afad29180aa88e6dd7a78d209c8 100644 (file)
@@ -379,7 +379,7 @@ struct gru_thread_state {
                                                   required for contest */
        char                    ts_cch_req_slice;/* CCH packet slice */
        char                    ts_blade;       /* If >= 0, migrate context if
-                                                  ref from diferent blade */
+                                                  ref from different blade */
        char                    ts_force_cch_reload;
        char                    ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each
                                                          allocated CB */
index 9ee4c788aa69173c69f62af6f141004a9a7b71b3..b4488c8f6b233f5a0ca2a8be38608b3a4bfbfbd7 100644 (file)
@@ -649,7 +649,7 @@ static int kim_probe(struct platform_device *pdev)
                /* multiple devices could exist */
                st_kim_devices[pdev->id] = pdev;
        } else {
-               /* platform's sure about existance of 1 device */
+               /* platform's sure about existence of 1 device */
                st_kim_devices[0] = pdev;
        }
 
index f5cedeccad426d8cf2c583cc23efe162ddd26189..abc1a63bcc5ee9f0ceb1c76ded78fda2b4fd5f97 100644 (file)
@@ -292,7 +292,7 @@ static void mmc_test_free_mem(struct mmc_test_mem *mem)
 }
 
 /*
- * Allocate a lot of memory, preferrably max_sz but at least min_sz.  In case
+ * Allocate a lot of memory, preferably max_sz but at least min_sz.  In case
  * there isn't much memory do not exceed 1/16th total lowmem pages.  Also do
  * not exceed a maximum number of segments and try not to make segments much
  * bigger than maximum segment size.
index 63667a8f140c458722c54b33b3e91d54e4cca029..d6d62fd07ee9fd0b492d6c7e0a80d116840009b2 100644 (file)
@@ -284,6 +284,7 @@ int mmc_add_card(struct mmc_card *card)
                type = "SD-combo";
                if (mmc_card_blockaddr(card))
                        type = "SDHC-combo";
+               break;
        default:
                type = "?";
                break;
index 461e6a17fb90e8526d96054f2ec90f44a85e70c3..2b200c1cfbba151a3348706d6a61668280119b0a 100644 (file)
@@ -94,7 +94,7 @@ static void mmc_host_clk_gate_delayed(struct mmc_host *host)
                spin_unlock_irqrestore(&host->clk_lock, flags);
                return;
        }
-       mutex_lock(&host->clk_gate_mutex);
+       mmc_claim_host(host);
        spin_lock_irqsave(&host->clk_lock, flags);
        if (!host->clk_requests) {
                spin_unlock_irqrestore(&host->clk_lock, flags);
@@ -104,7 +104,7 @@ static void mmc_host_clk_gate_delayed(struct mmc_host *host)
                pr_debug("%s: gated MCI clock\n", mmc_hostname(host));
        }
        spin_unlock_irqrestore(&host->clk_lock, flags);
-       mutex_unlock(&host->clk_gate_mutex);
+       mmc_release_host(host);
 }
 
 /*
@@ -130,7 +130,7 @@ void mmc_host_clk_ungate(struct mmc_host *host)
 {
        unsigned long flags;
 
-       mutex_lock(&host->clk_gate_mutex);
+       mmc_claim_host(host);
        spin_lock_irqsave(&host->clk_lock, flags);
        if (host->clk_gated) {
                spin_unlock_irqrestore(&host->clk_lock, flags);
@@ -140,7 +140,7 @@ void mmc_host_clk_ungate(struct mmc_host *host)
        }
        host->clk_requests++;
        spin_unlock_irqrestore(&host->clk_lock, flags);
-       mutex_unlock(&host->clk_gate_mutex);
+       mmc_release_host(host);
 }
 
 /**
@@ -215,7 +215,6 @@ static inline void mmc_host_clk_init(struct mmc_host *host)
        host->clk_gated = false;
        INIT_WORK(&host->clk_gate_work, mmc_host_clk_gate_work);
        spin_lock_init(&host->clk_lock);
-       mutex_init(&host->clk_gate_mutex);
 }
 
 /**
index 14e95f39a7bf3fec3dff6c45048a40c7a67fcd80..772d0d0a541b6f9bbfc5208cba135e03ea38b57f 100644 (file)
@@ -538,7 +538,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 
        /*
         * If enhanced_area_en is TRUE, host needs to enable ERASE_GRP_DEF
-        * bit.  This bit will be lost everytime after a reset or power off.
+        * bit.  This bit will be lost every time after a reset or power off.
         */
        if (card->ext_csd.enhanced_area_en) {
                err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
index 60842f878dedb015789d49b84baca3b7db8e7e7b..f3b22bf89cc98b68ab3e107154ec82b11aeb8a02 100644 (file)
@@ -105,7 +105,7 @@ int mmc_go_idle(struct mmc_host *host)
         * that in case of hardware that won't pull up DAT3/nCS otherwise.
         *
         * SPI hosts ignore ios.chip_select; it's managed according to
-        * rules that must accomodate non-MMC slaves which this layer
+        * rules that must accommodate non-MMC slaves which this layer
         * won't even know about.
         */
        if (!mmc_host_is_spi(host)) {
index bb192f90e8e9a0028770a04073aefed345d35f95..b3001617e67d764c8157f45f60c4d677eaa6d161 100644 (file)
@@ -45,7 +45,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
                        struct sdio_func *func = card->sdio_func[i - 1];
                        if (!func) {
                                printk(KERN_WARNING "%s: pending IRQ for "
-                                       "non-existant function\n",
+                                       "non-existent function\n",
                                        mmc_card_id(card));
                                ret = -EINVAL;
                        } else if (func->irq_handler) {
index 80bc9a5c25cc3ef3f6bd7656c03e5d2da00ee0c7..ea3888b65d5d3215adf1d64723c46f579c3024d8 100644 (file)
@@ -127,7 +127,7 @@ struct atmel_mci_dma {
  * EVENT_DATA_COMPLETE is set in @pending_events, all data-related
  * interrupts must be disabled and @data_status updated with a
  * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the
- * CMDRDY interupt must be disabled and @cmd_status updated with a
+ * CMDRDY interrupt must be disabled and @cmd_status updated with a
  * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the
  * bytes_xfered field of @data must be written. This is ensured by
  * using barriers.
@@ -1082,7 +1082,7 @@ static void atmci_request_end(struct atmel_mci *host, struct mmc_request *mrq)
        /*
         * Update the MMC clock rate if necessary. This may be
         * necessary if set_ios() is called when a different slot is
-        * busy transfering data.
+        * busy transferring data.
         */
        if (host->need_clock_update) {
                mci_writel(host, MR, host->mode_reg);
index 2f7fc0c5146f365a465d31bd9f5b3ab5e42c8c77..7c1e16aaf17ff9449909dd77b72573f6bd156526 100644 (file)
@@ -99,7 +99,7 @@
 #define r1b_timeout            (HZ * 3)
 
 /* One of the critical speed parameters is the amount of data which may
- * be transfered in one command. If this value is too low, the SD card
+ * be transferred in one command. If this value is too low, the SD card
  * controller has to do multiple partial block writes (argggh!). With
  * today (2008) SD cards there is little speed gain if we transfer more
  * than 64 KBytes at a time. So use this value until there is any indication
index 2e032f0e8cf47e45730d99e8f9554c688eb756b1..a6c329040140420ab73ded04fa08c7ca9cdaa07e 100644 (file)
@@ -832,7 +832,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
                return IRQ_HANDLED;
        }
 
-       if (end_command)
+       if (end_command && host->cmd)
                mmc_omap_cmd_done(host, host->cmd);
        if (host->data != NULL) {
                if (transfer_error)
index 1ccd4b256ceec11008370a1691d00c7018570cbe..a04f87d7ee3d13a79be90146b2cfa004014d01be 100644 (file)
@@ -874,7 +874,7 @@ static void finalize_request(struct s3cmci_host *host)
        if (!mrq->data)
                goto request_done;
 
-       /* Calulate the amout of bytes transfer if there was no error */
+       /* Calculate the amout of bytes transfer if there was no error */
        if (mrq->data->error == 0) {
                mrq->data->bytes_xfered =
                        (mrq->data->blocks * mrq->data->blksz);
@@ -882,7 +882,7 @@ static void finalize_request(struct s3cmci_host *host)
                mrq->data->bytes_xfered = 0;
        }
 
-       /* If we had an error while transfering data we flush the
+       /* If we had an error while transferring data we flush the
         * DMA channel and the fifo to clear out any garbage. */
        if (mrq->data->error != 0) {
                if (s3cmci_host_usedma(host))
@@ -980,7 +980,7 @@ static int s3cmci_setup_data(struct s3cmci_host *host, struct mmc_data *data)
 
        if ((data->blksz & 3) != 0) {
                /* We cannot deal with unaligned blocks with more than
-                * one block being transfered. */
+                * one block being transferred. */
 
                if (data->blocks > 1) {
                        pr_warning("%s: can't do non-word sized block transfers (blksz %d)\n", __func__, data->blksz);
index a136be7063478bc9f9f6b130cc92010c47737fc5..f8b5f37007b2a0b8115e62032664e6d96a04e214 100644 (file)
@@ -957,6 +957,7 @@ static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot(
        host->ioaddr = pci_ioremap_bar(pdev, bar);
        if (!host->ioaddr) {
                dev_err(&pdev->dev, "failed to remap registers\n");
+               ret = -ENOMEM;
                goto release;
        }
 
index 9e15f41f87be8f4a79bd61b94ace660942512eb6..5d20661bc357ba387601b6b2089185bceb144aac 100644 (file)
@@ -1334,6 +1334,13 @@ static void sdhci_tasklet_finish(unsigned long param)
 
        host = (struct sdhci_host*)param;
 
+        /*
+         * If this tasklet gets rescheduled while running, it will
+         * be run again afterwards but without any active request.
+         */
+       if (!host->mrq)
+               return;
+
        spin_lock_irqsave(&host->lock, flags);
 
        del_timer(&host->timer);
@@ -1345,7 +1352,7 @@ static void sdhci_tasklet_finish(unsigned long param)
         * upon error conditions.
         */
        if (!(host->flags & SDHCI_DEVICE_DEAD) &&
-               (mrq->cmd->error ||
+           ((mrq->cmd && mrq->cmd->error) ||
                 (mrq->data && (mrq->data->error ||
                  (mrq->data->stop && mrq->data->stop->error))) ||
                   (host->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) {
index 6ae8d2f00ec7a6d10ccbb472ae705480fcf946ff..710339a85c84676d9c72e2105f24108344248da2 100644 (file)
@@ -355,7 +355,7 @@ static int tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command
 /*
  * This chip always returns (at least?) as much data as you ask for.
  * I'm unsure what happens if you ask for less than a block. This should be
- * looked into to ensure that a funny length read doesnt hose the controller.
+ * looked into to ensure that a funny length read doesn't hose the controller.
  */
 static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
 {
@@ -728,15 +728,15 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                tmio_mmc_set_clock(host, ios->clock);
 
        /* Power sequence - OFF -> UP -> ON */
-       if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
+       if (ios->power_mode == MMC_POWER_UP) {
+               /* power up SD bus */
+               if (host->set_pwr)
+                       host->set_pwr(host->pdev, 1);
+       } else if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
                /* power down SD bus */
                if (ios->power_mode == MMC_POWER_OFF && host->set_pwr)
                        host->set_pwr(host->pdev, 0);
                tmio_mmc_clk_stop(host);
-       } else if (ios->power_mode == MMC_POWER_UP) {
-               /* power up SD bus */
-               if (host->set_pwr)
-                       host->set_pwr(host->pdev, 1);
        } else {
                /* start bus clock */
                tmio_mmc_clk_start(host);
index 7fca0a386ba052bf398bad4462c66d5f673c02a9..62e5a4d171e1c881c8ba8780d06aadacaaaef90d 100644 (file)
@@ -484,7 +484,7 @@ static void wbsd_fill_fifo(struct wbsd_host *host)
 
        /*
         * Check that we aren't being called after the
-        * entire buffer has been transfered.
+        * entire buffer has been transferred.
         */
        if (host->num_sg == 0)
                return;
@@ -828,7 +828,7 @@ static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq)
        /*
         * If this is a data transfer the request
         * will be finished after the data has
-        * transfered.
+        * transferred.
         */
        if (cmd->data && !cmd->error) {
                /*
@@ -904,7 +904,7 @@ static void wbsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                        setup &= ~WBSD_DAT3_H;
 
                        /*
-                        * We cannot resume card detection immediatly
+                        * We cannot resume card detection immediately
                         * because of capacitance and delays in the chip.
                         */
                        mod_timer(&host->ignore_timer, jiffies + HZ / 100);
index 35c6a23b183b34873fc92b217c5bb663ff4ce46c..b1e3c26edd6dad3953cfc11203de1497b25887aa 100644 (file)
@@ -19,7 +19,7 @@ config MTD_JEDECPROBE
        help
          This option enables JEDEC-style probing of flash chips which are not
          compatible with the Common Flash Interface, but will use the common
-         CFI-targetted flash drivers for any chips which are identified which
+         CFI-targeted flash drivers for any chips which are identified which
          are in fact compatible in all but the probe method. This actually
          covers most AMD/Fujitsu-compatible chips and also non-CFI
          Intel chips.
index 092aef11120cb70f13129a29788eb95a1eabbe8c..09cb7c8d93b48d80dc874319d8672b680871b42e 100644 (file)
@@ -1247,12 +1247,12 @@ static int inval_cache_and_wait_for_operation(
                        break;
 
                if (chip->erase_suspended && chip_state == FL_ERASING)  {
-                       /* Erase suspend occured while sleep: reset timeout */
+                       /* Erase suspend occurred while sleep: reset timeout */
                        timeo = reset_timeo;
                        chip->erase_suspended = 0;
                }
                if (chip->write_suspended && chip_state == FL_WRITING)  {
-                       /* Write suspend occured while sleep: reset timeout */
+                       /* Write suspend occurred while sleep: reset timeout */
                        timeo = reset_timeo;
                        chip->write_suspended = 0;
                }
index f9a5331e9445a3fb16e1f1604097c7a54f833201..0b49266840b94407eb53ba0aad9b17ad531f0997 100644 (file)
@@ -263,7 +263,7 @@ static void fixup_old_sst_eraseregion(struct mtd_info *mtd)
        struct cfi_private *cfi = map->fldrv_priv;
 
        /*
-        * These flashes report two seperate eraseblock regions based on the
+        * These flashes report two separate eraseblock regions based on the
         * sector_erase-size and block_erase-size, although they both operate on the
         * same memory. This is not allowed according to CFI, so we just pick the
         * sector_erase-size.
@@ -611,8 +611,8 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
  *
  * Note that anything more complicated than checking if no bits are toggling
  * (including checking DQ5 for an error status) is tricky to get working
- * correctly and is therefore not done (particulary with interleaved chips
- * as each chip must be checked independantly of the others).
+ * correctly and is therefore not done (particularly with interleaved chips
+ * as each chip must be checked independently of the others).
  */
 static int __xipram chip_ready(struct map_info *map, unsigned long addr)
 {
@@ -635,8 +635,8 @@ static int __xipram chip_ready(struct map_info *map, unsigned long addr)
  *
  * Note that anything more complicated than checking if no bits are toggling
  * (including checking DQ5 for an error status) is tricky to get working
- * correctly and is therefore not done (particulary with interleaved chips
- * as each chip must be checked independantly of the others).
+ * correctly and is therefore not done (particularly with interleaved chips
+ * as each chip must be checked independently of the others).
  *
  */
 static int __xipram chip_good(struct map_info *map, unsigned long addr, map_word expected)
index 6ae3d111e1e7e5250b2442da81b3b5e3143dea60..8e464054a631539d9478b659aabfb4a4dd6ae7f7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Common Flash Interface support:
- *   Generic utility functions not dependant on command set
+ *   Generic utility functions not dependent on command set
  *
  * Copyright (C) 2002 Red Hat
  * Copyright (C) 2003 STMicroelectronics Limited
index 4e1be51cc122618d60b69297726b96dcb896a0ef..ea832ea0e4aacac6840dbfcfa73a9f7e0262667e 100644 (file)
@@ -2075,7 +2075,7 @@ static inline int jedec_match( uint32_t base,
        }
 
        /*
-        * Make sure the ID's dissappear when the device is taken out of
+        * Make sure the ID's disappear when the device is taken out of
         * ID mode.  The only time this should fail when it should succeed
         * is when the ID's are written as data to the same
         * addresses.  For this rare and unfortunate case the chip
index f29a6f9df6e73fdfe477f695b366f061a0d876b5..97183c8c9e338cc22bc8979d91f4a32cd3723447 100644 (file)
@@ -295,7 +295,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
        dev->mtd.owner = THIS_MODULE;
 
        if (add_mtd_device(&dev->mtd)) {
-               /* Device didnt get added, so free the entry */
+               /* Device didn't get added, so free the entry */
                goto devinit_err;
        }
        list_add(&dev->list, &blkmtd_device_list);
index 719b2915dc3ae4134fc5ffc4588012956c0d70a8..8b36fa77a195840f273062e355b4c1706340133e 100644 (file)
@@ -90,7 +90,7 @@ static inline int DoC_WaitReady(void __iomem * docptr)
        return ret;
 }
 
-/* For some reason the Millennium Plus seems to occassionally put itself
+/* For some reason the Millennium Plus seems to occasionally put itself
  * into reset mode. For me this happens randomly, with no pattern that I
  * can detect. M-systems suggest always check this on any block level
  * operation and setting to normal mode if in reset mode.
index a99838bb2dc0806719efbc19b5c17f140e6281db..37ef29a73ee43993ded8414fb8dcbaafdbf1c20a 100644 (file)
@@ -109,7 +109,7 @@ for(ci=(n)-1;ci >=0;ci--)\
    of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for
    example the polynomial representation of @^5 would be given by the binary
    representation of the integer "alpha_to[5]".
-                   Similarily, index_of[] can be used as follows:
+                   Similarly, index_of[] can be used as follows:
         As above, let @ represent the primitive element of GF(2^m) that is
    the root of the primitive polynomial p(x). In order to find the power
    of @ (alpha) that has the polynomial representation
@@ -121,7 +121,7 @@ for(ci=(n)-1;ci >=0;ci--)\
    NOTE:
         The element alpha_to[2^m-1] = 0 always signifying that the
    representation of "@^infinity" = 0 is (0,0,0,...,0).
-        Similarily, the element index_of[0] = A0 always signifying
+        Similarly, the element index_of[0] = A0 always signifying
    that the power of alpha which has the polynomial representation
    (0,0,...,0) is "infinity".
 
index caf604167f03d618620562fdd16948d5f84ed400..4b829f97d56cfe313292d68480ea5eabb675a28d 100644 (file)
@@ -353,7 +353,7 @@ static inline int erase_block (__u32 offset)
    /* put the flash back into command mode */
    write32 (DATA_TO_FLASH (READ_ARRAY),offset);
 
-   /* was the erase successfull? */
+   /* was the erase successful? */
    if ((status & STATUS_ERASE_ERR))
         {
                printk (KERN_WARNING "%s: erase error at address 0x%.8x.\n",module_name,offset);
@@ -508,7 +508,7 @@ static inline int write_dword (__u32 offset,__u32 x)
    /* put the flash back into command mode */
    write32 (DATA_TO_FLASH (READ_ARRAY),offset);
 
-   /* was the write successfull? */
+   /* was the write successful? */
    if ((status & STATUS_PGM_ERR) || read32 (offset) != x)
         {
                printk (KERN_WARNING "%s: write error at address 0x%.8x.\n",module_name,offset);
index ef0aba0ce58fdfb7f9d0f7a40108787392d7bb82..41b8cdcc64cbf4184bf7d9bfb4b16b14cb7b9356 100644 (file)
@@ -351,7 +351,7 @@ static int pmc551_write(struct mtd_info *mtd, loff_t to, size_t len,
  * Fixup routines for the V370PDC
  * PCI device ID 0x020011b0
  *
- * This function basicly kick starts the DRAM oboard the card and gets it
+ * This function basically kick starts the DRAM oboard the card and gets it
  * ready to be used.  Before this is done the device reads VERY erratic, so
  * much that it can crash the Linux 2.2.x series kernels when a user cat's
  * /proc/pci .. though that is mainly a kernel bug in handling the PCI DEVSEL
@@ -540,7 +540,7 @@ static u32 fixup_pmc551(struct pci_dev *dev)
 
        /*
         * Check to make certain the DEVSEL is set correctly, this device
-        * has a tendancy to assert DEVSEL and TRDY when a write is performed
+        * has a tendency to assert DEVSEL and TRDY when a write is performed
         * to the memory when memory is read-only
         */
        if ((cmd & PCI_STATUS_DEVSEL_MASK) != 0x0) {
index 04fdfcca93f72b2db3c2b24ba41ddc913813fe98..12679925b420abd2c06b50f86162149f053b3b24 100644 (file)
@@ -3,7 +3,7 @@
  * erase, lock/unlock support for LPDDR flash memories
  * (C) 2008 Korolev Alexey <akorolev@infradead.org>
  * (C) 2008 Vasiliy Leonenko <vasiliy.leonenko@gmail.com>
- * Many thanks to Roman Borisov for intial enabling
+ * Many thanks to Roman Borisov for initial enabling
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -171,7 +171,7 @@ static int wait_for_ready(struct map_info *map, struct flchip *chip,
                        mutex_lock(&chip->mutex);
                }
                if (chip->erase_suspended || chip->write_suspended)  {
-                       /* Suspend has occured while sleep: reset timeout */
+                       /* Suspend has occurred while sleep: reset timeout */
                        timeo = reset_timeo;
                        chip->erase_suspended = chip->write_suspended = 0;
                }
index e5f645b775ad1e721623ed9293a9396cc27d2cef..23f551dc8ca8f14c2c6751b50eb068d569c7d0af 100644 (file)
@@ -42,7 +42,7 @@
  *
  * Please note:
  *  1. The flash size given should be the largest flash size that can
- *     be accomodated.
+ *     be accommodated.
  *
  *  2. The bus width must defined in clps_setup_flash.
  *
@@ -58,7 +58,7 @@
 #define BOOT_PARTITION_SIZE_KiB       (16)
 #define PARAMS_PARTITION_SIZE_KiB     (8)
 #define KERNEL_PARTITION_SIZE_KiB     (4*128)
-/* Use both remaing portion of first flash, and all of second flash */
+/* Use both remaining portion of first flash, and all of second flash */
 #define ROOT_PARTITION_SIZE_KiB       (3*128) + (8*128)
 
 static struct mtd_partition ceiva_partitions[] = {
index b4ed8161191846e95a65fd973ff20f4c3b5b4aa6..f71343cd77cca60f1eef6a46e8088ee1779bba1c 100644 (file)
@@ -33,7 +33,7 @@
 
 
 /* We split the flash chip up into four parts.
- * 1: bootloader firts 128k                    (0x00000000 - 0x0001FFFF) size 0x020000
+ * 1: bootloader first 128k                    (0x00000000 - 0x0001FFFF) size 0x020000
  * 2: kernel 640k                                      (0x00020000 - 0x000BFFFF) size 0x0A0000
  * 3: compressed 1536k root ramdisk    (0x000C0000 - 0x0023FFFF) size 0x180000
  * 4: writeable diskpartition (jffs)(0x00240000 - 0x003FFFFF) size 0x1C0000
index 91702294839942e8c225ed3f3176011a489d2d61..6799e75d74e0387c251200a7e266506a8c59704d 100644 (file)
@@ -497,7 +497,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
                dev->pcmcia_map.set_vpp = pcmciamtd_set_vpp;
 
        /* Request a memory window for PCMCIA. Some architeures can map windows
-        * upto the maximum that PCMCIA can support (64MiB) - this is ideal and
+        * up to the maximum that PCMCIA can support (64MiB) - this is ideal and
         * we aim for a window the size of the whole card - otherwise we try
         * smaller windows until we succeed
         */
index acb13fa5001ca7a14c3f872be849b7cc6001c722..64aea6acd48e5f173e6bd5d628e1d97a3cf1e7d4 100644 (file)
@@ -3,7 +3,7 @@
  * Config with both CFI and JEDEC device support.
  *
  * Basically physmap.c with the addition of partitions and
- * an array of mapping info to accomodate more than one flash type per board.
+ * an array of mapping info to accommodate more than one flash type per board.
  *
  * Copyright 2005-2007 PMC-Sierra, Inc.
  *
index 85c1e56309ec571a326066273be94099a425f7cb..4d8aaaf4bb761a3325a059e927bab9769ec4a0c4 100644 (file)
@@ -197,7 +197,7 @@ static void sc520cdp_setup_par(void)
        }
 
        /*
-       ** Find the PARxx registers that are reponsible for activating
+       ** Find the PARxx registers that are responsible for activating
        ** ROMCS0, ROMCS1 and BOOTCS. Reprogram each of these with a
        ** new value from the table.
        */
index c08e140d40ed4edf1fc6674a8a0f59e1f108bb77..0718dfb3ee6476d64634e8cfd89472936f80e1a8 100644 (file)
@@ -63,7 +63,7 @@ static void __iomem *start_scan_addr;
  */
 
 #ifdef CONFIG_MTD_PARTITIONS
-/* Currently, TQM8xxL has upto 8MiB flash */
+/* Currently, TQM8xxL has up to 8MiB flash */
 static unsigned long tqm8xxl_max_flash_size = 0x00800000;
 
 /* partition definition for first flash bank
index 1e74ad961040ddc72a7855ee6bc13296873316f6..3326615ad66b957c57234bf3eb83699a393ff62e 100644 (file)
@@ -129,7 +129,7 @@ static int write_cached_data (struct mtdblk_dev *mtdblk)
                return ret;
 
        /*
-        * Here we could argubly set the cache state to STATE_CLEAN.
+        * Here we could arguably set the cache state to STATE_CLEAN.
         * However this could lead to inconsistency since we will not
         * be notified if this content is altered on the flash by other
         * means.  Let's declare it empty and leave buffering tasks to
index 145b3d0dc0db31cc06a5f690340fdea4395b33f3..4c36ef66a46b907962ae01ccb420895355d592fe 100644 (file)
@@ -234,7 +234,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t
                 * the data. For our userspace tools it is important
                 * to dump areas with ecc errors !
                 * For kernel internal usage it also might return -EUCLEAN
-                * to signal the caller that a bitflip has occured and has
+                * to signal the caller that a bitflip has occurred and has
                 * been corrected by the ECC algorithm.
                 * Userspace software which accesses NAND this way
                 * must be aware of the fact that it deals with NAND
index 237913c5c92c348f70d9d4f160188402fbb48acf..fed215c4cfa19a3676666dbef17c1e4ce8b8d8bc 100644 (file)
@@ -1452,7 +1452,7 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
        oinfo = mtd->ecclayout;
        if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) {
                printk(KERN_ERR "%s: Not enough free bytes in OOB, "
-                       "%d available, %lu needed.\n",
+                       "%d available, %zu needed.\n",
                        MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE);
                return;
        }
index a92054e945e1c2788559c3d2e80f47f7878e0a46..edec457d361d4b12a8f2a419d2330c54b2f6ddd8 100644 (file)
@@ -239,7 +239,7 @@ config MTD_NAND_BCM_UMI
        help
          This enables the NAND flash controller on the BCM UMI block.
 
-         No board specfic support is done by this driver, each board
+         No board specific support is done by this driver, each board
          must advertise a platform_device for the driver to attach.
 
 config MTD_NAND_BCM_UMI_HWCS
index a067d090cb31804c1fd2ed284df7743741f3631c..bc65bf71e1a240798f2be57a8668bc971249c5fb 100644 (file)
@@ -228,7 +228,7 @@ static int __devinit ams_delta_init(struct platform_device *pdev)
                                          AMS_DELTA_LATCH2_NAND_NCE |
                                          AMS_DELTA_LATCH2_NAND_NWP);
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan(ams_delta_mtd, 1)) {
                err = -ENXIO;
                goto out_mtd;
index 6fae04b3fc6da19a1adad5c261157b62e89fe4b2..950646aa4c4b004a174c1951f08397ab808956c0 100644 (file)
@@ -209,22 +209,8 @@ static int atmel_nand_dma_op(struct mtd_info *mtd, void *buf, int len,
        int err = -EIO;
        enum dma_data_direction dir = is_read ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
 
-       if (buf >= high_memory) {
-               struct page *pg;
-
-               if (((size_t)buf & PAGE_MASK) !=
-                   ((size_t)(buf + len - 1) & PAGE_MASK)) {
-                       dev_warn(host->dev, "Buffer not fit in one page\n");
-                       goto err_buf;
-               }
-
-               pg = vmalloc_to_page(buf);
-               if (pg == 0) {
-                       dev_err(host->dev, "Failed to vmalloc_to_page\n");
-                       goto err_buf;
-               }
-               p = page_address(pg) + ((size_t)buf & ~PAGE_MASK);
-       }
+       if (buf >= high_memory)
+               goto err_buf;
 
        dma_dev = host->dma_chan->device;
 
@@ -280,7 +266,8 @@ static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len)
        struct nand_chip *chip = mtd->priv;
        struct atmel_nand_host *host = chip->priv;
 
-       if (use_dma && len >= mtd->oobsize)
+       if (use_dma && len > mtd->oobsize)
+               /* only use DMA for bigger than oob size: better performances */
                if (atmel_nand_dma_op(mtd, buf, len, 1) == 0)
                        return;
 
@@ -295,7 +282,8 @@ static void atmel_write_buf(struct mtd_info *mtd, const u8 *buf, int len)
        struct nand_chip *chip = mtd->priv;
        struct atmel_nand_host *host = chip->priv;
 
-       if (use_dma && len >= mtd->oobsize)
+       if (use_dma && len > mtd->oobsize)
+               /* only use DMA for bigger than oob size: better performances */
                if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0)
                        return;
 
@@ -599,7 +587,10 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
                nand_chip->options |= NAND_USE_FLASH_BBT;
        }
 
-       if (cpu_has_dma() && use_dma) {
+       if (!cpu_has_dma())
+               use_dma = 0;
+
+       if (use_dma) {
                dma_cap_mask_t mask;
 
                dma_cap_zero(mask);
@@ -611,7 +602,8 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
                }
        }
        if (use_dma)
-               dev_info(host->dev, "Using DMA for NAND access.\n");
+               dev_info(host->dev, "Using %s for DMA transfers.\n",
+                                       dma_chan_name(host->dma_chan));
        else
                dev_info(host->dev, "No DMA support for NAND access.\n");
 
index 7c95da1f612cd0ff4bc9961af433425d5a680998..0911cf03db806bcaa33e5469732e3158f7eaff77 100644 (file)
@@ -176,7 +176,7 @@ static int __init autcpu12_init(void)
         */
        this->options = NAND_USE_FLASH_BBT;
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan(autcpu12_mtd, 1)) {
                err = -ENXIO;
                goto out_ior;
index 9f1b451005ca14f8ce73aaa3c64e087cf2e7e607..71c35a0b9826972f164ea728f9d89af54a789b88 100644 (file)
@@ -241,7 +241,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
        /* Enable the following for a flash based bad block table */
        this->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR;
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan(new_mtd, 1)) {
                err = -ENXIO;
                goto out_ior;
index 8c8d3c86c0e82a16d304362cc637d55b2e36a0b1..4633f094c51019a8405e2573cdada5b7c51997b8 100644 (file)
@@ -724,7 +724,7 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask)
 }
 
 /* This helper function setups the registers for ECC and whether or not
- * the spare area will be transfered. */
+ * the spare area will be transferred. */
 static void setup_ecc_for_xfer(struct denali_nand_info *denali, bool ecc_en,
                                bool transfer_spare)
 {
@@ -965,7 +965,7 @@ static bool handle_ecc(struct denali_nand_info *denali, uint8_t *buf,
 
                        if (ECC_ERROR_CORRECTABLE(err_correction_info)) {
                                /* If err_byte is larger than ECC_SECTOR_SIZE,
-                                * means error happend in OOB, so we ignore
+                                * means error happened in OOB, so we ignore
                                 * it. It's no need for us to correct it
                                 * err_device is represented the NAND error
                                 * bits are happened in if there are more
@@ -1109,7 +1109,7 @@ static void denali_write_page(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /* This is the callback that the NAND core calls to write a page without ECC.
- * raw access is similiar to ECC page writes, so all the work is done in the
+ * raw access is similar to ECC page writes, so all the work is done in the
  * write_page() function above.
  */
 static void denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
index b7f8de7b27801d96906e10438e7e6fcb9ca833d9..657b9f4b6f9ba288ad4dbd5f7f1450e440e84360 100644 (file)
@@ -137,7 +137,7 @@ static struct rs_control *rs_decoder;
  *
  * Fabrice Bellard figured this out in the old docecc code. I added
  * some comments, improved a minor bit and converted it to make use
- * of the generic Reed-Solomon libary. tglx
+ * of the generic Reed-Solomon library. tglx
  */
 static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc)
 {
@@ -400,7 +400,7 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr)
        doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE);
        doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE);
 
-       /* We cant' use dev_ready here, but at least we wait for the
+       /* We can't use dev_ready here, but at least we wait for the
         * command to complete
         */
        udelay(50);
@@ -986,7 +986,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat,
                dummy = ReadDOC(docptr, ECCConf);
        }
 
-       /* Error occured ? */
+       /* Error occurred ? */
        if (dummy & 0x80) {
                for (i = 0; i < 6; i++) {
                        if (DoC_is_MillenniumPlus(doc))
@@ -1160,7 +1160,7 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio
        /* NOTE: The lines below modify internal variables of the NAND and MTD
           layers; variables with have already been configured by nand_scan.
           Unfortunately, we didn't know before this point what these values
-          should be.  Thus, this code is somewhat dependant on the exact
+          should be.  Thus, this code is somewhat dependent on the exact
           implementation of the NAND layer.  */
        if (mh->UnitSizeFactor != 0xff) {
                this->bbt_erase_shift += (0xff - mh->UnitSizeFactor);
index 7a13d42cbabdb76d8fe1e477c84f4b418e2e5d45..537e380b8dcb3fb3eb403a6c5c8a094016309afc 100644 (file)
@@ -59,7 +59,7 @@ struct fsl_elbc_mtd {
        unsigned int fmr;       /* FCM Flash Mode Register value     */
 };
 
-/* Freescale eLBC FCM controller infomation */
+/* Freescale eLBC FCM controller information */
 
 struct fsl_elbc_fcm_ctrl {
        struct nand_hw_control controller;
index 205b10b9f9b9132dd136cc64459ec936665f16e5..0d45ef3883e821ba63aa29d2e189948a129cfc30 100644 (file)
@@ -335,7 +335,7 @@ static void fsmc_enable_hwecc(struct mtd_info *mtd, int mode)
 
 /*
  * fsmc_read_hwecc_ecc4 - Hardware ECC calculator for ecc4 option supported by
- * FSMC. ECC is 13 bytes for 512 bytes of data (supports error correction upto
+ * FSMC. ECC is 13 bytes for 512 bytes of data (supports error correction up to
  * max of 8-bits)
  */
 static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data,
@@ -381,7 +381,7 @@ static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data,
 
 /*
  * fsmc_read_hwecc_ecc1 - Hardware ECC calculator for ecc1 option supported by
- * FSMC. ECC is 3 bytes for 512 bytes of data (supports error correction upto
+ * FSMC. ECC is 3 bytes for 512 bytes of data (supports error correction up to
  * max of 1-bit)
  */
 static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data,
@@ -408,10 +408,10 @@ static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data,
  * @buf:       buffer to store read data
  * @page:      page number to read
  *
- * This routine is needed for fsmc verison 8 as reading from NAND chip has to be
+ * This routine is needed for fsmc version 8 as reading from NAND chip has to be
  * performed in a strict sequence as follows:
  * data(512 byte) -> ecc(13 byte)
- * After this read, fsmc hardware generates and reports error data bits(upto a
+ * After this read, fsmc hardware generates and reports error data bits(up to a
  * max of 8 bits)
  */
 static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
@@ -686,7 +686,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
        }
 
        /*
-        * Scan to find existance of the device
+        * Scan to find existence of the device
         */
        if (nand_scan_ident(&host->mtd, 1, NULL)) {
                ret = -ENXIO;
index 85cfc061d41cd7aec609de423cfdf9d6826451a8..c54a4cbac6bc036f90496d65364e04e846ec7e18 100644 (file)
@@ -1582,7 +1582,7 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
 }
 
 /**
- * nand_read - [MTD Interface] MTD compability function for nand_do_read_ecc
+ * nand_read - [MTD Interface] MTD compatibility function for nand_do_read_ecc
  * @mtd:       MTD device structure
  * @from:      offset to read from
  * @len:       number of bytes to read
index a1e8b30078d9a6a0d6c2289f495d5b158d66aad0..af46428286fefc63cb67b1181770976509934782 100644 (file)
@@ -945,7 +945,7 @@ static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc
                rd2 = NULL;
                /* Per chip or per device ? */
                chipsel = (td->options & NAND_BBT_PERCHIP) ? i : -1;
-               /* Mirrored table avilable ? */
+               /* Mirrored table available ? */
                if (md) {
                        if (td->pages[i] == -1 && md->pages[i] == -1) {
                                writeops = 0x03;
index 213181be0d9a727efd7870163b90886f7f5f3029..893d95bfea481ad9c568a83cea316eb9f06472b8 100644 (file)
@@ -162,7 +162,7 @@ MODULE_PARM_DESC(bitflips,       "Maximum number of random bit flips per page (z
 MODULE_PARM_DESC(gravepages,     "Pages that lose data [: maximum reads (defaults to 3)]"
                                 " separated by commas e.g. 1401:2 means page 1401"
                                 " can be read only twice before failing");
-MODULE_PARM_DESC(rptwear,        "Number of erases inbetween reporting wear, if not zero");
+MODULE_PARM_DESC(rptwear,        "Number of erases between reporting wear, if not zero");
 MODULE_PARM_DESC(overridesize,   "Specifies the NAND Flash size overriding the ID bytes. "
                                 "The size is specified in erase blocks and as the exponent of a power of two"
                                 " e.g. 5 means a size of 32 erase blocks");
index 8c0b69375224cd9cda762f90b223a66b697620bc..a045a4a581b62240ddc69aa43b465f0a026b0b84 100644 (file)
@@ -151,7 +151,7 @@ static int nomadik_nand_probe(struct platform_device *pdev)
        nand->options = pdata->options;
 
        /*
-        * Scan to find existance of the device
+        * Scan to find existence of the device
         */
        if (nand_scan(&host->mtd, 1)) {
                ret = -ENXIO;
index 59efa829ef24f79d9b446da8b175b448acf60a7f..20bfe5f15afdcaf7cd93c19d1a296013a0d694f8 100644 (file)
@@ -157,7 +157,7 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev)
        /* Enable the following for a flash based bad block table */
        chip->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR;
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan(pasemi_nand_mtd, 1)) {
                err = -ENXIO;
                goto out_lpc;
index 317aff428e428e1ce71e190ccece5de01cd49fec..caf5a736340a90af135259fbcab695b2145b606e 100644 (file)
@@ -95,7 +95,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
                        goto out;
        }
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan(&data->mtd, pdata->chip.nr_chips)) {
                err = -ENXIO;
                goto out;
index ab7f4c33ced60c96d983be04a644dab0d7d1d015..ff0701276d654bc7f9653c53ece3f6b0152a84e3 100644 (file)
@@ -184,7 +184,7 @@ struct pxa3xx_nand_info {
 
 static int use_dma = 1;
 module_param(use_dma, bool, 0444);
-MODULE_PARM_DESC(use_dma, "enable DMA for data transfering to/from NAND HW");
+MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW");
 
 /*
  * Default NAND flash controller configuration setup by the
index 6322d1fb5d622f272268051a4848b103eced27d5..cae2e013c986fde685be317e1bcaeeff0a8d87e7 100644 (file)
@@ -185,7 +185,7 @@ static void r852_do_dma(struct r852_device *dev, uint8_t *buf, int do_read)
 
        dbg_verbose("doing dma %s ", do_read ? "read" : "write");
 
-       /* Set intial dma state: for reading first fill on board buffer,
+       /* Set initial dma state: for reading first fill on board buffer,
          from device, for writes first fill the buffer  from memory*/
        dev->dma_state = do_read ? DMA_INTERNAL : DMA_MEMORY;
 
@@ -766,7 +766,7 @@ static irqreturn_t r852_irq(int irq, void *data)
                ret = IRQ_HANDLED;
                dev->card_detected = !!(card_status & R852_CARD_IRQ_INSERT);
 
-               /* we shouldn't recieve any interrupts if we wait for card
+               /* we shouldn't receive any interrupts if we wait for card
                        to settle */
                WARN_ON(dev->card_unstable);
 
@@ -794,13 +794,13 @@ static irqreturn_t r852_irq(int irq, void *data)
                ret = IRQ_HANDLED;
 
                if (dma_status & R852_DMA_IRQ_ERROR) {
-                       dbg("recieved dma error IRQ");
+                       dbg("received dma error IRQ");
                        r852_dma_done(dev, -EIO);
                        complete(&dev->dma_done);
                        goto out;
                }
 
-               /* recieved DMA interrupt out of nowhere? */
+               /* received DMA interrupt out of nowhere? */
                WARN_ON_ONCE(dev->dma_stage == 0);
 
                if (dev->dma_stage == 0)
@@ -960,7 +960,7 @@ int  r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
                &dev->card_detect_work, 0);
 
 
-       printk(KERN_NOTICE DRV_NAME ": driver loaded succesfully\n");
+       printk(KERN_NOTICE DRV_NAME ": driver loaded successfully\n");
        return 0;
 
 error10:
index 546c2f0eb2e8fdaab73ed0bf0666c21afc185783..81bbb5ee148d49da8a9ca792338f60b2c7324b1d 100644 (file)
@@ -78,7 +78,7 @@ static void start_translation(struct sh_flctl *flctl)
 
 static void timeout_error(struct sh_flctl *flctl, const char *str)
 {
-       dev_err(&flctl->pdev->dev, "Timeout occured in %s\n", str);
+       dev_err(&flctl->pdev->dev, "Timeout occurred in %s\n", str);
 }
 
 static void wait_completion(struct sh_flctl *flctl)
index 4a8f367c295c404780e59d61dbcf19802462c29f..57cc80cd01a33e8749eaad0201ae561f964339ec 100644 (file)
@@ -121,7 +121,7 @@ int sm_register_device(struct mtd_info *mtd, int smartmedia)
        if (ret)
                return ret;
 
-       /* Bad block marker postion */
+       /* Bad block marker position */
        chip->badblockpos = 0x05;
        chip->badblockbits = 7;
        chip->block_markbad = sm_block_markbad;
index 38fb16771f8554969231cdde5779a064476b93dc..14c578707824b5e598ce5216da991ac52183e64f 100644 (file)
@@ -4,7 +4,7 @@
  * Slightly murky pre-git history of the driver:
  *
  * Copyright (c) Ian Molton 2004, 2005, 2008
- *    Original work, independant of sharps code. Included hardware ECC support.
+ *    Original work, independent of sharps code. Included hardware ECC support.
  *    Hard ECC did not work for writes in the early revisions.
  * Copyright (c) Dirk Opfer 2005.
  *    Modifications developed from sharps code but
index f591f615d3f620ba0ee497873d06a4bfebf7a15b..1fcb41adab072006e4f3081242efef06b01844af 100644 (file)
@@ -608,7 +608,7 @@ static int omap2_onenand_enable(struct mtd_info *mtd)
 
        ret = regulator_enable(c->regulator);
        if (ret != 0)
-               dev_err(&c->pdev->dev, "cant enable regulator\n");
+               dev_err(&c->pdev->dev, "can't enable regulator\n");
 
        return ret;
 }
@@ -620,7 +620,7 @@ static int omap2_onenand_disable(struct mtd_info *mtd)
 
        ret = regulator_disable(c->regulator);
        if (ret != 0)
-               dev_err(&c->pdev->dev, "cant disable regulator\n");
+               dev_err(&c->pdev->dev, "can't disable regulator\n");
 
        return ret;
 }
index 8b246061d511ad5c7ed1cd4f6f833833863e6ee5..5ef3bd5477723dabf1c5b405ceb45b1ae1f2dff6 100644 (file)
@@ -321,7 +321,7 @@ static void onenand_data_handle(struct onenand_chip *this, int cmd,
                                continue;
                        if (memcmp(dest + off, ffchars, this->subpagesize) &&
                            onenand_check_overwrite(dest + off, src + off, this->subpagesize))
-                               printk(KERN_ERR "over-write happend at 0x%08x\n", offset);
+                               printk(KERN_ERR "over-write happened at 0x%08x\n", offset);
                        memcpy(dest + off, src + off, this->subpagesize);
                }
                /* Fall through */
@@ -335,7 +335,7 @@ static void onenand_data_handle(struct onenand_chip *this, int cmd,
                dest = ONENAND_CORE_SPARE(flash, this, offset);
                if (memcmp(dest, ffchars, mtd->oobsize) &&
                    onenand_check_overwrite(dest, src, mtd->oobsize))
-                       printk(KERN_ERR "OOB: over-write happend at 0x%08x\n",
+                       printk(KERN_ERR "OOB: over-write happened at 0x%08x\n",
                               offset);
                memcpy(dest, src, mtd->oobsize);
                break;
index 2b0daae4018deb07a128e31c0744283b6ff31f73..ed3d6cd2c6dca216e097bfd5491544283be5ac11 100644 (file)
@@ -540,7 +540,7 @@ static int sm_check_block(struct sm_ftl *ftl, int zone, int block)
                        return -EIO;
        }
 
-       /* If the block is sliced (partialy erased usually) erase it */
+       /* If the block is sliced (partially erased usually) erase it */
        if (i == 2) {
                sm_erase_block(ftl, zone, block, 1);
                return 1;
@@ -878,7 +878,7 @@ static int sm_init_zone(struct sm_ftl *ftl, int zone_num)
        return 0;
 }
 
-/* Get and automaticly initialize an FTL mapping for one zone */
+/* Get and automatically initialize an FTL mapping for one zone */
 struct ftl_zone *sm_get_zone(struct sm_ftl *ftl, int zone_num)
 {
        struct ftl_zone *zone;
index 6abeb4f1340372796e81f0e7ad920182f5734aa8..4dcc752a0c0b1423290ecfedaa886a3c9908f94d 100644 (file)
@@ -56,7 +56,7 @@ config MTD_UBI_DEBUG
        bool "UBI debugging"
        depends on SYSFS
        select DEBUG_FS
-       select KALLSYMS_ALL if KALLSYMS && DEBUG_KERNEL
+       select KALLSYMS
        help
          This option enables UBI debugging.
 
index eededf94f5a6c591d003fcd9838e8a06af15f3d4..e347cc4388edd5cad5e96d471458a642450f4271 100644 (file)
@@ -344,6 +344,12 @@ static int do_sync_erase(struct ubi_device *ubi, int pnum)
        wait_queue_head_t wq;
 
        dbg_io("erase PEB %d", pnum);
+       ubi_assert(pnum >= 0 && pnum < ubi->peb_count);
+
+       if (ubi->ro_mode) {
+               ubi_err("read-only mode");
+               return -EROFS;
+       }
 
 retry:
        init_waitqueue_head(&wq);
@@ -390,7 +396,7 @@ retry:
        if (err)
                return err;
 
-       if (ubi_dbg_is_erase_failure() && !err) {
+       if (ubi_dbg_is_erase_failure()) {
                dbg_err("cannot erase PEB %d (emulated)", pnum);
                return -EIO;
        }
index 11eb8ef124854e88812b1e1f3203b2019941afc8..d2d12ab7def427c22cb6303d986ae3206575cb39 100644 (file)
@@ -968,7 +968,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
                         * contains garbage because of a power cut during erase
                         * operation. So we just schedule this PEB for erasure.
                         *
-                        * Besides, in case of NOR flash, we deliberatly
+                        * Besides, in case of NOR flash, we deliberately
                         * corrupt both headers because NOR flash erasure is
                         * slow and can start from the end.
                         */
index b79e0dea36320720f7b931010ae6416b1a177a8d..366eb70219a65bb0a5aca0ccaed329b470ab1b83 100644 (file)
@@ -790,11 +790,6 @@ static int paranoid_check_volume(struct ubi_device *ubi, int vol_id)
                goto fail;
        }
 
-       if (!vol->name) {
-               ubi_err("NULL volume name");
-               goto fail;
-       }
-
        n = strnlen(vol->name, vol->name_len + 1);
        if (n != vol->name_len) {
                ubi_err("bad name_len %lld", n);
index 9e1c03eb97ae5e3ce05de34b0aae69c2b3507680..5420f6de27dfa1bdd9ee4fb626e7c6537792b854 100644 (file)
@@ -399,7 +399,7 @@ static void el_timeout(struct net_device *dev)
  * as we may still be attempting to retrieve the last RX packet buffer.
  *
  * When a transmit times out we dump the card into control mode and just
- * start again. It happens enough that it isnt worth logging.
+ * start again. It happens enough that it isn't worth logging.
  *
  * We avoid holding the spin locks when doing the packet load to the board.
  * The device is very slow, and its DMA mode is even slower. If we held the
@@ -499,7 +499,7 @@ static netdev_tx_t el_start_xmit(struct sk_buff *skb, struct net_device *dev)
  *
  * Handle the ether interface interrupts. The 3c501 needs a lot more
  * hand holding than most cards. In particular we get a transmit interrupt
- * with a collision error because the board firmware isnt capable of rewinding
+ * with a collision error because the board firmware isn't capable of rewinding
  * its own transmit buffer pointers. It can however count to 16 for us.
  *
  * On the receive side the card is also very dumb. It has no buffering to
@@ -732,7 +732,7 @@ static void el_receive(struct net_device *dev)
  * el_reset: Reset a 3c501 card
  * @dev: The 3c501 card about to get zapped
  *
- * Even resetting a 3c501 isnt simple. When you activate reset it loses all
+ * Even resetting a 3c501 isn't simple. When you activate reset it loses all
  * its configuration. You must hold the lock when doing this. The function
  * cannot take the lock itself as it is callable from the irq handler.
  */
index de579d0431697b400dadeab44cb5d7126795054b..bc0d1a1c2e2862ace01203842fe9175a9d3b91f7 100644 (file)
@@ -44,7 +44,7 @@
    this for the 64K version would require a lot of heinous bank
    switching, which I'm sure not interested in doing.  If you try to
    implement a bank switching version, you'll basically have to remember
-   what bank is enabled and do a switch everytime you access a memory
+   what bank is enabled and do a switch every time you access a memory
    location that's not current.  You'll also have to remap pointers on
    the driver side, because it only knows about 16K of the memory.
    Anyone desperate or masochistic enough to try?
index 8c094bae8bf3167756cfea19f70862cfbc412a2d..d9d056d207f318644c176f3d524fd6029994e7b7 100644 (file)
@@ -51,7 +51,7 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Procter <rnp@paradise.net.
  *     circular buffer queues.
  *
  *     The mailboxes can be used for controlling how the card traverses
- *     its buffer rings, but are used only for inital setup in this
+ *     its buffer rings, but are used only for initial setup in this
  *     implementation.  The exec mailbox allows a variety of commands to
  *     be executed. Each command must complete before the next is
  *     executed. Primarily we use the exec mailbox for controlling the
@@ -813,7 +813,7 @@ static void mc32_flush_rx_ring(struct net_device *dev)
  *
  *     This sets up the host transmit data-structures.
  *
- *     First, we obtain from the card it's current postion in the tx
+ *     First, we obtain from the card it's current position in the tx
  *     ring, so that we will know where to begin transmitting
  *     packets.
  *
index 0a92436f05389883e8485bdf13fafc19cccd2ca2..8cc22568ebd3429282b8674b912cb8fe80eb7a03 100644 (file)
@@ -984,7 +984,7 @@ static int __init vortex_eisa_init(void)
                 * any device have been found when we exit from
                 * eisa_driver_register (the bus root driver may not be
                 * initialized yet). So we blindly assume something was
-                * found, and let the sysfs magic happend...
+                * found, and let the sysfs magic happened...
                 */
                eisa_found = 1;
        }
index 41d9911202d01e4b721e7a2221a15f0dd8e82c3b..ee648fe5d96fc48b65c59c1a2965aea7902cbf63 100644 (file)
@@ -1584,7 +1584,7 @@ static void ace_watchdog(struct net_device *data)
        /*
         * We haven't received a stats update event for more than 2.5
         * seconds and there is data in the transmit queue, thus we
-        * asume the card is stuck.
+        * assume the card is stuck.
         */
        if (*ap->tx_csm != ap->tx_ret_csm) {
                printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n",
@@ -2564,7 +2564,7 @@ restart:
 
                /*
                 * A TX-descriptor producer (an IRQ) might have gotten
-                * inbetween, making the ring free again. Since xmit is
+                * between, making the ring free again. Since xmit is
                 * serialized, this is the only situation we have to
                 * re-test.
                 */
index 2ca880b4c0dbea4499b681c55a4f46d8331caadb..241b185e6569da605eea3fcdd089098b42262a6e 100644 (file)
@@ -106,7 +106,7 @@ MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version "M
 MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl);
 module_param_array(speed_duplex, int, NULL, 0);
-MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotitate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
+MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotiate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
 module_param_array(coalesce, bool, NULL, 0);
 MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable");
 module_param_array(dynamic_ipg, bool, NULL, 0);
@@ -1398,7 +1398,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
                mc_filter[1] = mc_filter[0] = 0;
                lp->options &= ~OPTION_MULTICAST_ENABLE;
                amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF);
-               /* disable promiscous mode */
+               /* disable promiscuous mode */
                writel(PROM, lp->mmio + CMD2);
                return;
        }
index f4744fc897681345217e25f63eb6daa502014dd9..65a78f965dd25c5f30442e9a010ecac849c761ce 100644 (file)
@@ -133,7 +133,7 @@ struct net_local {
 /* Run-time register bank 2 definitions. */
 #define DATAPORT               8               /* Word-wide DMA or programmed-I/O dataport. */
 #define TX_START               10
-#define COL16CNTL              11              /* Controll Reg for 16 collisions */
+#define COL16CNTL              11              /* Control Reg for 16 collisions */
 #define MODE13                 13
 #define RX_CTRL                        14
 /* Configuration registers only on the '865A/B chips. */
index 7cb375e0e29cd5e3219a86106f2288201cf20635..925929d764ca50eff2812842c611e0cfbdb3005a 100644 (file)
@@ -566,9 +566,9 @@ struct atl1c_adapter {
 #define __AT_TESTING        0x0001
 #define __AT_RESETTING      0x0002
 #define __AT_DOWN           0x0003
-       u8 work_event;
-#define ATL1C_WORK_EVENT_RESET                 0x01
-#define ATL1C_WORK_EVENT_LINK_CHANGE   0x02
+       unsigned long work_event;
+#define        ATL1C_WORK_EVENT_RESET          0
+#define        ATL1C_WORK_EVENT_LINK_CHANGE    1
        u32 msg_enable;
 
        bool have_msi;
index 7d9d5067a65ce1bb368bd2128d75c5ef87446828..a6e1c36e48e6812b7590a0e2e595abb956b417ab 100644 (file)
@@ -325,7 +325,7 @@ static void atl1c_link_chg_event(struct atl1c_adapter *adapter)
                }
        }
 
-       adapter->work_event |= ATL1C_WORK_EVENT_LINK_CHANGE;
+       set_bit(ATL1C_WORK_EVENT_LINK_CHANGE, &adapter->work_event);
        schedule_work(&adapter->common_task);
 }
 
@@ -337,20 +337,16 @@ static void atl1c_common_task(struct work_struct *work)
        adapter = container_of(work, struct atl1c_adapter, common_task);
        netdev = adapter->netdev;
 
-       if (adapter->work_event & ATL1C_WORK_EVENT_RESET) {
-               adapter->work_event &= ~ATL1C_WORK_EVENT_RESET;
+       if (test_and_clear_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event)) {
                netif_device_detach(netdev);
                atl1c_down(adapter);
                atl1c_up(adapter);
                netif_device_attach(netdev);
-               return;
        }
 
-       if (adapter->work_event & ATL1C_WORK_EVENT_LINK_CHANGE) {
-               adapter->work_event &= ~ATL1C_WORK_EVENT_LINK_CHANGE;
+       if (test_and_clear_bit(ATL1C_WORK_EVENT_LINK_CHANGE,
+               &adapter->work_event))
                atl1c_check_link_status(adapter);
-       }
-       return;
 }
 
 
@@ -369,7 +365,7 @@ static void atl1c_tx_timeout(struct net_device *netdev)
        struct atl1c_adapter *adapter = netdev_priv(netdev);
 
        /* Do the reset outside of interrupt context */
-       adapter->work_event |= ATL1C_WORK_EVENT_RESET;
+       set_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event);
        schedule_work(&adapter->common_task);
 }
 
index 1ff001a8270cec79343be82983220a6e04e36e1f..b0a71e2f28a9d086bdd2c8953f43870cb3446f02 100644 (file)
@@ -2509,7 +2509,7 @@ static struct pci_driver atl1e_driver = {
        .id_table = atl1e_pci_tbl,
        .probe    = atl1e_probe,
        .remove   = __devexit_p(atl1e_remove),
-       /* Power Managment Hooks */
+       /* Power Management Hooks */
 #ifdef CONFIG_PM
        .suspend  = atl1e_suspend,
        .resume   = atl1e_resume,
index 937ef1afa5db873397c821392153d1f5ebc3ff32..e3cbf45dc612b59727bf4c4ebfe49dbaf7e6e4f2 100644 (file)
@@ -1701,7 +1701,7 @@ static struct pci_driver atl2_driver = {
        .id_table = atl2_pci_tbl,
        .probe    = atl2_probe,
        .remove   = __devexit_p(atl2_remove),
-       /* Power Managment Hooks */
+       /* Power Management Hooks */
        .suspend  = atl2_suspend,
 #ifdef CONFIG_PM
        .resume   = atl2_resume,
index e94a966af4186bb4db195547ac7ddc7ac957ea1f..c48104b08861a3b769566a700e828ff43926c932 100644 (file)
@@ -597,7 +597,7 @@ static int bcm_enet_set_mac_address(struct net_device *dev, void *p)
 }
 
 /*
- * Change rx mode (promiscous/allmulti) and update multicast list
+ * Change rx mode (promiscuous/allmulti) and update multicast list
  */
 static void bcm_enet_set_multicast_list(struct net_device *dev)
 {
index f803c58b941d7196f4ce53d62cf6c5a0a63d33d1..66823eded7a3b7d4ffa7525728d8c587f1628275 100644 (file)
@@ -154,7 +154,7 @@ struct be_eq_obj {
        u16 min_eqd;            /* in usecs */
        u16 max_eqd;            /* in usecs */
        u16 cur_eqd;            /* in usecs */
-       u8  msix_vec_idx;
+       u8  eq_idx;
 
        struct napi_struct napi;
 };
@@ -291,7 +291,7 @@ struct be_adapter {
        u32 num_rx_qs;
        u32 big_page_size;      /* Compounded page size shared by rx wrbs */
 
-       u8 msix_vec_next_idx;
+       u8 eq_next_idx;
        struct be_drv_stats drv_stats;
 
        struct vlan_group *vlan_grp;
index 5a4a87e7c5eadb8a83e72289d61e42ea5fdf42c9..1e2d825bb94a2b608bc4d8eacac2fa8e24dafaf3 100644 (file)
@@ -1331,7 +1331,7 @@ err:
 
 /*
  * Uses MCC for this command as it may be called in BH context
- * (mc == NULL) => multicast promiscous
+ * (mc == NULL) => multicast promiscuous
  */
 int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
                struct net_device *netdev, struct be_dma_mem *mem)
index a71163f1e34b80eabd12e0e33ba46583b041004b..02a0443d1821d56f5c4ed61d713b2b186f6dc62e 100644 (file)
@@ -708,7 +708,7 @@ static void be_set_multicast_list(struct net_device *netdev)
                goto done;
        }
 
-       /* BE was previously in promiscous mode; disable it */
+       /* BE was previously in promiscuous mode; disable it */
        if (adapter->promiscuous) {
                adapter->promiscuous = false;
                be_cmd_promiscuous_config(adapter, adapter->port_num, 0);
@@ -1497,7 +1497,7 @@ static int be_tx_queues_create(struct be_adapter *adapter)
        if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd))
                goto tx_eq_free;
 
-       adapter->tx_eq.msix_vec_idx = adapter->msix_vec_next_idx++;
+       adapter->tx_eq.eq_idx = adapter->eq_next_idx++;
 
 
        /* Alloc TX eth compl queue */
@@ -1590,7 +1590,7 @@ static int be_rx_queues_create(struct be_adapter *adapter)
                if (rc)
                        goto err;
 
-               rxo->rx_eq.msix_vec_idx = adapter->msix_vec_next_idx++;
+               rxo->rx_eq.eq_idx = adapter->eq_next_idx++;
 
                /* CQ */
                cq = &rxo->cq;
@@ -1666,11 +1666,11 @@ static irqreturn_t be_intx(int irq, void *dev)
                if (!isr)
                        return IRQ_NONE;
 
-               if ((1 << adapter->tx_eq.msix_vec_idx & isr))
+               if ((1 << adapter->tx_eq.eq_idx & isr))
                        event_handle(adapter, &adapter->tx_eq);
 
                for_all_rx_queues(adapter, rxo, i) {
-                       if ((1 << rxo->rx_eq.msix_vec_idx & isr))
+                       if ((1 << rxo->rx_eq.eq_idx & isr))
                                event_handle(adapter, &rxo->rx_eq);
                }
        }
@@ -1873,6 +1873,7 @@ static void be_worker(struct work_struct *work)
                be_detect_dump_ue(adapter);
 
 reschedule:
+       adapter->work_counter++;
        schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000));
 }
 
@@ -1951,7 +1952,7 @@ static void be_sriov_disable(struct be_adapter *adapter)
 static inline int be_msix_vec_get(struct be_adapter *adapter,
                                        struct be_eq_obj *eq_obj)
 {
-       return adapter->msix_entries[eq_obj->msix_vec_idx].vector;
+       return adapter->msix_entries[eq_obj->eq_idx].vector;
 }
 
 static int be_request_irq(struct be_adapter *adapter,
@@ -2345,6 +2346,7 @@ static int be_clear(struct be_adapter *adapter)
        be_mcc_queues_destroy(adapter);
        be_rx_queues_destroy(adapter);
        be_tx_queues_destroy(adapter);
+       adapter->eq_next_idx = 0;
 
        if (be_physfn(adapter) && adapter->sriov_enabled)
                for (vf = 0; vf < num_vfs; vf++)
@@ -3141,12 +3143,14 @@ static int be_resume(struct pci_dev *pdev)
 static void be_shutdown(struct pci_dev *pdev)
 {
        struct be_adapter *adapter = pci_get_drvdata(pdev);
-       struct net_device *netdev =  adapter->netdev;
 
-       if (netif_running(netdev))
+       if (!adapter)
+               return;
+
+       if (netif_running(adapter->netdev))
                cancel_delayed_work_sync(&adapter->work);
 
-       netif_device_detach(netdev);
+       netif_device_detach(adapter->netdev);
 
        be_cmd_reset_function(adapter);
 
index 34933cb9569ffc070692d8031a8c50eb32b07111..7581518ecfa2eade4c4bb4cba60601e5f39b7be2 100644 (file)
@@ -38,6 +38,8 @@
 #define bfa_ioc_map_port(__ioc) ((__ioc)->ioc_hwif->ioc_map_port(__ioc))
 #define bfa_ioc_notify_fail(__ioc)                     \
                        ((__ioc)->ioc_hwif->ioc_notify_fail(__ioc))
+#define bfa_ioc_sync_start(__ioc)               \
+                       ((__ioc)->ioc_hwif->ioc_sync_start(__ioc))
 #define bfa_ioc_sync_join(__ioc)                       \
                        ((__ioc)->ioc_hwif->ioc_sync_join(__ioc))
 #define bfa_ioc_sync_leave(__ioc)                      \
@@ -602,7 +604,7 @@ bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event)
        switch (event) {
        case IOCPF_E_SEMLOCKED:
                if (bfa_ioc_firmware_lock(ioc)) {
-                       if (bfa_ioc_sync_complete(ioc)) {
+                       if (bfa_ioc_sync_start(ioc)) {
                                iocpf->retry_count = 0;
                                bfa_ioc_sync_join(ioc);
                                bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit);
@@ -1314,7 +1316,7 @@ bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr)
  * execution context (driver/bios) must match.
  */
 static bool
-bfa_ioc_fwver_valid(struct bfa_ioc *ioc)
+bfa_ioc_fwver_valid(struct bfa_ioc *ioc, u32 boot_env)
 {
        struct bfi_ioc_image_hdr fwhdr, *drv_fwhdr;
 
@@ -1325,7 +1327,7 @@ bfa_ioc_fwver_valid(struct bfa_ioc *ioc)
        if (fwhdr.signature != drv_fwhdr->signature)
                return false;
 
-       if (fwhdr.exec != drv_fwhdr->exec)
+       if (swab32(fwhdr.param) != boot_env)
                return false;
 
        return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr);
@@ -1352,9 +1354,12 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force)
 {
        enum bfi_ioc_state ioc_fwstate;
        bool fwvalid;
+       u32 boot_env;
 
        ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate);
 
+       boot_env = BFI_BOOT_LOADER_OS;
+
        if (force)
                ioc_fwstate = BFI_IOC_UNINIT;
 
@@ -1362,10 +1367,10 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force)
         * check if firmware is valid
         */
        fwvalid = (ioc_fwstate == BFI_IOC_UNINIT) ?
-               false : bfa_ioc_fwver_valid(ioc);
+               false : bfa_ioc_fwver_valid(ioc, boot_env);
 
        if (!fwvalid) {
-               bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id);
+               bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env);
                return;
        }
 
@@ -1396,7 +1401,7 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force)
        /**
         * Initialize the h/w for any other states.
         */
-       bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id);
+       bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env);
 }
 
 void
@@ -1506,7 +1511,7 @@ bfa_ioc_hb_stop(struct bfa_ioc *ioc)
  */
 static void
 bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type,
-                   u32 boot_param)
+                   u32 boot_env)
 {
        u32 *fwimg;
        u32 pgnum, pgoff;
@@ -1558,10 +1563,10 @@ bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type,
        /*
         * Set boot type and boot param at the end.
        */
-       writel((swab32(swab32(boot_type))), ((ioc->ioc_regs.smem_page_start)
+       writel(boot_type, ((ioc->ioc_regs.smem_page_start)
                        + (BFI_BOOT_TYPE_OFF)));
-       writel((swab32(swab32(boot_param))), ((ioc->ioc_regs.smem_page_start)
-                       + (BFI_BOOT_PARAM_OFF)));
+       writel(boot_env, ((ioc->ioc_regs.smem_page_start)
+                       + (BFI_BOOT_LOADER_OFF)));
 }
 
 static void
@@ -1721,7 +1726,7 @@ bfa_ioc_pll_init(struct bfa_ioc *ioc)
  * as the entry vector.
  */
 static void
-bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param)
+bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_env)
 {
        void __iomem *rb;
 
@@ -1734,7 +1739,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param)
         * Initialize IOC state of all functions on a chip reset.
         */
        rb = ioc->pcidev.pci_bar_kva;
-       if (boot_param == BFI_BOOT_TYPE_MEMTEST) {
+       if (boot_type == BFI_BOOT_TYPE_MEMTEST) {
                writel(BFI_IOC_MEMTEST, (rb + BFA_IOC0_STATE_REG));
                writel(BFI_IOC_MEMTEST, (rb + BFA_IOC1_STATE_REG));
        } else {
@@ -1743,7 +1748,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param)
        }
 
        bfa_ioc_msgflush(ioc);
-       bfa_ioc_download_fw(ioc, boot_type, boot_param);
+       bfa_ioc_download_fw(ioc, boot_type, boot_env);
 
        /**
         * Enable interrupts just before starting LPU
@@ -2219,13 +2224,9 @@ bfa_nw_ioc_get_mac(struct bfa_ioc *ioc)
 static void
 bfa_ioc_recover(struct bfa_ioc *ioc)
 {
-       u16 bdf;
-
-       bdf = (ioc->pcidev.pci_slot << 8 | ioc->pcidev.pci_func << 3 |
-                                       ioc->pcidev.device_id);
-
-       pr_crit("Firmware heartbeat failure at %d", bdf);
-       BUG_ON(1);
+       pr_crit("Heart Beat of IOC has failed\n");
+       bfa_ioc_stats(ioc, ioc_hbfails);
+       bfa_fsm_send_event(ioc, IOC_E_HBFAIL);
 }
 
 static void
index e4974bc24ef69b3d05229398cc15b4977997226e..bd48abee781f17ed340d18317e07374d2000b8bb 100644 (file)
@@ -194,6 +194,7 @@ struct bfa_ioc_hwif {
                                        bool msix);
        void            (*ioc_notify_fail)      (struct bfa_ioc *ioc);
        void            (*ioc_ownership_reset)  (struct bfa_ioc *ioc);
+       bool            (*ioc_sync_start)       (struct bfa_ioc *ioc);
        void            (*ioc_sync_join)        (struct bfa_ioc *ioc);
        void            (*ioc_sync_leave)       (struct bfa_ioc *ioc);
        void            (*ioc_sync_ack)         (struct bfa_ioc *ioc);
index 469997c4ffd196a4609c58daf83c6112d4fc4995..87aecdf22cf9c29adf4379685d9813bbbebd2cd5 100644 (file)
@@ -41,6 +41,7 @@ static void bfa_ioc_ct_map_port(struct bfa_ioc *ioc);
 static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix);
 static void bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc);
 static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc);
+static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc);
 static void bfa_ioc_ct_sync_join(struct bfa_ioc *ioc);
 static void bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc);
 static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc);
@@ -63,6 +64,7 @@ bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc)
        nw_hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set;
        nw_hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail;
        nw_hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset;
+       nw_hwif_ct.ioc_sync_start = bfa_ioc_ct_sync_start;
        nw_hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join;
        nw_hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave;
        nw_hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack;
@@ -342,6 +344,32 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc)
        bfa_nw_ioc_hw_sem_release(ioc);
 }
 
+/**
+ * Synchronized IOC failure processing routines
+ */
+static bool
+bfa_ioc_ct_sync_start(struct bfa_ioc *ioc)
+{
+       u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync);
+       u32 sync_reqd = bfa_ioc_ct_get_sync_reqd(r32);
+
+       /*
+        * Driver load time.  If the sync required bit for this PCI fn
+        * is set, it is due to an unclean exit by the driver for this
+        * PCI fn in the previous incarnation. Whoever comes here first
+        * should clean it up, no matter which PCI fn.
+        */
+
+       if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) {
+               writel(0, ioc->ioc_regs.ioc_fail_sync);
+               writel(1, ioc->ioc_regs.ioc_usage_reg);
+               writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate);
+               writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate);
+               return true;
+       }
+
+       return bfa_ioc_ct_sync_complete(ioc);
+}
 /**
  * Synchronized IOC failure processing routines
  */
index a97396811050eaccc1bcd31064c0088c29479413..6050379526f74f737ed2ef8a12c8f44ece1241d5 100644 (file)
@@ -184,12 +184,14 @@ enum bfi_mclass {
 #define BFI_IOC_MSGLEN_MAX     32      /* 32 bytes */
 
 #define BFI_BOOT_TYPE_OFF              8
-#define BFI_BOOT_PARAM_OFF             12
+#define BFI_BOOT_LOADER_OFF            12
 
-#define BFI_BOOT_TYPE_NORMAL           0       /* param is device id */
+#define BFI_BOOT_TYPE_NORMAL           0
 #define        BFI_BOOT_TYPE_FLASH             1
 #define        BFI_BOOT_TYPE_MEMTEST           2
 
+#define BFI_BOOT_LOADER_OS             0
+
 #define BFI_BOOT_MEMTEST_RES_ADDR   0x900
 #define BFI_BOOT_MEMTEST_RES_SIG    0xA0A1A2A3
 
index 806b224a4c63fcfaa9c5660581664f4317c11809..6cb89692f5c1e725566f7d50c97ce797dfb96628 100644 (file)
@@ -897,7 +897,7 @@ static struct bna_ritseg_pool_cfg name[BFI_RIT_SEG_TOTAL_POOLS] =   \
  * Catapult RSS Table Base Offset Address
  *
  * Exists in RAD memory space.
- * Each entry is 352 bits, but alligned on
+ * Each entry is 352 bits, but aligned on
  * 64 byte (512 bit) boundary. Accessed
  * 4 byte words, the whole entry can be
  * broken into 11 word accesses.
index 9f356d5d0f3318c42630cd0ce2b479e73a28b75b..8e6ceab9f4d800e4cbfee2cac22a297d0d987396 100644 (file)
@@ -1837,7 +1837,6 @@ bnad_setup_rx(struct bnad *bnad, uint rx_id)
        /* Initialize the Rx event handlers */
        rx_cbfn.rcb_setup_cbfn = bnad_cb_rcb_setup;
        rx_cbfn.rcb_destroy_cbfn = bnad_cb_rcb_destroy;
-       rx_cbfn.rcb_destroy_cbfn = NULL;
        rx_cbfn.ccb_setup_cbfn = bnad_cb_ccb_setup;
        rx_cbfn.ccb_destroy_cbfn = bnad_cb_ccb_destroy;
        rx_cbfn.rx_cleanup_cbfn = bnad_cb_rx_cleanup;
index 8e6d618b53052139981cf5cc6df6720d11382a0c..d8383a9af9ad21a756a090bc1fd7342f3af005ee 100644 (file)
@@ -8413,6 +8413,8 @@ bnx2_remove_one(struct pci_dev *pdev)
 
        unregister_netdev(dev);
 
+       del_timer_sync(&bp->timer);
+
        if (bp->mips_firmware)
                release_firmware(bp->mips_firmware);
        if (bp->rv2p_firmware)
index b7ff87b35fbb38eb42a217ec0a8ac22257b71b23..e0fca701d2f3c141dc2a1b6a7b7820c9ab5f8c92 100644 (file)
@@ -1220,7 +1220,7 @@ struct bnx2x {
        struct bnx2x_dcbx_port_params           dcbx_port_params;
        int                                     dcb_version;
 
-       /* DCBX Negotation results */
+       /* DCBX Negotiation results */
        struct dcbx_features                    dcbx_local_feat;
        u32                                     dcbx_error;
        u32                                     pending_max;
index e83ac6dd6fc076b85b752957b9d7a88985cb0412..16581df5ee4e62936afd0ac74ad50dbd108f5782 100644 (file)
@@ -2019,15 +2019,23 @@ static inline void bnx2x_set_pbd_gso(struct sk_buff *skb,
 static inline  u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb,
        u32 *parsing_data, u32 xmit_type)
 {
-       *parsing_data |= ((tcp_hdrlen(skb)/4) <<
-               ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) &
-               ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW;
+       *parsing_data |=
+                       ((((u8 *)skb_transport_header(skb) - skb->data) >> 1) <<
+                       ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) &
+                       ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W;
 
-       *parsing_data |= ((((u8 *)tcp_hdr(skb) - skb->data) / 2) <<
-               ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) &
-               ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W;
+       if (xmit_type & XMIT_CSUM_TCP) {
+               *parsing_data |= ((tcp_hdrlen(skb) / 4) <<
+                       ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) &
+                       ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW;
 
-       return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data;
+               return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data;
+       } else
+               /* We support checksum offload for TCP and UDP only.
+                * No need to pass the UDP header length - it's a constant.
+                */
+               return skb_transport_header(skb) +
+                               sizeof(struct udphdr) - skb->data;
 }
 
 /**
@@ -2043,7 +2051,7 @@ static inline u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb,
        struct eth_tx_parse_bd_e1x *pbd,
        u32 xmit_type)
 {
-       u8 hlen = (skb_network_header(skb) - skb->data) / 2;
+       u8 hlen = (skb_network_header(skb) - skb->data) >> 1;
 
        /* for now NS flag is not used in Linux */
        pbd->global_data =
@@ -2051,9 +2059,15 @@ static inline u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb,
                         ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT));
 
        pbd->ip_hlen_w = (skb_transport_header(skb) -
-                       skb_network_header(skb)) / 2;
+                       skb_network_header(skb)) >> 1;
 
-       hlen += pbd->ip_hlen_w + tcp_hdrlen(skb) / 2;
+       hlen += pbd->ip_hlen_w;
+
+       /* We support checksum offload for TCP and UDP only */
+       if (xmit_type & XMIT_CSUM_TCP)
+               hlen += tcp_hdrlen(skb) / 2;
+       else
+               hlen += sizeof(struct udphdr) / 2;
 
        pbd->total_hlen_w = cpu_to_le16(hlen);
        hlen = hlen*2;
index f5050155c6b5e04d87a62be1f8f22a78dc953d9e..89cb977898cb5cfbce98bd53422c9d27128761e5 100644 (file)
@@ -2114,19 +2114,18 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data)
        for (i = 0; i < (data * 2); i++) {
                if ((i % 2) == 0)
                        bnx2x_set_led(&bp->link_params, &bp->link_vars,
-                                     LED_MODE_OPER, SPEED_1000);
+                                     LED_MODE_ON, SPEED_1000);
                else
                        bnx2x_set_led(&bp->link_params, &bp->link_vars,
-                                     LED_MODE_OFF, 0);
+                                     LED_MODE_FRONT_PANEL_OFF, 0);
 
                msleep_interruptible(500);
                if (signal_pending(current))
                        break;
        }
 
-       if (bp->link_vars.link_up)
-               bnx2x_set_led(&bp->link_params, &bp->link_vars, LED_MODE_OPER,
-                             bp->link_vars.line_speed);
+       bnx2x_set_led(&bp->link_params, &bp->link_vars,
+                     LED_MODE_OPER, bp->link_vars.line_speed);
 
        return 0;
 }
index be503cc0a50baf8a9985d64096a91e756811098a..dac1bf9cbbfa30a0c275d24e477e5dbe00c2dfb8 100644 (file)
@@ -3019,7 +3019,7 @@ struct tstorm_eth_mac_filter_config {
 
 
 /*
- * common flag to indicate existance of TPA.
+ * common flag to indicate existence of TPA.
  */
 struct tstorm_eth_tpa_exist {
 #if defined(__BIG_ENDIAN)
index f2f367d4e74dab400f7b40ee927614ec5504de9b..974ef2be36a5b6e804da1325dfdf94cd0da88f0e 100644 (file)
@@ -2823,7 +2823,7 @@ static u16 bnx2x_wait_reset_complete(struct bnx2x *bp,
                                     struct link_params *params)
 {
        u16 cnt, ctrl;
-       /* Wait for soft reset to get cleared upto 1 sec */
+       /* Wait for soft reset to get cleared up to 1 sec */
        for (cnt = 0; cnt < 1000; cnt++) {
                bnx2x_cl45_read(bp, phy,
                                MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, &ctrl);
@@ -4141,7 +4141,7 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy,
                        val = (1<<5);
                        /*
                         * Note that 2.5G works only when used with 1G
-                        * advertisment
+                        * advertisement
                         */
                } else
                        val = (1<<5);
@@ -4151,7 +4151,7 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy,
                        PORT_HW_CFG_SPEED_CAPABILITY_D0_10G)
                        val |= (1<<7);
 
-               /* Note that 2.5G works only when used with 1G advertisment */
+               /* Note that 2.5G works only when used with 1G advertisement */
                if (phy->speed_cap_mask &
                        (PORT_HW_CFG_SPEED_CAPABILITY_D0_1G |
                         PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G))
@@ -5232,14 +5232,14 @@ static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy,
                bnx2x_cl45_write(bp, phy,
                                 MDIO_PMA_DEVAD, MDIO_PMA_REG_LASI_CTRL, 1);
        } else {
-               /* Force 1Gbps using autoneg with 1G advertisment */
+               /* Force 1Gbps using autoneg with 1G advertisement */
 
                /* Allow CL37 through CL73 */
                DP(NETIF_MSG_LINK, "XGXS 8706 AutoNeg\n");
                bnx2x_cl45_write(bp, phy,
                                 MDIO_AN_DEVAD, MDIO_AN_REG_CL37_CL73, 0x040c);
 
-               /* Enable Full-Duplex advertisment on CL37 */
+               /* Enable Full-Duplex advertisement on CL37 */
                bnx2x_cl45_write(bp, phy,
                                 MDIO_AN_DEVAD, MDIO_AN_REG_CL37_FC_LP, 0x0020);
                /* Enable CL37 AN */
@@ -6269,7 +6269,7 @@ static u8 bnx2x_848x3_config_init(struct bnx2x_phy *phy,
 
        switch (actual_phy_selection) {
        case PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT:
-               /* Do nothing. Essentialy this is like the priority copper */
+               /* Do nothing. Essentially this is like the priority copper */
                break;
        case PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY:
                val |= MDIO_CTL_REG_84823_MEDIA_PRIORITY_COPPER;
@@ -7765,7 +7765,7 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
        REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0);
 
        msleep(10);
-       /* The PHY reset is controled by GPIO 1
+       /* The PHY reset is controlled by GPIO 1
         * Hold it as vars low
         */
         /* clear link led */
index 32e64cc85d2cd09f869edbd67a7c3ab47afa8313..a97a4a1c344fb8abf1014136710cf2a55993508f 100644 (file)
@@ -3702,7 +3702,7 @@ static void bnx2x_eq_int(struct bnx2x *bp)
        if ((hw_cons & EQ_DESC_MAX_PAGE) == EQ_DESC_MAX_PAGE)
                hw_cons++;
 
-       /* This function may never run in parralel with itself for a
+       /* This function may never run in parallel with itself for a
         * specific bp, thus there is no need in "paired" read memory
         * barrier here.
         */
@@ -5089,7 +5089,7 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code)
                /* Step 1: set zeroes to all ilt page entries with valid bit on
                 * Step 2: set the timers first/last ilt entry to point
                 * to the entire range to prevent ILT range error for 3rd/4th
-                * vnic (this code assumes existance of the vnic)
+                * vnic (this code assumes existence of the vnic)
                 *
                 * both steps performed by call to bnx2x_ilt_client_init_op()
                 * with dummy TM client
@@ -8685,7 +8685,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
                                E1H_FUNC_MAX * sizeof(struct drv_func_mb);
                /*
                 * get mf configuration:
-                * 1. existance of MF configuration
+                * 1. existence of MF configuration
                 * 2. MAC address must be legal (check only upper bytes)
                 *    for  Switch-Independent mode;
                 *    OVLAN must be legal for Switch-Dependent mode
@@ -8727,7 +8727,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
                        default:
                                /* Unknown configuration: reset mf_config */
                                bp->mf_config[vn] = 0;
-                               DP(NETIF_MSG_PROBE, "Unkown MF mode 0x%x\n",
+                               DP(NETIF_MSG_PROBE, "Unknown MF mode 0x%x\n",
                                   val);
                        }
                }
@@ -9777,7 +9777,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 
 #endif
 
-       /* Configure interupt mode: try to enable MSI-X/MSI if
+       /* Configure interrupt mode: try to enable MSI-X/MSI if
         * needed, set bp->num_queues appropriately.
         */
        bnx2x_set_int_mode(bp);
index 1c89f19a4425b95786f77a2104c7ef6216ccb2f7..1509a2318af965836a8d1615504aa563be65ad80 100644 (file)
    the initial credit value; read returns the current value of the credit
    counter. Must be initialized to 1 at start-up. */
 #define CCM_REG_CFC_INIT_CRD                                    0xd0204
-/* [RW 2] Auxillary counter flag Q number 1. */
+/* [RW 2] Auxiliary counter flag Q number 1. */
 #define CCM_REG_CNT_AUX1_Q                                      0xd00c8
-/* [RW 2] Auxillary counter flag Q number 2. */
+/* [RW 2] Auxiliary counter flag Q number 2. */
 #define CCM_REG_CNT_AUX2_Q                                      0xd00cc
 /* [RW 28] The CM header value for QM request (primary). */
 #define CCM_REG_CQM_CCM_HDR_P                                   0xd008c
 #define CSDM_REG_AGG_INT_MODE_9                                 0xc21dc
 /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
 #define CSDM_REG_CFC_RSP_START_ADDR                             0xc2008
-/* [RW 16] The maximum value of the competion counter #0 */
+/* [RW 16] The maximum value of the completion counter #0 */
 #define CSDM_REG_CMP_COUNTER_MAX0                               0xc201c
-/* [RW 16] The maximum value of the competion counter #1 */
+/* [RW 16] The maximum value of the completion counter #1 */
 #define CSDM_REG_CMP_COUNTER_MAX1                               0xc2020
-/* [RW 16] The maximum value of the competion counter #2 */
+/* [RW 16] The maximum value of the completion counter #2 */
 #define CSDM_REG_CMP_COUNTER_MAX2                               0xc2024
-/* [RW 16] The maximum value of the competion counter #3 */
+/* [RW 16] The maximum value of the completion counter #3 */
 #define CSDM_REG_CMP_COUNTER_MAX3                               0xc2028
 /* [RW 13] The start address in the internal RAM for the completion
    counters. */
 #define IGU_REG_ATTN_MSG_ADDR_L                                 0x130120
 /* [R 4] Debug: [3] - attention write done message is pending (0-no pending;
  * 1-pending). [2:0] = PFID. Pending means attention message was sent; but
- * write done didnt receive. */
+ * write done didn't receive. */
 #define IGU_REG_ATTN_WRITE_DONE_PENDING                         0x130030
 #define IGU_REG_BLOCK_CONFIGURATION                             0x130000
 #define IGU_REG_COMMAND_REG_32LSB_DATA                          0x130124
 #define IGU_REG_CSTORM_TYPE_0_SB_CLEANUP                        0x130200
 /* [R 5] Debug: ctrl_fsm */
 #define IGU_REG_CTRL_FSM                                        0x130064
-/* [R 1] data availble for error memory. If this bit is clear do not red
+/* [R 1] data available for error memory. If this bit is clear do not red
  * from error_handling_memory. */
 #define IGU_REG_ERROR_HANDLING_DATA_VALID                       0x130130
 /* [RW 11] Parity mask register #0 read/write */
    block. Should be used for close the gates. */
 #define PXP_REG_HST_DISCARD_DOORBELLS                           0x1030a4
 /* [R 1] debug only: '1' means this PSWHST is discarding doorbells. This bit
-   should update accoring to 'hst_discard_doorbells' register when the state
+   should update according to 'hst_discard_doorbells' register when the state
    machine is idle */
 #define PXP_REG_HST_DISCARD_DOORBELLS_STATUS                    0x1030a0
 /* [RW 1] When 1; new internal writes arriving to the block are discarded.
 #define PXP_REG_HST_DISCARD_INTERNAL_WRITES                     0x1030a8
 /* [R 6] debug only: A bit mask for all PSWHST internal write clients. '1'
    means this PSWHST is discarding inputs from this client. Each bit should
-   update accoring to 'hst_discard_internal_writes' register when the state
+   update according to 'hst_discard_internal_writes' register when the state
    machine is idle. */
 #define PXP_REG_HST_DISCARD_INTERNAL_WRITES_STATUS              0x10309c
 /* [WB 160] Used for initialization of the inbound interrupts memory */
 #define TSDM_REG_AGG_INT_T_1                                    0x420bc
 /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
 #define TSDM_REG_CFC_RSP_START_ADDR                             0x42008
-/* [RW 16] The maximum value of the competion counter #0 */
+/* [RW 16] The maximum value of the completion counter #0 */
 #define TSDM_REG_CMP_COUNTER_MAX0                               0x4201c
-/* [RW 16] The maximum value of the competion counter #1 */
+/* [RW 16] The maximum value of the completion counter #1 */
 #define TSDM_REG_CMP_COUNTER_MAX1                               0x42020
-/* [RW 16] The maximum value of the competion counter #2 */
+/* [RW 16] The maximum value of the completion counter #2 */
 #define TSDM_REG_CMP_COUNTER_MAX2                               0x42024
-/* [RW 16] The maximum value of the competion counter #3 */
+/* [RW 16] The maximum value of the completion counter #3 */
 #define TSDM_REG_CMP_COUNTER_MAX3                               0x42028
 /* [RW 13] The start address in the internal RAM for the completion
    counters. */
 #define USDM_REG_AGG_INT_T_6                                    0xc40d0
 /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
 #define USDM_REG_CFC_RSP_START_ADDR                             0xc4008
-/* [RW 16] The maximum value of the competion counter #0 */
+/* [RW 16] The maximum value of the completion counter #0 */
 #define USDM_REG_CMP_COUNTER_MAX0                               0xc401c
-/* [RW 16] The maximum value of the competion counter #1 */
+/* [RW 16] The maximum value of the completion counter #1 */
 #define USDM_REG_CMP_COUNTER_MAX1                               0xc4020
-/* [RW 16] The maximum value of the competion counter #2 */
+/* [RW 16] The maximum value of the completion counter #2 */
 #define USDM_REG_CMP_COUNTER_MAX2                               0xc4024
-/* [RW 16] The maximum value of the competion counter #3 */
+/* [RW 16] The maximum value of the completion counter #3 */
 #define USDM_REG_CMP_COUNTER_MAX3                               0xc4028
 /* [RW 13] The start address in the internal RAM for the completion
    counters. */
 #define XSDM_REG_AGG_INT_MODE_1                                 0x1661bc
 /* [RW 13] The start address in the internal RAM for the cfc_rsp lcid */
 #define XSDM_REG_CFC_RSP_START_ADDR                             0x166008
-/* [RW 16] The maximum value of the competion counter #0 */
+/* [RW 16] The maximum value of the completion counter #0 */
 #define XSDM_REG_CMP_COUNTER_MAX0                               0x16601c
-/* [RW 16] The maximum value of the competion counter #1 */
+/* [RW 16] The maximum value of the completion counter #1 */
 #define XSDM_REG_CMP_COUNTER_MAX1                               0x166020
-/* [RW 16] The maximum value of the competion counter #2 */
+/* [RW 16] The maximum value of the completion counter #2 */
 #define XSDM_REG_CMP_COUNTER_MAX2                               0x166024
-/* [RW 16] The maximum value of the competion counter #3 */
+/* [RW 16] The maximum value of the completion counter #3 */
 #define XSDM_REG_CMP_COUNTER_MAX3                               0x166028
 /* [RW 13] The start address in the internal RAM for the completion
    counters. */
index 494bf960442d3ff533507661ce394d0d128a3d6f..31912f17653f74173368e36a03c924a4b1443975 100644 (file)
@@ -1482,8 +1482,11 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best,
 
 static int agg_device_up(const struct aggregator *agg)
 {
-       return (netif_running(agg->slave->dev) &&
-               netif_carrier_ok(agg->slave->dev));
+       struct port *port = agg->lag_ports;
+       if (!port)
+               return 0;
+       return (netif_running(port->slave->dev) &&
+               netif_carrier_ok(port->slave->dev));
 }
 
 /**
index 9bc5de3e04a8375894e040cd3cb794a0fff5f90c..ba715826e2a8f1c7cf66213f777527d5db053d4c 100644 (file)
@@ -176,7 +176,7 @@ static int tlb_initialize(struct bonding *bond)
        bond_info->tx_hashtbl = new_hashtbl;
 
        for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
-               tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1);
+               tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
        }
 
        _unlock_tx_hashtbl(bond);
@@ -701,7 +701,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
                 */
                rlb_choose_channel(skb, bond);
 
-               /* The ARP relpy packets must be delayed so that
+               /* The ARP reply packets must be delayed so that
                 * they can cancel out the influence of the ARP request.
                 */
                bond->alb_info.rlb_update_delay_counter = RLB_UPDATE_DELAY;
@@ -1042,7 +1042,7 @@ static void alb_change_hw_addr_on_detach(struct bonding *bond, struct slave *sla
  *
  * If the permanent hw address of @slave is @bond's hw address, we need to
  * find a different hw address to give @slave, that isn't in use by any other
- * slave in the bond. This address must be, of course, one of the premanent
+ * slave in the bond. This address must be, of course, one of the permanent
  * addresses of the other slaves.
  *
  * We go over the slave list, and for each slave there we compare its
index 4b3e358784060ae34cbb735df22412cae0c22571..8ca7158b2dda412f158ae790050c380e2abd2971 100644 (file)
@@ -75,8 +75,8 @@ struct tlb_client_info {
                                 * gave this entry index.
                                 */
        u32 tx_bytes;           /* Each Client accumulates the BytesTx that
-                                * were tranmitted to it, and after each
-                                * CallBack the LoadHistory is devided
+                                * were transmitted to it, and after each
+                                * CallBack the LoadHistory is divided
                                 * by the balance interval
                                 */
        u32 load_history;       /* This field contains the amount of Bytes
@@ -122,7 +122,6 @@ struct tlb_slave_info {
 };
 
 struct alb_bond_info {
-       struct timer_list       alb_timer;
        struct tlb_client_info  *tx_hashtbl; /* Dynamically allocated */
        spinlock_t              tx_hashtbl_lock;
        u32                     unbalanced_load;
@@ -140,7 +139,6 @@ struct alb_bond_info {
        struct slave            *next_rx_slave;/* next slave to be assigned
                                                * to a new rx client for
                                                */
-       u32                     rlb_interval_counter;
        u8                      primary_is_promisc;        /* boolean */
        u32                     rlb_promisc_timeout_counter;/* counts primary
                                                             * promiscuity time
index 80511167f35bd4bcfb53cf424eb58ff4174a558b..731aa1193770f881f13665231dd8d4a47b494bb7 100644 (file)
@@ -591,7 +591,7 @@ int caif_shmcore_probe(struct shmdev_layer *pshm_dev)
                        (NR_TX_BUF * TX_BUF_SZ + NR_RX_BUF * RX_BUF_SZ)) {
 
                pr_warn("ERROR, Amount of available"
-                               " Phys. SHM cannot accomodate current SHM "
+                               " Phys. SHM cannot accommodate current SHM "
                                "driver configuration, Bailing out ...\n");
                free_netdev(pshm_dev->pshm_netdev);
                return -ENOMEM;
index 20da1996d354d563d8a2616276de477041b2368d..57e639373815e59cb00b36aaee7f1e5ea71a835c 100644 (file)
@@ -397,7 +397,7 @@ int cfspi_xmitlen(struct cfspi *cfspi)
        int pkts = 0;
 
        /*
-        * Decommit previously commited frames.
+        * Decommit previously committed frames.
         * skb_queue_splice_tail(&cfspi->chead,&cfspi->qhead)
         */
        while (skb_peek(&cfspi->chead)) {
index 1b9943a4edabb8f48678d7384ac2141d47264908..b009e03cda9e3c771269d79423d67b78db4b7331 100644 (file)
@@ -98,7 +98,7 @@ void cfspi_xfer(struct work_struct *work)
 
                        cfspi_dbg_state(cfspi, CFSPI_STATE_FETCH_PKT);
 
-                       /* Copy commited SPI frames after the SPI indication. */
+                       /* Copy committed SPI frames after the SPI indication. */
                        ptr = (u8 *) cfspi->xfer.va_tx;
                        ptr += SPI_IND_SZ;
                        len = cfspi_xmitfrm(cfspi, ptr, cfspi->tx_cpck_len);
@@ -158,7 +158,7 @@ void cfspi_xfer(struct work_struct *work)
 
                cfspi_dbg_state(cfspi, CFSPI_STATE_SIG_ACTIVE);
 
-               /* Signal that we are ready to recieve data. */
+               /* Signal that we are ready to receive data. */
                cfspi->dev->sig_xfer(true, cfspi->dev);
 
                cfspi_dbg_state(cfspi, CFSPI_STATE_WAIT_XFER_DONE);
index 57d2ffbbb433d9d665e1e77ccda13006eb993c70..74efb5a2ad4177dd93a991c8699c3b414163b443 100644 (file)
@@ -416,7 +416,7 @@ static netdev_tx_t at91_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        stats->tx_bytes += cf->can_dlc;
 
-       /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */
+       /* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */
        can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST);
 
        /*
@@ -782,7 +782,7 @@ static void at91_irq_tx(struct net_device *dev, u32 reg_sr)
                reg_msr = at91_read(priv, AT91_MSR(mb));
                if (likely(reg_msr & AT91_MSR_MRDY &&
                           ~reg_msr & AT91_MSR_MABT)) {
-                       /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */
+                       /* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */
                        can_get_echo_skb(dev, mb - AT91_MB_TX_FIRST);
                        dev->stats.tx_packets++;
                }
index 31552959aed7baa4895ac386d390b0a331abde6e..7e5cc0bd913da3f106d1feda23194c64b5a1d1d4 100644 (file)
@@ -813,7 +813,7 @@ static int c_can_handle_state_change(struct net_device *dev,
        struct sk_buff *skb;
        struct can_berr_counter bec;
 
-       /* propogate the error condition to the CAN stack */
+       /* propagate the error condition to the CAN stack */
        skb = alloc_can_err_skb(dev, &cf);
        if (unlikely(!skb))
                return 0;
@@ -887,7 +887,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
        if (lec_type == LEC_UNUSED || lec_type == LEC_NO_ERROR)
                return 0;
 
-       /* propogate the error condition to the CAN stack */
+       /* propagate the error condition to the CAN stack */
        skb = alloc_can_err_skb(dev, &cf);
        if (unlikely(!skb))
                return 0;
index 102b16c6cc97711543cfecacaa224799cf4e4d6b..587fba48cdd9594af60827a4626196ee1483a695 100644 (file)
@@ -274,7 +274,7 @@ static inline void ican3_set_page(struct ican3_dev *mod, unsigned int page)
  */
 
 /*
- * Recieve a message from the ICAN3 "old-style" firmware interface
+ * Receive a message from the ICAN3 "old-style" firmware interface
  *
  * LOCKING: must hold mod->lock
  *
@@ -1050,7 +1050,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg)
                complete(&mod->termination_comp);
                break;
        default:
-               dev_err(mod->dev, "recieved an unknown inquiry response\n");
+               dev_err(mod->dev, "received an unknown inquiry response\n");
                break;
        }
 }
@@ -1058,7 +1058,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg)
 static void ican3_handle_unknown_message(struct ican3_dev *mod,
                                        struct ican3_msg *msg)
 {
-       dev_warn(mod->dev, "recieved unknown message: spec 0x%.2x length %d\n",
+       dev_warn(mod->dev, "received unknown message: spec 0x%.2x length %d\n",
                           msg->spec, le16_to_cpu(msg->len));
 }
 
@@ -1113,7 +1113,7 @@ static bool ican3_txok(struct ican3_dev *mod)
 }
 
 /*
- * Recieve one CAN frame from the hardware
+ * Receive one CAN frame from the hardware
  *
  * CONTEXT: must be called from user context
  */
index 7513c4523ac4833d05e7e6efe3c4e07268704175..330140ee266dfe7d19e9ba4be07dd3a384b6605e 100644 (file)
@@ -931,7 +931,8 @@ static int mcp251x_open(struct net_device *net)
        priv->tx_len = 0;
 
        ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
-                         IRQF_TRIGGER_FALLING, DEVICE_NAME, priv);
+                 pdata->irq_flags ? pdata->irq_flags : IRQF_TRIGGER_FALLING,
+                 DEVICE_NAME, priv);
        if (ret) {
                dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
                if (pdata->transceiver_enable)
index c0a1bc5b14352288d5c73238031547e4afd9ee98..bd1d811c204f276cbf2aa74f07035cd8ae0875ef 100644 (file)
@@ -260,7 +260,7 @@ static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
 
        if (!ofdev->dev.of_match)
                return -EINVAL;
-       data = (struct mpc5xxx_can_data *)of_dev->dev.of_match->data;
+       data = (struct mpc5xxx_can_data *)ofdev->dev.of_match->data;
 
        base = of_iomap(np, 0);
        if (!base) {
index 74cd880c7e0676c2387f300a9a79b0b3f3e63ae0..92feac68b66e725fbe8865d688d0fdabeb8ec1ae 100644 (file)
@@ -246,7 +246,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
                out_be16(&regs->tx.idr3_2, can_id);
 
                can_id >>= 16;
-               /* EFF_FLAGS are inbetween the IDs :( */
+               /* EFF_FLAGS are between the IDs :( */
                can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0)
                         | MSCAN_EFF_FLAGS;
        } else {
index 0a8de01d52f7a1e2c1267701bb8d9e2437ad7fd6..a358ea9445a20b5cc37341502e9590dd9ab91253 100644 (file)
@@ -425,7 +425,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
                        cf->data[3] = ecc & ECC_SEG;
                        break;
                }
-               /* Error occured during transmission? */
+               /* Error occurred during transmission? */
                if ((ecc & ECC_DIR) == 0)
                        cf->data[2] |= CAN_ERR_PROT_TX;
        }
index 7ec9f4db3d528e0f7caedff53cf48428bba94500..afd7d85b69155a4259748b2c2648bc2739835d38 100644 (file)
@@ -22,7 +22,7 @@ struct softing_priv {
        struct softing *card;
        struct {
                int pending;
-               /* variables wich hold the circular buffer */
+               /* variables which hold the circular buffer */
                int echo_put;
                int echo_get;
        } tx;
index aeea9f9ff6e8ac4798feb8d664f2a774f5dc9219..7a70709d5608ca7be74be32c767fd6acc1893df2 100644 (file)
@@ -218,7 +218,7 @@ static int softing_handle_1(struct softing *card)
        ptr = buf;
        cmd = *ptr++;
        if (cmd == 0xff)
-               /* not quite usefull, probably the card has got out */
+               /* not quite useful, probably the card has got out */
                return 0;
        netdev = card->net[0];
        if (cmd & CMD_BUS2)
index 4d07f1ee7168acd8e736b08b63c4a455e0e56bc8..f7bbde9eb2cba34db7c27207648fc000320dc690 100644 (file)
@@ -663,7 +663,7 @@ static int ti_hecc_error(struct net_device *ndev, int int_status,
        struct can_frame *cf;
        struct sk_buff *skb;
 
-       /* propogate the error condition to the can stack */
+       /* propagate the error condition to the can stack */
        skb = alloc_can_err_skb(ndev, &cf);
        if (!skb) {
                if (printk_ratelimit())
index e75f1a87697266829a1f1c88e135823ff5d5c2f9..a72c7bfb40908bd31b01fcfebe38cf855364631c 100644 (file)
@@ -386,7 +386,7 @@ static void ems_usb_rx_err(struct ems_usb *dev, struct ems_cpc_msg *msg)
                        break;
                }
 
-               /* Error occured during transmission? */
+               /* Error occurred during transmission? */
                if ((ecc & SJA1000_ECC_DIR) == 0)
                        cf->data[2] |= CAN_ERR_PROT_TX;
 
index dc53c831ea956fac00f70895867918f688524ae5..eb8b0e6002826c85b71f447f4bdb1898bc16f53b 100644 (file)
@@ -284,7 +284,7 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
                                break;
                        }
 
-                       /* Error occured during transmission? */
+                       /* Error occurred during transmission? */
                        if (!(ecc & SJA1000_ECC_DIR))
                                cf->data[2] |= CAN_ERR_PROT_TX;
 
index 3437613f0454e97d00676766f6f7058abb5bbc5c..143a28c666af3ef1157f0a7779e50abad936a903 100644 (file)
@@ -51,7 +51,7 @@
  * TX has 4 queues. currently these queues are used in a round-robin
  * fashion for load balancing. They can also be used for QoS. for that
  * to work, however, QoS information needs to be exposed down to the driver
- * level so that subqueues get targetted to particular transmit rings.
+ * level so that subqueues get targeted to particular transmit rings.
  * alternatively, the queues can be configured via use of the all-purpose
  * ioctl.
  *
@@ -5165,7 +5165,7 @@ err_out_free_res:
        pci_release_regions(pdev);
 
 err_write_cacheline:
-       /* Try to restore it in case the error occured after we
+       /* Try to restore it in case the error occurred after we
         * set it.
         */
        pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, orig_cacheline_size);
index faf4746a0f3ebfeb2d904689fcbbd9780484765b..b361424d5f5799209d0c21fec9acf974aed2644e 100644 (file)
 #define    RX_DEBUG_INTR_WRITE_PTR_MASK    0xC0000000 /* interrupt write pointer
                                                         of the interrupt queue */
 
-/* flow control frames are emmitted using two PAUSE thresholds:
+/* flow control frames are emitted using two PAUSE thresholds:
  * XOFF PAUSE uses pause time value pre-programmed in the Send PAUSE MAC reg
  * XON PAUSE uses a pause time of 0. granularity of threshold is 64bytes.
  * PAUSE thresholds defined in terms of FIFO occupancy and may be translated
index 809047a99e96a983579bc7c6cf7c28ea6326fec8..71018a4fdf15150b30bcbaa91fde96aa5da2011a 100644 (file)
@@ -41,7 +41,7 @@ static void mdio_clear_bit(struct cphy *cphy, int reg, u32 bitval)
  *
  * PARAMS: cphy     - Pointer to PHY instance data.
  *
- * RETURN:  0 - Successfull reset.
+ * RETURN:  0 - Successful reset.
  *         -1 - Timeout.
  */
 static int mv88e1xxx_reset(struct cphy *cphy, int wait)
index 7dbb16d36fffffa775f8cf214f8767da72870b54..40c7b93ababc3d39d09e6f0ef9ba8e61af241955 100644 (file)
@@ -293,7 +293,7 @@ static int pm3393_enable_port(struct cmac *cmac, int which)
        pm3393_enable(cmac, which);
 
        /*
-        * XXX This should be done by the PHY and preferrably not at all.
+        * XXX This should be done by the PHY and preferably not at all.
         * The PHY doesn't give us link status indication on its own so have
         * the link management code query it instead.
         */
index f778b15ad3fd6c22478ae8d3d8e2067e8b7c9935..8754d44730427da47a5c8e48aa30229eacb7c974 100644 (file)
@@ -1662,7 +1662,7 @@ irqreturn_t t1_interrupt(int irq, void *data)
  * The code figures out how many entries the sk_buff will require in the
  * cmdQ and updates the cmdQ data structure with the state once the enqueue
  * has complete. Then, it doesn't access the global structure anymore, but
- * uses the corresponding fields on the stack. In conjuction with a spinlock
+ * uses the corresponding fields on the stack. In conjunction with a spinlock
  * around that code, we can make the function reentrant without holding the
  * lock when we actually enqueue (which might be expensive, especially on
  * architectures with IO MMUs).
index 106a590f0d9afae6dfff55b99ac83fc5bdc52369..b0cb388f5e123918310c2dc20e453814b1bcd0db 100644 (file)
@@ -566,7 +566,7 @@ static int mac_disable(struct cmac *mac, int which)
        for (i = 0; i <= 0x3a; ++i)
                vsc_write(mac->adapter, CRA(4, port, i), 0);
 
-       /* Clear sofware counters */
+       /* Clear software counters */
        memset(&mac->stats, 0, sizeof(struct cmac_statistics));
 
        return 0;
index 80c2feeefec5542266a4444c341a864c8a905cf9..9d267d3a6892b5290814962c21d1242f45d1debb 100644 (file)
@@ -1383,7 +1383,7 @@ e100_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        spin_lock(&np->lock); /* Preempt protection */
        switch (cmd) {
                /* The ioctls below should be considered obsolete but are */
-               /* still present for compatability with old scripts/apps  */
+               /* still present for compatibility with old scripts/apps  */
                case SET_ETH_SPEED_10:                  /* 10 Mbps */
                        e100_set_speed(dev, 10);
                        break;
index f9f6645b2e61341af8b3c2c37dd438c024c3b0c4..bfa2d56af1ee2aa68217022e8ba741994844e0bd 100644 (file)
@@ -199,7 +199,7 @@ static inline void refill_rspq(struct adapter *adapter,
  *     need_skb_unmap - does the platform need unmapping of sk_buffs?
  *
  *     Returns true if the platform needs sk_buff unmapping.  The compiler
- *     optimizes away unecessary code if this returns true.
+ *     optimizes away unnecessary code if this returns true.
  */
 static inline int need_skb_unmap(void)
 {
index d55db6b38e7b9a9297fdd2feec1e21deb02c0aae..c688421da9c708ae3f8f200edef09496a5a15c6f 100644 (file)
@@ -1386,11 +1386,11 @@ struct intr_info {
  *     @reg: the interrupt status register to process
  *     @mask: a mask to apply to the interrupt status
  *     @acts: table of interrupt actions
- *     @stats: statistics counters tracking interrupt occurences
+ *     @stats: statistics counters tracking interrupt occurrences
  *
  *     A table driven interrupt handler that applies a set of masks to an
  *     interrupt status word and performs the corresponding actions if the
- *     interrupts described by the mask have occured.  The actions include
+ *     interrupts described by the mask have occurred.  The actions include
  *     optionally printing a warning or alert message, and optionally
  *     incrementing a stat counter.  The table is terminated by an entry
  *     specifying mask 0.  Returns the number of fatal interrupt conditions.
@@ -2783,7 +2783,7 @@ static void init_mtus(unsigned short mtus[])
 {
        /*
         * See draft-mathis-plpmtud-00.txt for the values.  The min is 88 so
-        * it can accomodate max size TCP/IP headers when SACK and timestamps
+        * it can accommodate max size TCP/IP headers when SACK and timestamps
         * are enabled and still have at least 8 bytes of payload.
         */
        mtus[0] = 88;
index b9fd8a6f2cc498d627403d3c2d82a157c7ef016e..d1ec111aebd8117be5529fc945273e3daeb49f1b 100644 (file)
@@ -883,7 +883,7 @@ struct intr_info {
  *
  *     A table driven interrupt handler that applies a set of masks to an
  *     interrupt status word and performs the corresponding actions if the
- *     interrupts described by the mask have occured.  The actions include
+ *     interrupts described by the mask have occurred.  The actions include
  *     optionally emitting a warning or alert message.  The table is terminated
  *     by an entry specifying mask 0.  Returns the number of fatal interrupt
  *     conditions.
index 6aad64df4dcb84c01e9f777dfceee8fb58f2eab6..4661cbbd9bd910c96958fe17dc0463421df45396 100644 (file)
@@ -2738,7 +2738,7 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
        cfg_queues(adapter);
 
        /*
-        * Print a short notice on the existance and configuration of the new
+        * Print a short notice on the existence and configuration of the new
         * VF network device ...
         */
        for_each_port(adapter, pidx) {
index e0b3d1bc2fdf6f206e538517aa5f4fe203c140bb..bb65121f581c44e5f23b8ec2de22bb1e8d7cd4e4 100644 (file)
@@ -224,8 +224,8 @@ static inline bool is_buf_mapped(const struct rx_sw_desc *sdesc)
 /**
  *     need_skb_unmap - does the platform need unmapping of sk_buffs?
  *
- *     Returns true if the platfrom needs sk_buff unmapping.  The compiler
- *     optimizes away unecessary code if this returns true.
+ *     Returns true if the platform needs sk_buff unmapping.  The compiler
+ *     optimizes away unnecessary code if this returns true.
  */
 static inline int need_skb_unmap(void)
 {
@@ -267,7 +267,7 @@ static inline unsigned int fl_cap(const struct sge_fl *fl)
  *
  *     Tests specified Free List to see whether the number of buffers
  *     available to the hardware has falled below our "starvation"
- *     threshhold.
+ *     threshold.
  */
 static inline bool fl_starving(const struct sge_fl *fl)
 {
@@ -1149,7 +1149,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
        if (unlikely(credits < ETHTXQ_STOP_THRES)) {
                /*
                 * After we're done injecting the Work Request for this
-                * packet, we'll be below our "stop threshhold" so stop the TX
+                * packet, we'll be below our "stop threshold" so stop the TX
                 * Queue now and schedule a request for an SGE Egress Queue
                 * Update message.  The queue will get started later on when
                 * the firmware processes this Work Request and sends us an
index baca6bfcb089e7b403134f1bc4fdade1b7b03a69..807b6bb200eb28da5658b7cf8497dba7b8ab4821 100644 (file)
@@ -94,14 +94,14 @@ MODULE_VERSION(EMAC_MODULE_VERSION);
 static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
 
 /* Configuration items */
-#define EMAC_DEF_PASS_CRC              (0) /* Do not pass CRC upto frames */
+#define EMAC_DEF_PASS_CRC              (0) /* Do not pass CRC up to frames */
 #define EMAC_DEF_QOS_EN                        (0) /* EMAC proprietary QoS disabled */
 #define EMAC_DEF_NO_BUFF_CHAIN         (0) /* No buffer chain */
 #define EMAC_DEF_MACCTRL_FRAME_EN      (0) /* Discard Maccontrol frames */
 #define EMAC_DEF_SHORT_FRAME_EN                (0) /* Discard short frames */
 #define EMAC_DEF_ERROR_FRAME_EN                (0) /* Discard error frames */
-#define EMAC_DEF_PROM_EN               (0) /* Promiscous disabled */
-#define EMAC_DEF_PROM_CH               (0) /* Promiscous channel is 0 */
+#define EMAC_DEF_PROM_EN               (0) /* Promiscuous disabled */
+#define EMAC_DEF_PROM_CH               (0) /* Promiscuous channel is 0 */
 #define EMAC_DEF_BCAST_EN              (1) /* Broadcast enabled */
 #define EMAC_DEF_BCAST_CH              (0) /* Broadcast channel is 0 */
 #define EMAC_DEF_MCAST_EN              (1) /* Multicast enabled */
@@ -1013,7 +1013,7 @@ static void emac_rx_handler(void *token, int len, int status)
                return;
        }
 
-       /* recycle on recieve error */
+       /* recycle on receive error */
        if (status < 0) {
                ndev->stats.rx_errors++;
                goto recycle;
index f4d0922ec65b8ee6d7541b2ceee8e46cd85bb715..dd70738eb2f48cb245b3d843ccdde1151b902feb 100644 (file)
@@ -160,7 +160,7 @@ static int e1000_get_settings(struct net_device *netdev,
                                                   &adapter->link_duplex);
                ecmd->speed = adapter->link_speed;
 
-               /* unfortunatly FULL_DUPLEX != DUPLEX_FULL
+               /* unfortunately FULL_DUPLEX != DUPLEX_FULL
                 *          and HALF_DUPLEX != DUPLEX_HALF */
 
                if (adapter->link_duplex == FULL_DUPLEX)
index c70b23d522847fd6df184ac5f61d6329bf2ca12a..5c9a8403668b87e1bc711e654f3dad6be6b0854c 100644 (file)
@@ -1026,7 +1026,7 @@ extern void __iomem *ce4100_gbe_mdio_base_virt;
 
 #define E1000_KUMCTRLSTA 0x00034       /* MAC-PHY interface - RW */
 #define E1000_MDPHYA     0x0003C       /* PHY address - RW */
-#define E1000_MANC2H     0x05860       /* Managment Control To Host - RW */
+#define E1000_MANC2H     0x05860       /* Management Control To Host - RW */
 #define E1000_SW_FW_SYNC 0x05B5C       /* Software-Firmware Synchronization - RW */
 
 #define E1000_GCR       0x05B00        /* PCI-Ex Control */
index bfab14092d2c87b30f3e7bf3d1b72efd542b1d48..477e066a1cf04254d0d8dc7da636d1a8be6b1c02 100644 (file)
@@ -205,7 +205,7 @@ static struct pci_driver e1000_driver = {
        .probe    = e1000_probe,
        .remove   = __devexit_p(e1000_remove),
 #ifdef CONFIG_PM
-       /* Power Managment Hooks */
+       /* Power Management Hooks */
        .suspend  = e1000_suspend,
        .resume   = e1000_resume,
 #endif
index a39d4a4d871c2aac2c3fd2a662924b44ed9eb011..506a0a0043b393bb9ccb1e0c232650f01fd545ba 100644 (file)
@@ -4886,7 +4886,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
        if (skb->protocol == htons(ETH_P_IP))
                tx_flags |= E1000_TX_FLAGS_IPV4;
 
-       /* if count is 0 then mapping error has occured */
+       /* if count is 0 then mapping error has occurred */
        count = e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss);
        if (count) {
                e1000_tx_queue(adapter, tx_flags, count);
index f75d3144b8a508e9668c48be6592eff49fbb7e3f..53c0f04b1b2322ccee9c53e19e71f5321e81cb8a 100644 (file)
@@ -3040,11 +3040,14 @@ static void ehea_rereg_mrs(void)
 
                                        if (dev->flags & IFF_UP) {
                                                mutex_lock(&port->port_lock);
-                                               port_napi_enable(port);
                                                ret = ehea_restart_qps(dev);
-                                               check_sqs(port);
-                                               if (!ret)
+                                               if (!ret) {
+                                                       check_sqs(port);
+                                                       port_napi_enable(port);
                                                        netif_wake_queue(dev);
+                                               } else {
+                                                       netdev_err(dev, "Unable to restart QPS\n");
+                                               }
                                                mutex_unlock(&port->port_lock);
                                        }
                                }
index 1a0b20969f8028a912d4f3ee78c60fdafb32a178..25b41de49f0eef9050ed640f79dbd9798e93588a 100644 (file)
 /* maximum ethernet frame length */
 #define MAX_FRAMELEN           1518
 
-/* Prefered half duplex: LEDA: Link status LEDB: Rx/Tx activity */
+/* Preferred half duplex: LEDA: Link status LEDB: Rx/Tx activity */
 #define ENC28J60_LAMPS_MODE    0x3476
 
 #endif
index fb717be511f6023bcee869adf410523b0583632d..12d28e9d0cb7b77df1a03a26ebd1ab68b03dd9d2 100644 (file)
@@ -13,7 +13,7 @@
    This driver supports following cards :
        - ICL EtherTeam 16i
        - ICL EtherTeam 32 EISA
-         (Uses true 32 bit transfers rather than 16i compability mode)
+         (Uses true 32 bit transfers rather than 16i compatibility mode)
 
    Example Module usage:
         insmod eth16i.o io=0x2a0 mediatype=bnc
index db0290f05bdf9ec00e6a16b07832de60204a2813..a83dd312c3ac1ae07d68651d9b1d4b0c54635551 100644 (file)
@@ -542,7 +542,7 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id)
 
        /* Figure out what triggered the interrupt...
         * The tricky bit here is that the interrupt source bits get
-        * set in INT_SOURCE for an event irregardless of whether that
+        * set in INT_SOURCE for an event regardless of whether that
         * event is masked or not.  Thus, in order to figure out what
         * triggered the interrupt, we need to remove the sources
         * for all events that are currently masked.  This behaviour
index ace318df4c8d7fa7abb00eb7427c54edd3dfadc1..8b2c6d797e6ddee6fe6dd165a22ba2ea9a8e8567 100644 (file)
@@ -97,11 +97,11 @@ struct bufdesc {
  *     The following definitions courtesy of commproc.h, which where
  *     Copyright (c) 1997 Dan Malek (dmalek@jlc.net).
  */
-#define BD_SC_EMPTY     ((ushort)0x8000)        /* Recieve is empty */
+#define BD_SC_EMPTY     ((ushort)0x8000)        /* Receive is empty */
 #define BD_SC_READY     ((ushort)0x8000)        /* Transmit is ready */
 #define BD_SC_WRAP      ((ushort)0x2000)        /* Last buffer descriptor */
 #define BD_SC_INTRPT    ((ushort)0x1000)        /* Interrupt on change */
-#define BD_SC_CM        ((ushort)0x0200)        /* Continous mode */
+#define BD_SC_CM        ((ushort)0x0200)        /* Continuous mode */
 #define BD_SC_ID        ((ushort)0x0100)        /* Rec'd too many idles */
 #define BD_SC_P         ((ushort)0x0100)        /* xmt preamble */
 #define BD_SC_BR        ((ushort)0x0020)        /* Break received */
index 7b92897ca66b4ccc36ee66ebcd5e1493612ccf10..d5ab4dad505153c3bf200aa5ba35a82b8588c9ec 100644 (file)
@@ -440,7 +440,7 @@ union ring_type {
 #define NV_RX3_VLAN_TAG_PRESENT (1<<16)
 #define NV_RX3_VLAN_TAG_MASK   (0x0000FFFF)
 
-/* Miscelaneous hardware related defines: */
+/* Miscellaneous hardware related defines: */
 #define NV_PCI_REGSZ_VER1      0x270
 #define NV_PCI_REGSZ_VER2      0x2d4
 #define NV_PCI_REGSZ_VER3      0x604
@@ -1488,7 +1488,7 @@ static int phy_init(struct net_device *dev)
                }
        }
 
-       /* some phys clear out pause advertisment on reset, set it back */
+       /* some phys clear out pause advertisement on reset, set it back */
        mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg);
 
        /* restart auto negotiation, power down phy */
@@ -2535,7 +2535,7 @@ static void nv_tx_timeout(struct net_device *dev)
        else
                nv_tx_done_optimized(dev, np->tx_ring_size);
 
-       /* save current HW postion */
+       /* save current HW position */
        if (np->tx_change_owner)
                put_tx.ex = np->tx_change_owner->first_tx_desc;
        else
@@ -4053,7 +4053,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
 
        } else if (ecmd->autoneg == AUTONEG_DISABLE) {
                /* Note: autonegotiation disable, speed 1000 intentionally
-                * forbidden - noone should need that. */
+                * forbidden - no one should need that. */
 
                if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100)
                        return -EINVAL;
@@ -4103,7 +4103,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
                        adv |= ADVERTISE_100HALF;
                if (ecmd->advertising & ADVERTISED_100baseT_Full)
                        adv |= ADVERTISE_100FULL;
-               if (np->pause_flags & NV_PAUSEFRAME_RX_REQ)  /* for rx we set both advertisments but disable tx pause */
+               if (np->pause_flags & NV_PAUSEFRAME_RX_REQ)  /* for rx we set both advertisements but disable tx pause */
                        adv |=  ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
                if (np->pause_flags & NV_PAUSEFRAME_TX_REQ)
                        adv |=  ADVERTISE_PAUSE_ASYM;
@@ -4148,7 +4148,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
                if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_FULL)
                        adv |= ADVERTISE_100FULL;
                np->pause_flags &= ~(NV_PAUSEFRAME_AUTONEG|NV_PAUSEFRAME_RX_ENABLE|NV_PAUSEFRAME_TX_ENABLE);
-               if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) {/* for rx we set both advertisments but disable tx pause */
+               if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) {/* for rx we set both advertisements but disable tx pause */
                        adv |=  ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
                        np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE;
                }
@@ -4449,7 +4449,7 @@ static int nv_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam*
 
                adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ);
                adv &= ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
-               if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisments but disable tx pause */
+               if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisements but disable tx pause */
                        adv |=  ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
                if (np->pause_flags & NV_PAUSEFRAME_TX_REQ)
                        adv |=  ADVERTISE_PAUSE_ASYM;
index 61035fc5599b1bd552bf05e1a77289bd24bee53f..b9fbc83d64a7faa09acfdc2537427bda5f4c6f14 100644 (file)
@@ -226,8 +226,8 @@ static void set_multicast_finish(struct net_device *dev)
        }
 
        FC(fecp, r_cntrl, FEC_RCNTRL_PROM);
-       FW(fecp, hash_table_high, fep->fec.hthi);
-       FW(fecp, hash_table_low, fep->fec.htlo);
+       FW(fecp, grp_hash_table_high, fep->fec.hthi);
+       FW(fecp, grp_hash_table_low, fep->fec.htlo);
 }
 
 static void set_multicast_list(struct net_device *dev)
@@ -273,8 +273,8 @@ static void restart(struct net_device *dev)
        /*
         * Reset all multicast.
         */
-       FW(fecp, hash_table_high, fep->fec.hthi);
-       FW(fecp, hash_table_low, fep->fec.htlo);
+       FW(fecp, grp_hash_table_high, fep->fec.hthi);
+       FW(fecp, grp_hash_table_low, fep->fec.htlo);
 
        /*
         * Set maximum receive buffer size.
index a31661948c420e0d467c7e8b7bb4ecae4c078de0..9bd7746cbfcfd1fc6b294cbdb2f499e7f21d5e96 100644 (file)
@@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
                         * that hardware reset completed (what the f*ck).
                         * We still need to wait for a while.
                         */
-                       usleep_range(500, 1000);
+                       udelay(500);
                        return 0;
                }
 
-               usleep_range(1000, 10000);
+               udelay(1000);
        }
 
        netdev_err(netdev, "software reset failed\n");
@@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg)
                if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
                        return phycr & FTMAC100_PHYCR_MIIRDATA;
 
-               usleep_range(100, 1000);
+               udelay(100);
        }
 
        netdev_err(netdev, "mdio read timed out\n");
@@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg,
                if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
                        return;
 
-               usleep_range(100, 1000);
+               udelay(100);
        }
 
        netdev_err(netdev, "mdio write timed out\n");
index ec5d595ce2e265a342ed2c92cb479e202a239e37..b2fe7edefad96206f013d2c64b431c241ae72809 100644 (file)
@@ -1043,7 +1043,7 @@ enum gfar_errata {
 };
 
 /* Struct stolen almost completely (and shamelessly) from the FCC enet source
- * (Ok, that's not so true anymore, but there is a family resemblence)
+ * (Ok, that's not so true anymore, but there is a family resemblance)
  * The GFAR buffer descriptors track the ring buffers.  The rx_bd_base
  * and tx_bd_base always point to the currently available buffer.
  * The dirty_tx tracks the current buffer that is being sent by the
index 9def86704a91033ee14e8f1354488de2c63beb1b..104096070026fe3b65184b5f3ccd7a14df5c4a53 100644 (file)
@@ -3,7 +3,7 @@
 #
 #
 # 19971130     Moved the amateur radio related network drivers from 
-#              drivers/net/ to drivers/hamradio for easier maintainance.
+#              drivers/net/ to drivers/hamradio for easier maintenance.
 #               Joerg Reuter DL1BKE <jreuter@yaina.de>
 #
 # 20000806     Rewritten to use lists instead of if-statements.
index 7d9ced0738c545e47cd3c5af8495f6544ade1e8d..96a98d2ff1513e3c5f0b682ed8a5a0d5c3ba9118 100644 (file)
@@ -30,7 +30,7 @@
  *   0.1 F1OAT 07.06.98  Add timer polling routine for channel arbitration
  *   0.2 F6FBB 08.06.98  Added delay after FPGA programming
  *   0.3 F6FBB 29.07.98  Delayed PTT implementation for dupmode=2
- *   0.4 F6FBB 30.07.98  Added TxTail, Slottime and Persistance
+ *   0.4 F6FBB 30.07.98  Added TxTail, Slottime and Persistence
  *   0.5 F6FBB 01.08.98  Shared IRQs, /proc/net and network statistics
  *   0.6 F6FBB 25.08.98  Added 1200Bds format
  *   0.7 F6FBB 12.09.98  Added to the kernel configuration
index 8e2c4601b5f5c3dd2c6042c31c9dde21cd619fbd..8e10d2f6a5adc8340d239c729e835fb0122b3acd 100644 (file)
@@ -180,8 +180,8 @@ struct hp100_private {
 
        u_int *page_vaddr_algn; /* Aligned virtual address of allocated page */
        u_long whatever_offset; /* Offset to bus/phys/dma address */
-       int rxrcommit;          /* # Rx PDLs commited to adapter */
-       int txrcommit;          /* # Tx PDLs commited to adapter */
+       int rxrcommit;          /* # Rx PDLs committed to adapter */
+       int txrcommit;          /* # Tx PDLs committed to adapter */
 };
 
 /*
@@ -716,7 +716,7 @@ static int __devinit hp100_probe1(struct net_device *dev, int ioaddr,
         * implemented/tested only with the lassen chip anyway... */
        if (lp->mode == 1) {    /* busmaster */
                dma_addr_t page_baddr;
-               /* Get physically continous memory for TX & RX PDLs    */
+               /* Get physically continuous memory for TX & RX PDLs    */
                /* Conversion to new PCI API :
                 * Pages are always aligned and zeroed, no need to it ourself.
                 * Doc says should be OK for EISA bus as well - Jean II */
@@ -1596,7 +1596,7 @@ drop:
 
 /* clean_txring checks if packets have been sent by the card by reading
  * the TX_PDL register from the performance page and comparing it to the
- * number of commited packets. It then frees the skb's of the packets that
+ * number of committed packets. It then frees the skb's of the packets that
  * obviously have been sent to the network.
  *
  * Needs the PERFORMANCE page selected.
@@ -1617,7 +1617,7 @@ static void hp100_clean_txring(struct net_device *dev)
 
 #ifdef HP100_DEBUG
        if (donecount > MAX_TX_PDL)
-               printk("hp100: %s: Warning: More PDLs transmitted than commited to card???\n", dev->name);
+               printk("hp100: %s: Warning: More PDLs transmitted than committed to card???\n", dev->name);
 #endif
 
        for (; 0 != donecount; donecount--) {
@@ -1765,7 +1765,7 @@ drop:
  * Receive Function (Non-Busmaster mode)
  * Called when an "Receive Packet" interrupt occurs, i.e. the receive
  * packet counter is non-zero.
- * For non-busmaster, this function does the whole work of transfering
+ * For non-busmaster, this function does the whole work of transferring
  * the packet to the host memory and then up to higher layers via skb
  * and netif_rx.
  */
@@ -1892,7 +1892,7 @@ static void hp100_rx_bm(struct net_device *dev)
                /* RX_PKT_CNT states how many PDLs are currently formatted and available to
                 * the cards BM engine */
        if ((hp100_inw(RX_PKT_CNT) & 0x00ff) >= lp->rxrcommit) {
-               printk("hp100: %s: More packets received than commited? RX_PKT_CNT=0x%x, commit=0x%x\n",
+               printk("hp100: %s: More packets received than committed? RX_PKT_CNT=0x%x, commit=0x%x\n",
                                     dev->name, hp100_inw(RX_PKT_CNT) & 0x00ff,
                                     lp->rxrcommit);
                return;
@@ -2256,7 +2256,7 @@ static irqreturn_t hp100_interrupt(int irq, void *dev_id)
                if (lp->mode != 1)      /* non busmaster */
                        hp100_rx(dev);
                else if (!(val & HP100_RX_PDL_FILL_COMPL)) {
-                       /* Shouldnt happen - maybe we missed a RX_PDL_FILL Interrupt?  */
+                       /* Shouldn't happen - maybe we missed a RX_PDL_FILL Interrupt?  */
                        hp100_rx_bm(dev);
                }
        }
index e6ca128a5564ea5cb684f5e8d08026b15cf468e2..b60e96fe38b419a2468d9baf2df45bbce1a08ff2 100644 (file)
 #define HP100_REG_MAC_CFG_2    0x0d    /* RW: (8) Misc MAC functions        */
 #define HP100_REG_MAC_CFG_3     0x0e   /* RW: (8) Misc MAC functions */
 #define HP100_REG_MAC_CFG_4     0x0f   /* R:  (8) Misc MAC states */
-#define HP100_REG_DROPPED      0x10    /* R:  (16),11:0 Pkts cant fit in mem */
+#define HP100_REG_DROPPED      0x10    /* R:  (16),11:0 Pkts can't fit in mem */
 #define HP100_REG_CRC          0x12    /* R:  (8) Pkts with CRC             */
 #define HP100_REG_ABORT                0x13    /* R:  (8) Aborted Tx pkts           */
 #define HP100_REG_TRAIN_REQUEST 0x14   /* RW: (16) Endnode MAC register. */
index 8ead6a96abaa1203474c67cd644517ef4c559a30..5f51bf7c9dc518105f9f298e27a1d923521aa01d 100644 (file)
@@ -60,7 +60,7 @@ void tah_reset(struct platform_device *ofdev)
                printk(KERN_ERR "%s: reset timeout\n",
                        ofdev->dev.of_node->full_name);
 
-       /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */
+       /* 10KB TAH TX FIFO accommodates the max MTU of 9000 */
        out_be32(&p->mr,
                 TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP |
                 TAH_MR_DIG);
index 94d9969ec0bbfa697c8d2e2487d58fcd032e51aa..8ff68ae6b5208de420a8ff8a2d7718d36f0c4da9 100644 (file)
@@ -53,7 +53,7 @@ History:
        still work with 2.0.x....
   Jan 28th, 2000
        in Linux 2.2.13, the version.h file mysteriously didn't get
-       included.  Added a workaround for this.  Futhermore, it now
+       included.  Added a workaround for this.  Furthermore, it now
        not only compiles as a modules ;-)
   Jan 30th, 2000
        newer kernels automatically probe more than one board, so the
@@ -481,7 +481,7 @@ static void InitBoard(struct net_device *dev)
        if ((dev->flags & IFF_ALLMULTI) || netdev_mc_count(dev) > camcnt)
                rcrval |= RCREG_AMC;
 
-       /* promiscous mode ? */
+       /* promiscuous mode ? */
 
        if (dev->flags & IFF_PROMISC)
                rcrval |= RCREG_PRO;
index aa3ddbdee4bbc76391d8f6be203d5f576ddf5d1a..accd5efc9c8a96b3e5c481675356babd0532abb8 100644 (file)
@@ -90,7 +90,7 @@ typedef struct {
 #define RCREG_ERR        0x8000        /* accept damaged and collided pkts */
 #define RCREG_RNT        0x4000        /* accept packets that are < 64     */
 #define RCREG_BRD        0x2000        /* accept broadcasts                */
-#define RCREG_PRO        0x1000        /* promiscous mode                  */
+#define RCREG_PRO        0x1000        /* promiscuous mode                  */
 #define RCREG_AMC        0x0800        /* accept all multicasts            */
 #define RCREG_LB_NONE    0x0000        /* no loopback                      */
 #define RCREG_LB_MAC     0x0200        /* MAC loopback                     */
index 90c5e01e9235875ba6b954e31ab3a52cbcee9fb1..ce8255fc3c52893ab0261ef6993e579deb3edfb8 100644 (file)
@@ -181,7 +181,7 @@ s32 igb_vfta_set(struct e1000_hw *hw, u32 vid, bool add)
  *  address and must override the actual permanent MAC address.  If an
  *  alternate MAC address is fopund it is saved in the hw struct and
  *  prgrammed into RAR0 and the cuntion returns success, otherwise the
- *  fucntion returns an error.
+ *  function returns an error.
  **/
 s32 igb_check_alt_mac_addr(struct e1000_hw *hw)
 {
@@ -982,7 +982,7 @@ out:
 }
 
 /**
- *  igb_get_speed_and_duplex_copper - Retreive current speed/duplex
+ *  igb_get_speed_and_duplex_copper - Retrieve current speed/duplex
  *  @hw: pointer to the HW structure
  *  @speed: stores the current speed
  *  @duplex: stores the current duplex
index 6694bf3e5ad9a5da5f8a67b37b0639b271c06ff0..d639706eb3f681a83f1c3f202350bd9e6602350d 100644 (file)
@@ -1421,7 +1421,7 @@ out:
 }
 
 /**
- *  igb_check_downshift - Checks whether a downshift in speed occured
+ *  igb_check_downshift - Checks whether a downshift in speed occurred
  *  @hw: pointer to the HW structure
  *
  *  Success returns 0, Failure returns 1
index 3d850af0cddae1c4ed510e5849647030e0d90df3..0dfd1b93829e5933b76d64ac3eb1a5c08b32cef5 100644 (file)
@@ -200,7 +200,7 @@ static struct pci_driver igb_driver = {
        .probe    = igb_probe,
        .remove   = __devexit_p(igb_remove),
 #ifdef CONFIG_PM
-       /* Power Managment Hooks */
+       /* Power Management Hooks */
        .suspend  = igb_suspend,
        .resume   = igb_resume,
 #endif
@@ -2292,7 +2292,7 @@ static void igb_init_hw_timer(struct igb_adapter *adapter)
                /**
                 * Scale the NIC clock cycle by a large factor so that
                 * relatively small clock corrections can be added or
-                * substracted at each clock tick. The drawbacks of a large
+                * subtracted at each clock tick. The drawbacks of a large
                 * factor are a) that the clock register overflows more quickly
                 * (not such a big deal) and b) that the increment per tick has
                 * to fit into 24 bits.  As a result we need to use a shift of
@@ -3409,7 +3409,7 @@ static void igb_set_rx_mode(struct net_device *netdev)
                } else {
                        /*
                         * Write addresses to the MTA, if the attempt fails
-                        * then we should just turn on promiscous mode so
+                        * then we should just turn on promiscuous mode so
                         * that we can at least receive multicast traffic
                         */
                        count = igb_write_mc_addr_list(netdev);
@@ -3423,7 +3423,7 @@ static void igb_set_rx_mode(struct net_device *netdev)
                /*
                 * Write addresses to available RAR registers, if there is not
                 * sufficient space to store all the addresses then enable
-                * unicast promiscous mode
+                * unicast promiscuous mode
                 */
                count = igb_write_uc_addr_list(netdev);
                if (count < 0) {
@@ -4317,7 +4317,7 @@ netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *skb,
 
        /*
         * count reflects descriptors mapped, if 0 or less then mapping error
-        * has occured and we need to rewind the descriptor queue
+        * has occurred and we need to rewind the descriptor queue
         */
        count = igb_tx_map_adv(tx_ring, skb, first);
        if (!count) {
@@ -5352,8 +5352,8 @@ static void igb_msg_task(struct igb_adapter *adapter)
  *  The unicast table address is a register array of 32-bit registers.
  *  The table is meant to be used in a way similar to how the MTA is used
  *  however due to certain limitations in the hardware it is necessary to
- *  set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscous
- *  enable bit to allow vlan tag stripping when promiscous mode is enabled
+ *  set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscuous
+ *  enable bit to allow vlan tag stripping when promiscuous mode is enabled
  **/
 static void igb_set_uta(struct igb_adapter *adapter)
 {
index 6ccc32fd7338e06d7d2b3ef3d1d3c10ea7b21de4..1d04ca6fdaeac1e952e514367e6d69a144c9cac3 100644 (file)
@@ -2227,7 +2227,7 @@ static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
 
        /*
         * count reflects descriptors mapped, if 0 then mapping error
-        * has occured and we need to rewind the descriptor queue
+        * has occurred and we need to rewind the descriptor queue
         */
        count = igbvf_tx_map_adv(adapter, tx_ring, skb, first);
 
index a5b0f0e194bb729a71d8b1326a2eeedb34fc0310..58cd3202b48c0860088d5f21757a3b072b94d1ea 100644 (file)
@@ -486,14 +486,14 @@ static int ipg_config_autoneg(struct net_device *dev)
        phyctrl = ipg_r8(PHY_CTRL);
        mac_ctrl_val = ipg_r32(MAC_CTRL);
 
-       /* Set flags for use in resolving auto-negotation, assuming
+       /* Set flags for use in resolving auto-negotiation, assuming
         * non-1000Mbps, half duplex, no flow control.
         */
        fullduplex = 0;
        txflowcontrol = 0;
        rxflowcontrol = 0;
 
-       /* To accomodate a problem in 10Mbps operation,
+       /* To accommodate a problem in 10Mbps operation,
         * set a global flag if PHY running in 10Mbps mode.
         */
        sp->tenmbpsmode = 0;
@@ -846,7 +846,7 @@ static void init_tfdlist(struct net_device *dev)
 }
 
 /*
- * Free all transmit buffers which have already been transfered
+ * Free all transmit buffers which have already been transferred
  * via DMA to the IPG.
  */
 static void ipg_nic_txfree(struct net_device *dev)
@@ -920,7 +920,7 @@ static void ipg_tx_timeout(struct net_device *dev)
 
 /*
  * For TxComplete interrupts, free all transmit
- * buffers which have already been transfered via DMA
+ * buffers which have already been transferred via DMA
  * to the IPG.
  */
 static void ipg_nic_txcleanup(struct net_device *dev)
@@ -1141,13 +1141,13 @@ static int ipg_nic_rx_check_error(struct net_device *dev)
 
                /* Increment detailed receive error statistics. */
                if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) {
-                       IPG_DEBUG_MSG("RX FIFO overrun occured.\n");
+                       IPG_DEBUG_MSG("RX FIFO overrun occurred.\n");
 
                        sp->stats.rx_fifo_errors++;
                }
 
                if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) {
-                       IPG_DEBUG_MSG("RX runt occured.\n");
+                       IPG_DEBUG_MSG("RX runt occurred.\n");
                        sp->stats.rx_length_errors++;
                }
 
@@ -1156,7 +1156,7 @@ static int ipg_nic_rx_check_error(struct net_device *dev)
                 */
 
                if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) {
-                       IPG_DEBUG_MSG("RX alignment error occured.\n");
+                       IPG_DEBUG_MSG("RX alignment error occurred.\n");
                        sp->stats.rx_frame_errors++;
                }
 
@@ -1421,12 +1421,12 @@ static int ipg_nic_rx(struct net_device *dev)
 
                        /* Increment detailed receive error statistics. */
                        if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFIFOOVERRUN) {
-                               IPG_DEBUG_MSG("RX FIFO overrun occured.\n");
+                               IPG_DEBUG_MSG("RX FIFO overrun occurred.\n");
                                sp->stats.rx_fifo_errors++;
                        }
 
                        if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXRUNTFRAME) {
-                               IPG_DEBUG_MSG("RX runt occured.\n");
+                               IPG_DEBUG_MSG("RX runt occurred.\n");
                                sp->stats.rx_length_errors++;
                        }
 
@@ -1436,7 +1436,7 @@ static int ipg_nic_rx(struct net_device *dev)
                         */
 
                        if (le64_to_cpu(rxfd->rfs) & IPG_RFS_RXALIGNMENTERROR) {
-                               IPG_DEBUG_MSG("RX alignment error occured.\n");
+                               IPG_DEBUG_MSG("RX alignment error occurred.\n");
                                sp->stats.rx_frame_errors++;
                        }
 
@@ -1460,7 +1460,7 @@ static int ipg_nic_rx(struct net_device *dev)
                        }
                } else {
 
-                       /* Adjust the new buffer length to accomodate the size
+                       /* Adjust the new buffer length to accommodate the size
                         * of the received frame.
                         */
                        skb_put(skb, framelen);
@@ -1488,7 +1488,7 @@ static int ipg_nic_rx(struct net_device *dev)
        }
 
        /*
-        * If there are more RFDs to proces and the allocated amount of RFD
+        * If there are more RFDs to process and the allocated amount of RFD
         * processing time has expired, assert Interrupt Requested to make
         * sure we come back to process the remaining RFDs.
         */
@@ -1886,7 +1886,7 @@ static netdev_tx_t ipg_nic_hard_start_xmit(struct sk_buff *skb,
        /* Request TxComplete interrupts at an interval defined
         * by the constant IPG_FRAMESBETWEENTXCOMPLETES.
         * Request TxComplete interrupt for every frame
-        * if in 10Mbps mode to accomodate problem with 10Mbps
+        * if in 10Mbps mode to accommodate problem with 10Mbps
         * processing.
         */
        if (sp->tenmbpsmode)
@@ -2098,7 +2098,7 @@ static int ipg_nic_change_mtu(struct net_device *dev, int new_mtu)
        struct ipg_nic_private *sp = netdev_priv(dev);
        int err;
 
-       /* Function to accomodate changes to Maximum Transfer Unit
+       /* Function to accommodate changes to Maximum Transfer Unit
         * (or MTU) of IPG NIC. Cannot use default function since
         * the default will not allow for MTU > 1500 bytes.
         */
index 92631eb6f6a308a53bb6ee5a1b7a8e3f4c70632d..872183f29ec49fd03a267c100e138cacfeafa19e 100644 (file)
@@ -76,7 +76,7 @@ static int  ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info);
 static int  ali_ircc_init_43(ali_chip_t *chip, chipio_t *info);
 static int  ali_ircc_init_53(ali_chip_t *chip, chipio_t *info);
 
-/* These are the currently known ALi sourth-bridge chipsets, the only one difference
+/* These are the currently known ALi south-bridge chipsets, the only one difference
  * is that M1543C doesn't support HP HDSL-3600
  */
 static ali_chip_t chips[] =
@@ -1108,7 +1108,7 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
        outb(lcr,                 iobase+UART_LCR); /* Set 8N1  */
        outb(fcr,                 iobase+UART_FCR); /* Enable FIFO's */
 
-       /* without this, the conection will be broken after come back from FIR speed,
+       /* without this, the connection will be broken after come back from FIR speed,
           but with this, the SIR connection is harder to established */
        outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR);
        
index f81d944fc3608a23d64cba5ebfb5e26261adad80..174cafad2c1ac27b9fb78f97bc192dfb5532046a 100644 (file)
@@ -56,7 +56,7 @@
 /* do_probe module parameter Enable this code */
 /* Probe code is very useful for understanding how the hardware works */
 /* Use it with various combinations of TT_LEN, RX_LEN */
-/* Strongly recomended, disable if the probe fails on your machine */
+/* Strongly recommended, disable if the probe fails on your machine */
 /* and send me <james@fishsoup.dhs.org> the output of dmesg */
 #define USE_PROBE 1
 #undef  USE_PROBE
index 77fcf4459161e0f194d2ba0082d5874cb58d51e7..d92d54e839b97658699447c979c59b5470ab00d3 100644 (file)
@@ -51,7 +51,7 @@
 
 /* The documentation for this chip is allegedly released         */
 /* However I have not seen it, not have I managed to contact     */
-/* anyone who has. HOWEVER the chip bears a striking resemblence */
+/* anyone who has. HOWEVER the chip bears a striking resemblance */
 /* to the IrDA controller in the Toshiba RISC TMPR3922 chip      */
 /* the documentation for this is freely available at             */
 /* http://www.madingley.org/james/resources/toshoboe/TMPR3922.pdf */
index a31b8fa8aaa991e3aa70e7d74223036600af84c6..96cdecff349d952715f63a9dabc49c1db9722298 100644 (file)
@@ -38,7 +38,7 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed);
 /* Control register 1 */
 #define GIRBIL_TXEN    0x01 /* Enable transmitter */
 #define GIRBIL_RXEN    0x02 /* Enable receiver */
-#define GIRBIL_ECAN    0x04 /* Cancel self emmited data */
+#define GIRBIL_ECAN    0x04 /* Cancel self emitted data */
 #define GIRBIL_ECHO    0x08 /* Echo control characters */
 
 /* LED Current Register (0x2) */
index e4ea61944c22937a5a1e3309242467d0f7b4edc9..d9267cb98a236f739e8947bc567627fb44a544f8 100644 (file)
@@ -370,7 +370,7 @@ static void speed_bulk_callback(struct urb *urb)
        /* urb is now available */
        //urb->status = 0; -> tested above
 
-       /* New speed and xbof is now commited in hardware */
+       /* New speed and xbof is now committed in hardware */
        self->new_speed = -1;
        self->new_xbofs = -1;
 
@@ -602,7 +602,7 @@ static void write_bulk_callback(struct urb *urb)
                        IRDA_DEBUG(1, "%s(), Changing speed now...\n", __func__);
                        irda_usb_change_speed_xbofs(self);
                } else {
-                       /* New speed and xbof is now commited in hardware */
+                       /* New speed and xbof is now committed in hardware */
                        self->new_speed = -1;
                        self->new_xbofs = -1;
                        /* Done, waiting for next packet */
index cc821de2c9669bb5c9e17bda80e3d98372c9d9f0..be52bfed66a9c2246bb185fd2ca4509b0762ab05 100644 (file)
@@ -588,7 +588,7 @@ static int mcs_speed_change(struct mcs_cb *mcs)
 
        mcs_get_reg(mcs, MCS_MODE_REG, &rval);
 
-       /* MINRXPW values recomended by MosChip */
+       /* MINRXPW values recommended by MosChip */
        if (mcs->new_speed <= 115200) {
                rval &= ~MCS_FIR;
 
@@ -799,7 +799,7 @@ static void mcs_receive_irq(struct urb *urb)
        ret = usb_submit_urb(urb, GFP_ATOMIC);
 }
 
-/* Transmit callback funtion.  */
+/* Transmit callback function.  */
 static void mcs_send_irq(struct urb *urb)
 {
        struct mcs_cb *mcs = urb->context;
@@ -811,7 +811,7 @@ static void mcs_send_irq(struct urb *urb)
                netif_wake_queue(ndev);
 }
 
-/* Transmit callback funtion.  */
+/* Transmit callback function.  */
 static netdev_tx_t mcs_hard_xmit(struct sk_buff *skb,
                                       struct net_device *ndev)
 {
index 559fe854d76d2277d82530af9e1bd368121c6533..7a963d4e6d06608abbe47b4254b50ff74662b06c 100644 (file)
@@ -716,7 +716,7 @@ static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info)
        int reg, com = 0;
        int pnp;
 
-       /* Read funtion enable register (FER) */
+       /* Read function enable register (FER) */
        outb(CFG_338_FER, cfg_base);
        reg = inb(cfg_base+1);
 
index 7ba7738759b951b603ea7e0d4ee7ad198754ad9a..32fa58211fadc19f0c9df01a9f8c544f3ea963a3 100644 (file)
 #define LSR_TXRDY       0x20 /* Transmitter ready */
 #define LSR_TXEMP       0x40 /* Transmitter empty */
 
-#define ASCR            0x07 /* Auxillary Status and Control Register */
+#define ASCR            0x07 /* Auxiliary Status and Control Register */
 #define ASCR_RXF_TOUT   0x01 /* Rx FIFO timeout */
 #define ASCR_FEND_INF   0x02 /* Frame end bytes in rx FIFO */
 #define ASCR_S_EOT      0x04 /* Set end of transmission */
index c192c31e4c5c3792a2113afac14b28ca8748c1c0..001ed0a255f646f4b93c5872ca2b10a7e200c6d6 100644 (file)
@@ -40,7 +40,7 @@
 
 #define ICCR0_AME      (1 << 7)        /* Address match enable */
 #define ICCR0_TIE      (1 << 6)        /* Transmit FIFO interrupt enable */
-#define ICCR0_RIE      (1 << 5)        /* Recieve FIFO interrupt enable */
+#define ICCR0_RIE      (1 << 5)        /* Receive FIFO interrupt enable */
 #define ICCR0_RXE      (1 << 4)        /* Receive enable */
 #define ICCR0_TXE      (1 << 3)        /* Transmit enable */
 #define ICCR0_TUS      (1 << 2)        /* Transmit FIFO underrun select */
@@ -483,7 +483,7 @@ static irqreturn_t pxa_irda_fir_irq(int irq, void *dev_id)
        }
 
        if (icsr0 & ICSR0_EIF) {
-               /* An error in FIFO occured, or there is a end of frame */
+               /* An error in FIFO occurred, or there is a end of frame */
                pxa_irda_fir_irq_eif(si, dev, icsr0);
        }
 
index 1c1677cfea293157c567c1d347f691eac8e6ca3a..8800e1fe4129a84a41b2a6d5da495b5e807b8301 100644 (file)
@@ -1582,7 +1582,7 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
        int iobase;
        int iir, lsr;
 
-       /* Already locked comming here in smsc_ircc_interrupt() */
+       /* Already locked coming here in smsc_ircc_interrupt() */
        /*spin_lock(&self->lock);*/
 
        iobase = self->io.sir_base;
index 186cd28a61cc473c61a624e309151b549ba397f5..f504b262ba364c46a25e4a914cecd2daf6cb96ed 100644 (file)
@@ -29,7 +29,7 @@ F02 Oct/28/02: Add SB device ID for 3147 and 3177.
 
 2004-02-16: <sda@bdit.de>
 - Removed unneeded 'legacy' pci stuff.
-- Make sure SIR mode is set (hw_init()) before calling mode-dependant stuff.
+- Make sure SIR mode is set (hw_init()) before calling mode-dependent stuff.
 - On speed change from core, don't send SIR frame with new speed. 
   Use current speed and change speeds later.
 - Make module-param dongle_id actually work.
@@ -334,7 +334,7 @@ static __devinit int via_ircc_open(struct pci_dev *pdev, chipio_t * info,
        self->io.dongle_id = dongle_id;
 
        /* The only value we must override it the baudrate */
-       /* Maximum speeds and capabilities are dongle-dependant. */
+       /* Maximum speeds and capabilities are dongle-dependent. */
        switch( self->io.dongle_id ){
        case 0x0d:
                self->qos.baud_rate.bits =
index d66fab854bf181e42568d198b028864e84c19295..a076eb1253490ac4557feb743c78d368efa4bbe4 100644 (file)
@@ -209,7 +209,7 @@ enum vlsi_pio_irintr {
        IRINTR_ACTEN    = 0x80, /* activity interrupt enable */
        IRINTR_ACTIVITY = 0x40, /* activity monitor (traffic detected) */
        IRINTR_RPKTEN   = 0x20, /* receive packet interrupt enable*/
-       IRINTR_RPKTINT  = 0x10, /* rx-packet transfered from fifo to memory finished */
+       IRINTR_RPKTINT  = 0x10, /* rx-packet transferred from fifo to memory finished */
        IRINTR_TPKTEN   = 0x08, /* transmit packet interrupt enable */
        IRINTR_TPKTINT  = 0x04, /* last bit of tx-packet+crc shifted to ir-pulser */
        IRINTR_OE_EN    = 0x02, /* UART rx fifo overrun error interrupt enable */
@@ -739,7 +739,7 @@ typedef struct vlsi_irda_dev {
 /* the remapped error flags we use for returning from frame
  * post-processing in vlsi_process_tx/rx() after it was completed
  * by the hardware. These functions either return the >=0 number
- * of transfered bytes in case of success or the negative (-)
+ * of transferred bytes in case of success or the negative (-)
  * of the or'ed error flags.
  */
 
index 41c529fac0abeaf647eebb734b6ab05e8182d392..686a17aadef33147539e5b283ab630bfdd0dd316 100644 (file)
@@ -36,7 +36,7 @@
 /**
  * ixgbe_ieee_credits - This calculates the ieee traffic class
  * credits from the configured bandwidth percentages. Credits
- * are the smallest unit programable into the underlying
+ * are the smallest unit programmable into the underlying
  * hardware. The IEEE 802.1Qaz specification do not use bandwidth
  * groups so this is much simplified from the CEE case.
  */
index fec4c724c37ad99775b26a9998495079672b2fb2..327c8614198cc3eb9fe73c74eb7aae5eff489ad8 100644 (file)
@@ -360,7 +360,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
                return DCB_NO_HW_CHG;
 
        /*
-        * Only take down the adapter if an app change occured. FCoE
+        * Only take down the adapter if an app change occurred. FCoE
         * may shuffle tx rings in this case and this can not be done
         * without a reset currently.
         */
@@ -599,7 +599,7 @@ static u8 ixgbe_dcbnl_setapp(struct net_device *netdev,
                                break;
 
                        /* The FCoE application priority may be changed multiple
-                        * times in quick sucession with switches that build up
+                        * times in quick succession with switches that build up
                         * TLVs. To avoid creating uneeded device resets this
                         * checks the actual HW configuration and clears
                         * BIT_APP_UPCHG if a HW configuration change is not
index f17e4a7ee731994c76037b6479555aa955f5fa1f..6f8adc7f5d7c123a5ed5b61d56622502eaf837b2 100644 (file)
@@ -644,7 +644,7 @@ void ixgbe_unmap_and_free_tx_resource(struct ixgbe_ring *tx_ring,
  * @adapter: driver private struct
  * @index: reg idx of queue to query (0-127)
  *
- * Helper function to determine the traffic index for a paticular
+ * Helper function to determine the traffic index for a particular
  * register index.
  *
  * Returns : a tc index for use in range 0-7, or 0-3
@@ -3556,7 +3556,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
                } else {
                        /*
                         * Write addresses to the MTA, if the attempt fails
-                        * then we should just turn on promiscous mode so
+                        * then we should just turn on promiscuous mode so
                         * that we can at least receive multicast traffic
                         */
                        hw->mac.ops.update_mc_addr_list(hw, netdev);
@@ -3567,7 +3567,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
                /*
                 * Write addresses to available RAR registers, if there is not
                 * sufficient space to store all the addresses then enable
-                * unicast promiscous mode
+                * unicast promiscuous mode
                 */
                count = ixgbe_write_uc_addr_list(netdev);
                if (count < 0) {
@@ -4443,7 +4443,7 @@ static inline bool ixgbe_set_sriov_queues(struct ixgbe_adapter *adapter)
 }
 
 /*
- * ixgbe_set_num_queues: Allocate queues for device, feature dependant
+ * ixgbe_set_num_queues: Allocate queues for device, feature dependent
  * @adapter: board private structure to initialize
  *
  * This is the top level queue allocation routine.  The order here is very
index f72f705f6183ba1aaa0a0b0c2a553b086d09dbf1..df5b8aa4795d79d9f17d9720f9495f0200edf3b5 100644 (file)
@@ -1694,7 +1694,7 @@ static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw)
 }
 
 /**
- *  ixgbe_tn_check_overtemp - Checks if an overtemp occured.
+ *  ixgbe_tn_check_overtemp - Checks if an overtemp occurred.
  *  @hw: pointer to hardware structure
  *
  *  Checks if the LASI temp alarm status was triggered due to overtemp
index f47e93fe32bef9572e9efc53a1eb02f7d02a45ae..d9323c08f5c7678ec5edce620d0f21f3f46e5c44 100644 (file)
@@ -573,7 +573,7 @@ static s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask)
  * @hw: pointer to hardware structure
  * @mask: Mask to specify which semaphore to release
  *
- * Releases the SWFW semaphore throught the SW_FW_SYNC register
+ * Releases the SWFW semaphore through the SW_FW_SYNC register
  * for the specified function (CSR, PHY0, PHY1, EVM, Flash)
  **/
 static void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u16 mask)
index 054ab05b7c6aed4c0f18cc1b73496587c5895735..05fa7c85deed3351ec9c6ad8069f40c7ceae858b 100644 (file)
@@ -1925,7 +1925,7 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter,
 }
 
 /*
- * ixgbevf_set_num_queues: Allocate queues for device, feature dependant
+ * ixgbevf_set_num_queues: Allocate queues for device, feature dependent
  * @adapter: board private structure to initialize
  *
  * This is the top level queue allocation routine.  The order here is very
index efd44afeae83f7c359629f9561b3288504d7bef8..f0d8346d0fa5d2d3dcf62c402a4d65d5dc9729d6 100644 (file)
@@ -321,7 +321,7 @@ static void ks8842_reset_hw(struct ks8842_adapter *adapter)
        /* RX 2 kb high watermark */
        ks8842_write16(adapter, 0, 0x1000, REG_QRFCR);
 
-       /* aggresive back off in half duplex */
+       /* aggressive back off in half duplex */
        ks8842_enable_bits(adapter, 32, 1 << 8, REG_SGCR1);
 
        /* enable no excessive collison drop */
index 0fa4a9887ba2668e42cd328ad150148af0fd88fb..bcd9ba68c9f2c208004975037f778388551fe7c1 100644 (file)
@@ -141,7 +141,7 @@ static int msg_enable;
  *
  * All these calls issue SPI transactions to access the chip's registers. They
  * all require that the necessary lock is held to prevent accesses when the
- * chip is busy transfering packet data (RX/TX FIFO accesses).
+ * chip is busy transferring packet data (RX/TX FIFO accesses).
  */
 
 /**
@@ -483,7 +483,7 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
         *
         * This form of operation would require us to hold the SPI bus'
         * chipselect low during the entie transaction to avoid any
-        * reset to the data stream comming from the chip.
+        * reset to the data stream coming from the chip.
         */
 
        for (; rxfc != 0; rxfc--) {
@@ -634,7 +634,7 @@ static void ks8851_irq_work(struct work_struct *work)
 
 /**
  * calc_txlen - calculate size of message to send packet
- * @len: Lenght of data
+ * @len: Length of data
  *
  * Returns the size of the TXFIFO message needed to send
  * this packet.
@@ -1472,7 +1472,7 @@ static int ks8851_phy_reg(int reg)
  * @reg: The register to read.
  *
  * This call reads data from the PHY register specified in @reg. Since the
- * device does not support all the MII registers, the non-existant values
+ * device does not support all the MII registers, the non-existent values
  * are always returned as zero.
  *
  * We return zero for unsupported registers as the MII code does not check
index 2e2c69b24062efb87654684048a1670f486ee741..61631cace913c5b3762a6eee5f73ed5f53c734a7 100644 (file)
@@ -470,7 +470,7 @@ static int msg_enable;
  *
  * All these calls issue transactions to access the chip's registers. They
  * all require that the necessary lock is held to prevent accesses when the
- * chip is busy transfering packet data (RX/TX FIFO accesses).
+ * chip is busy transferring packet data (RX/TX FIFO accesses).
  */
 
 /**
@@ -1364,7 +1364,7 @@ static int ks_phy_reg(int reg)
  * @reg: The register to read.
  *
  * This call reads data from the PHY register specified in @reg. Since the
- * device does not support all the MII registers, the non-existant values
+ * device does not support all the MII registers, the non-existent values
  * are always returned as zero.
  *
  * We return zero for unsupported registers as the MII code does not check
index da74db4a03d46cccab76f6d51a698ae5a843539d..17b75e5f1b0a0659d9ed0fabd8e3c373d98f55de 100644 (file)
@@ -35,7 +35,7 @@
   Alexey Kuznetsov     : use the 8390's six bit hash multicast filter.
   Paul Gortmaker       : tweak ANK's above multicast changes a bit.
   Paul Gortmaker       : update packet statistics for v2.1.x
-  Alan Cox             : support arbitary stupid port mappings on the
+  Alan Cox             : support arbitrary stupid port mappings on the
                          68K Macintosh. Support >16bit I/O spaces
   Paul Gortmaker       : add kmod support for auto-loading of the 8390
                          module by all drivers that require it.
@@ -121,7 +121,7 @@ static void __NS8390_init(struct net_device *dev, int startp);
 /*
  *     SMP and the 8390 setup.
  *
- *     The 8390 isnt exactly designed to be multithreaded on RX/TX. There is
+ *     The 8390 isn't exactly designed to be multithreaded on RX/TX. There is
  *     a page register that controls bank and packet buffer access. We guard
  *     this with ei_local->page_lock. Nobody should assume or set the page other
  *     than zero when the lock is not held. Lock holders must restore page 0
index ea0dc451da9c874716c689a051cb967082c8bf6b..d70fb76edb7717062544a3c87d27e5799d0348c9 100644 (file)
@@ -173,7 +173,8 @@ static void loopback_setup(struct net_device *dev)
                | NETIF_F_RXCSUM
                | NETIF_F_HIGHDMA
                | NETIF_F_LLTX
-               | NETIF_F_NETNS_LOCAL;
+               | NETIF_F_NETNS_LOCAL
+               | NETIF_F_VLAN_CHALLENGED;
        dev->ethtool_ops        = &loopback_ethtool_ops;
        dev->header_ops         = &eth_header_ops;
        dev->netdev_ops         = &loopback_ops;
index 3698824744cb2c44b9e30f9b6c9103a74fb629e4..385a95311cd2c82a8a1e0298b9152da366195760 100644 (file)
@@ -27,7 +27,7 @@
 
        Credits:
        Thanks to Murphy Software BV for letting me write this in their time.
-       Well, actually, I get payed doing this...
+       Well, actually, I get paid doing this...
        (Also: see http://www.murphy.nl for murphy, and my homepage ~ard for
        more information on the Professional Workstation)
 
index a78dc1ca8c29d16324f2fbf1b696e94bf1cef1b4..5b145c6bad60661877ecd1bc34780b291abb183a 100644 (file)
@@ -144,7 +144,7 @@ typedef struct rx_packet {
                                       /* Bits 22 through 28 are used to determine IPGR2 */
 
 #define METH_REV_SHIFT 29       /* Bits 29 through 31 are used to determine the revision */
-                                      /* 000: Inital revision */
+                                      /* 000: Initial revision */
                                       /* 001: First revision, Improved TX concatenation */
 
 
@@ -193,7 +193,7 @@ typedef struct rx_packet {
                                                /* 1: A TX message had the INT request bit set, the packet has been sent. */
 #define METH_INT_TX_LINK_FAIL  BIT(2)  /* 0: No interrupt pending, 1: PHY has reported a link failure */
 #define METH_INT_MEM_ERROR     BIT(3)  /* 0: No interrupt pending */
-                                               /* 1: A memory error occurred durring DMA, DMA stopped, Fatal */
+                                               /* 1: A memory error occurred during DMA, DMA stopped, Fatal */
 #define METH_INT_TX_ABORT              BIT(4)  /* 0: No interrupt pending, 1: The TX aborted operation, DMA stopped, FATAL */
 #define METH_INT_RX_THRESHOLD  BIT(5)  /* 0: No interrupt pending, 1: Selected receive threshold condition Valid */
 #define METH_INT_RX_UNDERFLOW  BIT(6)  /* 0: No interrupt pending, 1: FIFO was empty, packet could not be queued */
index 0a6c6a2e7550f17235827811be88140ba891a0f6..d4fc00b1ff93442f699844517736a0ac1b6a0bde 100644 (file)
@@ -49,6 +49,10 @@ static u32 mii_get_an(struct mii_if_info *mii, u16 addr)
                result |= ADVERTISED_100baseT_Half;
        if (advert & ADVERTISE_100FULL)
                result |= ADVERTISED_100baseT_Full;
+       if (advert & ADVERTISE_PAUSE_CAP)
+               result |= ADVERTISED_Pause;
+       if (advert & ADVERTISE_PAUSE_ASYM)
+               result |= ADVERTISED_Asym_Pause;
 
        return result;
 }
index 9317b61a75b8752d69832e267269666615c34ae8..9276b1b25586bc17dc146f56fc05399dd8bf6ed2 100644 (file)
@@ -236,7 +236,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
                goto err_mr;
        }
 
-       /* Configure wich ports to start according to module parameters */
+       /* Configure which ports to start according to module parameters */
        mdev->port_cnt = 0;
        mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH)
                mdev->port_cnt++;
index 4f158baa0246be3022c7bb2843a0e4be2a834671..77063f91c564e4ddf0ffbff5a7b118057ff1bbd6 100644 (file)
@@ -247,7 +247,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
                                                               priv->port);
                        if (err)
                                en_err(priv, "Failed enabling "
-                                            "promiscous mode\n");
+                                            "promiscuous mode\n");
 
                        /* Disable port multicast filter (unconditionally) */
                        err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0,
@@ -276,7 +276,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
        }
 
        /*
-        * Not in promiscous mode
+        * Not in promiscuous mode
         */
 
        if (priv->flags & MLX4_EN_FLAG_PROMISC) {
@@ -292,14 +292,14 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
                        err = mlx4_unicast_promisc_remove(mdev->dev, priv->base_qpn,
                                                          priv->port);
                if (err)
-                       en_err(priv, "Failed disabling promiscous mode\n");
+                       en_err(priv, "Failed disabling promiscuous mode\n");
 
                /* Disable Multicast promisc */
                if (priv->flags & MLX4_EN_FLAG_MC_PROMISC) {
                        err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn,
                                                            priv->port);
                        if (err)
-                               en_err(priv, "Failed disabling multicast promiscous mode\n");
+                               en_err(priv, "Failed disabling multicast promiscuous mode\n");
                        priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC;
                }
 
@@ -331,7 +331,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
                        err = mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn,
                                                            priv->port);
                        if (err)
-                               en_err(priv, "Failed disabling multicast promiscous mode\n");
+                               en_err(priv, "Failed disabling multicast promiscuous mode\n");
                        priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC;
                }
 
index 05998ee297c950b74a6a1da4d583dc43f4d5ee0d..62dd21b06df4f8faabe1522f78476ecd02c33b33 100644 (file)
@@ -345,6 +345,8 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv)
                err = mlx4_en_init_allocator(priv, ring);
                if (err) {
                        en_err(priv, "Failed initializing ring allocator\n");
+                       if (ring->stride <= TXBB_SIZE)
+                               ring->buf -= TXBB_SIZE;
                        ring_ind--;
                        goto err_allocator;
                }
@@ -369,6 +371,8 @@ err_buffers:
        ring_ind = priv->rx_ring_num - 1;
 err_allocator:
        while (ring_ind >= 0) {
+               if (priv->rx_ring[ring_ind].stride <= TXBB_SIZE)
+                       priv->rx_ring[ring_ind].buf -= TXBB_SIZE;
                mlx4_en_destroy_allocator(priv, &priv->rx_ring[ring_ind]);
                ring_ind--;
        }
@@ -706,7 +710,7 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget)
 }
 
 
-/* Calculate the last offset position that accomodates a full fragment
+/* Calculate the last offset position that accommodates a full fragment
  * (assuming fagment size = stride-align) */
 static int mlx4_en_last_alloc_offset(struct mlx4_en_priv *priv, u16 stride, u16 align)
 {
index 9c91a92da705fb313ff810cb08e68a032f846476..191a8dcd8a93af1e668121d0853dc1127f3fc34c 100644 (file)
@@ -149,7 +149,7 @@ void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf)
 
                netif_carrier_off(dev);
 retry_tx:
-               /* Wait untill all tx queues are empty.
+               /* Wait until all tx queues are empty.
                 * there should not be any additional incoming traffic
                 * since we turned the carrier off */
                msleep(200);
index 01feb8fd42adbec9a9950b808ca6cecd251cf4c5..b229acf1855f89ba8323d6b896af5c159b74a6bf 100644 (file)
@@ -636,7 +636,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
        if (unlikely(!real_size))
                goto tx_drop;
 
-       /* Allign descriptor to TXBB size */
+       /* Align descriptor to TXBB size */
        desc_size = ALIGN(real_size, TXBB_SIZE);
        nr_txbb = desc_size / TXBB_SIZE;
        if (unlikely(nr_txbb > MAX_DESC_TXBBS)) {
index 62fa7eec5f0c448be487ed78bc4da11eaaa4a751..3814fc9b1145d50fc6fe25426436f895d9010b63 100644 (file)
@@ -944,6 +944,10 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
        }
 
        for (port = 1; port <= dev->caps.num_ports; port++) {
+               enum mlx4_port_type port_type = 0;
+               mlx4_SENSE_PORT(dev, port, &port_type);
+               if (port_type)
+                       dev->caps.port_type[port] = port_type;
                ib_port_default_caps = 0;
                err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps);
                if (err)
@@ -958,6 +962,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
                        goto err_mcg_table_free;
                }
        }
+       mlx4_set_port_mask(dev);
 
        return 0;
 
index 37150b2f6425566b015d4dfd6d38ee207b14e232..e63c37d6a11506f8d91f937b2eab7b481ed32a11 100644 (file)
@@ -111,7 +111,7 @@ static int new_steering_entry(struct mlx4_dev *dev, u8 vep_num, u8 port,
        u32 members_count;
        struct mlx4_steer_index *new_entry;
        struct mlx4_promisc_qp *pqp;
-       struct mlx4_promisc_qp *dqp;
+       struct mlx4_promisc_qp *dqp = NULL;
        u32 prot;
        int err;
        u8 pf_num;
@@ -184,7 +184,7 @@ out_mailbox:
 out_alloc:
        if (dqp) {
                list_del(&dqp->list);
-               kfree(&dqp);
+               kfree(dqp);
        }
        list_del(&new_entry->list);
        kfree(new_entry);
@@ -222,7 +222,7 @@ static int existing_steering_entry(struct mlx4_dev *dev, u8 vep_num, u8 port,
 
        /* the given qpn is listed as a promisc qpn
         * we need to add it as a duplicate to this entry
-        * for future refernce */
+        * for future references */
        list_for_each_entry(dqp, &entry->duplicates, list) {
                if (qpn == dqp->qpn)
                        return 0; /* qp is already duplicated */
index c1e0e5f1bcdbb0c85891b678798e6c59e7aafbe2..dd7d745fbab49e2b730f556fd4aef4c1e738862c 100644 (file)
@@ -431,6 +431,8 @@ void mlx4_srq_event(struct mlx4_dev *dev, u32 srqn, int event_type);
 
 void mlx4_handle_catas_err(struct mlx4_dev *dev);
 
+int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
+                   enum mlx4_port_type *type);
 void mlx4_do_sense_ports(struct mlx4_dev *dev,
                         enum mlx4_port_type *stype,
                         enum mlx4_port_type *defaults);
index eca7d8596f8753c1f4f6f4fd6fce5b2fab376e21..8856659fb43c4a23d2280a2a3062ce2bd9453b35 100644 (file)
@@ -172,7 +172,7 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap)
                }
 
                if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) {
-                       /* MAC already registered, increase refernce count */
+                       /* MAC already registered, increase references count */
                        ++table->refs[i];
                        goto out;
                }
@@ -360,7 +360,7 @@ int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index)
                if (table->refs[i] &&
                    (vlan == (MLX4_VLAN_MASK &
                              be32_to_cpu(table->entries[i])))) {
-                       /* Vlan already registered, increase refernce count */
+                       /* Vlan already registered, increase references count */
                        *index = i;
                        ++table->refs[i];
                        goto out;
index 015fbe785c13304aab333759a4629250b531b8d9..e2337a7411d943409fc881d911b21d2c907bcc18 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "mlx4.h"
 
-static int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
-                          enum mlx4_port_type *type)
+int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
+                   enum mlx4_port_type *type)
 {
        u64 out_param;
        int err = 0;
index 673dc600c891fedabe7f63eaccd295b629c31364..1446de59ae53bf13445d129eb7f9c79d5751d993 100644 (file)
@@ -3702,7 +3702,7 @@ abort:
 
 /*
  * This function determines the number of slices supported.
- * The number slices is the minumum of the number of CPUS,
+ * The number slices is the minimum of the number of CPUS,
  * the number of MSI-X irqs supported, the number of slices
  * supported by the firmware
  */
index a761076b69c39c6bc32b9683ad5aaf5aac447cb8..53aeea4b536effc329bba1a0ed9f80fddd5b9389 100644 (file)
@@ -1009,7 +1009,7 @@ static int __devinit myri_sbus_probe(struct platform_device *op)
 
        /* Map in the MyriCOM register/localram set. */
        if (mp->eeprom.cpuvers < CPUVERS_4_0) {
-               /* XXX Makes no sense, if control reg is non-existant this
+               /* XXX Makes no sense, if control reg is non-existent this
                 * XXX driver cannot function at all... maybe pre-4.0 is
                 * XXX only a valid version for PCI cards?  Ask feldy...
                 */
index 2fd39630b1e57c0e706165022335428e173cfb35..1074231f0a0d722a803bcc968372d9705b582a53 100644 (file)
@@ -203,7 +203,7 @@ skbuff at an offset of "+2", 16-byte aligning the IP header.
 IIId. Synchronization
 
 Most operations are synchronized on the np->lock irq spinlock, except the
-recieve and transmit paths which are synchronised using a combination of
+receive and transmit paths which are synchronised using a combination of
 hardware descriptor ownership, disabling interrupts and NAPI poll scheduling.
 
 IVb. References
@@ -726,7 +726,7 @@ static void move_int_phy(struct net_device *dev, int addr)
         * There are two addresses we must avoid:
         * - the address on the external phy that is used for transmission.
         * - the address that we want to access. User space can access phys
-        *   on the mii bus with SIOCGMIIREG/SIOCSMIIREG, independant from the
+        *   on the mii bus with SIOCGMIIREG/SIOCSMIIREG, independent from the
         *   phy that is used for transmission.
         */
 
@@ -860,6 +860,9 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
                prev_eedata = eedata;
        }
 
+       /* Store MAC Address in perm_addr */
+       memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);
+
        dev->base_addr = (unsigned long __force) ioaddr;
        dev->irq = irq;
 
@@ -1982,7 +1985,7 @@ static void init_ring(struct net_device *dev)
 
        np->rx_head_desc = &np->rx_ring[0];
 
-       /* Please be carefull before changing this loop - at least gcc-2.95.1
+       /* Please be careful before changing this loop - at least gcc-2.95.1
         * miscompiles it otherwise.
         */
        /* Initialize all Rx descriptors. */
index dfb67eb2a94b726cb590f8b3a015d98a719866d1..eb41e44921e665c3863dd82860b7c44413c7ef5e 100644 (file)
@@ -671,6 +671,7 @@ static int netconsole_netdev_event(struct notifier_block *this,
                goto done;
 
        spin_lock_irqsave(&target_list_lock, flags);
+restart:
        list_for_each_entry(nt, &target_list, list) {
                netconsole_target_get(nt);
                if (nt->np.dev == dev) {
@@ -683,9 +684,16 @@ static int netconsole_netdev_event(struct notifier_block *this,
                                 * rtnl_lock already held
                                 */
                                if (nt->np.dev) {
+                                       spin_unlock_irqrestore(
+                                                             &target_list_lock,
+                                                             flags);
                                        __netpoll_cleanup(&nt->np);
+                                       spin_lock_irqsave(&target_list_lock,
+                                                         flags);
                                        dev_put(nt->np.dev);
                                        nt->np.dev = NULL;
+                                       netconsole_target_put(nt);
+                                       goto restart;
                                }
                                /* Fall through */
                        case NETDEV_GOING_DOWN:
index d7299f1a49401dc57d84610696008e63b90efe98..679dc8519c5b6db3c5916f81197b7413b66c44cc 100644 (file)
 
 #define        MAX_NUM_CARDS           4
 
-#define MAX_BUFFERS_PER_CMD    32
+#define NETXEN_MAX_FRAGS_PER_TX        14
 #define MAX_TSO_HEADER_DESC    2
 #define MGMT_CMD_DESC_RESV     4
 #define TX_STOP_THRESH         ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \
@@ -558,7 +558,7 @@ struct netxen_recv_crb {
  */
 struct netxen_cmd_buffer {
        struct sk_buff *skb;
-       struct netxen_skb_frag frag_array[MAX_BUFFERS_PER_CMD + 1];
+       struct netxen_skb_frag frag_array[MAX_SKB_FRAGS + 1];
        u32 frag_count;
 };
 
index d8bd73d7e29603a59058fde0e635205d8164b535..dc1967c1f312497e7d680c501a8c71d2091c4b2e 100644 (file)
@@ -780,7 +780,7 @@ enum {
 
 /*
  * capabilities register, can be used to selectively enable/disable features
- * for backward compability
+ * for backward compatibility
  */
 #define CRB_NIC_CAPABILITIES_HOST      NETXEN_NIC_REG(0x1a8)
 #define CRB_NIC_MSI_MODE_HOST          NETXEN_NIC_REG(0x270)
index 83348dc4b184c5f8afbafc892b0c91dccd0dce13..e8a4b66559999b2fef6e375fb568abfa8f663786 100644 (file)
@@ -1844,6 +1844,8 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
        struct cmd_desc_type0 *hwdesc, *first_desc;
        struct pci_dev *pdev;
        int i, k;
+       int delta = 0;
+       struct skb_frag_struct *frag;
 
        u32 producer;
        int frag_count, no_of_desc;
@@ -1851,6 +1853,21 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 
        frag_count = skb_shinfo(skb)->nr_frags + 1;
 
+       /* 14 frags supported for normal packet and
+        * 32 frags supported for TSO packet
+        */
+       if (!skb_is_gso(skb) && frag_count > NETXEN_MAX_FRAGS_PER_TX) {
+
+               for (i = 0; i < (frag_count - NETXEN_MAX_FRAGS_PER_TX); i++) {
+                       frag = &skb_shinfo(skb)->frags[i];
+                       delta += frag->size;
+               }
+
+               if (!__pskb_pull_tail(skb, delta))
+                       goto drop_packet;
+
+               frag_count = 1 + skb_shinfo(skb)->nr_frags;
+       }
        /* 4 fragments per cmd des */
        no_of_desc = (frag_count + 3) >> 2;
 
index a41b2cf4d9176d4629a84aecb05659347e00ea78..6667e0667a88e15b82c8f0b65564046c9fe88202 100644 (file)
@@ -512,7 +512,7 @@ static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group
 /* Packet Receiver
  *
  * The hardware supports linked lists of receive descriptors for
- * which ownership is transfered back and forth by means of an
+ * which ownership is transferred back and forth by means of an
  * ownership bit.  While the hardware does support the use of a
  * ring for receive descriptors, we only make use of a chain in
  * an attempt to reduce bus traffic under heavy load scenarios.
@@ -1147,7 +1147,7 @@ again:
 #ifdef NS83820_VLAN_ACCEL_SUPPORT
        if(vlan_tx_tag_present(skb)) {
                /* fetch the vlan tag info out of the
-                * ancilliary data if the vlan code
+                * ancillary data if the vlan code
                 * is using hw vlan acceleration
                 */
                short tag = vlan_tx_tag_get(skb);
index e1e33c80fb251cd5896c6797c25cd08247c82fdf..bf126e76fabfec683d5555aa4b08d97333f63101 100644 (file)
@@ -351,7 +351,7 @@ struct pch_gbe_functions {
 };
 
 /**
- * struct pch_gbe_mac_info - MAC infomation
+ * struct pch_gbe_mac_info - MAC information
  * @addr[6]:           Store the MAC address
  * @fc:                        Mode of flow control
  * @fc_autoneg:                Auto negotiation enable for flow control setting
@@ -375,7 +375,7 @@ struct pch_gbe_mac_info {
 };
 
 /**
- * struct pch_gbe_phy_info - PHY infomation
+ * struct pch_gbe_phy_info - PHY information
  * @addr:              PHY address
  * @id:                        PHY's identifier
  * @revision:          PHY's revision
@@ -393,7 +393,7 @@ struct pch_gbe_phy_info {
 /*!
  * @ingroup Gigabit Ether driver Layer
  * @struct  pch_gbe_bus_info
- * @brief   Bus infomation
+ * @brief   Bus information
  */
 struct pch_gbe_bus_info {
        u8 type;
@@ -404,7 +404,7 @@ struct pch_gbe_bus_info {
 /*!
  * @ingroup Gigabit Ether driver Layer
  * @struct  pch_gbe_hw
- * @brief   Hardware infomation
+ * @brief   Hardware information
  */
 struct pch_gbe_hw {
        void *back;
@@ -462,7 +462,7 @@ struct pch_gbe_tx_desc {
 
 
 /**
- * struct pch_gbe_buffer - Buffer infomation
+ * struct pch_gbe_buffer - Buffer information
  * @skb:       pointer to a socket buffer
  * @dma:       DMA address
  * @time_stamp:        time stamp
@@ -477,7 +477,7 @@ struct pch_gbe_buffer {
 };
 
 /**
- * struct pch_gbe_tx_ring - tx ring infomation
+ * struct pch_gbe_tx_ring - tx ring information
  * @tx_lock:   spinlock structs
  * @desc:      pointer to the descriptor ring memory
  * @dma:       physical address of the descriptor ring
@@ -499,7 +499,7 @@ struct pch_gbe_tx_ring {
 };
 
 /**
- * struct pch_gbe_rx_ring - rx ring infomation
+ * struct pch_gbe_rx_ring - rx ring information
  * @desc:      pointer to the descriptor ring memory
  * @dma:       physical address of the descriptor ring
  * @size:      length of descriptor ring in bytes
index c8c873b31a899a47ae002826efff438893646178..d2174a40d708338aed1261816aceab9ae3e9c1f2 100644 (file)
@@ -21,7 +21,7 @@
 #include "pch_gbe_api.h"
 
 /**
- * pch_gbe_stats - Stats item infomation
+ * pch_gbe_stats - Stats item information
  */
 struct pch_gbe_stats {
        char string[ETH_GSTRING_LEN];
index 50986840c99c6cd46694a27cc0f728efeb704556..2ef2f9cdefa6ff1f0d991d734c340960486f420a 100644 (file)
@@ -1011,7 +1011,7 @@ static void pch_gbe_tx_queue(struct pch_gbe_adapter *adapter,
        tmp_skb->len = skb->len;
        memcpy(&tmp_skb->data[ETH_HLEN + 2], &skb->data[ETH_HLEN],
               (skb->len - ETH_HLEN));
-       /*-- Set Buffer infomation --*/
+       /*-- Set Buffer information --*/
        buffer_info->length = tmp_skb->len;
        buffer_info->dma = dma_map_single(&adapter->pdev->dev, tmp_skb->data,
                                          buffer_info->length,
@@ -1540,7 +1540,7 @@ int pch_gbe_setup_tx_resources(struct pch_gbe_adapter *adapter,
        size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count;
        tx_ring->buffer_info = vzalloc(size);
        if (!tx_ring->buffer_info) {
-               pr_err("Unable to allocate memory for the buffer infomation\n");
+               pr_err("Unable to allocate memory for the buffer information\n");
                return -ENOMEM;
        }
 
index 1766dc4f07e171ebb88dd11c0b2acf5c85fe6d73..c0f23376a462a20fe1a7450782dabe9eca2fe95c 100644 (file)
@@ -214,7 +214,7 @@ static struct {
        { "SMC1211TX EZCard 10/100 (RealTek RTL8139)" },
 /*     { MPX5030, "Accton MPX5030 (RealTek RTL8139)" },*/
        { "Delta Electronics 8139 10/100BaseTX" },
-       { "Addtron Technolgy 8139 10/100BaseTX" },
+       { "Addtron Technology 8139 10/100BaseTX" },
 };
 
 
index 321b12f826455c547df1bd87cbfac564448f32f1..81ac330f931d67b6b15eab36faa415b20fbbca9f 100644 (file)
@@ -950,7 +950,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
 }
 
 /*  Update statistics.
-       Suprisingly this need not be run single-threaded, but it effectively is.
+       Surprisingly this need not be run single-threaded, but it effectively is.
        The counters clear when read, so the adds must merely be atomic.
  */
 static void update_stats(struct net_device *dev)
index d3cb772058633cdb98f9c69a64aac18e53912725..3077d72e8222b6fd78a6f6b2a8c08fd5c66eca85 100644 (file)
@@ -780,7 +780,7 @@ module_exit(exit_axnet_cs);
   Alexey Kuznetsov     : use the 8390's six bit hash multicast filter.
   Paul Gortmaker       : tweak ANK's above multicast changes a bit.
   Paul Gortmaker       : update packet statistics for v2.1.x
-  Alan Cox             : support arbitary stupid port mappings on the
+  Alan Cox             : support arbitrary stupid port mappings on the
                          68K Macintosh. Support >16bit I/O spaces
   Paul Gortmaker       : add kmod support for auto-loading of the 8390
                          module by all drivers that require it.
@@ -842,7 +842,7 @@ static void do_set_multicast_list(struct net_device *dev);
 /*
  *     SMP and the 8390 setup.
  *
- *     The 8390 isnt exactly designed to be multithreaded on RX/TX. There is
+ *     The 8390 isn't exactly designed to be multithreaded on RX/TX. There is
  *     a page register that controls bank and packet buffer access. We guard
  *     this with ei_local->page_lock. Nobody should assume or set the page other
  *     than zero when the lock is not held. Lock holders must restore page 0
index 8a9ff53189236eff17bca6abd2afb8d5f9ac8809..1085917564400c587795e744c6cf8ef36ce34cc5 100644 (file)
@@ -1264,7 +1264,7 @@ static netdev_tx_t smc_start_xmit(struct sk_buff *skb,
 
 /*======================================================================
 
-    Handle a Tx anomolous event.  Entered while in Window 2.
+    Handle a Tx anomalous event.  Entered while in Window 2.
 
 ======================================================================*/
 
index aee3bb0358bf9b49801cff98602699870cdec0c1..768037602dffedfacc9720579dcfe25b24746471 100644 (file)
@@ -1651,7 +1651,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
        /*
         *  On selected chips turn on the BCR18:NOUFLO bit. This stops transmit
         *  starting until the packet is loaded. Strike one for reliability, lose
-        *  one for latency - although on PCI this isnt a big loss. Older chips
+        *  one for latency - although on PCI this isn't a big loss. Older chips
         *  have FIFO's smaller than a packet, so you can't do this.
         *  Turn on BCR18:BurstRdEn and BCR18:BurstWrEn.
         */
index e870c0698bbebbcd2225f110a02f357021c0a16b..ff109fe5af6bfad946d8e8c4eb82995c19fe382d 100644 (file)
@@ -538,7 +538,7 @@ EXPORT_SYMBOL(phy_detach);
 /* Generic PHY support and helper functions */
 
 /**
- * genphy_config_advert - sanitize and advertise auto-negotation parameters
+ * genphy_config_advert - sanitize and advertise auto-negotiation parameters
  * @phydev: target phy_device struct
  *
  * Description: Writes MII_ADVERTISE with the appropriate values,
@@ -687,7 +687,7 @@ int genphy_config_aneg(struct phy_device *phydev)
                return result;
 
        if (result == 0) {
-               /* Advertisment hasn't changed, but maybe aneg was never on to
+               /* Advertisement hasn't changed, but maybe aneg was never on to
                 * begin with?  Or maybe phy was isolated? */
                int ctl = phy_read(phydev, MII_BMCR);
 
index 9f6d670748d11f3c6198e2792373ff6c33bce76c..4609bc0e2f563104065e56f119f9f7a509f45e40 100644 (file)
@@ -1448,7 +1448,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
 
                /*
                 *check if we are on the last channel or
-                *we exceded the lenght of the data to
+                *we exceded the length of the data to
                 *fragment
                 */
                if ((nfree <= 0) || (flen > len))
index 4e6b72f57de8ef9d3366c3e5d8a9f6c1a2a2ca91..2573f525f11c31ced737e750fefc66807bbbfc65 100644 (file)
@@ -178,7 +178,7 @@ ppp_print_buffer (const char *name, const __u8 *buf, int count)
  * way to fix this is to use a rwlock in the tty struct, but for now
  * we use a single global rwlock for all ttys in ppp line discipline.
  *
- * FIXME: Fixed in tty_io nowdays.
+ * FIXME: Fixed in tty_io nowadays.
  */
 static DEFINE_RWLOCK(disc_data_lock);
 
index 78c0e3c9b2b5fcb8d42fb910ab2416e4db787dc7..718879b35b7d2ac2ea5415dcd70b63e64da94255 100644 (file)
@@ -115,7 +115,7 @@ struct pppoe_net {
  * 2) Session stage (MAC and SID are known)
  *
  * Ethernet frames have a special tag for this but
- * we use simplier approach based on session id
+ * we use simpler approach based on session id
  */
 static inline bool stage_session(__be16 sid)
 {
@@ -317,7 +317,7 @@ static void pppoe_flush_dev(struct net_device *dev)
                        lock_sock(sk);
 
                        if (po->pppoe_dev == dev &&
-                           sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) {
+                           sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
                                pppox_unbind_sock(sk);
                                sk->sk_state = PPPOX_ZOMBIE;
                                sk->sk_state_change(sk);
index 5ecfa4b1e758f7db622700b9cc42452851d5ad78..ffdf7349ef7a2d6057b2e4c67a62ec299d7c2f33 100644 (file)
@@ -632,7 +632,7 @@ static inline void gelic_card_enable_rxdmac(struct gelic_card *card)
  * @card: card structure
  *
  * gelic_card_disable_rxdmac terminates processing on the DMA controller by
- * turing off DMA and issueing a force end
+ * turing off DMA and issuing a force end
  */
 static inline void gelic_card_disable_rxdmac(struct gelic_card *card)
 {
@@ -650,7 +650,7 @@ static inline void gelic_card_disable_rxdmac(struct gelic_card *card)
  * @card: card structure
  *
  * gelic_card_disable_txdmac terminates processing on the DMA controller by
- * turing off DMA and issueing a force end
+ * turing off DMA and issuing a force end
  */
 static inline void gelic_card_disable_txdmac(struct gelic_card *card)
 {
index 32521ae5e8245ca54be3501e9e3f2b162380ca2e..fadadf9097a3b944275b25e1c0c3f006429dce3a 100644 (file)
@@ -117,7 +117,7 @@ enum gelic_descr_rx_error {
        GELIC_DESCR_RXDATAERR   = 0x00020000, /* IP packet format error */
        GELIC_DESCR_RXCALERR    = 0x00010000, /* cariier extension length
                                              * error */
-       GELIC_DESCR_RXCREXERR   = 0x00008000, /* carrier extention error */
+       GELIC_DESCR_RXCREXERR   = 0x00008000, /* carrier extension error */
        GELIC_DESCR_RXMLTCST    = 0x00004000, /* multicast address frame */
        /* bit 13..0 reserved */
 };
index 4a624a29393f832498e3083befd44d5fe67785a5..b5ae29d20f2ef4d47d2bac5aced11f9f7d71cfdc 100644 (file)
@@ -814,7 +814,7 @@ static int gelic_wl_set_auth(struct net_device *netdev,
                         * you will not decide suitable cipher from
                         * its beacon.
                         * You should have knowledge about the AP's
-                        * cipher infomation in other method prior to
+                        * cipher information in other method prior to
                         * the association.
                         */
                        if (!precise_ie())
index 1b63c8aef121cb6dd723e08c69cbfa4c334f698b..89f7540d90f909708fa318dbe9ecf6458252a922 100644 (file)
@@ -462,7 +462,7 @@ static u32 hash_function(unsigned char *mac_addr_orig)
  * pep - ETHERNET .
  * mac_addr - MAC address.
  * skip - if 1, skip this address.Used in case of deleting an entry which is a
- *       part of chain in the hash table.We cant just delete the entry since
+ *       part of chain in the hash table.We can't just delete the entry since
  *       that will break the chain.We need to defragment the tables time to
  *       time.
  * rd   - 0 Discard packet upon match.
index 3362a661248c61065fa50b12fdee49b0d0591dc0..73e234366a82d4cd1c7f6d81a271155e54174d0c 100644 (file)
@@ -770,7 +770,7 @@ enum {
        FM93C56A_WDS = 0x0,
        FM93C56A_ERASE = 0x3,
        FM93C56A_ERASE_ALL = 0x0,
-/* Command Extentions */
+/* Command Extensions */
        FM93C56A_WEN_EXT = 0x3,
        FM93C56A_WRITE_ALL_EXT = 0x1,
        FM93C56A_WDS_EXT = 0x0,
index dc44564ef6f9984fdc9a214491d9bdced015eb80..b0dead00b2d1d6b7809bd2b01906b5bff5a786b5 100644 (file)
@@ -99,6 +99,7 @@
 #define TX_UDPV6_PKT   0x0c
 
 /* Tx defines */
+#define QLCNIC_MAX_FRAGS_PER_TX        14
 #define MAX_TSO_HEADER_DESC    2
 #define MGMT_CMD_DESC_RESV     4
 #define TX_STOP_THRESH         ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \
index cd88c7e1bfa9c76c3ae156da021a020f27346be5..cb1a1ef36c0ade56ddb5dfb98c2ef2ce8813b100 100644 (file)
@@ -2099,6 +2099,7 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
        struct cmd_desc_type0 *hwdesc, *first_desc;
        struct pci_dev *pdev;
        struct ethhdr *phdr;
+       int delta = 0;
        int i, k;
 
        u32 producer;
@@ -2118,6 +2119,19 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
        }
 
        frag_count = skb_shinfo(skb)->nr_frags + 1;
+       /* 14 frags supported for normal packet and
+        * 32 frags supported for TSO packet
+        */
+       if (!skb_is_gso(skb) && frag_count > QLCNIC_MAX_FRAGS_PER_TX) {
+
+               for (i = 0; i < (frag_count - QLCNIC_MAX_FRAGS_PER_TX); i++)
+                       delta += skb_shinfo(skb)->frags[i].size;
+
+               if (!__pskb_pull_tail(skb, delta))
+                       goto drop_packet;
+
+               frag_count = 1 + skb_shinfo(skb)->nr_frags;
+       }
 
        /* 4 fragments per cmd des */
        no_of_desc = (frag_count + 3) >> 2;
index 49bfa5813068d788af16c67f9a1f79c36426ad79..5bb311945436ebc514b57477ef54c970ddc27886 100644 (file)
@@ -660,7 +660,7 @@ static void ql_disable_interrupts(struct ql_adapter *qdev)
 /* If we're running with multiple MSI-X vectors then we enable on the fly.
  * Otherwise, we may have multiple outstanding workers and don't want to
  * enable until the last one finishes. In this case, the irq_cnt gets
- * incremented everytime we queue a worker and decremented everytime
+ * incremented every time we queue a worker and decremented every time
  * a worker finishes.  Once it hits zero we enable the interrupt.
  */
 u32 ql_enable_completion_interrupt(struct ql_adapter *qdev, u32 intr)
@@ -3299,7 +3299,7 @@ msi:
  * will service it.  An example would be if there are
  * 2 vectors (so 2 RSS rings) and 8 TX completion rings.
  * This would mean that vector 0 would service RSS ring 0
- * and TX competion rings 0,1,2 and 3.  Vector 1 would
+ * and TX completion rings 0,1,2 and 3.  Vector 1 would
  * service RSS ring 1 and TX completion rings 4,5,6 and 7.
  */
 static void ql_set_tx_vect(struct ql_adapter *qdev)
@@ -4152,7 +4152,7 @@ static int ql_change_rx_buffers(struct ql_adapter *qdev)
        int i, status;
        u32 lbq_buf_len;
 
-       /* Wait for an oustanding reset to complete. */
+       /* Wait for an outstanding reset to complete. */
        if (!test_bit(QL_ADAPTER_UP, &qdev->flags)) {
                int i = 3;
                while (i-- && !test_bit(QL_ADAPTER_UP, &qdev->flags)) {
@@ -4281,7 +4281,7 @@ static void qlge_set_multicast_list(struct net_device *ndev)
                        if (ql_set_routing_reg
                            (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 1)) {
                                netif_err(qdev, hw, qdev->ndev,
-                                         "Failed to set promiscous mode.\n");
+                                         "Failed to set promiscuous mode.\n");
                        } else {
                                set_bit(QL_PROMISCUOUS, &qdev->flags);
                        }
@@ -4291,7 +4291,7 @@ static void qlge_set_multicast_list(struct net_device *ndev)
                        if (ql_set_routing_reg
                            (qdev, RT_IDX_PROMISCUOUS_SLOT, RT_IDX_VALID, 0)) {
                                netif_err(qdev, hw, qdev->ndev,
-                                         "Failed to clear promiscous mode.\n");
+                                         "Failed to clear promiscuous mode.\n");
                        } else {
                                clear_bit(QL_PROMISCUOUS, &qdev->flags);
                        }
index e3ebd90ae6513cd2b80faf100332e0bea01c5c81..200a363c3bf59ac47d5da56e762486af6572b252 100644 (file)
@@ -535,7 +535,7 @@ static int r6040_rx(struct net_device *dev, int limit)
                        /* RX dribble */
                        if (err & DSC_RX_ERR_DRI)
                                dev->stats.rx_frame_errors++;
-                       /* Buffer lenght exceeded */
+                       /* Buffer length exceeded */
                        if (err & DSC_RX_ERR_BUF)
                                dev->stats.rx_length_errors++;
                        /* Packet too long */
index 493b0de3848bf17fadd6741ad57d5b4701b2f074..397c36810a159ad7dfc143a819303e059008fe56 100644 (file)
@@ -170,6 +170,16 @@ static const struct {
 };
 #undef _R
 
+static const struct rtl_firmware_info {
+       int mac_version;
+       const char *fw_name;
+} rtl_firmware_infos[] = {
+       { .mac_version = RTL_GIGA_MAC_VER_25, .fw_name = FIRMWARE_8168D_1 },
+       { .mac_version = RTL_GIGA_MAC_VER_26, .fw_name = FIRMWARE_8168D_2 },
+       { .mac_version = RTL_GIGA_MAC_VER_29, .fw_name = FIRMWARE_8105E_1 },
+       { .mac_version = RTL_GIGA_MAC_VER_30, .fw_name = FIRMWARE_8105E_1 }
+};
+
 enum cfg_version {
        RTL_CFG_0 = 0x00,
        RTL_CFG_1,
@@ -565,6 +575,7 @@ struct rtl8169_private {
        u32 saved_wolopts;
 
        const struct firmware *fw;
+#define RTL_FIRMWARE_UNKNOWN   ERR_PTR(-EAGAIN);
 };
 
 MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
@@ -1789,25 +1800,26 @@ rtl_phy_write_fw(struct rtl8169_private *tp, const struct firmware *fw)
 
 static void rtl_release_firmware(struct rtl8169_private *tp)
 {
-       release_firmware(tp->fw);
-       tp->fw = NULL;
+       if (!IS_ERR_OR_NULL(tp->fw))
+               release_firmware(tp->fw);
+       tp->fw = RTL_FIRMWARE_UNKNOWN;
 }
 
-static int rtl_apply_firmware(struct rtl8169_private *tp, const char *fw_name)
+static void rtl_apply_firmware(struct rtl8169_private *tp)
 {
-       const struct firmware **fw = &tp->fw;
-       int rc = !*fw;
-
-       if (rc) {
-               rc = request_firmware(fw, fw_name, &tp->pci_dev->dev);
-               if (rc < 0)
-                       goto out;
-       }
+       const struct firmware *fw = tp->fw;
 
        /* TODO: release firmware once rtl_phy_write_fw signals failures. */
-       rtl_phy_write_fw(tp, *fw);
-out:
-       return rc;
+       if (!IS_ERR_OR_NULL(fw))
+               rtl_phy_write_fw(tp, fw);
+}
+
+static void rtl_apply_firmware_cond(struct rtl8169_private *tp, u8 reg, u16 val)
+{
+       if (rtl_readphy(tp, reg) != val)
+               netif_warn(tp, hw, tp->dev, "chipset not ready for firmware\n");
+       else
+               rtl_apply_firmware(tp);
 }
 
 static void rtl8169s_hw_phy_config(struct rtl8169_private *tp)
@@ -2246,10 +2258,8 @@ static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
 
        rtl_writephy(tp, 0x1f, 0x0005);
        rtl_writephy(tp, 0x05, 0x001b);
-       if ((rtl_readphy(tp, 0x06) != 0xbf00) ||
-           (rtl_apply_firmware(tp, FIRMWARE_8168D_1) < 0)) {
-               netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
-       }
+
+       rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xbf00);
 
        rtl_writephy(tp, 0x1f, 0x0000);
 }
@@ -2351,10 +2361,8 @@ static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
 
        rtl_writephy(tp, 0x1f, 0x0005);
        rtl_writephy(tp, 0x05, 0x001b);
-       if ((rtl_readphy(tp, 0x06) != 0xb300) ||
-           (rtl_apply_firmware(tp, FIRMWARE_8168D_2) < 0)) {
-               netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
-       }
+
+       rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xb300);
 
        rtl_writephy(tp, 0x1f, 0x0000);
 }
@@ -2474,8 +2482,7 @@ static void rtl8105e_hw_phy_config(struct rtl8169_private *tp)
        rtl_writephy(tp, 0x18, 0x0310);
        msleep(100);
 
-       if (rtl_apply_firmware(tp, FIRMWARE_8105E_1) < 0)
-               netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
+       rtl_apply_firmware(tp);
 
        rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init));
 }
@@ -3237,6 +3244,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        tp->timer.data = (unsigned long) dev;
        tp->timer.function = rtl8169_phy_timer;
 
+       tp->fw = RTL_FIRMWARE_UNKNOWN;
+
        rc = register_netdev(dev);
        if (rc < 0)
                goto err_out_msi_4;
@@ -3288,10 +3297,10 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
 
        cancel_delayed_work_sync(&tp->task);
 
-       rtl_release_firmware(tp);
-
        unregister_netdev(dev);
 
+       rtl_release_firmware(tp);
+
        if (pci_dev_run_wake(pdev))
                pm_runtime_get_noresume(&pdev->dev);
 
@@ -3303,6 +3312,37 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
        pci_set_drvdata(pdev, NULL);
 }
 
+static void rtl_request_firmware(struct rtl8169_private *tp)
+{
+       int i;
+
+       /* Return early if the firmware is already loaded / cached. */
+       if (!IS_ERR(tp->fw))
+               goto out;
+
+       for (i = 0; i < ARRAY_SIZE(rtl_firmware_infos); i++) {
+               const struct rtl_firmware_info *info = rtl_firmware_infos + i;
+
+               if (info->mac_version == tp->mac_version) {
+                       const char *name = info->fw_name;
+                       int rc;
+
+                       rc = request_firmware(&tp->fw, name, &tp->pci_dev->dev);
+                       if (rc < 0) {
+                               netif_warn(tp, ifup, tp->dev, "unable to load "
+                                       "firmware patch %s (%d)\n", name, rc);
+                               goto out_disable_request_firmware;
+                       }
+                       goto out;
+               }
+       }
+
+out_disable_request_firmware:
+       tp->fw = NULL;
+out:
+       return;
+}
+
 static int rtl8169_open(struct net_device *dev)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
@@ -3334,11 +3374,13 @@ static int rtl8169_open(struct net_device *dev)
 
        smp_mb();
 
+       rtl_request_firmware(tp);
+
        retval = request_irq(dev->irq, rtl8169_interrupt,
                             (tp->features & RTL_FEATURE_MSI) ? 0 : IRQF_SHARED,
                             dev->name, dev);
        if (retval < 0)
-               goto err_release_ring_2;
+               goto err_release_fw_2;
 
        napi_enable(&tp->napi);
 
@@ -3359,7 +3401,8 @@ static int rtl8169_open(struct net_device *dev)
 out:
        return retval;
 
-err_release_ring_2:
+err_release_fw_2:
+       rtl_release_firmware(tp);
        rtl8169_rx_clear(tp);
 err_free_rx_1:
        dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
index 356e74d20b80f1d30f73650c23ef6acc1e7569ed..337bdcd5abc91227ca95bdf7ae63d8ca8f4e3c5c 100644 (file)
@@ -2353,7 +2353,7 @@ static int start_nic(struct s2io_nic *nic)
 
        if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER) {
                /*
-                * Dont see link state interrupts initally on some switches,
+                * Dont see link state interrupts initially on some switches,
                 * so directly scheduling the link state task here.
                 */
                schedule_work(&nic->set_link_task);
@@ -3563,7 +3563,7 @@ static void s2io_reset(struct s2io_nic *sp)
        }
 
        /*
-        * Clear spurious ECC interrupts that would have occured on
+        * Clear spurious ECC interrupts that would have occurred on
         * XFRAME II cards after reset.
         */
        if (sp->device_type == XFRAME_II_DEVICE) {
@@ -4065,7 +4065,7 @@ static int s2io_close(struct net_device *dev)
  *  Description :
  *  This function is the Tx entry point of the driver. S2IO NIC supports
  *  certain protocol assist features on Tx side, namely  CSO, S/G, LSO.
- *  NOTE: when device cant queue the pkt,just the trans_start variable will
+ *  NOTE: when device can't queue the pkt,just the trans_start variable will
  *  not be upadted.
  *  Return value:
  *  0 on success & 1 on failure.
index 7d160306b651adf34cbe19fc4e642d5e76f43a6d..2d144979f6f863c5d8b16a62708f1f9816c6e2ea 100644 (file)
@@ -376,7 +376,7 @@ static const u16 fifo_selector[MAX_TX_FIFOS] = {0, 1, 3, 3, 7, 7, 7, 7};
 /* Maintains Per FIFO related information. */
 struct tx_fifo_config {
 #define        MAX_AVAILABLE_TXDS      8192
-       u32 fifo_len;           /* specifies len of FIFO upto 8192, ie no of TxDLs */
+       u32 fifo_len;           /* specifies len of FIFO up to 8192, ie no of TxDLs */
 /* Priority definition */
 #define TX_FIFO_PRI_0               0  /*Highest */
 #define TX_FIFO_PRI_1               1
index d890679e4c4d293538b0e8d98cb1f34466e23947..a3c2aab53de8d29407e11386e51c7fefcd00c402 100644 (file)
@@ -328,7 +328,8 @@ static int efx_poll(struct napi_struct *napi, int budget)
  * processing to finish, then directly poll (and ack ) the eventq.
  * Finally reenable NAPI and interrupts.
  *
- * Since we are touching interrupts the caller should hold the suspend lock
+ * This is for use only during a loopback self-test.  It must not
+ * deliver any packets up the stack as this can result in deadlock.
  */
 void efx_process_channel_now(struct efx_channel *channel)
 {
@@ -336,6 +337,7 @@ void efx_process_channel_now(struct efx_channel *channel)
 
        BUG_ON(channel->channel >= efx->n_channels);
        BUG_ON(!channel->enabled);
+       BUG_ON(!efx->loopback_selftest);
 
        /* Disable interrupts and wait for ISRs to complete */
        efx_nic_disable_interrupts(efx);
@@ -1436,7 +1438,7 @@ static void efx_start_all(struct efx_nic *efx)
         * restart the transmit interface early so the watchdog timer stops */
        efx_start_port(efx);
 
-       if (efx_dev_registered(efx))
+       if (efx_dev_registered(efx) && !efx->port_inhibited)
                netif_tx_wake_all_queues(efx->net_dev);
 
        efx_for_each_channel(channel, efx)
index 734fcfb52e856aa67fa08e28e3df82d3663a9aab..d96b23769bd1e613e576388c87f5dbc1e5c5fdf5 100644 (file)
@@ -692,7 +692,7 @@ static int falcon_gmii_wait(struct efx_nic *efx)
        efx_oword_t md_stat;
        int count;
 
-       /* wait upto 50ms - taken max from datasheet */
+       /* wait up to 50ms - taken max from datasheet */
        for (count = 0; count < 5000; count++) {
                efx_reado(efx, &md_stat, FR_AB_MD_STAT);
                if (EFX_OWORD_FIELD(md_stat, FRF_AB_MD_BSY) == 0) {
@@ -1221,7 +1221,7 @@ static int falcon_reset_sram(struct efx_nic *efx)
 
                        return 0;
                }
-       } while (++count < 20); /* wait upto 0.4 sec */
+       } while (++count < 20); /* wait up to 0.4 sec */
 
        netif_err(efx, hw, efx->net_dev, "timed out waiting for SRAM reset\n");
        return -ETIMEDOUT;
index d9d8c2ef1074a3de6278eff70d7894cc8cc65991..cc978803d484bf84510ca5beb24ca41dd83a93ba 100644 (file)
@@ -152,6 +152,7 @@ static inline void efx_reado(struct efx_nic *efx, efx_oword_t *value,
 
        spin_lock_irqsave(&efx->biu_lock, flags);
        value->u32[0] = _efx_readd(efx, reg + 0);
+       rmb();
        value->u32[1] = _efx_readd(efx, reg + 4);
        value->u32[2] = _efx_readd(efx, reg + 8);
        value->u32[3] = _efx_readd(efx, reg + 12);
@@ -174,6 +175,7 @@ static inline void efx_sram_readq(struct efx_nic *efx, void __iomem *membase,
        value->u64[0] = (__force __le64)__raw_readq(membase + addr);
 #else
        value->u32[0] = (__force __le32)__raw_readl(membase + addr);
+       rmb();
        value->u32[1] = (__force __le32)__raw_readl(membase + addr + 4);
 #endif
        spin_unlock_irqrestore(&efx->biu_lock, flags);
index 5e118f0d2479231e1f0069062c6cd9d5582d423a..d98479030ef2c3e3dbac1d9a0c0f4a3f1262e91f 100644 (file)
@@ -453,7 +453,7 @@ static void efx_mcdi_ev_death(struct efx_nic *efx, int rc)
         *
         * There's a race here with efx_mcdi_rpc(), because we might receive
         * a REBOOT event *before* the request has been copied out. In polled
-        * mode (during startup) this is irrelevent, because efx_mcdi_complete()
+        * mode (during startup) this is irrelevant, because efx_mcdi_complete()
         * is ignored. In event mode, this condition is just an edge-case of
         * receiving a REBOOT event after posting the MCDI request. Did the mc
         * reboot before or after the copyout? The best we can do always is
index b86a15f221ade983c075e18205f7187860c57f3e..41fe06fa06003fabd1ab6c1305832c1640f82926 100644 (file)
  *
  * If Code==CMDDONE, then the fields are further interpreted as:
  *
- *   - LEVEL==INFO    Command succeded
+ *   - LEVEL==INFO    Command succeeded
  *   - LEVEL==ERR     Command failed
  *
  *    0     8         16      24     32
   (4*(_numwords))
 
 /* MC_CMD_SET_RAND_SEED:
- * Set the 16byte seed for the MC psuedo-random generator
+ * Set the 16byte seed for the MC pseudo-random generator
  */
 #define MC_CMD_SET_RAND_SEED 0x1a
 #define MC_CMD_SET_RAND_SEED_IN_LEN 16
 #define MC_CMD_MAC_STATS_CMD_CLEAR_WIDTH 1
 #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_LBN 2
 #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_WIDTH 1
-/* Remaining PERIOD* fields only relevent when PERIODIC_CHANGE is set */
+/* Remaining PERIOD* fields only relevant when PERIODIC_CHANGE is set */
 #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_LBN 3
 #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_WIDTH 1
 #define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_LBN 4
index ec3f740f54655fa206e1763276554f406e5d8865..7e3c65b0c99fb01cd89bae0c0e7fddd1bb4d2805 100644 (file)
@@ -449,7 +449,7 @@ void efx_mcdi_phy_check_fcntl(struct efx_nic *efx, u32 lpa)
        struct efx_mcdi_phy_data *phy_cfg = efx->phy_data;
        u32 rmtadv;
 
-       /* The link partner capabilities are only relevent if the
+       /* The link partner capabilities are only relevant if the
         * link supports flow control autonegotiation */
        if (~phy_cfg->supported_cap & (1 << MC_CMD_PHY_CAP_AN_LBN))
                return;
index 215d5c51bfa0c424e2030347690dded37e5433ee..191a311da2dc77b4bfa65bcb927148cf791a54a0 100644 (file)
@@ -330,7 +330,6 @@ enum efx_rx_alloc_method {
  * @eventq_mask: Event queue pointer mask
  * @eventq_read_ptr: Event queue read pointer
  * @last_eventq_read_ptr: Last event queue read pointer value.
- * @magic_count: Event queue test event count
  * @irq_count: Number of IRQs since last adaptive moderation decision
  * @irq_mod_score: IRQ moderation score
  * @rx_alloc_level: Watermark based heuristic counter for pushing descriptors
@@ -360,7 +359,6 @@ struct efx_channel {
        unsigned int eventq_mask;
        unsigned int eventq_read_ptr;
        unsigned int last_eventq_read_ptr;
-       unsigned int magic_count;
 
        unsigned int irq_count;
        unsigned int irq_mod_score;
@@ -670,7 +668,7 @@ struct efx_filter_state;
  * @irq_zero_count: Number of legacy IRQs seen with queue flags == 0
  * @fatal_irq_level: IRQ level (bit number) used for serious errors
  * @mtd_list: List of MTDs attached to the NIC
- * @nic_data: Hardware dependant state
+ * @nic_data: Hardware dependent state
  * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode,
  *     @port_inhibited, efx_monitor() and efx_reconfigure_port()
  * @port_enabled: Port enabled indicator.
index e8396614daf38b4e7d7c923a65d2bb109f066d98..10f1cb79c1472cfb91f9a50f16f827248bd00c96 100644 (file)
@@ -84,7 +84,8 @@ static inline void efx_write_buf_tbl(struct efx_nic *efx, efx_qword_t *value,
 static inline efx_qword_t *efx_event(struct efx_channel *channel,
                                     unsigned int index)
 {
-       return ((efx_qword_t *) (channel->eventq.addr)) + index;
+       return ((efx_qword_t *) (channel->eventq.addr)) +
+               (index & channel->eventq_mask);
 }
 
 /* See if an event is present
@@ -673,7 +674,8 @@ void efx_nic_eventq_read_ack(struct efx_channel *channel)
        efx_dword_t reg;
        struct efx_nic *efx = channel->efx;
 
-       EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR, channel->eventq_read_ptr);
+       EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR,
+                            channel->eventq_read_ptr & channel->eventq_mask);
        efx_writed_table(efx, &reg, efx->type->evq_rptr_tbl_base,
                         channel->channel);
 }
@@ -908,7 +910,7 @@ efx_handle_generated_event(struct efx_channel *channel, efx_qword_t *event)
 
        code = EFX_QWORD_FIELD(*event, FSF_AZ_DRV_GEN_EV_MAGIC);
        if (code == EFX_CHANNEL_MAGIC_TEST(channel))
-               ++channel->magic_count;
+               ; /* ignore */
        else if (code == EFX_CHANNEL_MAGIC_FILL(channel))
                /* The queue must be empty, so we won't receive any rx
                 * events, so efx_process_channel() won't refill the
@@ -1015,8 +1017,7 @@ int efx_nic_process_eventq(struct efx_channel *channel, int budget)
                /* Clear this event by marking it all ones */
                EFX_SET_QWORD(*p_event);
 
-               /* Increment read pointer */
-               read_ptr = (read_ptr + 1) & channel->eventq_mask;
+               ++read_ptr;
 
                ev_code = EFX_QWORD_FIELD(event, FSF_AZ_EV_CODE);
 
@@ -1060,6 +1061,13 @@ out:
        return spent;
 }
 
+/* Check whether an event is present in the eventq at the current
+ * read pointer.  Only useful for self-test.
+ */
+bool efx_nic_event_present(struct efx_channel *channel)
+{
+       return efx_event_present(efx_event(channel, channel->eventq_read_ptr));
+}
 
 /* Allocate buffer table entries for event queue */
 int efx_nic_probe_eventq(struct efx_channel *channel)
@@ -1165,7 +1173,7 @@ static void efx_poll_flush_events(struct efx_nic *efx)
        struct efx_tx_queue *tx_queue;
        struct efx_rx_queue *rx_queue;
        unsigned int read_ptr = channel->eventq_read_ptr;
-       unsigned int end_ptr = (read_ptr - 1) & channel->eventq_mask;
+       unsigned int end_ptr = read_ptr + channel->eventq_mask - 1;
 
        do {
                efx_qword_t *event = efx_event(channel, read_ptr);
@@ -1205,7 +1213,7 @@ static void efx_poll_flush_events(struct efx_nic *efx)
                 * it's ok to throw away every non-flush event */
                EFX_SET_QWORD(*event);
 
-               read_ptr = (read_ptr + 1) & channel->eventq_mask;
+               ++read_ptr;
        } while (read_ptr != end_ptr);
 
        channel->eventq_read_ptr = read_ptr;
index d9de1b647d416b601f62cb1e6a1a6f56f09a4830..a42db6e35be39166d86f72887def5619c581dc58 100644 (file)
@@ -184,6 +184,7 @@ extern void efx_nic_fini_eventq(struct efx_channel *channel);
 extern void efx_nic_remove_eventq(struct efx_channel *channel);
 extern int efx_nic_process_eventq(struct efx_channel *channel, int rx_quota);
 extern void efx_nic_eventq_read_ack(struct efx_channel *channel);
+extern bool efx_nic_event_present(struct efx_channel *channel);
 
 /* MAC/PHY */
 extern void falcon_drain_tx_fifo(struct efx_nic *efx);
index a0f49b348d62872be7512019083badfc50ab9db8..50ad3bcaf68a243ec41d78d72e1cd358c0455e59 100644 (file)
@@ -131,8 +131,6 @@ static int efx_test_chip(struct efx_nic *efx, struct efx_self_tests *tests)
 static int efx_test_interrupts(struct efx_nic *efx,
                               struct efx_self_tests *tests)
 {
-       struct efx_channel *channel;
-
        netif_dbg(efx, drv, efx->net_dev, "testing interrupts\n");
        tests->interrupt = -1;
 
@@ -140,15 +138,6 @@ static int efx_test_interrupts(struct efx_nic *efx,
        efx->last_irq_cpu = -1;
        smp_wmb();
 
-       /* ACK each interrupting event queue. Receiving an interrupt due to
-        * traffic before a test event is raised is considered a pass */
-       efx_for_each_channel(channel, efx) {
-               if (channel->work_pending)
-                       efx_process_channel_now(channel);
-               if (efx->last_irq_cpu >= 0)
-                       goto success;
-       }
-
        efx_nic_generate_interrupt(efx);
 
        /* Wait for arrival of test interrupt. */
@@ -173,13 +162,13 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
                               struct efx_self_tests *tests)
 {
        struct efx_nic *efx = channel->efx;
-       unsigned int magic_count, count;
+       unsigned int read_ptr, count;
 
        tests->eventq_dma[channel->channel] = -1;
        tests->eventq_int[channel->channel] = -1;
        tests->eventq_poll[channel->channel] = -1;
 
-       magic_count = channel->magic_count;
+       read_ptr = channel->eventq_read_ptr;
        channel->efx->last_irq_cpu = -1;
        smp_wmb();
 
@@ -190,10 +179,7 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
        do {
                schedule_timeout_uninterruptible(HZ / 100);
 
-               if (channel->work_pending)
-                       efx_process_channel_now(channel);
-
-               if (channel->magic_count != magic_count)
+               if (ACCESS_ONCE(channel->eventq_read_ptr) != read_ptr)
                        goto eventq_ok;
        } while (++count < 2);
 
@@ -211,8 +197,7 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
        }
 
        /* Check to see if event was received even if interrupt wasn't */
-       efx_process_channel_now(channel);
-       if (channel->magic_count != magic_count) {
+       if (efx_nic_event_present(channel)) {
                netif_err(efx, drv, efx->net_dev,
                          "channel %d event was generated, but "
                          "failed to trigger an interrupt\n", channel->channel);
@@ -770,6 +755,8 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
        __efx_reconfigure_port(efx);
        mutex_unlock(&efx->mac_lock);
 
+       netif_tx_wake_all_queues(efx->net_dev);
+
        return rc_test;
 }
 
index 13980190821762aa47a31729b688e5b36001ef77..d2c85dfdf3bf3a338349dbe21a5547d99cd6c98a 100644 (file)
@@ -435,7 +435,8 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
         * queue state. */
        smp_mb();
        if (unlikely(netif_tx_queue_stopped(tx_queue->core_txq)) &&
-           likely(efx->port_enabled)) {
+           likely(efx->port_enabled) &&
+           likely(!efx->port_inhibited)) {
                fill_level = tx_queue->insert_count - tx_queue->read_count;
                if (fill_level < EFX_TXQ_THRESHOLD(efx)) {
                        EFX_BUG_ON_PARANOID(!efx_dev_registered(efx));
index 3a0cc63428eec6d8222dee806b0594af9aa9f95c..dd03bf6199888435f2262b2b52b8599f4116d353 100644 (file)
@@ -33,7 +33,7 @@ static char *sgiseeqstr = "SGI Seeq8003";
  * with that in mind, I've decided to make this driver look completely like a
  * stupid Lance from a driver architecture perspective.  Only difference is that
  * here our "ring buffer" looks and acts like a real Lance one does but is
- * layed out like how the HPC DMA and the Seeq want it to.  You'd be surprised
+ * laid out like how the HPC DMA and the Seeq want it to.  You'd be surprised
  * how a stupid idea like this can pay off in performance, not to mention
  * making this driver 2,000 times easier to write. ;-)
  */
@@ -77,7 +77,7 @@ struct sgiseeq_tx_desc {
 };
 
 /*
- * Warning: This structure is layed out in a certain way because HPC dma
+ * Warning: This structure is laid out in a certain way because HPC dma
  *          descriptors must be 8-byte aligned.  So don't touch this without
  *          some care.
  */
index e9e7a530552ca28c3a3dc7ba1f730273d753960e..8a72a979ee711262a613ddbe6e0fd3276b6f77d4 100644 (file)
@@ -1875,7 +1875,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
        if (ret)
                goto out_unregister;
 
-       /* print device infomation */
+       /* print device information */
        pr_info("Base address at 0x%x, %pM, IRQ %d.\n",
               (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
 
index 3406ed8709176eefebd268fb66bb82b168c8410b..b436e007eea0583326312e289e7e4506295ea61a 100644 (file)
@@ -93,7 +93,7 @@ enum sis190_registers {
        IntrStatus              = 0x20,
        IntrMask                = 0x24,
        IntrControl             = 0x28,
-       IntrTimer               = 0x2c, // unused (Interupt Timer)
+       IntrTimer               = 0x2c, // unused (Interrupt Timer)
        PMControl               = 0x30, // unused (Power Mgmt Control/Status)
        rsv2                    = 0x34, // reserved
        ROMControl              = 0x38,
@@ -234,7 +234,7 @@ enum _DescStatusBit {
        RxSizeMask      = 0x0000ffff
        /*
         * The asic could apparently do vlan, TSO, jumbo (sis191 only) and
-        * provide two (unused with Linux) Tx queues. No publically
+        * provide two (unused with Linux) Tx queues. No publicly
         * available documentation alas.
         */
 };
index 84d4167eee9ad83a3c40b99f4221201aacde40f3..484f795a779dbca9b20e4f089d06cf1b9e253a50 100644 (file)
@@ -240,7 +240,8 @@ static const struct ethtool_ops sis900_ethtool_ops;
  *     @net_dev: the net device to get address for
  *
  *     Older SiS900 and friends, use EEPROM to store MAC address.
- *     MAC address is read from read_eeprom() into @net_dev->dev_addr.
+ *     MAC address is read from read_eeprom() into @net_dev->dev_addr and
+ *     @net_dev->perm_addr.
  */
 
 static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_device *net_dev)
@@ -261,6 +262,9 @@ static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_de
        for (i = 0; i < 3; i++)
                ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);
 
+       /* Store MAC Address in perm_addr */
+       memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
+
        return 1;
 }
 
@@ -271,7 +275,8 @@ static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_de
  *
  *     SiS630E model, use APC CMOS RAM to store MAC address.
  *     APC CMOS RAM is accessed through ISA bridge.
- *     MAC address is read into @net_dev->dev_addr.
+ *     MAC address is read into @net_dev->dev_addr and
+ *     @net_dev->perm_addr.
  */
 
 static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
@@ -296,6 +301,10 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
                outb(0x09 + i, 0x70);
                ((u8 *)(net_dev->dev_addr))[i] = inb(0x71);
        }
+
+       /* Store MAC Address in perm_addr */
+       memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
+
        pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40);
        pci_dev_put(isa_bridge);
 
@@ -310,7 +319,7 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
  *
  *     SiS635 model, set MAC Reload Bit to load Mac address from APC
  *     to rfdr. rfdr is accessed through rfcr. MAC address is read into
- *     @net_dev->dev_addr.
+ *     @net_dev->dev_addr and @net_dev->perm_addr.
  */
 
 static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev,
@@ -334,6 +343,9 @@ static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev,
                *( ((u16 *)net_dev->dev_addr) + i) = inw(ioaddr + rfdr);
        }
 
+       /* Store MAC Address in perm_addr */
+       memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
+
        /* enable packet filtering */
        outl(rfcrSave | RFEN, rfcr + ioaddr);
 
@@ -353,7 +365,7 @@ static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev,
  *     EEDONE signal to refuse EEPROM access by LAN.
  *     The EEPROM map of SiS962 or SiS963 is different to SiS900.
  *     The signature field in SiS962 or SiS963 spec is meaningless.
- *     MAC address is read into @net_dev->dev_addr.
+ *     MAC address is read into @net_dev->dev_addr and @net_dev->perm_addr.
  */
 
 static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev,
@@ -372,6 +384,9 @@ static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev,
                        for (i = 0; i < 3; i++)
                                ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);
 
+                       /* Store MAC Address in perm_addr */
+                       memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);
+
                        outl(EEDONE, ee_addr);
                        return 1;
                } else {
@@ -1180,7 +1195,7 @@ sis900_init_rx_ring(struct net_device *net_dev)
  *
  *     630E equalizer workaround rule(Cyrus Huang 08/15)
  *     PHY register 14h(Test)
- *     Bit 14: 0 -- Automatically dectect (default)
+ *     Bit 14: 0 -- Automatically detect (default)
  *             1 -- Manually set Equalizer filter
  *     Bit 13: 0 -- (Default)
  *             1 -- Speed up convergence of equalizer setting
@@ -1192,7 +1207,7 @@ sis900_init_rx_ring(struct net_device *net_dev)
  *     Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0
  *     Link Off:Set Bit 13 to 1, Bit 14 to 0
  *     Calculate Equalizer value:
- *     When Link is ON and Bit 14 is 0, SIS900PHY will auto-dectect proper equalizer value.
+ *     When Link is ON and Bit 14 is 0, SIS900PHY will auto-detect proper equalizer value.
  *     When the equalizer is stable, this value is not a fixed value. It will be within
  *     a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9)
  *     0 <= max <= 4  --> set equalizer to max
@@ -1723,7 +1738,7 @@ static int sis900_rx(struct net_device *net_dev)
                rx_size = data_size - CRC_SIZE;
 
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-               /* ``TOOLONG'' flag means jumbo packet recived. */
+               /* ``TOOLONG'' flag means jumbo packet received. */
                if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE)
                        rx_status &= (~ ((unsigned int)TOOLONG));
 #endif
index 8639a0884f5c59cbda034120a7b1d5a68932c6df..2fc5987b41dc2ec072cc92b41ec4026cc887d2b1 100644 (file)
@@ -241,7 +241,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm,
                        != SMT_RDF_SUCCESS) ||
                        (sm->smt_tid != smc->ess.alloc_trans_id)) {
 
-                       DB_ESS("ESS: Allocation Responce not accepted\n",0,0) ;
+                       DB_ESS("ESS: Allocation Response not accepted\n",0,0) ;
                        return fs;
                }
 
@@ -393,7 +393,7 @@ static int process_bw_alloc(struct s_smc *smc, long int payload, long int overhe
         *                    |  T-NEG  |
         *                     -       -
         *
-        * T-NEG is discribed by the equation:
+        * T-NEG is described by the equation:
         *
         *                   (-) fddiMACT-NEG
         *      T-NEG =     -------------------
@@ -479,7 +479,7 @@ static void ess_send_response(struct s_smc *smc, struct smt_header *sm,
        void                    *p ;
 
        /*
-        * get and initialize the responce frame
+        * get and initialize the response frame
         */
        if (sba_cmd == CHANGE_ALLOCATION) {
                if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REPLY,
@@ -578,7 +578,7 @@ static void ess_send_alc_req(struct s_smc *smc)
        }
        
        /*
-        * get and initialize the responce frame
+        * get and initialize the response frame
         */
        if (!(mb=smt_build_frame(smc,SMT_RAF,SMT_REQUEST,
                        sizeof(struct smt_sba_alc_req))))
index ca4e7bb6a5a8a0f592778821bf722c1d25803cfa..a20ed1a98099f3d959317f68964bbd88639e3d8b 100644 (file)
@@ -340,7 +340,7 @@ static void mac_counter_init(struct s_smc *smc)
        outpw(FM_A(FM_LCNTR),0) ;
        outpw(FM_A(FM_ECNTR),0) ;
        /*
-        * clear internal error counter stucture
+        * clear internal error counter structure
         */
        ec = (u_long *)&smc->hw.fp.err_stats ;
        for (i = (sizeof(struct err_st)/sizeof(long)) ; i ; i--)
@@ -1262,8 +1262,8 @@ Function  DOWNCALL/INTERN (SMT, fplustm.c)
 
 Para   mode =  1       RX_ENABLE_ALLMULTI      enable all multicasts
                2       RX_DISABLE_ALLMULTI     disable "enable all multicasts"
-               3       RX_ENABLE_PROMISC       enable promiscous
-               4       RX_DISABLE_PROMISC      disable promiscous
+               3       RX_ENABLE_PROMISC       enable promiscuous
+               4       RX_DISABLE_PROMISC      disable promiscuous
                5       RX_ENABLE_NSA           enable reception of NSA frames
                6       RX_DISABLE_NSA          disable reception of NSA frames
 
index f2f771d8be76b3a207ff8282b91fd2a8f7331703..5a6c6122ccb0769ee6639424e81057817cdb9245 100644 (file)
@@ -19,7 +19,7 @@
 
 /*
  * implementation specific constants
- * MODIIFY THE FOLLWOING THREE DEFINES
+ * MODIIFY THE FOLLOWING THREE DEFINES
  */
 #define AMDPLC                 /* if Amd PLC chip used */
 #ifdef CONC
@@ -456,7 +456,7 @@ struct s_plc {
        u_long soft_err ;               /* error counter */
        u_long parity_err ;             /* error counter */
        u_long ebuf_err ;               /* error counter */
-       u_long ebuf_cont ;              /* continous error counter */
+       u_long ebuf_cont ;              /* continuous error counter */
        u_long phyinv ;                 /* error counter */
        u_long vsym_ctr ;               /* error counter */
        u_long mini_ctr ;               /* error counter */
index 6d738e1e239336d94e152078506c22feca7c3e38..d43191ed938b41826079460d25b5107f21ab4800 100644 (file)
@@ -237,8 +237,8 @@ struct s_smt_fp {
  */
 #define RX_ENABLE_ALLMULTI     1       /* enable all multicasts */
 #define RX_DISABLE_ALLMULTI    2       /* disable "enable all multicasts" */
-#define RX_ENABLE_PROMISC      3       /* enable promiscous */
-#define RX_DISABLE_PROMISC     4       /* disable promiscous */
+#define RX_ENABLE_PROMISC      3       /* enable promiscuous */
+#define RX_DISABLE_PROMISC     4       /* disable promiscuous */
 #define RX_ENABLE_NSA          5       /* enable reception of NSA frames */
 #define RX_DISABLE_NSA         6       /* disable reception of NSA frames */
 
index 026a83b9f743e959c026e6c8059e8e3be81781ab..c774a95902f5e3834e59f7845ad7d69566151ae9 100644 (file)
@@ -388,7 +388,7 @@ struct smt_config {
        u_long  rmt_t_poll ;            /* RMT : claim/beacon poller */
        u_long  rmt_dup_mac_behavior ;  /* Flag for the beavior of SMT if
                                         * a Duplicate MAC Address was detected.
-                                        * FALSE: SMT will leave finaly the ring
+                                        * FALSE: SMT will leave finally the ring
                                         * TRUE:  SMT will reinstert into the ring
                                         */
        u_long  mac_d_max ;             /* MAC : D_Max timer value */
index 2976757a36fbdfe0ad96f74e4d6ca754a7fcc7ee..2030f9cbb24b7d3a15c1eecc8aaca7b123f6f19a 100644 (file)
@@ -793,7 +793,7 @@ struct smt_rdf {
 } ;
 
 /*
- * SBA Request Allocation Responce Frame
+ * SBA Request Allocation Response Frame
  */
 struct smt_sba_alc_res {
        struct smt_header       smt ;           /* generic header */
index 5ba0b8306753d989f3aa493944f31439a2e06e0f..0b73690280f6ffafd2590c82d2da203035939864 100644 (file)
@@ -14,7 +14,7 @@
 
 /*
        defines for AMD Supernet II chip set
-       the chips are refered to as
+       the chips are referred to as
                FPLUS   Formac Plus
                PLC     Physical Layer
 
@@ -386,7 +386,7 @@ struct tx_queue {
 #define        FM_MDISRCV      (4<<8)          /* disable receive function */
 #define        FM_MRES0        (5<<8)          /* reserve */
 #define        FM_MLIMPROM     (6<<8)          /* limited-promiscuous mode */
-#define FM_MPROMISCOUS (7<<8)          /* address detection : promiscous */
+#define FM_MPROMISCOUS (7<<8)          /* address detection : promiscuous */
 
 #define FM_SELSA       0x0800          /* select-short-address bit */
 
index af5a755e269de6077c14310d04502ccd526b4dad..e26398b5a7dcfec95bb2ca33cb521753a832eeab 100644 (file)
@@ -691,7 +691,7 @@ static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue)
  *             interrupt service routine, handles the interrupt requests
  *             generated by the FDDI adapter.
  *
- * NOTE:       The operating system dependent module must garantee that the
+ * NOTE:       The operating system dependent module must guarantee that the
  *             interrupts of the adapter are disabled when it calls fddi_isr.
  *
  *     About the USE_BREAK_ISR mechanismn:
index 112d35b1bf0ebc5f6b2b082c46d373dbaf7b6716..88d02d0a42c4ac1e93d576b1eb802c15adadd10c 100644 (file)
@@ -1680,7 +1680,7 @@ void plc_irq(struct s_smc *smc, int np, unsigned int cmd)
                         * Prevent counter from being wrapped after
                         * hanging years in that interrupt.
                         */
-                       plc->ebuf_cont++ ;      /* Ebuf continous error */
+                       plc->ebuf_cont++ ;      /* Ebuf continuous error */
                }
 
 #ifdef SUPERNET_3
@@ -1717,8 +1717,8 @@ void plc_irq(struct s_smc *smc, int np, unsigned int cmd)
                }
 #endif /* SUPERNET_3 */
        } else {
-               /* Reset the continous error variable */
-               plc->ebuf_cont = 0 ;    /* reset Ebuf continous error */
+               /* Reset the continuous error variable */
+               plc->ebuf_cont = 0 ;    /* reset Ebuf continuous error */
        }
        if (cmd & PL_PHYINV) {          /* physical layer invalid signal */
                plc->phyinv++ ;
index 1e1bd0c201c8f1db898a95bf97adf44fae4cc944..08d94329c12ff7502580c21ccad49a48a6a84148 100644 (file)
@@ -219,7 +219,7 @@ void smt_emulate_token_ct(struct s_smc *smc, int mac_index)
 
        /*
         * Only when ring is up we will have a token count. The
-        * flag is unfortunatly a single instance value. This
+        * flag is unfortunately a single instance value. This
         * doesn't matter now, because we currently have only
         * one MAC instance.
         */
index 507addcaffa3aa844368b4b7dd61b5285156089c..51c0214ac25c05493e28ee666e14294d40c349ac 100644 (file)
@@ -1038,7 +1038,7 @@ enum {
 
        PHY_ST_PRE_SUP  = 1<<6, /* Bit  6:      Preamble Suppression */
        PHY_ST_AN_OVER  = 1<<5, /* Bit  5:      Auto-Negotiation Over */
-       PHY_ST_REM_FLT  = 1<<4, /* Bit  4:      Remote Fault Condition Occured */
+       PHY_ST_REM_FLT  = 1<<4, /* Bit  4:      Remote Fault Condition Occurred */
        PHY_ST_AN_CAP   = 1<<3, /* Bit  3:      Auto-Negotiation Capability */
        PHY_ST_LSYNC    = 1<<2, /* Bit  2:      Link Synchronized */
        PHY_ST_JAB_DET  = 1<<1, /* Bit  1:      Jabber Detected */
@@ -1721,8 +1721,8 @@ enum {
        GM_GPSR_LINK_UP         = 1<<12, /* Bit 12:     Link Up Status */
        GM_GPSR_PAUSE           = 1<<11, /* Bit 11:     Pause State */
        GM_GPSR_TX_ACTIVE       = 1<<10, /* Bit 10:     Tx in Progress */
-       GM_GPSR_EXC_COL         = 1<<9, /* Bit  9:      Excessive Collisions Occured */
-       GM_GPSR_LAT_COL         = 1<<8, /* Bit  8:      Late Collisions Occured */
+       GM_GPSR_EXC_COL         = 1<<9, /* Bit  9:      Excessive Collisions Occurred */
+       GM_GPSR_LAT_COL         = 1<<8, /* Bit  8:      Late Collisions Occurred */
 
        GM_GPSR_PHY_ST_CH       = 1<<5, /* Bit  5:      PHY Status Change */
        GM_GPSR_GIG_SPEED       = 1<<4, /* Bit  4:      Gigabit Speed (1 = 1000 Mbps) */
@@ -2227,7 +2227,7 @@ enum {
        XM_ST_BC        = 1<<7,         /* Bit  7:      Broadcast packet */
        XM_ST_MC        = 1<<6,         /* Bit  6:      Multicast packet */
        XM_ST_UC        = 1<<5,         /* Bit  5:      Unicast packet */
-       XM_ST_TX_UR     = 1<<4,         /* Bit  4:      FIFO Underrun occured */
+       XM_ST_TX_UR     = 1<<4,         /* Bit  4:      FIFO Underrun occurred */
        XM_ST_CS_ERR    = 1<<3,         /* Bit  3:      Carrier Sense Error */
        XM_ST_LAT_COL   = 1<<2,         /* Bit  2:      Late Collision Error */
        XM_ST_MUL_COL   = 1<<1,         /* Bit  1:      Multiple Collisions */
index 2a91868788f7a00468934f162aa40fb5db456151..ff8d262dc27617041e98f9c3fc9128f87ae4e88c 100644 (file)
@@ -932,7 +932,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
        sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR);
        sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON);
 
-       /* On chips without ram buffer, pause is controled by MAC level */
+       /* On chips without ram buffer, pause is controlled by MAC level */
        if (!(hw->flags & SKY2_HW_RAM_BUFFER)) {
                /* Pause threshold is scaled by 8 in bytes */
                if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
@@ -3255,7 +3255,7 @@ static void sky2_reset(struct sky2_hw *hw)
 
 /* Take device down (offline).
  * Equivalent to doing dev_stop() but this does not
- * inform upper layers of the transistion.
+ * inform upper layers of the transition.
  */
 static void sky2_detach(struct net_device *dev)
 {
index 6861b0e8db9a831e60f46a893630f2a1195e2000..0c6d10c5f05351b0240ccef235f64580945f05a8 100644 (file)
@@ -1194,7 +1194,7 @@ enum {
 
        PHY_ST_PRE_SUP  = 1<<6, /* Bit  6:      Preamble Suppression */
        PHY_ST_AN_OVER  = 1<<5, /* Bit  5:      Auto-Negotiation Over */
-       PHY_ST_REM_FLT  = 1<<4, /* Bit  4:      Remote Fault Condition Occured */
+       PHY_ST_REM_FLT  = 1<<4, /* Bit  4:      Remote Fault Condition Occurred */
        PHY_ST_AN_CAP   = 1<<3, /* Bit  3:      Auto-Negotiation Capability */
        PHY_ST_LSYNC    = 1<<2, /* Bit  2:      Link Synchronized */
        PHY_ST_JAB_DET  = 1<<1, /* Bit  1:      Jabber Detected */
@@ -1725,8 +1725,8 @@ enum {
        GM_GPSR_LINK_UP         = 1<<12, /* Bit 12:     Link Up Status */
        GM_GPSR_PAUSE           = 1<<11, /* Bit 11:     Pause State */
        GM_GPSR_TX_ACTIVE       = 1<<10, /* Bit 10:     Tx in Progress */
-       GM_GPSR_EXC_COL         = 1<<9, /* Bit  9:      Excessive Collisions Occured */
-       GM_GPSR_LAT_COL         = 1<<8, /* Bit  8:      Late Collisions Occured */
+       GM_GPSR_EXC_COL         = 1<<9, /* Bit  9:      Excessive Collisions Occurred */
+       GM_GPSR_LAT_COL         = 1<<8, /* Bit  8:      Late Collisions Occurred */
 
        GM_GPSR_PHY_ST_CH       = 1<<5, /* Bit  5:      PHY Status Change */
        GM_GPSR_GIG_SPEED       = 1<<4, /* Bit  4:      Gigabit Speed (1 = 1000 Mbps) */
index 68d48ab6eacf85149af6731f04bb732b27c93f36..5f53fbbf67be84acf2c1fe1e4f0e8541bce86617 100644 (file)
@@ -921,7 +921,7 @@ static const char * chip_ids[ 16 ] =  {
  * Hack Alert: Some setups just can't write 8 or 16 bits reliably when not
  * aligned to a 32 bit boundary.  I tell you that does exist!
  * Fortunately the affected register accesses can be easily worked around
- * since we can write zeroes to the preceeding 16 bits without adverse
+ * since we can write zeroes to the preceding 16 bits without adverse
  * effects and use a 32-bit access.
  *
  * Enforce it on any 32-bit capable setup for now.
index 1566259c1f27aafe88f53a18fe31195773630524..4b42ecc63dcfd582203141b5e8f92ddfb42a25ba 100644 (file)
@@ -1669,7 +1669,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)
        }
 
        if (e2cmd & E2P_CMD_EPC_TIMEOUT_) {
-               SMSC_TRACE(DRV, "Error occured during eeprom operation");
+               SMSC_TRACE(DRV, "Error occurred during eeprom operation");
                return -EINVAL;
        }
 
@@ -1818,6 +1818,7 @@ static int __devinit smsc911x_init(struct net_device *dev)
        SMSC_TRACE(PROBE, "PHY will be autodetected.");
 
        spin_lock_init(&pdata->dev_lock);
+       spin_lock_init(&pdata->mac_lock);
 
        if (pdata->ioaddr == 0) {
                SMSC_WARNING(PROBE, "pdata->ioaddr: 0x00000000");
@@ -1895,8 +1896,11 @@ static int __devinit smsc911x_init(struct net_device *dev)
        /* workaround for platforms without an eeprom, where the mac address
         * is stored elsewhere and set by the bootloader.  This saves the
         * mac address before resetting the device */
-       if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS)
+       if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) {
+               spin_lock_irq(&pdata->mac_lock);
                smsc911x_read_mac_address(dev);
+               spin_unlock_irq(&pdata->mac_lock);
+       }
 
        /* Reset the LAN911x */
        if (smsc911x_soft_reset(pdata))
@@ -2059,8 +2063,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
                SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name);
        }
 
-       spin_lock_init(&pdata->mac_lock);
-
        retval = smsc911x_mii_init(pdev, dev);
        if (retval) {
                SMSC_WARNING(PROBE,
index b09ee1c319e8cb56f4813cad857765bf10fce87b..4c92ad8be765da20c6fa4f6f38b0756e1449904d 100644 (file)
@@ -364,7 +364,7 @@ static int smsc9420_eeprom_send_cmd(struct smsc9420_pdata *pd, u32 op)
        }
 
        if (e2cmd & E2P_CMD_EPC_TIMEOUT_) {
-               smsc_info(HW, "Error occured during eeprom operation");
+               smsc_info(HW, "Error occurred during eeprom operation");
                return -EINVAL;
        }
 
index a4f2bd52e546f522995df2fb7fae5721f94e0244..36045f3b03271117bc149bb036cfcb20ed639ca7 100644 (file)
@@ -144,11 +144,7 @@ static int full_duplex[MAX_UNITS] = {0, };
 /* Time in jiffies before concluding the transmitter is hung. */
 #define TX_TIMEOUT     (2 * HZ)
 
-/*
- * This SUCKS.
- * We need a much better method to determine if dma_addr_t is 64-bit.
- */
-#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || (defined(CONFIG_MIPS) && ((defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || defined(CONFIG_64BIT))) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT))
+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
 /* 64-bit dma_addr_t */
 #define ADDR_64BITS    /* This chip uses 64 bit addresses. */
 #define netdrv_addr_t __le64
index d65fab1ba790dfd0dba7af94bbf2506fc5566d7f..e25093510b0cd462af521f45aa5b3f43c98c0213 100644 (file)
@@ -26,9 +26,9 @@
 
 #undef DWMAC_DMA_DEBUG
 #ifdef DWMAC_DMA_DEBUG
-#define DBG(fmt, args...)  printk(fmt, ## args)
+#define DWMAC_LIB_DBG(fmt, args...)  printk(fmt, ## args)
 #else
-#define DBG(fmt, args...)  do { } while (0)
+#define DWMAC_LIB_DBG(fmt, args...)  do { } while (0)
 #endif
 
 /* CSR1 enables the transmit DMA to check for new descriptor */
@@ -152,7 +152,7 @@ int dwmac_dma_interrupt(void __iomem *ioaddr,
        /* read the status register (CSR5) */
        u32 intr_status = readl(ioaddr + DMA_STATUS);
 
-       DBG(INFO, "%s: [CSR5: 0x%08x]\n", __func__, intr_status);
+       DWMAC_LIB_DBG(KERN_INFO "%s: [CSR5: 0x%08x]\n", __func__, intr_status);
 #ifdef DWMAC_DMA_DEBUG
        /* It displays the DMA process states (CSR5 register) */
        show_tx_process_state(intr_status);
@@ -160,43 +160,43 @@ int dwmac_dma_interrupt(void __iomem *ioaddr,
 #endif
        /* ABNORMAL interrupts */
        if (unlikely(intr_status & DMA_STATUS_AIS)) {
-               DBG(INFO, "CSR5[15] DMA ABNORMAL IRQ: ");
+               DWMAC_LIB_DBG(KERN_INFO "CSR5[15] DMA ABNORMAL IRQ: ");
                if (unlikely(intr_status & DMA_STATUS_UNF)) {
-                       DBG(INFO, "transmit underflow\n");
+                       DWMAC_LIB_DBG(KERN_INFO "transmit underflow\n");
                        ret = tx_hard_error_bump_tc;
                        x->tx_undeflow_irq++;
                }
                if (unlikely(intr_status & DMA_STATUS_TJT)) {
-                       DBG(INFO, "transmit jabber\n");
+                       DWMAC_LIB_DBG(KERN_INFO "transmit jabber\n");
                        x->tx_jabber_irq++;
                }
                if (unlikely(intr_status & DMA_STATUS_OVF)) {
-                       DBG(INFO, "recv overflow\n");
+                       DWMAC_LIB_DBG(KERN_INFO "recv overflow\n");
                        x->rx_overflow_irq++;
                }
                if (unlikely(intr_status & DMA_STATUS_RU)) {
-                       DBG(INFO, "receive buffer unavailable\n");
+                       DWMAC_LIB_DBG(KERN_INFO "receive buffer unavailable\n");
                        x->rx_buf_unav_irq++;
                }
                if (unlikely(intr_status & DMA_STATUS_RPS)) {
-                       DBG(INFO, "receive process stopped\n");
+                       DWMAC_LIB_DBG(KERN_INFO "receive process stopped\n");
                        x->rx_process_stopped_irq++;
                }
                if (unlikely(intr_status & DMA_STATUS_RWT)) {
-                       DBG(INFO, "receive watchdog\n");
+                       DWMAC_LIB_DBG(KERN_INFO "receive watchdog\n");
                        x->rx_watchdog_irq++;
                }
                if (unlikely(intr_status & DMA_STATUS_ETI)) {
-                       DBG(INFO, "transmit early interrupt\n");
+                       DWMAC_LIB_DBG(KERN_INFO "transmit early interrupt\n");
                        x->tx_early_irq++;
                }
                if (unlikely(intr_status & DMA_STATUS_TPS)) {
-                       DBG(INFO, "transmit process stopped\n");
+                       DWMAC_LIB_DBG(KERN_INFO "transmit process stopped\n");
                        x->tx_process_stopped_irq++;
                        ret = tx_hard_error;
                }
                if (unlikely(intr_status & DMA_STATUS_FBI)) {
-                       DBG(INFO, "fatal bus error\n");
+                       DWMAC_LIB_DBG(KERN_INFO "fatal bus error\n");
                        x->fatal_bus_error_irq++;
                        ret = tx_hard_error;
                }
@@ -215,7 +215,7 @@ int dwmac_dma_interrupt(void __iomem *ioaddr,
        /* Clear the interrupt by writing a logic 1 to the CSR5[15-0] */
        writel((intr_status & 0x1ffff), ioaddr + DMA_STATUS);
 
-       DBG(INFO, "\n\n");
+       DWMAC_LIB_DBG(KERN_INFO "\n\n");
        return ret;
 }
 
index cd0cc76f7a1c8d3fbc3daf615a0c438a2880c07f..029c2a2cf5243aebaec8aba5d8d4eb9a7f3b72a7 100644 (file)
@@ -67,7 +67,7 @@ static int ndesc_get_tx_len(struct dma_desc *p)
 
 /* This function verifies if each incoming frame has some errors
  * and, if required, updates the multicast statistics.
- * In case of success, it returns csum_none becasue the device
+ * In case of success, it returns csum_none because the device
  * is not able to compute the csum in HW. */
 static int ndesc_get_rx_status(void *data, struct stmmac_extra_stats *x,
                               struct dma_desc *p)
index 0e5f03135b50abd053712ca6ddaf1e14df76a241..cc973fc384052bc2a5315aa982237b5bbc31015f 100644 (file)
@@ -750,7 +750,6 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)
                        priv->hw->dma->dma_mode(priv->ioaddr, tc, SF_DMA_MODE);
                        priv->xstats.threshold = tc;
                }
-               stmmac_tx_err(priv);
        } else if (unlikely(status == tx_hard_error))
                stmmac_tx_err(priv);
 }
@@ -781,21 +780,6 @@ static int stmmac_open(struct net_device *dev)
 
        stmmac_verify_args();
 
-       ret = stmmac_init_phy(dev);
-       if (unlikely(ret)) {
-               pr_err("%s: Cannot attach to PHY (error: %d)\n", __func__, ret);
-               return ret;
-       }
-
-       /* Request the IRQ lines */
-       ret = request_irq(dev->irq, stmmac_interrupt,
-                         IRQF_SHARED, dev->name, dev);
-       if (unlikely(ret < 0)) {
-               pr_err("%s: ERROR: allocating the IRQ %d (error: %d)\n",
-                      __func__, dev->irq, ret);
-               return ret;
-       }
-
 #ifdef CONFIG_STMMAC_TIMER
        priv->tm = kzalloc(sizeof(struct stmmac_timer *), GFP_KERNEL);
        if (unlikely(priv->tm == NULL)) {
@@ -814,6 +798,11 @@ static int stmmac_open(struct net_device *dev)
        } else
                priv->tm->enable = 1;
 #endif
+       ret = stmmac_init_phy(dev);
+       if (unlikely(ret)) {
+               pr_err("%s: Cannot attach to PHY (error: %d)\n", __func__, ret);
+               goto open_error;
+       }
 
        /* Create and initialize the TX/RX descriptors chains. */
        priv->dma_tx_size = STMMAC_ALIGN(dma_txsize);
@@ -822,12 +811,11 @@ static int stmmac_open(struct net_device *dev)
        init_dma_desc_rings(dev);
 
        /* DMA initialization and SW reset */
-       if (unlikely(priv->hw->dma->init(priv->ioaddr, priv->plat->pbl,
-                                        priv->dma_tx_phy,
-                                        priv->dma_rx_phy) < 0)) {
-
+       ret = priv->hw->dma->init(priv->ioaddr, priv->plat->pbl,
+                                 priv->dma_tx_phy, priv->dma_rx_phy);
+       if (ret < 0) {
                pr_err("%s: DMA initialization failed\n", __func__);
-               return -1;
+               goto open_error;
        }
 
        /* Copy the MAC addr into the HW  */
@@ -848,6 +836,15 @@ static int stmmac_open(struct net_device *dev)
        writel(0xffffffff, priv->ioaddr + MMC_HIGH_INTR_MASK);
        writel(0xffffffff, priv->ioaddr + MMC_LOW_INTR_MASK);
 
+       /* Request the IRQ lines */
+       ret = request_irq(dev->irq, stmmac_interrupt,
+                        IRQF_SHARED, dev->name, dev);
+       if (unlikely(ret < 0)) {
+               pr_err("%s: ERROR: allocating the IRQ %d (error: %d)\n",
+                      __func__, dev->irq, ret);
+               goto open_error;
+       }
+
        /* Enable the MAC Rx/Tx */
        stmmac_enable_mac(priv->ioaddr);
 
@@ -878,7 +875,17 @@ static int stmmac_open(struct net_device *dev)
        napi_enable(&priv->napi);
        skb_queue_head_init(&priv->rx_recycle);
        netif_start_queue(dev);
+
        return 0;
+
+open_error:
+#ifdef CONFIG_STMMAC_TIMER
+       kfree(priv->tm);
+#endif
+       if (priv->phydev)
+               phy_disconnect(priv->phydev);
+
+       return ret;
 }
 
 /**
index 8db88945b8899d83cb5dc2ab387d9d885a2810ba..4943e975a73135af4dd39d1e9f06a9f18b278a67 100644 (file)
 #define BIGMAC_RXCFG_ENABLE    0x00000001 /* Enable the receiver                      */
 #define BIGMAC_RXCFG_FIFO      0x0000000e /* Default rx fthresh...                    */
 #define BIGMAC_RXCFG_PSTRIP    0x00000020 /* Pad byte strip enable                    */
-#define BIGMAC_RXCFG_PMISC     0x00000040 /* Enable promiscous mode                   */
+#define BIGMAC_RXCFG_PMISC     0x00000040 /* Enable promiscuous mode                   */
 #define BIGMAC_RXCFG_DERR      0x00000080 /* Disable error checking                   */
 #define BIGMAC_RXCFG_DCRCS     0x00000100 /* Disable CRC stripping                    */
 #define BIGMAC_RXCFG_ME        0x00000200 /* Receive packets addressed to me          */
index c1a344829b54827b6a39391e558c9ed63f334e3d..d3be735c471915065f301d112e0ffd4a5a71f8f9 100644 (file)
@@ -1150,7 +1150,7 @@ static void gem_pcs_reinit_adv(struct gem *gp)
        val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
        writel(val, gp->regs + PCS_CFG);
 
-       /* Advertise all capabilities except assymetric
+       /* Advertise all capabilities except asymmetric
         * pause.
         */
        val = readl(gp->regs + PCS_MIIADV);
index 756b5bf3aa89b40a6c40530e61c929a269ed05c9..64f278360d892e4415e767f77fdc11e5e92f65dc 100644 (file)
 /* BigMac receive config register. */
 #define BIGMAC_RXCFG_ENABLE   0x00000001 /* Enable the receiver             */
 #define BIGMAC_RXCFG_PSTRIP   0x00000020 /* Pad byte strip enable           */
-#define BIGMAC_RXCFG_PMISC    0x00000040 /* Enable promiscous mode          */
+#define BIGMAC_RXCFG_PMISC    0x00000040 /* Enable promiscuous mode          */
 #define BIGMAC_RXCFG_DERR     0x00000080 /* Disable error checking          */
 #define BIGMAC_RXCFG_DCRCS    0x00000100 /* Disable CRC stripping           */
 #define BIGMAC_RXCFG_REJME    0x00000200 /* Reject packets addressed to me  */
index b6eec8cea20948c37fc1c95e15e6f4992245df94..7ca51cebcddd832b7e4f7c69ab4589da50fdfc03 100644 (file)
@@ -119,13 +119,13 @@ struct tc35815_regs {
 /*
  * Bit assignments
  */
-/* DMA_Ctl bit asign ------------------------------------------------------- */
+/* DMA_Ctl bit assign ------------------------------------------------------- */
 #define DMA_RxAlign           0x00c00000 /* 1:Reception Alignment           */
 #define DMA_RxAlign_1         0x00400000
 #define DMA_RxAlign_2         0x00800000
 #define DMA_RxAlign_3         0x00c00000
 #define DMA_M66EnStat         0x00080000 /* 1:66MHz Enable State            */
-#define DMA_IntMask           0x00040000 /* 1:Interupt mask                 */
+#define DMA_IntMask           0x00040000 /* 1:Interrupt mask                */
 #define DMA_SWIntReq          0x00020000 /* 1:Software Interrupt request    */
 #define DMA_TxWakeUp          0x00010000 /* 1:Transmit Wake Up              */
 #define DMA_RxBigE            0x00008000 /* 1:Receive Big Endian            */
@@ -134,11 +134,11 @@ struct tc35815_regs {
 #define DMA_PowrMgmnt         0x00001000 /* 1:Power Management              */
 #define DMA_DmBurst_Mask       0x000001fc /* DMA Burst size                 */
 
-/* RxFragSize bit asign ---------------------------------------------------- */
+/* RxFragSize bit assign ---------------------------------------------------- */
 #define RxFrag_EnPack         0x00008000 /* 1:Enable Packing                */
 #define RxFrag_MinFragMask     0x00000ffc /* Minimum Fragment               */
 
-/* MAC_Ctl bit asign ------------------------------------------------------- */
+/* MAC_Ctl bit assign ------------------------------------------------------- */
 #define MAC_Link10            0x00008000 /* 1:Link Status 10Mbits           */
 #define MAC_EnMissRoll        0x00002000 /* 1:Enable Missed Roll            */
 #define MAC_MissRoll          0x00000400 /* 1:Missed Roll                   */
@@ -152,7 +152,7 @@ struct tc35815_regs {
 #define MAC_HaltImm           0x00000002 /* 1:Halt Immediate                */
 #define MAC_HaltReq           0x00000001 /* 1:Halt request                  */
 
-/* PROM_Ctl bit asign ------------------------------------------------------ */
+/* PROM_Ctl bit assign ------------------------------------------------------ */
 #define PROM_Busy             0x00008000 /* 1:Busy (Start Operation)        */
 #define PROM_Read             0x00004000 /*10:Read operation                */
 #define PROM_Write            0x00002000 /*01:Write operation               */
@@ -162,7 +162,7 @@ struct tc35815_regs {
 #define PROM_Addr_Ena         0x00000030 /*11xxxx:PROM Write enable         */
                                          /*00xxxx:           disable        */
 
-/* CAM_Ctl bit asign ------------------------------------------------------- */
+/* CAM_Ctl bit assign ------------------------------------------------------- */
 #define CAM_CompEn            0x00000010 /* 1:CAM Compare Enable            */
 #define CAM_NegCAM            0x00000008 /* 1:Reject packets CAM recognizes,*/
                                          /*                    accept other */
@@ -170,7 +170,7 @@ struct tc35815_regs {
 #define CAM_GroupAcc          0x00000002 /* 1:Multicast assept              */
 #define CAM_StationAcc        0x00000001 /* 1:unicast accept                */
 
-/* CAM_Ena bit asign ------------------------------------------------------- */
+/* CAM_Ena bit assign ------------------------------------------------------- */
 #define CAM_ENTRY_MAX                 21   /* CAM Data entry max count      */
 #define CAM_Ena_Mask ((1<<CAM_ENTRY_MAX)-1) /* CAM Enable bits (Max 21bits)  */
 #define CAM_Ena_Bit(index)     (1 << (index))
@@ -178,7 +178,7 @@ struct tc35815_regs {
 #define CAM_ENTRY_SOURCE       1
 #define CAM_ENTRY_MACCTL       20
 
-/* Tx_Ctl bit asign -------------------------------------------------------- */
+/* Tx_Ctl bit assign -------------------------------------------------------- */
 #define Tx_En                 0x00000001 /* 1:Transmit enable               */
 #define Tx_TxHalt             0x00000002 /* 1:Transmit Halt Request         */
 #define Tx_NoPad              0x00000004 /* 1:Suppress Padding              */
@@ -192,7 +192,7 @@ struct tc35815_regs {
 #define Tx_EnTxPar            0x00002000 /* 1:Enable Transmit Parity        */
 #define Tx_EnComp             0x00004000 /* 1:Enable Completion             */
 
-/* Tx_Stat bit asign ------------------------------------------------------- */
+/* Tx_Stat bit assign ------------------------------------------------------- */
 #define Tx_TxColl_MASK        0x0000000F /* Tx Collision Count              */
 #define Tx_ExColl             0x00000010 /* Excessive Collision             */
 #define Tx_TXDefer            0x00000020 /* Transmit Defered                */
@@ -208,7 +208,7 @@ struct tc35815_regs {
 #define Tx_Halted             0x00008000 /* Tx Halted                       */
 #define Tx_SQErr              0x00010000 /* Signal Quality Error(SQE)       */
 
-/* Rx_Ctl bit asign -------------------------------------------------------- */
+/* Rx_Ctl bit assign -------------------------------------------------------- */
 #define Rx_EnGood             0x00004000 /* 1:Enable Good                   */
 #define Rx_EnRxPar            0x00002000 /* 1:Enable Receive Parity         */
 #define Rx_EnLongErr          0x00000800 /* 1:Enable Long Error             */
@@ -222,7 +222,7 @@ struct tc35815_regs {
 #define Rx_RxHalt             0x00000002 /* 1:Receive Halt Request          */
 #define Rx_RxEn                       0x00000001 /* 1:Receive Intrrupt Enable       */
 
-/* Rx_Stat bit asign ------------------------------------------------------- */
+/* Rx_Stat bit assign ------------------------------------------------------- */
 #define Rx_Halted             0x00008000 /* Rx Halted                       */
 #define Rx_Good                       0x00004000 /* Rx Good                         */
 #define Rx_RxPar              0x00002000 /* Rx Parity Error                 */
@@ -238,7 +238,7 @@ struct tc35815_regs {
 
 #define Rx_Stat_Mask          0x0000FFF0 /* Rx All Status Mask              */
 
-/* Int_En bit asign -------------------------------------------------------- */
+/* Int_En bit assign -------------------------------------------------------- */
 #define Int_NRAbtEn           0x00000800 /* 1:Non-recoverable Abort Enable  */
 #define Int_TxCtlCmpEn        0x00000400 /* 1:Transmit Ctl Complete Enable  */
 #define Int_DmParErrEn        0x00000200 /* 1:DMA Parity Error Enable       */
@@ -253,7 +253,7 @@ struct tc35815_regs {
 #define Int_FDAExEn           0x00000001 /* 1:Free Descriptor Area          */
                                          /*               Exhausted Enable  */
 
-/* Int_Src bit asign ------------------------------------------------------- */
+/* Int_Src bit assign ------------------------------------------------------- */
 #define Int_NRabt             0x00004000 /* 1:Non Recoverable error         */
 #define Int_DmParErrStat       0x00002000 /* 1:DMA Parity Error & Clear             */
 #define Int_BLEx              0x00001000 /* 1:Buffer List Empty & Clear     */
@@ -270,8 +270,8 @@ struct tc35815_regs {
 #define Int_IntMacRx          0x00000002 /* 1:Rx controller & Clear         */
 #define Int_IntMacTx          0x00000001 /* 1:Tx controller & Clear         */
 
-/* MD_CA bit asign --------------------------------------------------------- */
-#define MD_CA_PreSup          0x00001000 /* 1:Preamble Supress              */
+/* MD_CA bit assign --------------------------------------------------------- */
+#define MD_CA_PreSup          0x00001000 /* 1:Preamble Suppress                     */
 #define MD_CA_Busy            0x00000800 /* 1:Busy (Start Operation)        */
 #define MD_CA_Wr              0x00000400 /* 1:Write 0:Read                  */
 
@@ -296,7 +296,7 @@ struct BDesc {
 
 #define FD_ALIGN       16
 
-/* Frame Descripter bit asign ---------------------------------------------- */
+/* Frame Descripter bit assign ---------------------------------------------- */
 #define FD_FDLength_MASK       0x0000FFFF /* Length MASK                    */
 #define FD_BDCnt_MASK         0x001F0000 /* BD count MASK in FD             */
 #define FD_FrmOpt_MASK        0x7C000000 /* Frame option MASK               */
@@ -309,8 +309,8 @@ struct BDesc {
 #define FD_Next_EOL           0x00000001 /* FD EOL indicator                */
 #define FD_BDCnt_SHIFT        16
 
-/* Buffer Descripter bit asign --------------------------------------------- */
-#define BD_BuffLength_MASK     0x0000FFFF /* Recieve Data Size              */
+/* Buffer Descripter bit assign --------------------------------------------- */
+#define BD_BuffLength_MASK     0x0000FFFF /* Receive Data Size              */
 #define BD_RxBDID_MASK        0x00FF0000 /* BD ID Number MASK               */
 #define BD_RxBDSeqN_MASK       0x7F000000 /* Rx BD Sequence Number          */
 #define BD_CownsBD            0x80000000 /* BD Controller owner bit         */
@@ -339,7 +339,7 @@ struct BDesc {
 #define TX_THRESHOLD   1024
 /* used threshold with packet max byte for low pci transfer ability.*/
 #define TX_THRESHOLD_MAX 1536
-/* setting threshold max value when overrun error occured this count. */
+/* setting threshold max value when overrun error occurred this count. */
 #define TX_THRESHOLD_KEEP_LIMIT 10
 
 /* 16 + RX_BUF_NUM * 8 + RX_FD_NUM * 16 + TX_FD_NUM * 32 <= PAGE_SIZE*FD_PAGE_NUM */
index 3397618d4d9615201c5e3d36f0c9d4fa77af83ca..8564ec5cfb7f20d8e8d8f19b574b0062d77be36c 100644 (file)
@@ -645,7 +645,7 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd)
        if (cmd != SIOCDEVPRIVATE) {
                error = copy_from_user(data, ifr->ifr_data, sizeof(data));
                if (error) {
-                       pr_err("cant copy from user\n");
+                       pr_err("can't copy from user\n");
                        RET(-EFAULT);
                }
                DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]);
@@ -999,7 +999,7 @@ static inline void bdx_rxdb_free_elem(struct rxdb *db, int n)
  *
  * RxD fifo is smaller than RxF fifo by design. Upon high load, RxD will be
  * filled and packets will be dropped by nic without getting into host or
- * cousing interrupt. Anyway, in that condition, host has no chance to proccess
+ * cousing interrupt. Anyway, in that condition, host has no chance to process
  * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles
  */
 
@@ -1200,8 +1200,8 @@ static void bdx_recycle_skb(struct bdx_priv *priv, struct rxd_desc *rxdd)
        RET();
 }
 
-/* bdx_rx_receive - recieves full packets from RXD fifo and pass them to OS
- * NOTE: a special treatment is given to non-continous descriptors
+/* bdx_rx_receive - receives full packets from RXD fifo and pass them to OS
+ * NOTE: a special treatment is given to non-continuous descriptors
  * that start near the end, wraps around and continue at the beginning. a second
  * part is copied right after the first, and then descriptor is interpreted as
  * normal. fifo has an extra space to allow such operations
@@ -1584,9 +1584,9 @@ err_mem:
 }
 
 /*
- * bdx_tx_space - calculates avalable space in TX fifo
+ * bdx_tx_space - calculates available space in TX fifo
  * @priv - NIC private structure
- * Returns avaliable space in TX fifo in bytes
+ * Returns available space in TX fifo in bytes
  */
 static inline int bdx_tx_space(struct bdx_priv *priv)
 {
index b6ba8601e2b538b70e892273a23107ca04192cc5..c5642fefc9e7909725cf7afac4d29946f9dffc7b 100644 (file)
@@ -502,7 +502,7 @@ struct txd_desc {
 #define  GMAC_RX_FILTER_ACRC  0x0010   /* accept crc error */
 #define  GMAC_RX_FILTER_AM    0x0008   /* accept multicast */
 #define  GMAC_RX_FILTER_AB    0x0004   /* accept broadcast */
-#define  GMAC_RX_FILTER_PRM   0x0001   /* [0:1] promiscous mode */
+#define  GMAC_RX_FILTER_PRM   0x0001   /* [0:1] promiscuous mode */
 
 #define  MAX_FRAME_AB_VAL       0x3fff /* 13:0 */
 
index 73c942d85f074fde4eaaf5cb7ab5f540fa4d25cd..7a5daefb6f3311e6e6d169113d7977e908045cbb 100644 (file)
@@ -9712,7 +9712,7 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
                eeprom->len += b_count;
        }
 
-       /* read bytes upto the last 4 byte boundary */
+       /* read bytes up to the last 4 byte boundary */
        pd = &data[eeprom->len];
        for (i = 0; i < (len - (len & 3)); i += 4) {
                ret = tg3_nvram_read_be32(tp, offset + i, &val);
@@ -12327,8 +12327,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
                if (val & VCPU_CFGSHDW_ASPM_DBNC)
                        tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
                if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
-                   (val & VCPU_CFGSHDW_WOL_MAGPKT))
+                   (val & VCPU_CFGSHDW_WOL_MAGPKT)) {
                        tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
+                       device_set_wakeup_enable(&tp->pdev->dev, true);
+               }
                goto done;
        }
 
@@ -12461,8 +12463,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
                        tp->tg3_flags &= ~TG3_FLAG_WOL_CAP;
 
                if ((tp->tg3_flags & TG3_FLAG_WOL_CAP) &&
-                   (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE))
+                   (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) {
                        tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
+                       device_set_wakeup_enable(&tp->pdev->dev, true);
+               }
 
                if (cfg2 & (1 << 17))
                        tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING;
index 73884b69b7494ed5f19b4900c11914b9c9045d44..5e96706ad1081f3f2a59b27d8abc159efaed86df 100644 (file)
 #define MII_TG3_DSP_EXP96              0x0f96
 #define MII_TG3_DSP_EXP97              0x0f97
 
-#define MII_TG3_AUX_CTRL               0x18 /* auxilliary control register */
+#define MII_TG3_AUX_CTRL               0x18 /* auxiliary control register */
 
 #define MII_TG3_AUXCTL_PCTL_100TX_LPWR 0x0010
 #define MII_TG3_AUXCTL_PCTL_SPR_ISOLATE        0x0020
 #define MII_TG3_AUXCTL_ACTL_TX_6DB     0x0400
 #define MII_TG3_AUXCTL_SHDWSEL_AUXCTL  0x0000
 
-#define MII_TG3_AUX_STAT               0x19 /* auxilliary status register */
+#define MII_TG3_AUX_STAT               0x19 /* auxiliary status register */
 #define MII_TG3_AUX_STAT_LPASS         0x0004
 #define MII_TG3_AUX_STAT_SPDMASK       0x0700
 #define MII_TG3_AUX_STAT_10HALF                0x0100
index 10800f16a2316c60e60ec9f4ca73f04711713d89..ff32befd84433c98867a6b7a9d8824978e9e8557 100644 (file)
@@ -208,7 +208,7 @@ static void print_rx_state(struct net_device *dev)
  *     passing/getting the next value from the nic. As with all requests
  *     on this nic it has to be done in two stages, a) tell the nic which
  *     memory address you want to access and b) pass/get the value from the nic.
- *     With the EEProm, you have to wait before and inbetween access a) and b).
+ *     With the EEProm, you have to wait before and between access a) and b).
  *     As this is only read at initialization time and the wait period is very 
  *     small we shouldn't have to worry about scheduling issues.
  */
@@ -1251,7 +1251,7 @@ static netdev_tx_t xl_xmit(struct sk_buff *skb, struct net_device *dev)
 /* 
  * The NIC has told us that a packet has been downloaded onto the card, we must
  * find out which packet it has done, clear the skb and information for the packet
- * then advance around the ring for all tranmitted packets
+ * then advance around the ring for all transmitted packets
  */
 
 static void xl_dn_comp(struct net_device *dev) 
@@ -1568,7 +1568,7 @@ static void xl_arb_cmd(struct net_device *dev)
                        if (lan_status_diff & LSC_SOFT_ERR)
                                        printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n",dev->name);
                        if (lan_status_diff & LSC_TRAN_BCN) 
-                                       printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n",dev->name);
+                                       printk(KERN_INFO "%s: We are transmitting the beacon, aaah\n",dev->name);
                        if (lan_status_diff & LSC_SS) 
                                        printk(KERN_INFO "%s: Single Station on the ring\n", dev->name);
                        if (lan_status_diff & LSC_RING_REC)
index 5bd140704533f353fa6b7ee05a6cbd9445aec7ad..9354ca9da576c97f7ff54ed014480d29e877ec48 100644 (file)
@@ -1675,7 +1675,7 @@ drop_frame:
                        if (lan_status_diff & LSC_SOFT_ERR)
                                printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n", dev->name);
                        if (lan_status_diff & LSC_TRAN_BCN)
-                               printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n", dev->name);
+                               printk(KERN_INFO "%s: We are transmitting the beacon, aaah\n", dev->name);
                        if (lan_status_diff & LSC_SS)
                                printk(KERN_INFO "%s: Single Station on the ring\n", dev->name);
                        if (lan_status_diff & LSC_RING_REC)
index 785ad1a2157be971cf684ef99f0c27319d94d8f3..2bedc0ace812ac2b5bfbf4ec05a54acc7f7c1ed5 100644 (file)
@@ -73,7 +73,7 @@ static void madgemc_setint(struct net_device *dev, int val);
 static irqreturn_t madgemc_interrupt(int irq, void *dev_id);
 
 /*
- * These work around paging, however they don't guarentee you're on the
+ * These work around paging, however they don't guarantee you're on the
  * right page.
  */
 #define SIFREADB(reg) (inb(dev->base_addr + ((reg<0x8)?reg:reg-0x8)))
@@ -387,7 +387,7 @@ getout:
  * both with their own disadvantages...
  *
  * 1)          Read in the SIFSTS register from the TMS controller.  This
- *     is guarenteed to be accurate, however, there's a fairly
+ *     is guaranteed to be accurate, however, there's a fairly
  *     large performance penalty for doing so: the Madge chips
  *     must request the register from the Eagle, the Eagle must
  *     read them from its internal bus, and then take the route
@@ -454,7 +454,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id)
 }
 
 /*
- * Set the card to the prefered ring speed.
+ * Set the card to the preferred ring speed.
  *
  * Unlike newer cards, the MC16/32 have their speed selection
  * circuit connected to the Madge ASICs and not to the TMS380
index 3d2fbe60b46e07f57e97f418ad62a903e908b26f..2684003b8ab6478037d1047328c61be4f02a8837 100644 (file)
@@ -1500,7 +1500,7 @@ drop_frame:
                        if (lan_status_diff & LSC_SOFT_ERR)
                                        printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n",dev->name);
                        if (lan_status_diff & LSC_TRAN_BCN) 
-                                       printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n",dev->name);
+                                       printk(KERN_INFO "%s: We are transmitting the beacon, aaah\n",dev->name);
                        if (lan_status_diff & LSC_SS) 
                                        printk(KERN_INFO "%s: Single Station on the ring\n", dev->name);
                        if (lan_status_diff & LSC_RING_REC)
index 63db5a6762ae2049064461602905f9d81ddc4a8a..d9044aba7afac48eb53da6d7ba201e752112dcd8 100644 (file)
@@ -393,7 +393,7 @@ static int smctr_alloc_shared_memory(struct net_device *dev)
         tp->rx_bdb_end[NON_MAC_QUEUE] = (BDBlock *)smctr_malloc(dev, 0);
 
         /* Allocate MAC transmit buffers.
-         * MAC Tx Buffers doen't have to be on an ODD Boundry.
+         * MAC Tx Buffers doen't have to be on an ODD Boundary.
          */
         tp->tx_buff_head[MAC_QUEUE]
                 = (__u16 *)smctr_malloc(dev, tp->tx_buff_size[MAC_QUEUE]);
@@ -415,7 +415,7 @@ static int smctr_alloc_shared_memory(struct net_device *dev)
 
         /* Allocate Non-MAC transmit buffers.
          * ?? For maximum Netware performance, put Tx Buffers on
-         * ODD Boundry and then restore malloc to Even Boundrys.
+         * ODD Boundary and then restore malloc to Even Boundrys.
          */
         smctr_malloc(dev, 1L);
         tp->tx_buff_head[NON_MAC_QUEUE]
@@ -1311,7 +1311,7 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev)
         mem_used += sizeof(BDBlock) * tp->num_rx_bdbs[MAC_QUEUE];
 
         /* Allocate MAC transmit buffers.
-         * MAC transmit buffers don't have to be on an ODD Boundry.
+         * MAC transmit buffers don't have to be on an ODD Boundary.
          */
         mem_used += tp->tx_buff_size[MAC_QUEUE];
 
@@ -1325,7 +1325,7 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev)
 
         /* Allocate Non-MAC transmit buffers.
          * For maximum Netware performance, put Tx Buffers on
-         * ODD Boundry,and then restore malloc to Even Boundrys.
+         * ODD Boundary,and then restore malloc to Even Boundrys.
          */
         mem_used += 1L;
         mem_used += tp->tx_buff_size[NON_MAC_QUEUE];
@@ -3069,8 +3069,8 @@ static int smctr_load_node_addr(struct net_device *dev)
  * disabled.!?
  *
  * NOTE 2: If the monitor_state is MS_BEACON_TEST_STATE and the receive_mask
- * has any multi-cast or promiscous bits set, the receive_mask needs to
- * be changed to clear the multi-cast or promiscous mode bits, the lobe_test
+ * has any multi-cast or promiscuous bits set, the receive_mask needs to
+ * be changed to clear the multi-cast or promiscuous mode bits, the lobe_test
  * run, and then the receive mask set back to its original value if the test
  * is successful.
  */
index 60b30ee38dcbea0dd7d1c116eff56834ec32ec8d..e5a617c586c2ecc88b33c763fb024c9a18068376 100644 (file)
@@ -442,7 +442,7 @@ typedef struct {
 #define PASS_FIRST_BUF_ONLY    0x0100  /* Passes only first internal buffer
                                         * of each received frame; FrameSize
                                         * of RPLs must contain internal
-                                        * BUFFER_SIZE bits for promiscous mode.
+                                        * BUFFER_SIZE bits for promiscuous mode.
                                         */
 #define ENABLE_FULL_DUPLEX_SELECTION   0x2000 
                                        /* Enable the use of full-duplex
index 5a77ae6c5f36d07200c7527b61a62ba51b7daff3..5fee7d78dc6dd70c89de368f8e336c00e37da602 100644 (file)
 #define TSI108_TX_CRC  (1 << 5)        /* Generate CRC for this packet */
 #define TSI108_TX_INT  (1 << 14)       /* Generate an IRQ after frag. processed */
 #define TSI108_TX_RETRY        (0xf << 16)     /* 4 bit field indicating num. of retries */
-#define TSI108_TX_COL  (1 << 20)       /* Set if a collision occured */
-#define TSI108_TX_LCOL (1 << 24)       /* Set if a late collision occured */
-#define TSI108_TX_UNDER        (1 << 25)       /* Set if a FIFO underrun occured */
+#define TSI108_TX_COL  (1 << 20)       /* Set if a collision occurred */
+#define TSI108_TX_LCOL (1 << 24)       /* Set if a late collision occurred */
+#define TSI108_TX_UNDER        (1 << 25)       /* Set if a FIFO underrun occurred */
 #define TSI108_TX_RLIM (1 << 26)       /* Set if the retry limit was reached */
 #define TSI108_TX_OK   (1 << 30)       /* Set if the frame TX was successful */
 #define TSI108_TX_OWN  (1 << 31)       /* Set if the device owns the descriptor */
@@ -332,7 +332,7 @@ typedef struct {
 #define TSI108_RX_RUNT (1 << 4)/* Packet is less than minimum size */
 #define TSI108_RX_HASH (1 << 7)/* Hash table match */
 #define TSI108_RX_BAD  (1 << 8)        /* Bad frame */
-#define TSI108_RX_OVER (1 << 9)        /* FIFO overrun occured */
+#define TSI108_RX_OVER (1 << 9)        /* FIFO overrun occurred */
 #define TSI108_RX_TRUNC        (1 << 11)       /* Packet truncated due to excess length */
 #define TSI108_RX_CRC  (1 << 12)       /* Packet had a CRC error */
 #define TSI108_RX_INT  (1 << 13)       /* Generate an IRQ after frag. processed */
index 4dbd493b996b0f5b802a061e19d9086dddac3fb8..efaa1d69b72082b5a0729710d0e86647b96bcc1e 100644 (file)
@@ -79,7 +79,7 @@
     every  usable DECchip board,  I  pinched Donald's 'next_module' field to
     link my modules together.
 
-    Upto 15 EISA cards can be supported under this driver, limited primarily
+    Up to 15 EISA cards can be supported under this driver, limited primarily
     by the available IRQ lines.  I have  checked different configurations of
     multiple depca, EtherWORKS 3 cards and de4x5 cards and  have not found a
     problem yet (provided you have at least depca.c v0.38) ...
@@ -517,7 +517,7 @@ struct mii_phy {
     u_int mci;              /* 21142 MII Connector Interrupt info        */
 };
 
-#define DE4X5_MAX_PHY 8     /* Allow upto 8 attached PHY devices per board */
+#define DE4X5_MAX_PHY 8     /* Allow up to 8 attached PHY devices per board */
 
 struct sia_phy {
     u_char mc;              /* Media Code                                */
@@ -1436,7 +1436,7 @@ de4x5_sw_reset(struct net_device *dev)
 
     /* Poll for setup frame completion (adapter interrupts are disabled now) */
 
-    for (j=0, i=0;(i<500) && (j==0);i++) {       /* Upto 500ms delay */
+    for (j=0, i=0;(i<500) && (j==0);i++) {       /* Up to 500ms delay */
        mdelay(1);
        if ((s32)le32_to_cpu(lp->tx_ring[lp->tx_new].status) >= 0) j=1;
     }
index 7064e035757a16b927d35aa61991268089275744..fb07f48910aea208aeedc79952617d3b9b05e3ac 100644 (file)
@@ -1224,7 +1224,7 @@ static void dmfe_timer(unsigned long data)
 
 
        /* If chip reports that link is failed it could be because external
-               PHY link status pin is not conected correctly to chip
+               PHY link status pin is not connected correctly to chip
                To be sure ask PHY too.
        */
 
index 3031ed9c4a1a83e384d23875bf55798dff73d65f..296486bf0956ebe7eb59953e36cf1c444e7ab55d 100644 (file)
@@ -115,7 +115,7 @@ static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp)
                          0x02,       /* phy reset sequence length */
                          0x01, 0x00, /* phy reset sequence */
                          0x00, 0x78, /* media capabilities */
-                         0x00, 0xe0, /* nway advertisment */
+                         0x00, 0xe0, /* nway advertisement */
                          0x00, 0x05, /* fdx bit map */
                          0x00, 0x06  /* ttm bit map */
                        };
index 7fa5ec2de942cc4f45dfc0f43374614c885925a9..82653cb07857fa91ce46a9a5c79c6dee7057c942 100644 (file)
@@ -846,7 +846,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
        if(typhoon_num_free_tx(txRing) < (numDesc + 2)) {
                netif_stop_queue(dev);
 
-               /* A Tx complete IRQ could have gotten inbetween, making
+               /* A Tx complete IRQ could have gotten between, making
                 * the ring free again. Only need to recheck here, since
                 * Tx is serialized.
                 */
index 055b87ab4f075b66afb7cc4d33c58b440d4f83be..d12fcad145e9b2f0765caa7195e033a1adb43647 100644 (file)
@@ -80,7 +80,7 @@ struct ucc_geth {
                                   frames) received that were between 128
                                   (Including FCS length==4) and 255 octets */
        u32 txok;               /* Total number of octets residing in frames
-                                  that where involved in successfull
+                                  that where involved in successful
                                   transmission */
        u16 txcf;               /* Total number of PAUSE control frames
                                   transmitted by this MAC */
@@ -759,7 +759,7 @@ struct ucc_geth_hardware_statistics {
                                   frames) received that were between 128
                                   (Including FCS length==4) and 255 octets */
        u32 txok;               /* Total number of octets residing in frames
-                                  that where involved in successfull
+                                  that where involved in successful
                                   transmission */
        u16 txcf;               /* Total number of PAUSE control frames
                                   transmitted by this MAC */
index 5f3b97668e63c80ae37cb07dcd556d04a113c696..882f53f708df46040132740b885ab839f18e876a 100644 (file)
@@ -190,7 +190,7 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 
                /*
                 * EEM packet header format:
-                * b0..14:      EEM type dependant (Data or Command)
+                * b0..14:      EEM type dependent (Data or Command)
                 * b15:         bmType
                 */
                header = get_unaligned_le16(skb->data);
@@ -340,7 +340,7 @@ next:
 
 static const struct driver_info eem_info = {
        .description =  "CDC EEM Device",
-       .flags =        FLAG_ETHER,
+       .flags =        FLAG_ETHER | FLAG_POINTTOPOINT,
        .bind =         eem_bind,
        .rx_fixup =     eem_rx_fixup,
        .tx_fixup =     eem_tx_fixup,
index 51c259b69278356b3f3994f67603a8efc67c914c..a301479ecc60a5f750e743cbed6f0104e0163ddb 100644 (file)
@@ -452,7 +452,7 @@ static int cdc_manage_power(struct usbnet *dev, int on)
 
 static const struct driver_info        cdc_info = {
        .description =  "CDC Ethernet Device",
-       .flags =        FLAG_ETHER,
+       .flags =        FLAG_ETHER | FLAG_POINTTOPOINT,
        // .check_connect = cdc_check_connect,
        .bind =         usbnet_cdc_bind,
        .unbind =       usbnet_cdc_unbind,
@@ -460,7 +460,7 @@ static const struct driver_info     cdc_info = {
        .manage_power = cdc_manage_power,
 };
 
-static const struct driver_info mbm_info = {
+static const struct driver_info wwan_info = {
        .description =  "Mobile Broadband Network Device",
        .flags =        FLAG_WWAN,
        .bind =         usbnet_cdc_bind,
@@ -471,6 +471,7 @@ static const struct driver_info mbm_info = {
 
 /*-------------------------------------------------------------------------*/
 
+#define HUAWEI_VENDOR_ID       0x12D1
 
 static const struct usb_device_id      products [] = {
 /*
@@ -587,8 +588,17 @@ static const struct usb_device_id  products [] = {
 }, {
        USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
                        USB_CDC_PROTO_NONE),
-       .driver_info = (unsigned long)&mbm_info,
+       .driver_info = (unsigned long)&wwan_info,
 
+}, {
+       /* Various Huawei modems with a network port like the UMG1831 */
+       .match_flags    =   USB_DEVICE_ID_MATCH_VENDOR
+                | USB_DEVICE_ID_MATCH_INT_INFO,
+       .idVendor               = HUAWEI_VENDOR_ID,
+       .bInterfaceClass        = USB_CLASS_COMM,
+       .bInterfaceSubClass     = USB_CDC_SUBCLASS_ETHERNET,
+       .bInterfaceProtocol     = 255,
+       .driver_info = (unsigned long)&wwan_info,
 },
        { },            // END
 };
index 7113168473cf43413ee1a011b1512dd74f9d1618..1033ef6476a41a67ab0f8201dc0ad9218a8fe6de 100644 (file)
 #include <linux/usb/usbnet.h>
 #include <linux/usb/cdc.h>
 
-#define        DRIVER_VERSION                          "7-Feb-2011"
+#define        DRIVER_VERSION                          "23-Apr-2011"
 
 /* CDC NCM subclass 3.2.1 */
 #define USB_CDC_NCM_NDP16_LENGTH_MIN           0x10
 
 /* Maximum NTB length */
-#define        CDC_NCM_NTB_MAX_SIZE_TX                 16384   /* bytes */
+#define        CDC_NCM_NTB_MAX_SIZE_TX                 (16384 + 4) /* bytes, must be short terminated */
 #define        CDC_NCM_NTB_MAX_SIZE_RX                 16384   /* bytes */
 
 /* Minimum value for MaxDatagramSize, ch. 6.2.9 */
@@ -1237,7 +1237,7 @@ static int cdc_ncm_manage_power(struct usbnet *dev, int status)
 
 static const struct driver_info cdc_ncm_info = {
        .description = "CDC NCM",
-       .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET,
+       .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET,
        .bind = cdc_ncm_bind,
        .unbind = cdc_ncm_unbind,
        .check_connect = cdc_ncm_check_connect,
index ca39ace0b0eb7ba8a924ba724cbc1258ead98257..fc5f13d47ad9b7cec1bf30a0bee18efd81b6ae68 100644 (file)
@@ -89,6 +89,7 @@ static int always_connected (struct usbnet *dev)
 
 static const struct driver_info        ali_m5632_info = {
        .description =  "ALi M5632",
+       .flags       = FLAG_POINTTOPOINT,
 };
 
 #endif
@@ -110,6 +111,7 @@ static const struct driver_info     ali_m5632_info = {
 
 static const struct driver_info        an2720_info = {
        .description =  "AnchorChips/Cypress 2720",
+       .flags       = FLAG_POINTTOPOINT,
        // no reset available!
        // no check_connect available!
 
@@ -132,6 +134,7 @@ static const struct driver_info     an2720_info = {
 
 static const struct driver_info        belkin_info = {
        .description =  "Belkin, eTEK, or compatible",
+       .flags       = FLAG_POINTTOPOINT,
 };
 
 #endif /* CONFIG_USB_BELKIN */
@@ -157,6 +160,7 @@ static const struct driver_info     belkin_info = {
 static const struct driver_info        epson2888_info = {
        .description =  "Epson USB Device",
        .check_connect = always_connected,
+       .flags = FLAG_POINTTOPOINT,
 
        .in = 4, .out = 3,
 };
@@ -173,6 +177,7 @@ static const struct driver_info     epson2888_info = {
 #define HAVE_HARDWARE
 static const struct driver_info kc2190_info = {
        .description =  "KC Technology KC-190",
+       .flags = FLAG_POINTTOPOINT,
 };
 #endif /* CONFIG_USB_KC2190 */
 
@@ -200,16 +205,19 @@ static const struct driver_info kc2190_info = {
 static const struct driver_info        linuxdev_info = {
        .description =  "Linux Device",
        .check_connect = always_connected,
+       .flags = FLAG_POINTTOPOINT,
 };
 
 static const struct driver_info        yopy_info = {
        .description =  "Yopy",
        .check_connect = always_connected,
+       .flags = FLAG_POINTTOPOINT,
 };
 
 static const struct driver_info        blob_info = {
        .description =  "Boot Loader OBject",
        .check_connect = always_connected,
+       .flags = FLAG_POINTTOPOINT,
 };
 
 #endif /* CONFIG_USB_ARMLINUX */
index dcd57c37ef733322a894cfebcb3956aa2d4705c7..c4cfd1dea88149d56fb1315155d10a6461cfeb9d 100644 (file)
@@ -193,7 +193,7 @@ static int genelink_bind(struct usbnet *dev, struct usb_interface *intf)
 
 static const struct driver_info        genelink_info = {
        .description =  "Genesys GeneLink",
-       .flags =        FLAG_FRAMING_GL | FLAG_NO_SETINT,
+       .flags =        FLAG_POINTTOPOINT | FLAG_FRAMING_GL | FLAG_NO_SETINT,
        .bind =         genelink_bind,
        .rx_fixup =     genelink_rx_fixup,
        .tx_fixup =     genelink_tx_fixup,
index 7dc84971f26f8720f8aea9384e33a669d1b825b7..ad0298f9b5f9e6924b634a9fcc673bebecb29afa 100644 (file)
@@ -1221,7 +1221,7 @@ static void kaweth_disconnect(struct usb_interface *intf)
 
        usb_set_intfdata(intf, NULL);
        if (!kaweth) {
-               dev_warn(&intf->dev, "unregistering non-existant device\n");
+               dev_warn(&intf->dev, "unregistering non-existent device\n");
                return;
        }
        netdev = kaweth->net;
index ba72a7281cb0d4387e6549c3c31e6862704c3c87..01db4602a39edbc75dadb39dec0d6a4bfb9ad147 100644 (file)
@@ -560,7 +560,7 @@ static int net1080_bind(struct usbnet *dev, struct usb_interface *intf)
 
 static const struct driver_info        net1080_info = {
        .description =  "NetChip TurboCONNECT",
-       .flags =        FLAG_FRAMING_NC,
+       .flags =        FLAG_POINTTOPOINT | FLAG_FRAMING_NC,
        .bind =         net1080_bind,
        .reset =        net1080_reset,
        .check_connect = net1080_check_connect,
index 08ad269f6b4e2619eefeb4da7b1f0c88bdd352c3..823c53751307230af2fc21c99abcefefea4aa2ca 100644 (file)
@@ -96,7 +96,7 @@ static int pl_reset(struct usbnet *dev)
 
 static const struct driver_info        prolific_info = {
        .description =  "Prolific PL-2301/PL-2302",
-       .flags =        FLAG_NO_SETINT,
+       .flags =        FLAG_POINTTOPOINT | FLAG_NO_SETINT,
                /* some PL-2302 versions seem to fail usb_set_interface() */
        .reset =        pl_reset,
 };
index dd8a4adf48cadf3d1c85507dc9c71c9d9c316004..5994a25c56ac0e4967db3aaffed28b646f2b8974 100644 (file)
@@ -573,7 +573,7 @@ EXPORT_SYMBOL_GPL(rndis_tx_fixup);
 
 static const struct driver_info        rndis_info = {
        .description =  "RNDIS device",
-       .flags =        FLAG_ETHER | FLAG_FRAMING_RN | FLAG_NO_SETINT,
+       .flags =        FLAG_ETHER | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT,
        .bind =         rndis_bind,
        .unbind =       rndis_unbind,
        .status =       rndis_status,
index 727874d9deb6d886fd9d357484c57d3ee899d079..48d4efdb4959a61b6704d58178879593ca4edad2 100644 (file)
@@ -730,7 +730,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev)
                msleep(10);
                bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR);
                timeout++;
-       } while ((bmcr & MII_BMCR) && (timeout < 100));
+       } while ((bmcr & BMCR_RESET) && (timeout < 100));
 
        if (timeout >= 100) {
                netdev_warn(dev->net, "timeout on PHY Reset");
@@ -1313,6 +1313,21 @@ static const struct usb_device_id products[] = {
                USB_DEVICE(0x0424, 0x9909),
                .driver_info = (unsigned long) &smsc95xx_info,
        },
+       {
+               /* SMSC LAN9530 USB Ethernet Device */
+               USB_DEVICE(0x0424, 0x9530),
+               .driver_info = (unsigned long) &smsc95xx_info,
+       },
+       {
+               /* SMSC LAN9730 USB Ethernet Device */
+               USB_DEVICE(0x0424, 0x9730),
+               .driver_info = (unsigned long) &smsc95xx_info,
+       },
+       {
+               /* SMSC LAN89530 USB Ethernet Device */
+               USB_DEVICE(0x0424, 0x9E08),
+               .driver_info = (unsigned long) &smsc95xx_info,
+       },
        { },            /* END */
 };
 MODULE_DEVICE_TABLE(usb, products);
index cf58b7682565ea0966f96393cd5efbb213587eb8..009bba3d753e7798f5a2331c233ee7c99884d6bd 100644 (file)
@@ -736,6 +736,7 @@ int usbnet_open (struct net_device *net)
                }
        }
 
+       set_bit(EVENT_DEV_OPEN, &dev->flags);
        netif_start_queue (net);
        netif_info(dev, ifup, dev->net,
                   "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n",
@@ -1259,6 +1260,9 @@ void usbnet_disconnect (struct usb_interface *intf)
        if (dev->driver_info->unbind)
                dev->driver_info->unbind (dev, intf);
 
+       usb_kill_urb(dev->interrupt);
+       usb_free_urb(dev->interrupt);
+
        free_netdev(net);
        usb_put_dev (xdev);
 }
@@ -1380,7 +1384,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
                // else "eth%d" when there's reasonable doubt.  userspace
                // can rename the link if it knows better.
                if ((dev->driver_info->flags & FLAG_ETHER) != 0 &&
-                   (net->dev_addr [0] & 0x02) == 0)
+                   ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 ||
+                    (net->dev_addr [0] & 0x02) == 0))
                        strcpy (net->name, "eth%d");
                /* WLAN devices should always be named "wlan%d" */
                if ((dev->driver_info->flags & FLAG_WLAN) != 0)
@@ -1497,6 +1502,10 @@ int usbnet_resume (struct usb_interface *intf)
        int                     retval;
 
        if (!--dev->suspend_count) {
+               /* resume interrupt URBs */
+               if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags))
+                       usb_submit_urb(dev->interrupt, GFP_NOIO);
+
                spin_lock_irq(&dev->txq.lock);
                while ((res = usb_get_from_anchor(&dev->deferred))) {
 
index 3eb0b167b5b46ac278e5b92b3aa7835d57344439..241756e0e86f03e86a1b368408c761389967d8f8 100644 (file)
@@ -102,7 +102,7 @@ static int always_connected (struct usbnet *dev)
 
 static const struct driver_info        zaurus_sl5x00_info = {
        .description =  "Sharp Zaurus SL-5x00",
-       .flags =        FLAG_FRAMING_Z,
+       .flags =        FLAG_POINTTOPOINT | FLAG_FRAMING_Z,
        .check_connect = always_connected,
        .bind =         zaurus_bind,
        .unbind =       usbnet_cdc_unbind,
@@ -112,7 +112,7 @@ static const struct driver_info     zaurus_sl5x00_info = {
 
 static const struct driver_info        zaurus_pxa_info = {
        .description =  "Sharp Zaurus, PXA-2xx based",
-       .flags =        FLAG_FRAMING_Z,
+       .flags =        FLAG_POINTTOPOINT | FLAG_FRAMING_Z,
        .check_connect = always_connected,
        .bind =         zaurus_bind,
        .unbind =       usbnet_cdc_unbind,
@@ -122,7 +122,7 @@ static const struct driver_info     zaurus_pxa_info = {
 
 static const struct driver_info        olympus_mxl_info = {
        .description =  "Olympus R1000",
-       .flags =        FLAG_FRAMING_Z,
+       .flags =        FLAG_POINTTOPOINT | FLAG_FRAMING_Z,
        .check_connect = always_connected,
        .bind =         zaurus_bind,
        .unbind =       usbnet_cdc_unbind,
@@ -258,7 +258,7 @@ bad_desc:
 
 static const struct driver_info        bogus_mdlm_info = {
        .description =  "pseudo-MDLM (BLAN) device",
-       .flags =        FLAG_FRAMING_Z,
+       .flags =        FLAG_POINTTOPOINT | FLAG_FRAMING_Z,
        .check_connect = always_connected,
        .tx_fixup =     zaurus_tx_fixup,
        .bind =         blan_mdlm_bind,
index 2de9b90c5f8f079859b695979acb4871c5a0ea08..3b99f64104fd528f7e1582931cacb58ff3bf7a92 100644 (file)
@@ -403,6 +403,17 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
        if (tb[IFLA_ADDRESS] == NULL)
                random_ether_addr(dev->dev_addr);
 
+       if (tb[IFLA_IFNAME])
+               nla_strlcpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ);
+       else
+               snprintf(dev->name, IFNAMSIZ, DRV_NAME "%%d");
+
+       if (strchr(dev->name, '%')) {
+               err = dev_alloc_name(dev, dev->name);
+               if (err < 0)
+                       goto err_alloc_name;
+       }
+
        err = register_netdevice(dev);
        if (err < 0)
                goto err_register_dev;
@@ -422,6 +433,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
 
 err_register_dev:
        /* nothing to do */
+err_alloc_name:
 err_configure_peer:
        unregister_netdevice(peer);
        return err;
index 5e7f069eab533e75cf950294648a7967da104bb0..eb5d75df5d5d8f1e8b25a4772a0231b4f0d809a6 100644 (file)
@@ -1861,7 +1861,7 @@ static void rhine_restart_tx(struct net_device *dev) {
        u32 intr_status;
 
        /*
-        * If new errors occured, we need to sort them out before doing Tx.
+        * If new errors occurred, we need to sort them out before doing Tx.
         * In that case the ISR will be back here RSN anyway.
         */
        intr_status = get_intr_status(dev);
@@ -1887,7 +1887,7 @@ static void rhine_restart_tx(struct net_device *dev) {
                /* This should never happen */
                if (debug > 1)
                        printk(KERN_WARNING "%s: rhine_restart_tx() "
-                              "Another error occured %8.8x.\n",
+                              "Another error occurred %8.8x.\n",
                               dev->name, intr_status);
        }
 
index 0d6fec6b7d93d8b22475bcd5774cf83409b6aaf0..4fe05175384233c97bb182afe92ec7dff7bea8f5 100644 (file)
@@ -292,7 +292,7 @@ VELOCITY_PARAM(DMA_length, "DMA length");
 /* IP_byte_align[] is used for IP header DWORD byte aligned
    0: indicate the IP header won't be DWORD byte aligned.(Default) .
    1: indicate the IP header will be DWORD byte aligned.
-      In some enviroment, the IP header should be DWORD byte aligned,
+      In some environment, the IP header should be DWORD byte aligned,
       or the packet will be droped when we receive it. (eg: IPVS)
 */
 VELOCITY_PARAM(IP_byte_align, "Enable IP header dword aligned");
@@ -1994,7 +1994,7 @@ static inline void velocity_rx_csum(struct rx_desc *rd, struct sk_buff *skb)
  *     @dev: network device
  *
  *     Replace the current skb that is scheduled for Rx processing by a
- *     shorter, immediatly allocated skb, if the received packet is small
+ *     shorter, immediately allocated skb, if the received packet is small
  *     enough. This function returns a negative value if the received
  *     packet is too big or if memory is exhausted.
  */
index cc14b4a75048ca623fae4519cb11b946630f01ce..0d47c3a0530788ab0e596836898eb399fd27e44c 100644 (file)
@@ -892,7 +892,7 @@ vmxnet3_prepare_tso(struct sk_buff *skb,
  * Transmits a pkt thru a given tq
  * Returns:
  *    NETDEV_TX_OK:      descriptors are setup successfully
- *    NETDEV_TX_OK:      error occured, the pkt is dropped
+ *    NETDEV_TX_OK:      error occurred, the pkt is dropped
  *    NETDEV_TX_BUSY:    tx ring is full, queue is stopped
  *
  * Side-effects:
@@ -2685,7 +2685,7 @@ vmxnet3_read_mac_addr(struct vmxnet3_adapter *adapter, u8 *mac)
  * Enable MSIx vectors.
  * Returns :
  *     0 on successful enabling of required vectors,
- *     VMXNET3_LINUX_MIN_MSIX_VECT when only minumum number of vectors required
+ *     VMXNET3_LINUX_MIN_MSIX_VECT when only minimum number of vectors required
  *      could be enabled.
  *     number of vectors which can be enabled otherwise (this number is smaller
  *      than VMXNET3_LINUX_MIN_MSIX_VECT)
index e74e4b42592dbd2873b4d68c416a50a610d2b738..401bebf595021366188fa6eea3d7e83005e591bb 100644 (file)
@@ -187,7 +187,7 @@ vxge_hw_vpath_fw_api(struct __vxge_hw_virtualpath *vpath, u32 action,
                                           VXGE_HW_DEF_DEVICE_POLL_MILLIS);
 
        /* The __vxge_hw_device_register_poll can udelay for a significant
-        * amount of time, blocking other proccess from the CPU.  If it delays
+        * amount of time, blocking other process from the CPU.  If it delays
         * for ~5secs, a NMI error can occur.  A way around this is to give up
         * the processor via msleep, but this is not allowed is under lock.
         * So, only allow it to sleep for ~4secs if open.  Otherwise, delay for
index 395423aeec0039b7b00512d2d24c77881afecef0..aff68c1118d49897116eeff1f029d775da510207 100644 (file)
@@ -2282,7 +2282,7 @@ vxge_alarm_msix_handle(int irq, void *dev_id)
                VXGE_HW_VPATH_MSIX_ACTIVE) + VXGE_ALARM_MSIX_ID;
 
        for (i = 0; i < vdev->no_of_vpath; i++) {
-               /* Reduce the chance of loosing alarm interrupts by masking
+               /* Reduce the chance of losing alarm interrupts by masking
                 * the vector. A pending bit will be set if an alarm is
                 * generated and on unmask the interrupt will be fired.
                 */
@@ -2788,7 +2788,7 @@ static int vxge_open(struct net_device *dev)
        }
 
        /* Enable vpath to sniff all unicast/multicast traffic that not
-        * addressed to them. We allow promiscous mode for PF only
+        * addressed to them. We allow promiscuous mode for PF only
         */
 
        val64 = 0;
@@ -2890,7 +2890,7 @@ out0:
        return ret;
 }
 
-/* Loop throught the mac address list and delete all the entries */
+/* Loop through the mac address list and delete all the entries */
 static void vxge_free_mac_add_list(struct vxge_vpath *vpath)
 {
 
@@ -2957,7 +2957,7 @@ static int do_vxge_close(struct net_device *dev, int do_io)
                                        val64);
                }
 
-               /* Remove the function 0 from promiscous mode */
+               /* Remove the function 0 from promiscuous mode */
                vxge_hw_mgmt_reg_write(vdev->devh,
                        vxge_hw_mgmt_reg_type_mrpcim,
                        0,
index 8674f331311c111afbbf6fd87f055ed731b4a681..2638b8d97b8f016c0005d8d123d3ce225a182ffd 100644 (file)
@@ -1111,7 +1111,7 @@ void vxge_hw_channel_dtr_free(struct __vxge_hw_channel *channel, void *dtrh)
  * vxge_hw_channel_dtr_count
  * @channel: Channel handle. Obtained via vxge_hw_channel_open().
  *
- * Retreive number of DTRs available. This function can not be called
+ * Retrieve number of DTRs available. This function can not be called
  * from data path. ring_initial_replenishi() is the only user.
  */
 int vxge_hw_channel_dtr_count(struct __vxge_hw_channel *channel)
@@ -2060,7 +2060,7 @@ enum vxge_hw_status vxge_hw_vpath_promisc_enable(
 
        vpath = vp->vpath;
 
-       /* Enable promiscous mode for function 0 only */
+       /* Enable promiscuous mode for function 0 only */
        if (!(vpath->hldev->access_rights &
                VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM))
                return VXGE_HW_OK;
index 9d9dfda4c7abd66937f7cbdd646cce4d813c7e2d..6c2fc0b72af57685859c88cc5038d7b9690198f7 100644 (file)
@@ -681,7 +681,7 @@ struct vxge_hw_xmac_aggr_stats {
  * @rx_red_discard: Count of received frames that are discarded because of RED
  *            (Random Early Discard).
  * @rx_xgmii_ctrl_err_cnt: Maintains a count of unexpected or misplaced control
- *            characters occuring between times of normal data transmission
+ *            characters occurring between times of normal data transmission
  *            (i.e. not included in RX_XGMII_DATA_ERR_CNT). This counter is
  *            incremented when either -
  *            1) The Reconciliation Sublayer (RS) is expecting one control
index 10bafd59f9c336e36fbec4c6703530ce54a92a36..6fb6f8e667d0e32a04d6b77768598d6a596e073e 100644 (file)
@@ -329,7 +329,7 @@ static int startmicrocode(struct cosa_data *cosa, int address);
 static int readmem(struct cosa_data *cosa, char __user *data, int addr, int len);
 static int cosa_reset_and_read_id(struct cosa_data *cosa, char *id);
 
-/* Auxilliary functions */
+/* Auxiliary functions */
 static int get_wait_data(struct cosa_data *cosa);
 static int put_wait_data(struct cosa_data *cosa, int data);
 static int puthexnumber(struct cosa_data *cosa, int number);
index 4578e5b4b4119156351997561b09bdfd394d2ca8..acb9ea83062812d2045439e3be86b7e1eded5ab0 100644 (file)
@@ -56,7 +56,7 @@
  * IV. Notes
  * The current error (XDU, RFO) recovery code is untested.
  * So far, RDO takes his RX channel down and the right sequence to enable it
- * again is still a mistery. If RDO happens, plan a reboot. More details
+ * again is still a mystery. If RDO happens, plan a reboot. More details
  * in the code (NB: as this happens, TX still works).
  * Don't mess the cables during operation, especially on DTE ports. I don't
  * suggest it for DCE either but at least one can get some messages instead
@@ -1065,7 +1065,7 @@ static int dscc4_open(struct net_device *dev)
 
        /*
         * Due to various bugs, there is no way to reliably reset a
-        * specific port (manufacturer's dependant special PCI #RST wiring
+        * specific port (manufacturer's dependent special PCI #RST wiring
         * apart: it affects all ports). Thus the device goes in the best
         * silent mode possible at dscc4_close() time and simply claims to
         * be up if it's opened again. It still isn't possible to change
@@ -1230,9 +1230,9 @@ static inline int dscc4_check_clock_ability(int port)
  *   scaling. Of course some rounding may take place.
  * - no high speed mode (40Mb/s). May be trivial to do but I don't have an
  *   appropriate external clocking device for testing.
- * - no time-slot/clock mode 5: shameless lazyness.
+ * - no time-slot/clock mode 5: shameless laziness.
  *
- * The clock signals wiring can be (is ?) manufacturer dependant. Good luck.
+ * The clock signals wiring can be (is ?) manufacturer dependent. Good luck.
  *
  * BIG FAT WARNING: if the device isn't provided enough clocking signal, it
  * won't pass the init sequence. For example, straight back-to-back DTE without
index 48edc5f4dac8e4bba19a7366e95463e6426f80b3..e817583e6ec5ad07ff17d4f21e2dc268bb4f9dbb 100644 (file)
@@ -15,7 +15,7 @@
  *     The hardware does the bus handling to avoid the need for delays between
  *     touching control registers.
  *
- *     Port B isnt wired (why - beats me)
+ *     Port B isn't wired (why - beats me)
  *
  *     Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl>
  */
index 6c571e198835216dd3489899142d87a12ee4d4bf..f1e1643dc3eb87c25d35c84a8aa1605718cffb8b 100644 (file)
  *
  * The resulting average clock frequency (assuming 33.333 MHz oscillator) is:
  * freq = 66.666 MHz / (A + (B + 1) / (C + 1))
- * minumum freq = 66.666 MHz / (A + 1)
+ * minimum freq = 66.666 MHz / (A + 1)
  * maximum freq = 66.666 MHz / A
  *
  * Example: A = 2, B = 2, C = 7, CLOCK_CR register = 2 << 22 | 2 << 12 | 7
 #define PKT_PIPE_MODE_WRITE            0x57
 
 /* HDLC packet status values - desc->status */
-#define ERR_SHUTDOWN           1 /* stop or shutdown occurrance */
+#define ERR_SHUTDOWN           1 /* stop or shutdown occurrence */
 #define ERR_HDLC_ALIGN         2 /* HDLC alignment error */
 #define ERR_HDLC_FCS           3 /* HDLC Frame Check Sum error */
 #define ERR_RXFREE_Q_EMPTY     4 /* RX-free queue became empty while receiving
index 70feb84df6701267211180e2f9763f9c35ec7dd5..b7f2358d23befa7bc2d097b41c55fbf9ce18b506 100644 (file)
@@ -24,7 +24,7 @@
   *
   * Linux driver notes:
   * Linux uses the device struct lmc_private to pass private information
-  * arround.
+  * around.
   *
   * The initialization portion of this driver (the lmc_reset() and the
   * lmc_dec_reset() functions, as well as the led controls and the
index 65d01978e7840067af85e10fb52319ce7917cfb5..01ad45218d192a16fcb8020ef39eafaf2cf29e72 100644 (file)
@@ -180,7 +180,7 @@ struct lmc___ctl {
 
 
 /*
- * Carefull, look at the data sheet, there's more to this
+ * Careful, look at the data sheet, there's more to this
  * structure than meets the eye.  It should probably be:
  *
  * struct tulip_desc_t {
@@ -380,7 +380,7 @@ struct lmc___softc {
 /* CSR6 settings */
 #define OPERATION_MODE  0x00000200 /* Full Duplex      */
 #define PROMISC_MODE    0x00000040 /* Promiscuous Mode */
-#define RECIEVE_ALL     0x40000000 /* Recieve All      */
+#define RECIEVE_ALL     0x40000000 /* Receive All      */
 #define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames  */
 
 /* Dec control registers  CSR6 as well */
@@ -398,7 +398,7 @@ struct lmc___softc {
 #define TULIP_CMD_RECEIVEALL    0x40000000L /* (RW)  Receivel all frames? */
 #define TULIP_CMD_MUSTBEONE     0x02000000L /* (RW)  Must Be One (21140) */
 #define TULIP_CMD_TXTHRSHLDCTL  0x00400000L /* (RW)  Transmit Threshold Mode (21140) */
-#define TULIP_CMD_STOREFWD      0x00200000L /* (RW)  Store and Foward (21140) */
+#define TULIP_CMD_STOREFWD      0x00200000L /* (RW)  Store and Forward (21140) */
 #define TULIP_CMD_NOHEARTBEAT   0x00080000L /* (RW)  No Heartbeat (21140) */
 #define TULIP_CMD_PORTSELECT    0x00040000L /* (RW)  Post Select (100Mb) (21140) */
 #define TULIP_CMD_FULLDUPLEX    0x00000200L /* (RW)  Full Duplex Mode */
index 93956861ea210eb08d773461827a172b7493294f..0806232e0f8fe0e7852c6f95f5cecfd2d2c5aa4b 100644 (file)
@@ -542,7 +542,7 @@ static void z8530_dma_tx(struct z8530_channel *chan)
                z8530_tx(chan);
                return;
        }
-       /* This shouldnt occur in DMA mode */
+       /* This shouldn't occur in DMA mode */
        printk(KERN_ERR "DMA tx - bogus event!\n");
        z8530_tx(chan);
 }
@@ -1219,7 +1219,7 @@ static const char *z8530_type_name[]={
  *     @io: the port value in question
  *
  *     Describe a Z8530 in a standard format. We must pass the I/O as
- *     the port offset isnt predictable. The main reason for this function
+ *     the port offset isn't predictable. The main reason for this function
  *     is to try and get a common format of report.
  */
 
@@ -1588,7 +1588,7 @@ static void z8530_rx_done(struct z8530_channel *c)
                unsigned long flags;
                
                /*
-                *      Complete this DMA. Neccessary to find the length
+                *      Complete this DMA. Necessary to find the length
                 */             
                 
                flags=claim_dma_lock();
@@ -1657,7 +1657,7 @@ static void z8530_rx_done(struct z8530_channel *c)
                 *      fifo length for this. Thus we want to flip to the new
                 *      buffer and then mess around copying and allocating
                 *      things. For the current case it doesn't matter but
-                *      if you build a system where the sync irq isnt blocked
+                *      if you build a system where the sync irq isn't blocked
                 *      by the kernel IRQ disable then you need only block the
                 *      sync IRQ for the RT_LOCK area.
                 *
index 12b84ed0e38a3f87800e789c65523ca28d617440..727d728649b7dd49d260ddf9471c8202d541a75c 100644 (file)
@@ -378,7 +378,7 @@ void i2400m_report_tlv_system_state(struct i2400m *i2400m,
  * the device's state as sometimes we need to do a link-renew (the BS
  * wants us to renew a DHCP lease, for example).
  *
- * In fact, doc says that everytime we get a link-up, we should do a
+ * In fact, doc says that every time we get a link-up, we should do a
  * DHCP negotiation...
  */
 static
@@ -675,7 +675,7 @@ void i2400m_msg_to_dev_cancel_wait(struct i2400m *i2400m, int code)
  *  - the ack message wasn't formatted correctly
  *
  * The returned skb has been allocated with wimax_msg_to_user_alloc(),
- * it contains the reponse in a netlink attribute and is ready to be
+ * it contains the response in a netlink attribute and is ready to be
  * passed up to user space with wimax_msg_to_user_send(). To access
  * the payload and its length, use wimax_msg_{data,len}() on the skb.
  *
index 65bc334ed57b43f9e8966835843bfa784c84d366..47cae7150bc1164fd94603fc298463e766a69eb9 100644 (file)
@@ -654,7 +654,7 @@ void __i2400m_dev_reset_handle(struct work_struct *ws)
        if (result == -EUCLEAN) {
                /*
                 * We come here because the reset during operational mode
-                * wasn't successully done and need to proceed to a bus
+                * wasn't successfully done and need to proceed to a bus
                 * reset. For the dev_reset_handle() to be able to handle
                 * the reset event later properly, we restore boot_mode back
                 * to the state before previous reset. ie: just like we are
@@ -755,7 +755,7 @@ EXPORT_SYMBOL_GPL(i2400m_error_recovery);
  * Alloc the command and ack buffers for boot mode
  *
  * Get the buffers needed to deal with boot mode messages.  These
- * buffers need to be allocated before the sdio recieve irq is setup.
+ * buffers need to be allocated before the sdio receive irq is setup.
  */
 static
 int i2400m_bm_buf_alloc(struct i2400m *i2400m)
index 8b55a5b14152adee9c966f0d6705dddfad769ffb..85dadd5bf4beec09cb0ce10a7912c21773ccd4e0 100644 (file)
@@ -54,7 +54,7 @@
  * endpoint and read from it in the notification endpoint. In SDIO we
  * talk to it via the write address and read from the read address.
  *
- * Upon entrance to boot mode, the device sends (preceeded with a few
+ * Upon entrance to boot mode, the device sends (preceded with a few
  * zero length packets (ZLPs) on the notification endpoint in USB) a
  * reboot barker (4 le32 words with the same value). We ack it by
  * sending the same barker to the device. The device acks with a
@@ -1589,7 +1589,7 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags)
                i2400m->fw_name = fw_name;
                ret = i2400m_fw_bootstrap(i2400m, fw, flags);
                release_firmware(fw);
-               if (ret >= 0)   /* firmware loaded succesfully */
+               if (ret >= 0)   /* firmware loaded successfully */
                        break;
                i2400m->fw_name = NULL;
        }
index eb80243e22df27315f7b271aa71593e4ebe534e9..6650fde99e1d30e89b37b164c3e9dd3cc1f17ac5 100644 (file)
@@ -105,14 +105,14 @@ static inline void edc_init(struct edc *edc)
  *
  * @edc: pointer to error density counter.
  * @max_err: maximum number of errors we can accept over the timeframe
- * @timeframe: lenght of the timeframe (in jiffies).
+ * @timeframe: length of the timeframe (in jiffies).
  *
  * Returns: !0 1 if maximum acceptable errors per timeframe has been
  *     exceeded. 0 otherwise.
  *
  * This is way to determine if the number of acceptable errors per time
  * period has been exceeded. It is not accurate as there are cases in which
- * this scheme will not work, for example if there are periodic occurences
+ * this scheme will not work, for example if there are periodic occurrences
  * of errors that straddle updates to the start time. This scheme is
  * sufficient for our usage.
  *
@@ -204,7 +204,7 @@ enum {
  *     usb_autopm_get/put_interface() barriers when executing
  *     commands. See doc in i2400mu_suspend() for more information.
  *
- * @rx_size_auto_shrink: if true, the rx_size is shrinked
+ * @rx_size_auto_shrink: if true, the rx_size is shrunk
  *     automatically based on the average size of the received
  *     transactions. This allows the receive code to allocate smaller
  *     chunks of memory and thus reduce pressure on the memory
index 030cbfd31704061fa185a39531e6bd726e95ee54..5eacc653a94db5228fba9961b4d4dc40af9943d6 100644 (file)
@@ -526,7 +526,7 @@ struct i2400m_barker_db;
  *
  * @barker: barker type that the device uses; this is initialized by
  *     i2400m_is_boot_barker() the first time it is called. Then it
- *     won't change during the life cycle of the device and everytime
+ *     won't change during the life cycle of the device and every time
  *     a boot barker is received, it is just verified for it being the
  *     same.
  *
@@ -928,7 +928,7 @@ extern void i2400m_report_tlv_rf_switches_status(
        struct i2400m *, const struct i2400m_tlv_rf_switches_status *);
 
 /*
- * Helpers for firmware backwards compability
+ * Helpers for firmware backwards compatibility
  *
  * As we aim to support at least the firmware version that was
  * released with the previous kernel/driver release, some code will be
index 94742e1eafe079d4dd99a33e1e144642f3cb6ad7..2edd8fe1c1f31c409cef10fedd62c5e9be7cc5b1 100644 (file)
@@ -166,7 +166,7 @@ void i2400m_wake_tx_work(struct work_struct *ws)
        d_fnstart(3, dev, "(ws %p i2400m %p skb %p)\n", ws, i2400m, skb);
        result = -EINVAL;
        if (skb == NULL) {
-               dev_err(dev, "WAKE&TX: skb dissapeared!\n");
+               dev_err(dev, "WAKE&TX: skb disappeared!\n");
                goto out_put;
        }
        /* If we have, somehow, lost the connection after this was
index 9e02b90b008001c3bc65431697560211df39e774..b0dba35a8ad2ae94e4cf89d78767156616fee59c 100644 (file)
@@ -27,7 +27,7 @@
  * - report changes in the HW RF Kill switch [with
  *   wimax_rfkill_{sw,hw}_report(), which happens when we detect those
  *   indications coming through hardware reports]. We also do it on
- *   initialization to let the stack know the intial HW state.
+ *   initialization to let the stack know the initial HW state.
  *
  * - implement indications from the stack to change the SW RF Kill
  *   switch (coming from sysfs, the wimax stack or user space).
@@ -73,7 +73,7 @@ int i2400m_radio_is(struct i2400m *i2400m, enum wimax_rf_state state)
  * Generic Netlink will call this function when a message is sent from
  * userspace to change the software RF-Kill switch status.
  *
- * This function will set the device's sofware RF-Kill switch state to
+ * This function will set the device's software RF-Kill switch state to
  * match what is requested.
  *
  * NOTE: the i2400m has a strict state machine; we can only set the
index 844133b44af04eb8b36436c8c7147e8c995685a4..2f94a872101f64097ec6a58ba8af708bf5277819 100644 (file)
@@ -349,7 +349,7 @@ error_no_waiter:
  *
  * For reports: We can't clone the original skb where the data is
  * because we need to send this up via netlink; netlink has to add
- * headers and we can't overwrite what's preceeding the payload...as
+ * headers and we can't overwrite what's preceding the payload...as
  * it is another message. So we just dup them.
  */
 static
@@ -425,7 +425,7 @@ error_check:
  *
  * As in i2400m_rx_ctl(), we can't clone the original skb where the
  * data is because we need to send this up via netlink; netlink has to
- * add headers and we can't overwrite what's preceeding the
+ * add headers and we can't overwrite what's preceding the
  * payload...as it is another message. So we just dup them.
  */
 static
index 3f819efc06b597b46f4f1a60b52cad88f9bf7e72..4b30ed11d7857f7ec5461ef0196d2182d39f3c10 100644 (file)
  * (with a moved message header to make sure it is size-aligned to
  * 16), TAIL room that was unusable (and thus is marked with a message
  * header that says 'skip this') and at the head of the buffer, an
- * imcomplete message with a couple of payloads.
+ * incomplete message with a couple of payloads.
  *
  * N   ___________________________________________________
  *    |                                                   |
@@ -819,7 +819,7 @@ EXPORT_SYMBOL_GPL(i2400m_tx);
  * the FIF that is ready for transmission.
  *
  * It sets the state in @i2400m to indicate the bus-specific driver is
- * transfering that message (i2400m->tx_msg_size).
+ * transferring that message (i2400m->tx_msg_size).
  *
  * Once the transfer is completed, call i2400m_tx_msg_sent().
  *
index b58ec56b86f8b29556cc9fe2a9b1453cf0d5baa9..1fda46c55eb3271b9b05336aff3374c26422d5b2 100644 (file)
@@ -169,7 +169,7 @@ retry:
  *
  * Command can be a raw command, which requires no preparation (and
  * which might not even be following the command format). Checks that
- * the right amount of data was transfered.
+ * the right amount of data was transferred.
  *
  * To satisfy USB requirements (no onstack, vmalloc or in data segment
  * buffers), we copy the command to i2400m->bm_cmd_buf and send it from
index a26483a812a50679088b6f9fae058821275d3dc0..e3257681e3605a3b9659527e892b16e779718600 100644 (file)
@@ -58,7 +58,7 @@
  *    a zillion reads; by serializing, we are throttling.
  *
  *  - RX data processing can get heavy enough so that it is not
- *    appropiate for doing it in the USB callback; thus we run it in a
+ *    appropriate for doing it in the USB callback; thus we run it in a
  *    process context.
  *
  * We provide a read buffer of an arbitrary size (short of a page); if
index c65b9979f87e1439f9df998a81e23ac0bbfccfa9..ac357acfb3e9a569be66ecb671c5b83b06b1f586 100644 (file)
@@ -168,7 +168,7 @@ retry:
 /*
  * Get the next TX message in the TX FIFO and send it to the device
  *
- * Note we exit the loop if i2400mu_tx() fails; that funtion only
+ * Note we exit the loop if i2400mu_tx() fails; that function only
  * fails on hard error (failing to tx a buffer not being one of them,
  * see its doc).
  *
index 57a79b0475f681d1fdcde11bc8b595b957014f9d..4e5c7a11f04aa5c496dcf7872bb75705c34588a5 100644 (file)
@@ -1884,7 +1884,7 @@ static int airo_open(struct net_device *dev) {
        /* Make sure the card is configured.
         * Wireless Extensions may postpone config changes until the card
         * is open (to pipeline changes and speed-up card setup). If
-        * those changes are not yet commited, do it now - Jean II */
+        * those changes are not yet committed, do it now - Jean II */
        if (test_bit(FLAG_COMMIT, &ai->flags)) {
                disable_MAC(ai, 1);
                writeConfigRid(ai, 1);
@@ -1992,7 +1992,7 @@ static int mpi_send_packet (struct net_device *dev)
 /*
  * Magic, the cards firmware needs a length count (2 bytes) in the host buffer
  * right after  TXFID_HDR.The TXFID_HDR contains the status short so payloadlen
- * is immediatly after it. ------------------------------------------------
+ * is immediately after it. ------------------------------------------------
  *                         |TXFIDHDR+STATUS|PAYLOADLEN|802.3HDR|PACKETDATA|
  *                         ------------------------------------------------
  */
@@ -2006,7 +2006,7 @@ static int mpi_send_packet (struct net_device *dev)
                sizeof(wifictlhdr8023) + 2 ;
 
        /*
-        * Firmware automaticly puts 802 header on so
+        * Firmware automatically puts 802 header on so
         * we don't need to account for it in the length
         */
        if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled &&
@@ -2531,7 +2531,7 @@ static int mpi_init_descriptors (struct airo_info *ai)
 /*
  * We are setting up three things here:
  * 1) Map AUX memory for descriptors: Rid, TxFid, or RxFid.
- * 2) Map PCI memory for issueing commands.
+ * 2) Map PCI memory for issuing commands.
  * 3) Allocate memory (shared) to send and receive ethernet frames.
  */
 static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci)
@@ -3947,7 +3947,7 @@ static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp) {
 
        if ( max_tries == -1 ) {
                airo_print_err(ai->dev->name,
-                       "Max tries exceeded when issueing command");
+                       "Max tries exceeded when issuing command");
                if (IN4500(ai, COMMAND) & COMMAND_BUSY)
                        OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY);
                return ERROR;
@@ -4173,7 +4173,7 @@ done:
 }
 
 /*  Note, that we are using BAP1 which is also used by transmit, so
- *  make sure this isnt called when a transmit is happening */
+ *  make sure this isn't called when a transmit is happening */
 static int PC4500_writerid(struct airo_info *ai, u16 rid,
                           const void *pBuf, int len, int lock)
 {
@@ -4776,7 +4776,7 @@ static int proc_stats_rid_open( struct inode *inode,
                if (!statsLabels[i]) continue;
                if (j+strlen(statsLabels[i])+16>4096) {
                        airo_print_warn(apriv->dev->name,
-                              "Potentially disasterous buffer overflow averted!");
+                              "Potentially disastrous buffer overflow averted!");
                        break;
                }
                j+=sprintf(data->rbuffer+j, "%s: %u\n", statsLabels[i],
index b761fec0d72174ce45965dcf3e1d6d633abf354f..ccc2edaaeda03ae97e18b817e4905bd9e1113fcf 100644 (file)
@@ -974,7 +974,7 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
                        if (ar->rx_failover_missing <= 0) {
                                /*
                                 * nested ar9170_rx call!
-                                * termination is guranteed, even when the
+                                * termination is guaranteed, even when the
                                 * combined frame also have a element with
                                 * a bad tag.
                                 */
index 0dbfcf79ac96b6abdab59dbe04512315e3681a48..aa8d06ba1ee4a60632b8ca47b9ab1fb0b1a5a536 100644 (file)
@@ -424,7 +424,7 @@ static u32 ar9170_get_default_phy_reg_val(u32 reg, bool is_2ghz, bool is_40mhz)
 
 /*
  * initialize some phy regs from eeprom values in modal_header[]
- * acc. to band and bandwith
+ * acc. to band and bandwidth
  */
 static int ar9170_init_phy_from_eeprom(struct ar9170 *ar,
                                bool is_2ghz, bool is_40mhz)
index d0a664039c877c2f4e8f064c499833a9bf0a3883..0340153970933af5756f2af69995824a6be92e28 100644 (file)
@@ -27,7 +27,7 @@
 #define ATH5K_ANI_RSSI_THR_HIGH                40
 #define ATH5K_ANI_RSSI_THR_LOW         7
 
-/* maximum availabe levels */
+/* maximum available levels */
 #define ATH5K_ANI_MAX_FIRSTEP_LVL      2
 #define ATH5K_ANI_MAX_NOISE_IMM_LVL    1
 
index 4d7f21ee111cf28b3aa2120d38c4b08282c8cb8e..349a5963931b21a60d3f361878cd18022e425b52 100644 (file)
@@ -1953,7 +1953,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf)
 
 #define FUDGE AR5K_TUNE_SW_BEACON_RESP + 3
        /* We use FUDGE to make sure the next TBTT is ahead of the current TU.
-        * Since we later substract AR5K_TUNE_SW_BEACON_RESP (10) in the timer
+        * Since we later subtract AR5K_TUNE_SW_BEACON_RESP (10) in the timer
         * configuration we need to make sure it is bigger than that. */
 
        if (bc_tsf == -1) {
@@ -1971,7 +1971,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf)
                intval |= AR5K_BEACON_RESET_TSF;
        } else if (bc_tsf > hw_tsf) {
                /*
-                * beacon received, SW merge happend but HW TSF not yet updated.
+                * beacon received, SW merge happened but HW TSF not yet updated.
                 * not possible to reconfigure timers yet, but next time we
                 * receive a beacon with the same BSSID, the hardware will
                 * automatically update the TSF and then we need to reconfigure
@@ -2651,7 +2651,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
        synchronize_irq(sc->irq);
        stop_tasklets(sc);
 
-       /* Save ani mode and disable ANI durring
+       /* Save ani mode and disable ANI during
         * reset. If we don't we might get false
         * PHY error interrupts. */
        ani_mode = ah->ah_sc->ani_state.ani_mode;
index 16b44ff7dd3e925f069cdfff8977c84866334a7c..a8fcc94269f72e0e5bfdcbf9500b17b53123cb2f 100644 (file)
@@ -51,7 +51,7 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
        /*
         * Validate input
         * - Zero retries don't make sense.
-        * - A zero rate will put the HW into a mode where it continously sends
+        * - A zero rate will put the HW into a mode where it continuously sends
         *   noise on the channel, so it is important to avoid this.
         */
        if (unlikely(tx_tries0 == 0)) {
@@ -190,7 +190,7 @@ static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *ah,
        /*
         * Validate input
         * - Zero retries don't make sense.
-        * - A zero rate will put the HW into a mode where it continously sends
+        * - A zero rate will put the HW into a mode where it continuously sends
         *   noise on the channel, so it is important to avoid this.
         */
        if (unlikely(tx_tries0 == 0)) {
@@ -300,7 +300,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
        /*
         * Rates can be 0 as long as the retry count is 0 too.
         * A zero rate and nonzero retry count will put the HW into a mode where
-        * it continously sends noise on the channel, so it is important to
+        * it continuously sends noise on the channel, so it is important to
         * avoid this.
         */
        if (unlikely((tx_rate1 == 0 && tx_tries1 != 0) ||
@@ -342,7 +342,7 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
 \***********************/
 
 /*
- * Proccess the tx status descriptor on 5210/5211
+ * Process the tx status descriptor on 5210/5211
  */
 static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah,
                struct ath5k_desc *desc, struct ath5k_tx_status *ts)
@@ -394,7 +394,7 @@ static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *ah,
 }
 
 /*
- * Proccess a tx status descriptor on 5212
+ * Process a tx status descriptor on 5212
  */
 static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah,
                struct ath5k_desc *desc, struct ath5k_tx_status *ts)
@@ -519,7 +519,7 @@ int ath5k_hw_setup_rx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
 }
 
 /*
- * Proccess the rx status descriptor on 5210/5211
+ * Process the rx status descriptor on 5210/5211
  */
 static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
                struct ath5k_desc *desc, struct ath5k_rx_status *rs)
@@ -602,7 +602,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
 }
 
 /*
- * Proccess the rx status descriptor on 5212
+ * Process the rx status descriptor on 5212
  */
 static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
                                        struct ath5k_desc *desc,
index b6561f785c6eb1e87886892760f6d15edd772fd8..efb672cb31e49521c95b2207f8f49278db142a4f 100644 (file)
@@ -1080,7 +1080,7 @@ ath5k_eeprom_read_pcal_info_5112(struct ath5k_hw *ah, int mode)
  *
  * To recreate the curves we read here the points and interpolate
  * later. Note that in most cases only 2 (higher and lower) curves are
- * used (like RF5112) but vendors have the oportunity to include all
+ * used (like RF5112) but vendors have the opportunity to include all
  * 4 curves on eeprom. The final curve (higher power) has an extra
  * point for better accuracy like RF5112.
  */
@@ -1302,7 +1302,7 @@ ath5k_eeprom_read_pcal_info_2413(struct ath5k_hw *ah, int mode)
                        /*
                         * Pd gain 0 is not the last pd gain
                         * so it only has 2 pd points.
-                        * Continue wih pd gain 1.
+                        * Continue with pd gain 1.
                         */
                        pcinfo->pwr_i[1] = (val >> 10) & 0x1f;
 
index 66598a0d1df05ad8251f1624acfda7dc72f54574..3c44689a700b7b73030860e35ee941a4f66b6678 100644 (file)
@@ -57,7 +57,7 @@ static void ath5k_pci_read_cachesize(struct ath_common *common, int *csz)
        *csz = (int)u8tmp;
 
        /*
-        * This check was put in to avoid "unplesant" consequences if
+        * This check was put in to avoid "unpleasant" consequences if
         * the bootrom has not fully initialized all PCI devices.
         * Sometimes the cache line size register is not set
         */
index a702817daf723dadd8b84ab54a884d6ae26f8499..d9b3f828455aeaf3fd19907aed1cd9030af6f54d 100644 (file)
@@ -472,7 +472,7 @@ void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter)
        }
 
        /*
-        * The AR5210 uses promiscous mode to detect radar activity
+        * The AR5210 uses promiscuous mode to detect radar activity
         */
        if (ah->ah_version == AR5K_AR5210 &&
                        (filter & AR5K_RX_FILTER_RADARERR)) {
@@ -706,8 +706,8 @@ ath5k_check_timer_win(int a, int b, int window, int intval)
  * The need for this function arises from the fact that we have 4 separate
  * HW timer registers (TIMER0 - TIMER3), which are closely related to the
  * next beacon target time (NBTT), and that the HW updates these timers
- * seperately based on the current TSF value. The hardware increments each
- * timer by the beacon interval, when the local TSF coverted to TU is equal
+ * separately based on the current TSF value. The hardware increments each
+ * timer by the beacon interval, when the local TSF converted to TU is equal
  * to the value stored in the timer.
  *
  * The reception of a beacon with the same BSSID can update the local HW TSF
index 62ce2f4e8605b847f4b242d766b032fc70ed6968..55441913344de5c4b889cd4fe0b8ea0d95f9ad92 100644 (file)
@@ -335,11 +335,11 @@ static void ath5k_hw_wait_for_synth(struct ath5k_hw *ah,
  * http://madwifi-project.org/ticket/1659
  * with various measurements and diagrams
  *
- * TODO: Deal with power drops due to probes by setting an apropriate
+ * TODO: Deal with power drops due to probes by setting an appropriate
  * tx power on the probe packets ! Make this part of the calibration process.
  */
 
-/* Initialize ah_gain durring attach */
+/* Initialize ah_gain during attach */
 int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah)
 {
        /* Initialize the gain optimization values */
@@ -1049,7 +1049,7 @@ static int ath5k_hw_rfregs_init(struct ath5k_hw *ah,
 \**************************/
 
 /*
- * Convertion needed for RF5110
+ * Conversion needed for RF5110
  */
 static u32 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel)
 {
@@ -1088,7 +1088,7 @@ static int ath5k_hw_rf5110_channel(struct ath5k_hw *ah,
 }
 
 /*
- * Convertion needed for 5111
+ * Conversion needed for 5111
  */
 static int ath5k_hw_rf5111_chan2athchan(unsigned int ieee,
                struct ath5k_athchan_2ghz *athchan)
@@ -2201,7 +2201,7 @@ ath5k_create_power_curve(s16 pmin, s16 pmax,
 /*
  * Get the surrounding per-channel power calibration piers
  * for a given frequency so that we can interpolate between
- * them and come up with an apropriate dataset for our current
+ * them and come up with an appropriate dataset for our current
  * channel.
  */
 static void
@@ -2618,7 +2618,7 @@ ath5k_write_pcdac_table(struct ath5k_hw *ah)
 /*
  * Set the gain boundaries and create final Power to PDADC table
  *
- * We can have up to 4 pd curves, we need to do a simmilar process
+ * We can have up to 4 pd curves, we need to do a similar process
  * as we do for RF5112. This time we don't have an edge_flag but we
  * set the gain boundaries on a separate register.
  */
@@ -2826,13 +2826,13 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
        u32 target = channel->center_freq;
        int pdg, i;
 
-       /* Get surounding freq piers for this channel */
+       /* Get surrounding freq piers for this channel */
        ath5k_get_chan_pcal_surrounding_piers(ah, channel,
                                                &pcinfo_L,
                                                &pcinfo_R);
 
        /* Loop over pd gain curves on
-        * surounding freq piers by index */
+        * surrounding freq piers by index */
        for (pdg = 0; pdg < ee->ee_pd_gains[ee_mode]; pdg++) {
 
                /* Fill curves in reverse order
@@ -2923,7 +2923,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
                }
 
                /* Interpolate between curves
-                * of surounding freq piers to
+                * of surrounding freq piers to
                 * get the final curve for this
                 * pd gain. Re-use tmpL for interpolation
                 * output */
@@ -2947,7 +2947,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah,
 
        /* Fill min and max power levels for this
         * channel by interpolating the values on
-        * surounding channels to complete the dataset */
+        * surrounding channels to complete the dataset */
        ah->ah_txpower.txp_min_pwr = ath5k_get_interpolated_value(target,
                                        (s16) pcinfo_L->freq,
                                        (s16) pcinfo_R->freq,
@@ -3179,7 +3179,7 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
 
        /* FIXME: TPC scale reduction */
 
-       /* Get surounding channels for per-rate power table
+       /* Get surrounding channels for per-rate power table
         * calibration */
        ath5k_get_rate_pcal_data(ah, channel, &rate_info);
 
index e1c9abd8c879cf6375cc4de53304c79eaf390102..d12b827033c1f4f4548478aaab910d62fff426fc 100644 (file)
  * As i can see in ar5k_ar5210_tx_start Reyk uses some of the values of BCR
  * for this register, so i guess TQ1V,TQ1FV and BDMAE have the same meaning
  * here and SNP/SNAP means "snapshot" (so this register gets synced with BCR).
- * So SNAPPEDBCRVALID sould also stand for "snapped BCR -values- valid", so i
- * renamed it to SNAPSHOTSVALID to make more sense. I realy have no idea what
+ * So SNAPPEDBCRVALID should also stand for "snapped BCR -values- valid", so i
+ * renamed it to SNAPSHOTSVALID to make more sense. I really have no idea what
  * else can it be. I also renamed SNPBCMD to SNPADHOC to match BCR.
  */
 #define AR5K_BSR               0x002c                  /* Register Address */
  */
 #define AR5K_ISR               0x001c                  /* Register Address [5210] */
 #define AR5K_PISR              0x0080                  /* Register Address [5211+] */
-#define AR5K_ISR_RXOK          0x00000001      /* Frame successfuly recieved */
+#define AR5K_ISR_RXOK          0x00000001      /* Frame successfuly received */
 #define AR5K_ISR_RXDESC                0x00000002      /* RX descriptor request */
 #define AR5K_ISR_RXERR         0x00000004      /* Receive error */
 #define AR5K_ISR_RXNOFRM       0x00000008      /* No frame received (receive timeout) */
 /*
  * Interrupt Mask Registers
  *
- * As whith ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary
+ * As with ISRs 5210 has one IMR (AR5K_IMR) and 5211/5212 has one primary
  * (AR5K_PIMR) and 4 secondary IMRs (AR5K_SIMRx). Note that ISR/IMR flags match.
  */
 #define        AR5K_IMR                0x0020                  /* Register Address [5210] */
 #define AR5K_PIMR              0x00a0                  /* Register Address [5211+] */
-#define AR5K_IMR_RXOK          0x00000001      /* Frame successfuly recieved*/
+#define AR5K_IMR_RXOK          0x00000001      /* Frame successfuly received*/
 #define AR5K_IMR_RXDESC                0x00000002      /* RX descriptor request*/
 #define AR5K_IMR_RXERR         0x00000004      /* Receive error*/
 #define AR5K_IMR_RXNOFRM       0x00000008      /* No frame received (receive timeout)*/
 #define AR5K_PCICFG_SL_INTEN           0x00000800      /* Enable interrupts when asleep */
 #define AR5K_PCICFG_LED_BCTL           0x00001000      /* Led blink (?) [5210] */
 #define AR5K_PCICFG_RETRY_FIX          0x00001000      /* Enable pci core retry fix */
-#define AR5K_PCICFG_SL_INPEN           0x00002000      /* Sleep even whith pending interrupts*/
+#define AR5K_PCICFG_SL_INPEN           0x00002000      /* Sleep even with pending interrupts*/
 #define AR5K_PCICFG_SPWR_DN            0x00010000      /* Mask for power status */
 #define AR5K_PCICFG_LEDMODE            0x000e0000      /* Ledmode [5211+] */
 #define AR5K_PCICFG_LEDMODE_PROP       0x00000000      /* Blink on standard traffic [5211+] */
index ffcf44a4058b7777a21c865095b4331c628e690b..106c0b06cf55b6b31bae3442c0642d15262b9e04 100644 (file)
@@ -142,7 +142,7 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq)
 
 /**
  * ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios
- * @ah: atheros hardware stucture
+ * @ah: atheros hardware structure
  * @chan:
  *
  * For the external AR2133/AR5133 radios, takes the MHz channel value and set
index 4a9271802991bdf696d28f9fe042b0d82eb5336e..6eadf975ae4884cc0c3bfb09dcaf0b09b9e407c4 100644 (file)
@@ -3240,7 +3240,7 @@ static int ar9300_compress_decision(struct ath_hw *ah,
                        eep = ar9003_eeprom_struct_find_by_id(reference);
                        if (eep == NULL) {
                                ath_dbg(common, ATH_DBG_EEPROM,
-                                       "cant find reference eeprom struct %d\n",
+                                       "can't find reference eeprom struct %d\n",
                                        reference);
                                return -1;
                        }
index f1b8af64569cbdeea7d80316d071aea329eab494..2d10239ce8295e2633699c6680a9f1b7072703e1 100644 (file)
@@ -1040,7 +1040,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
        }
 
        ret = ath9k_htc_hw_init(hif_dev->htc_handle,
-                               &hif_dev->udev->dev, hif_dev->device_id,
+                               &interface->dev, hif_dev->device_id,
                                hif_dev->udev->product, id->driver_info);
        if (ret) {
                ret = -EINVAL;
@@ -1158,7 +1158,7 @@ fail_resume:
 #endif
 
 static struct usb_driver ath9k_hif_usb_driver = {
-       .name = "ath9k_hif_usb",
+       .name = KBUILD_MODNAME,
        .probe = ath9k_hif_usb_probe,
        .disconnect = ath9k_hif_usb_disconnect,
 #ifdef CONFIG_PM
index c41ab8c301617d11279c7f1bf4f6739aa5216e1d..62e139a30a74d9b05f6ffeae825c15bd13c0ce0b 100644 (file)
@@ -360,7 +360,7 @@ ret:
  * HTC Messages are handled directly here and the obtained SKB
  * is freed.
  *
- * Sevice messages (Data, WMI) passed to the corresponding
+ * Service messages (Data, WMI) passed to the corresponding
  * endpoint RX handlers, which have to free the SKB.
  */
 void ath9k_htc_rx_msg(struct htc_target *htc_handle,
index 338b07502f1adc5621c60815a8f5ce8c0e0345e6..c95bc5cc1a1fbb4bad3d2e816477c5cfbe96fb97 100644 (file)
@@ -1254,15 +1254,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
        ah->txchainmask = common->tx_chainmask;
        ah->rxchainmask = common->rx_chainmask;
 
-       if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) {
-               ath9k_hw_abortpcurecv(ah);
-               if (!ath9k_hw_stopdmarecv(ah)) {
-                       ath_dbg(common, ATH_DBG_XMIT,
-                               "Failed to stop receive dma\n");
-                       bChannelChange = false;
-               }
-       }
-
        if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
                return -EIO;
 
@@ -2546,6 +2537,7 @@ static struct {
        { AR_SREV_VERSION_9287,         "9287" },
        { AR_SREV_VERSION_9271,         "9271" },
        { AR_SREV_VERSION_9300,         "9300" },
+       { AR_SREV_VERSION_9485,         "9485" },
 };
 
 /* For devices with external radios */
index 562257ac52cfecf77ee58cd7f1318507f14d9b75..edc1cbbfecaf6fbd153ce00237f1101f49096edc 100644 (file)
@@ -751,28 +751,47 @@ void ath9k_hw_abortpcurecv(struct ath_hw *ah)
 }
 EXPORT_SYMBOL(ath9k_hw_abortpcurecv);
 
-bool ath9k_hw_stopdmarecv(struct ath_hw *ah)
+bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
 {
 #define AH_RX_STOP_DMA_TIMEOUT 10000   /* usec */
 #define AH_RX_TIME_QUANTUM     100     /* usec */
        struct ath_common *common = ath9k_hw_common(ah);
+       u32 mac_status, last_mac_status = 0;
        int i;
 
+       /* Enable access to the DMA observation bus */
+       REG_WRITE(ah, AR_MACMISC,
+                 ((AR_MACMISC_DMA_OBS_LINE_8 << AR_MACMISC_DMA_OBS_S) |
+                  (AR_MACMISC_MISC_OBS_BUS_1 <<
+                   AR_MACMISC_MISC_OBS_BUS_MSB_S)));
+
        REG_WRITE(ah, AR_CR, AR_CR_RXD);
 
        /* Wait for rx enable bit to go low */
        for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) {
                if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0)
                        break;
+
+               if (!AR_SREV_9300_20_OR_LATER(ah)) {
+                       mac_status = REG_READ(ah, AR_DMADBG_7) & 0x7f0;
+                       if (mac_status == 0x1c0 && mac_status == last_mac_status) {
+                               *reset = true;
+                               break;
+                       }
+
+                       last_mac_status = mac_status;
+               }
+
                udelay(AH_TIME_QUANTUM);
        }
 
        if (i == 0) {
                ath_err(common,
-                       "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n",
+                       "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
                        AH_RX_STOP_DMA_TIMEOUT / 1000,
                        REG_READ(ah, AR_CR),
-                       REG_READ(ah, AR_DIAG_SW));
+                       REG_READ(ah, AR_DIAG_SW),
+                       REG_READ(ah, AR_DMADBG_7));
                return false;
        } else {
                return true;
index b2b2ff852c328142a55396801010c46e32c72432..c2a59386fb9cf05a7eabb12214e613103e0c08b0 100644 (file)
@@ -695,7 +695,7 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set);
 void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp);
 void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning);
 void ath9k_hw_abortpcurecv(struct ath_hw *ah);
-bool ath9k_hw_stopdmarecv(struct ath_hw *ah);
+bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset);
 int ath9k_hw_beaconq_setup(struct ath_hw *ah);
 
 /* Interrupt Handling */
index 524825720a09dfcb930d132109ad1cef6391670e..17d04ff8d678021aaf0f52f2da55794e017272b5 100644 (file)
@@ -1048,6 +1048,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
                "Starting driver with initial channel: %d MHz\n",
                curchan->center_freq);
 
+       ath9k_ps_wakeup(sc);
+
        mutex_lock(&sc->mutex);
 
        /* setup initial channel */
@@ -1143,6 +1145,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
 mutex_unlock:
        mutex_unlock(&sc->mutex);
 
+       ath9k_ps_restore(sc);
+
        return r;
 }
 
@@ -1372,7 +1376,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
 
        ath9k_calculate_iter_data(hw, vif, &iter_data);
 
-       ath9k_ps_wakeup(sc);
        /* Set BSSID mask. */
        memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
        ath_hw_setbssidmask(common);
@@ -1407,7 +1410,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
        }
 
        ath9k_hw_set_interrupts(ah, ah->imask);
-       ath9k_ps_restore(sc);
 
        /* Set up ANI */
        if ((iter_data.naps + iter_data.nadhocs) > 0) {
@@ -1453,6 +1455,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
        struct ath_vif *avp = (void *)vif->drv_priv;
        int ret = 0;
 
+       ath9k_ps_wakeup(sc);
        mutex_lock(&sc->mutex);
 
        switch (vif->type) {
@@ -1499,6 +1502,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
        ath9k_do_vif_add_setup(hw, vif);
 out:
        mutex_unlock(&sc->mutex);
+       ath9k_ps_restore(sc);
        return ret;
 }
 
@@ -1513,6 +1517,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
 
        ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n");
        mutex_lock(&sc->mutex);
+       ath9k_ps_wakeup(sc);
 
        /* See if new interface type is valid. */
        if ((new_type == NL80211_IFTYPE_ADHOC) &&
@@ -1542,6 +1547,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
 
        ath9k_do_vif_add_setup(hw, vif);
 out:
+       ath9k_ps_restore(sc);
        mutex_unlock(&sc->mutex);
        return ret;
 }
@@ -1554,6 +1560,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
 
        ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n");
 
+       ath9k_ps_wakeup(sc);
        mutex_lock(&sc->mutex);
 
        sc->nvifs--;
@@ -1565,6 +1572,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
        ath9k_calculate_summary_state(hw, NULL);
 
        mutex_unlock(&sc->mutex);
+       ath9k_ps_restore(sc);
 }
 
 static void ath9k_enable_ps(struct ath_softc *sc)
@@ -1805,6 +1813,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
 
        txq = sc->tx.txq_map[queue];
 
+       ath9k_ps_wakeup(sc);
        mutex_lock(&sc->mutex);
 
        memset(&qi, 0, sizeof(struct ath9k_tx_queue_info));
@@ -1828,6 +1837,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
                        ath_beaconq_config(sc);
 
        mutex_unlock(&sc->mutex);
+       ath9k_ps_restore(sc);
 
        return ret;
 }
@@ -1890,6 +1900,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
        int slottime;
        int error;
 
+       ath9k_ps_wakeup(sc);
        mutex_lock(&sc->mutex);
 
        if (changed & BSS_CHANGED_BSSID) {
@@ -1990,6 +2001,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
        }
 
        mutex_unlock(&sc->mutex);
+       ath9k_ps_restore(sc);
 }
 
 static u64 ath9k_get_tsf(struct ieee80211_hw *hw)
index e83128c50f7b60bdf70f0f0eb3e674e8b62f6fe0..9c65459be100585e243bb3a3e65c23dab0c6d556 100644 (file)
@@ -44,7 +44,7 @@ static void ath_pci_read_cachesize(struct ath_common *common, int *csz)
        *csz = (int)u8tmp;
 
        /*
-        * This check was put in to avoid "unplesant" consequences if
+        * This check was put in to avoid "unpleasant" consequences if
         * the bootrom has not fully initialized all PCI devices.
         * Sometimes the cache line size register is not set
         */
index a3241cd089b1db84cf60e2d92961dd6426ed9eb7..4c0d36a6980f5e319ce2a40b9782a53a4d8c22d6 100644 (file)
@@ -792,7 +792,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 
                tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
        } else {
-               /* Set the choosen rate. No RTS for first series entry. */
+               /* Set the chosen rate. No RTS for first series entry. */
                ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
                                       try_per_rate, rix, 0);
        }
index a9c3f4672aa0e12736a24c8ddb4e4c280d635d29..b29c80def35e89f10284ae794d267ca3a19d3e55 100644 (file)
@@ -486,12 +486,12 @@ start_recv:
 bool ath_stoprecv(struct ath_softc *sc)
 {
        struct ath_hw *ah = sc->sc_ah;
-       bool stopped;
+       bool stopped, reset = false;
 
        spin_lock_bh(&sc->rx.rxbuflock);
        ath9k_hw_abortpcurecv(ah);
        ath9k_hw_setrxfilter(ah, 0);
-       stopped = ath9k_hw_stopdmarecv(ah);
+       stopped = ath9k_hw_stopdmarecv(ah, &reset);
 
        if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
                ath_edma_stop_recv(sc);
@@ -506,7 +506,7 @@ bool ath_stoprecv(struct ath_softc *sc)
                        "confusing the DMA engine when we start RX up\n");
                ATH_DBG_WARN_ON_ONCE(!stopped);
        }
-       return stopped;
+       return stopped && !reset;
 }
 
 void ath_flushrecv(struct ath_softc *sc)
index 26734e53b37f316aba6693e51dfb0ff755ee02a4..88fa7fdffd05d6ac36c4d45cb2d7416fc0681713 100644 (file)
@@ -628,8 +628,8 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
                                 (u32)ATH_AMPDU_LIMIT_MAX);
 
        /*
-        * h/w can accept aggregates upto 16 bit lengths (65535).
-        * The IE, however can hold upto 65536, which shows up here
+        * h/w can accept aggregates up to 16 bit lengths (65535).
+        * The IE, however can hold up to 65536, which shows up here
         * as zero. Ignore 65536 since we  are constrained by hw.
         */
        if (tid->an->maxampdu)
index c6a5fae634a0f14718ff60e212ad20c123a58ca0..3d4ed5863732c6f2d6c4facb11aa042218d4e965 100644 (file)
@@ -161,7 +161,7 @@ struct carl9170_sta_tid {
  * Naturally: The higher the limit, the faster the device CAN send.
  * However, even a slight over-commitment at the wrong time and the
  * hardware is doomed to send all already-queued frames at suboptimal
- * rates. This in turn leads to an enourmous amount of unsuccessful
+ * rates. This in turn leads to an enormous amount of unsuccessful
  * retries => Latency goes up, whereas the throughput goes down. CRASH!
  */
 #define CARL9170_NUM_TX_LIMIT_HARD     ((AR9170_TXQ_DEPTH * 3) / 2)
@@ -443,6 +443,7 @@ struct carl9170_ba_stats {
        u8 ampdu_len;
        u8 ampdu_ack_len;
        bool clear;
+       bool req;
 };
 
 struct carl9170_sta_info {
index ede3d7e5a048d3a356cc56890318ea391df81241..89fe60accf8550f7a7234d7c0542eec7e1670bb3 100644 (file)
@@ -1355,6 +1355,7 @@ static int carl9170_op_ampdu_action(struct ieee80211_hw *hw,
                tid_info = rcu_dereference(sta_info->agg[tid]);
 
                sta_info->stats[tid].clear = true;
+               sta_info->stats[tid].req = false;
 
                if (tid_info) {
                        bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE);
index b6b0de600506ce3ed08d909762db7bb3a87c40fc..b6ae0e179c8d6cec059016d3f7650bca0f5a89c1 100644 (file)
@@ -427,7 +427,7 @@ static u32 carl9170_def_val(u32 reg, bool is_2ghz, bool is_40mhz)
 
 /*
  * initialize some phy regs from eeprom values in modal_header[]
- * acc. to band and bandwith
+ * acc. to band and bandwidth
  */
 static int carl9170_init_phy_from_eeprom(struct ar9170 *ar,
                                bool is_2ghz, bool is_40mhz)
index 84866a4b83509afcfbd3ec4a8684426b59ed4e23..ec21ea9fd8d5c9a9cd4ad644d33f5c1e40b74517 100644 (file)
@@ -849,7 +849,7 @@ static void carl9170_rx_stream(struct ar9170 *ar, void *buf, unsigned int len)
                                /*
                                 * nested carl9170_rx_stream call!
                                 *
-                                * termination is guranteed, even when the
+                                * termination is guaranteed, even when the
                                 * combined frame also have an element with
                                 * a bad tag.
                                 */
index 0ef70b6fc512b672d97360e0b48bab40796a2794..cb70ed7ec5ccff939c7c29b6cd340ecba07d0933 100644 (file)
@@ -383,6 +383,7 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar,
 
        if (sta_info->stats[tid].clear) {
                sta_info->stats[tid].clear = false;
+               sta_info->stats[tid].req = false;
                sta_info->stats[tid].ampdu_len = 0;
                sta_info->stats[tid].ampdu_ack_len = 0;
        }
@@ -391,10 +392,16 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar,
        if (txinfo->status.rates[0].count == 1)
                sta_info->stats[tid].ampdu_ack_len++;
 
+       if (!(txinfo->flags & IEEE80211_TX_STAT_ACK))
+               sta_info->stats[tid].req = true;
+
        if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) {
                super->s.rix = sta_info->stats[tid].ampdu_len;
                super->s.cnt = sta_info->stats[tid].ampdu_ack_len;
                txinfo->flags |= IEEE80211_TX_STAT_AMPDU;
+               if (sta_info->stats[tid].req)
+                       txinfo->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
+
                sta_info->stats[tid].clear = true;
        }
        spin_unlock_bh(&tid_info->lock);
index f82c400be28864d58edd9a5d38bd10f8a8c73f9d..2fb53d0675124d90b0c7ba82c9183af2437b9a9a 100644 (file)
@@ -430,7 +430,7 @@ static void carl9170_usb_rx_complete(struct urb *urb)
                         * The system is too slow to cope with
                         * the enormous workload. We have simply
                         * run out of active rx urbs and this
-                        * unfortunatly leads to an unpredictable
+                        * unfortunately leads to an unpredictable
                         * device.
                         */
 
index 183c28281385b255a0cd86d579cfc33885882abd..cc11d66f15bcc69fd02110ae5eb87b02f5f3948d 100644 (file)
@@ -86,7 +86,7 @@
  * IFRAME-01:  0110
  *
  * An easy eye-inspeciton of this already should tell you that this frame
- * will not pass our check. This is beacuse the bssid_mask tells the
+ * will not pass our check. This is because the bssid_mask tells the
  * hardware to only look at the second least significant bit and the
  * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB
  * as 1, which does not match 0.
index f828f294ba89f90efc966db7ec922739b8767980..0e1b8793c8641012617070e7d97ef0bfb8060a4f 100644 (file)
@@ -268,7 +268,7 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
        }
 
        /*
-        * If a country IE has been recieved check its rule for this
+        * If a country IE has been received check its rule for this
         * channel first before enabling active scan. The passive scan
         * would have been enforced by the initial processing of our
         * custom regulatory domain.
@@ -476,7 +476,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
                wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
        } else {
                /*
-                * This gets applied in the case of the absense of CRDA,
+                * This gets applied in the case of the absence of CRDA,
                 * it's our own custom world regulatory domain, similar to
                 * cfg80211's but we enable passive scanning.
                 */
index 248c670fdfbefe0bf06e3ace4e33b2e4bd43da05..5c2cfe6941524ccd7b05525a147b5ce6854c3133 100644 (file)
@@ -195,6 +195,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
        {APL9_WORLD, CTL_ETSI, CTL_ETSI},
 
        {APL3_FCCA, CTL_FCC, CTL_FCC},
+       {APL7_FCCA, CTL_FCC, CTL_FCC},
        {APL1_ETSIC, CTL_FCC, CTL_ETSI},
        {APL2_ETSIC, CTL_FCC, CTL_ETSI},
        {APL2_APLD, CTL_FCC, NO_CTL},
index 46e382ed46aa76a3a37695eccb25b7c948c10c26..39a11e8af4fa539f2f888b987ce127fe19c7403d 100644 (file)
@@ -439,7 +439,7 @@ static u8 mac_reader[] = {
 };
 
 struct atmel_private {
-       void *card; /* Bus dependent stucture varies for PCcard */
+       void *card; /* Bus dependent structure varies for PCcard */
        int (*present_callback)(void *); /* And callback which uses it */
        char firmware_id[32];
        AtmelFWType firmware_type;
@@ -3895,7 +3895,7 @@ static int reset_atmel_card(struct net_device *dev)
 
           This routine is also responsible for initialising some
           hardware-specific fields in the atmel_private structure,
-          including a copy of the firmware's hostinfo stucture
+          including a copy of the firmware's hostinfo structure
           which is the route into the rest of the firmware datastructures. */
 
        struct atmel_private *priv = netdev_priv(dev);
index c96e19da29496407385ee8e51b19f46b21e230d4..05263516c113f50cfcbff36e3ec94998832f203a 100644 (file)
@@ -99,7 +99,7 @@ static void atmel_detach(struct pcmcia_device *link)
 }
 
 /* Call-back function to interrogate PCMCIA-specific information
-   about the current existance of the card */
+   about the current existence of the card */
 static int card_present(void *arg)
 {
        struct pcmcia_device *link = (struct pcmcia_device *)arg;
index bd4cb75b6ca3aa12e72e76956ccd069b5b0b80ae..229f4388f790895108cd5ba592657fdcf3780a1f 100644 (file)
@@ -648,7 +648,7 @@ struct b43_request_fw_context {
        char errors[B43_NR_FWTYPES][128];
        /* Temporary buffer for storing the firmware name. */
        char fwname[64];
-       /* A fatal error occured while requesting. Firmware reqest
+       /* A fatal error occurred while requesting. Firmware reqest
         * can not continue, as any other reqest will also fail. */
        int fatal_failure;
 };
index 3d5566e7af0ad51ea08088c8adaa03f1c2a1e02b..ff0f5ba14b2cfb60223a19455772fddca719951b 100644 (file)
@@ -1536,7 +1536,7 @@ static void dma_rx(struct b43_dmaring *ring, int *slot)
                dmaaddr = meta->dmaaddr;
                goto drop_recycle_buffer;
        }
-       if (unlikely(len > ring->rx_buffersize)) {
+       if (unlikely(len + ring->frameoffset > ring->rx_buffersize)) {
                /* The data did not fit into one descriptor buffer
                 * and is split over multiple buffers.
                 * This should never happen, as we try to allocate buffers
index a01c2100f166455d055fa1717574fbb85dfdd3f6..e8a80a1251bf602ba89c726d8019188914f73c78 100644 (file)
@@ -163,7 +163,7 @@ struct b43_dmadesc_generic {
 /* DMA engine tuning knobs */
 #define B43_TXRING_SLOTS               256
 #define B43_RXRING_SLOTS               64
-#define B43_DMA0_RX_BUFFERSIZE         IEEE80211_MAX_FRAME_LEN
+#define B43_DMA0_RX_BUFFERSIZE         (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN)
 
 /* Pointer poison */
 #define B43_DMA_PTR_POISON             ((void *)ERR_PTR(-ENOMEM))
index 57eb5b6497308d7cbb6b77816915ab15132ac8d6..5af40d9170a096c4c598c9ae7c170cbb149c2f1a 100644 (file)
@@ -72,6 +72,7 @@ MODULE_FIRMWARE("b43/ucode11.fw");
 MODULE_FIRMWARE("b43/ucode13.fw");
 MODULE_FIRMWARE("b43/ucode14.fw");
 MODULE_FIRMWARE("b43/ucode15.fw");
+MODULE_FIRMWARE("b43/ucode16_mimo.fw");
 MODULE_FIRMWARE("b43/ucode5.fw");
 MODULE_FIRMWARE("b43/ucode9.fw");
 
@@ -4010,7 +4011,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
        b43_mac_enable(dev);
        b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask);
 
-       /* Start maintainance work */
+       /* Start maintenance work */
        b43_periodic_tasks_setup(dev);
 
        b43_leds_init(dev);
index 8569fdd4c6becb813193a3699856f4449eecbe95..5413c906a3e7dba5c6ea81663e94ae303bcfc048 100644 (file)
@@ -164,7 +164,7 @@ struct b43_phy_g {
        /* Current Interference Mitigation mode */
        int interfmode;
        /* Stack of saved values from the Interference Mitigation code.
-        * Each value in the stack is layed out as follows:
+        * Each value in the stack is laid out as follows:
         * bit 0-11:  offset
         * bit 12-15: register ID
         * bit 16-32: value
index 001e841f118c97ebfae1815035d539a33e199af0..e789a89f1047f7f7bc8544702bb1e8fd78ff1fd9 100644 (file)
 #define B43_NPHY_CHAN_ESTHANG                  B43_PHY_N(0x21D) /* Channel estimate hang */
 #define B43_NPHY_FINERX2_CGC                   B43_PHY_N(0x221) /* Fine RX 2 clock gate control */
 #define  B43_NPHY_FINERX2_CGC_DECGC            0x0008 /* Decode gated clocks */
-#define B43_NPHY_TXPCTL_INIT                   B43_PHY_N(0x222) /* TX power controll init */
+#define B43_NPHY_TXPCTL_INIT                   B43_PHY_N(0x222) /* TX power control init */
 #define  B43_NPHY_TXPCTL_INIT_PIDXI1           0x00FF /* Power index init 1 */
 #define  B43_NPHY_TXPCTL_INIT_PIDXI1_SHIFT     0
 #define B43_NPHY_PAPD_EN0                      B43_PHY_N(0x297) /* PAPD Enable0 TBD */
index c81b2f53b0c508e80a5833baa78c93c989854c8f..23583be1ee0b797d2999babc53bbc719e2c4569d 100644 (file)
@@ -488,7 +488,7 @@ struct b43legacy_phy {
        /* Current Interference Mitigation mode */
        int interfmode;
        /* Stack of saved values from the Interference Mitigation code.
-        * Each value in the stack is layed out as follows:
+        * Each value in the stack is laid out as follows:
         * bit 0-11:  offset
         * bit 12-15: register ID
         * bit 16-32: value
index 18d63f57777dec377fce78c46a5af330ff93933b..3d05dc15c6b8a3d63f69afbc37654401cfacee2e 100644 (file)
@@ -2359,7 +2359,7 @@ int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
 }
 
 
-/* Translate our list of Access Points & Stations to a card independant
+/* Translate our list of Access Points & Stations to a card independent
  * format that the Wireless Tools will understand - Jean II */
 int prism2_ap_translate_scan(struct net_device *dev,
                             struct iw_request_info *info, char *buffer)
index 655ceeba96122467b0e2c459d1ddc9838ba7db3c..334e2d0b8e1196617901cf5edd1f774b5f7cdad4 100644 (file)
@@ -114,7 +114,7 @@ struct sta_info {
  * has passed since last received frame from the station, a nullfunc data
  * frame is sent to the station. If this frame is not acknowledged and no other
  * frames have been received, the station will be disassociated after
- * AP_DISASSOC_DELAY. Similarily, a the station will be deauthenticated after
+ * AP_DISASSOC_DELAY. Similarly, a the station will be deauthenticated after
  * AP_DEAUTH_DELAY. AP_TIMEOUT_RESOLUTION is the resolution that is used with
  * max inactivity timer. */
 #define AP_MAX_INACTIVITY_SEC (5 * 60)
index 6038633ef361fa824595531c5466969303c08e62..12de46407c71ae42b7eb99e6f4e9d44888af2430 100644 (file)
@@ -1945,7 +1945,7 @@ static char * __prism2_translate_scan(local_info_t *local,
 }
 
 
-/* Translate scan data returned from the card to a card independant
+/* Translate scan data returned from the card to a card independent
  * format that the Wireless Tools will understand - Jean II */
 static inline int prism2_translate_scan(local_info_t *local,
                                        struct iw_request_info *info,
@@ -2043,7 +2043,7 @@ static inline int prism2_ioctl_giwscan_sta(struct net_device *dev,
                 * until results are ready for various reasons.
                 * First, managing wait queues is complex and racy
                 * (there may be multiple simultaneous callers).
-                * Second, we grab some rtnetlink lock before comming
+                * Second, we grab some rtnetlink lock before coming
                 * here (in dev_ioctl()).
                 * Third, the caller can wait on the Wireless Event
                 * - Jean II */
index 1c66b3c1030d7db008f400d5774d58a23490f57a..88dc6a52bdf11bb6d39f19a0eb57ab8becc8c8b4 100644 (file)
@@ -853,7 +853,7 @@ struct local_info {
        struct work_struct comms_qual_update;
 
        /* RSSI to dBm adjustment (for RX descriptor fields) */
-       int rssi_to_dBm; /* substract from RSSI to get approximate dBm value */
+       int rssi_to_dBm; /* subtract from RSSI to get approximate dBm value */
 
        /* BSS list / protected by local->lock */
        struct list_head bss_list;
index 4b97f918daff2b1779bec3c621870ffcee5fe870..44307753587da5dd5e00507ada40669ffa6b73be 100644 (file)
@@ -63,7 +63,7 @@ When data is sent to the firmware, the first TBD is used to indicate to the
 firmware if a Command or Data is being sent.  If it is Command, all of the
 command information is contained within the physical address referred to by the
 TBD.  If it is Data, the first TBD indicates the type of data packet, number
-of fragments, etc.  The next TBD then referrs to the actual packet location.
+of fragments, etc.  The next TBD then refers to the actual packet location.
 
 The Tx flow cycle is as follows:
 
index 160881f234cc300c78d804f1f2d6e688b14dc09f..42c3fe37af6434c124ec76d3ff742a2163ff8914 100644 (file)
@@ -1181,7 +1181,7 @@ static void ipw_led_shutdown(struct ipw_priv *priv)
 /*
  * The following adds a new attribute to the sysfs representation
  * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/)
- * used for controling the debug level.
+ * used for controlling the debug level.
  *
  * See the level definitions in ipw for details.
  */
@@ -3763,7 +3763,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv,
 
        q->txb = kmalloc(sizeof(q->txb[0]) * count, GFP_KERNEL);
        if (!q->txb) {
-               IPW_ERROR("vmalloc for auxilary BD structures failed\n");
+               IPW_ERROR("vmalloc for auxiliary BD structures failed\n");
                return -ENOMEM;
        }
 
@@ -5581,7 +5581,7 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
                return 0;
        }
 
-       /* Verify privacy compatability */
+       /* Verify privacy compatibility */
        if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
            ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
                IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
@@ -5808,7 +5808,7 @@ static int ipw_best_network(struct ipw_priv *priv,
                return 0;
        }
 
-       /* Verify privacy compatability */
+       /* Verify privacy compatibility */
        if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
            ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
                IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
@@ -8184,7 +8184,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
 static int is_network_packet(struct ipw_priv *priv,
                                    struct libipw_hdr_4addr *header)
 {
-       /* Filter incoming packets to determine if they are targetted toward
+       /* Filter incoming packets to determine if they are targeted toward
         * this network, discarding packets coming from ourselves */
        switch (priv->ieee->iw_mode) {
        case IW_MODE_ADHOC:     /* Header: Dest. | Source    | BSSID */
@@ -8340,9 +8340,9 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv,
 }
 
 /*
- * Main entry function for recieving a packet with 80211 headers.  This
+ * Main entry function for receiving a packet with 80211 headers.  This
  * should be called when ever the FW has notified us that there is a new
- * skb in the recieve queue.
+ * skb in the receive queue.
  */
 static void ipw_rx(struct ipw_priv *priv)
 {
@@ -8683,7 +8683,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
  * functions defined in ipw_main to provide the HW interaction.
  *
  * The exception to this is the use of the ipw_get_ordinal()
- * function used to poll the hardware vs. making unecessary calls.
+ * function used to poll the hardware vs. making unnecessary calls.
  *
  */
 
@@ -10419,7 +10419,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
 
        memset(&dummystats, 0, sizeof(dummystats));
 
-       /* Filtering of fragment chains is done agains the first fragment */
+       /* Filtering of fragment chains is done against the first fragment */
        hdr = (void *)txb->fragments[0]->data;
        if (libipw_is_management(le16_to_cpu(hdr->frame_control))) {
                if (filter & IPW_PROM_NO_MGMT)
index 0de1b189322019e80e37e56b564a05e3fe508897..e5ad76cd77da7ef106228b43bc45b909d8ea93e1 100644 (file)
@@ -925,7 +925,7 @@ drop_free:
 static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
 
 /*
-* Make ther structure we read from the beacon packet has
+* Make the structure we read from the beacon packet to have
 * the right values
 */
 static int libipw_verify_qos_info(struct libipw_qos_information_element
index 2a45dd44cc127ba7abf3400012059ab90addcb73..aef65cd47661e39a62106b232eccb8054b382411 100644 (file)
@@ -1,6 +1,5 @@
 config IWLWIFI_LEGACY
-       tristate "Intel Wireless Wifi legacy devices"
-       depends on PCI && MAC80211
+       tristate
        select FW_LOADER
        select NEW_LEDS
        select LEDS_CLASS
@@ -65,7 +64,8 @@ endmenu
 
 config IWL4965
        tristate "Intel Wireless WiFi 4965AGN (iwl4965)"
-       depends on IWLWIFI_LEGACY
+       depends on PCI && MAC80211
+       select IWLWIFI_LEGACY
        ---help---
          This option enables support for
 
@@ -92,7 +92,8 @@ config IWL4965
 
 config IWL3945
        tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)"
-       depends on IWLWIFI_LEGACY
+       depends on PCI && MAC80211
+       select IWLWIFI_LEGACY
        ---help---
          Select to build the driver supporting the:
 
index 779d3cb86e2c86ad9c15f207288032064bca9dcf..5c3a68d3af12e3e7c7fe137a536d2759416f2443 100644 (file)
@@ -74,8 +74,6 @@
 /* RSSI to dBm */
 #define IWL39_RSSI_OFFSET      95
 
-#define IWL_DEFAULT_TX_POWER   0x0F
-
 /*
  * EEPROM related constants, enums, and structures.
  */
index 08b189c8472d214d20ed132a3f0849e693136a29..fc6fa2886d9c38f05099516147dacc3088afb748 100644 (file)
@@ -804,9 +804,6 @@ struct iwl4965_scd_bc_tbl {
 
 #define IWL4965_DEFAULT_TX_RETRY  15
 
-/* Limit range of txpower output target to be between these values */
-#define IWL4965_TX_POWER_TARGET_POWER_MIN      (0)     /* 0 dBm: 1 milliwatt */
-
 /* EEPROM */
 #define IWL4965_FIRST_AMPDU_QUEUE      10
 
index 5c40502f869a89458545456870826236a27904d5..79ac081832fb771ff6ce607f37ce50e9bd5bc783 100644 (file)
@@ -316,12 +316,18 @@ int iwl4965_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
        hdr_len = ieee80211_hdrlen(fc);
 
-       /* Find index into station table for destination station */
-       sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta);
-       if (sta_id == IWL_INVALID_STATION) {
-               IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
-                              hdr->addr1);
-               goto drop_unlock;
+       /* For management frames use broadcast id to do not break aggregation */
+       if (!ieee80211_is_data(fc))
+               sta_id = ctx->bcast_sta_id;
+       else {
+               /* Find index into station table for destination station */
+               sta_id = iwl_legacy_sta_id_or_broadcast(priv, ctx, info->control.sta);
+
+               if (sta_id == IWL_INVALID_STATION) {
+                       IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
+                                      hdr->addr1);
+                       goto drop_unlock;
+               }
        }
 
        IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
@@ -1127,12 +1133,16 @@ int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
             q->read_ptr = iwl_legacy_queue_inc_wrap(q->read_ptr, q->n_bd)) {
 
                tx_info = &txq->txb[txq->q.read_ptr];
-               iwl4965_tx_status(priv, tx_info,
-                                txq_id >= IWL4965_FIRST_AMPDU_QUEUE);
+
+               if (WARN_ON_ONCE(tx_info->skb == NULL))
+                       continue;
 
                hdr = (struct ieee80211_hdr *)tx_info->skb->data;
-               if (hdr && ieee80211_is_data_qos(hdr->frame_control))
+               if (ieee80211_is_data_qos(hdr->frame_control))
                        nfreed++;
+
+               iwl4965_tx_status(priv, tx_info,
+                                txq_id >= IWL4965_FIRST_AMPDU_QUEUE);
                tx_info->skb = NULL;
 
                priv->cfg->ops->lib->txq_free_tfd(priv, txq);
index d418b647be800ba46b996241ff10a64865d34948..c1511b14b239c69884292e5e8e33296debbdebc4 100644 (file)
@@ -160,6 +160,7 @@ int iwl_legacy_init_geos(struct iwl_priv *priv)
        struct ieee80211_channel *geo_ch;
        struct ieee80211_rate *rates;
        int i = 0;
+       s8 max_tx_power = 0;
 
        if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates ||
            priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) {
@@ -235,8 +236,8 @@ int iwl_legacy_init_geos(struct iwl_priv *priv)
 
                        geo_ch->flags |= ch->ht40_extension_channel;
 
-                       if (ch->max_power_avg > priv->tx_power_device_lmt)
-                               priv->tx_power_device_lmt = ch->max_power_avg;
+                       if (ch->max_power_avg > max_tx_power)
+                               max_tx_power = ch->max_power_avg;
                } else {
                        geo_ch->flags |= IEEE80211_CHAN_DISABLED;
                }
@@ -249,6 +250,10 @@ int iwl_legacy_init_geos(struct iwl_priv *priv)
                                 geo_ch->flags);
        }
 
+       priv->tx_power_device_lmt = max_tx_power;
+       priv->tx_power_user_lmt = max_tx_power;
+       priv->tx_power_next = max_tx_power;
+
        if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) &&
             priv->cfg->sku & IWL_SKU_A) {
                IWL_INFO(priv, "Incorrectly detected BG card as ABG. "
@@ -1030,7 +1035,7 @@ int iwl_legacy_apm_init(struct iwl_priv *priv)
        /*
         * Enable HAP INTA (interrupt from management bus) to
         * wake device's PCI Express link L1a -> L0s
-        * NOTE:  This is no-op for 3945 (non-existant bit)
+        * NOTE:  This is no-op for 3945 (non-existent bit)
         */
        iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG,
                                    CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
@@ -1124,11 +1129,11 @@ int iwl_legacy_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
        if (!priv->cfg->ops->lib->send_tx_power)
                return -EOPNOTSUPP;
 
-       if (tx_power < IWL4965_TX_POWER_TARGET_POWER_MIN) {
+       /* 0 dBm mean 1 milliwatt */
+       if (tx_power < 0) {
                IWL_WARN(priv,
-                        "Requested user TXPOWER %d below lower limit %d.\n",
-                        tx_power,
-                        IWL4965_TX_POWER_TARGET_POWER_MIN);
+                        "Requested user TXPOWER %d below 1 mW.\n",
+                        tx_power);
                return -EINVAL;
        }
 
@@ -1805,6 +1810,15 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw,
 
        mutex_lock(&priv->mutex);
 
+       if (!ctx->vif || !iwl_legacy_is_ready_rf(priv)) {
+               /*
+                * Huh? But wait ... this can maybe happen when
+                * we're in the middle of a firmware restart!
+                */
+               err = -EBUSY;
+               goto out;
+       }
+
        interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes;
 
        if (!(interface_modes & BIT(newtype))) {
@@ -1832,6 +1846,7 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw,
        /* success */
        iwl_legacy_teardown_interface(priv, vif, true);
        vif->type = newtype;
+       vif->p2p = newp2p;
        err = iwl_legacy_setup_interface(priv, ctx);
        WARN_ON(err);
        /*
index 04c5648027df8db645aa57d4f5535267c5a15d3b..cb346d1a9ffa6e5f581b5b9c9c0a52f6ffafed3a 100644 (file)
@@ -471,13 +471,6 @@ int iwl_legacy_init_channel_map(struct iwl_priv *priv)
                                             flags & EEPROM_CHANNEL_RADAR))
                                       ? "" : "not ");
 
-                       /* Set the tx_power_user_lmt to the highest power
-                        * supported by any channel */
-                       if (eeprom_ch_info[ch].max_power_avg >
-                                               priv->tx_power_user_lmt)
-                               priv->tx_power_user_lmt =
-                                   eeprom_ch_info[ch].max_power_avg;
-
                        ch_info++;
                }
        }
index 4e20c7e5c883a1041a3f10653f2ad8589b34b16f..6e6091816e3649f016746a9973569f6ff2c19ef5 100644 (file)
  * @finished_rb_num [0:11] - Indicates the index of the current RB
  *     in which the last frame was written to
  * @finished_fr_num [0:11] - Indicates the index of the RX Frame
- *     which was transfered
+ *     which was transferred
  */
 struct iwl_rb_status {
        __le16 closed_rb_num;
index 15eb8b70715741c0a92e347b0d087964df2b32f9..bda0d61b2c0d1e5aefaea5b13fd4e25a84832ec1 100644 (file)
@@ -48,8 +48,21 @@ module_param(led_mode, int, S_IRUGO);
 MODULE_PARM_DESC(led_mode, "0=system default, "
                "1=On(RF On)/Off(RF Off), 2=blinking");
 
+/* Throughput          OFF time(ms)    ON time (ms)
+ *     >300                    25              25
+ *     >200 to 300             40              40
+ *     >100 to 200             55              55
+ *     >70 to 100              65              65
+ *     >50 to 70               75              75
+ *     >20 to 50               85              85
+ *     >10 to 20               95              95
+ *     >5 to 10                110             110
+ *     >1 to 5                 130             130
+ *     >0 to 1                 167             167
+ *     <=0                                     SOLID ON
+ */
 static const struct ieee80211_tpt_blink iwl_blink[] = {
-       { .throughput = 0 * 1024 - 1, .blink_time = 334 },
+       { .throughput = 0, .blink_time = 334 },
        { .throughput = 1 * 1024 - 1, .blink_time = 260 },
        { .throughput = 5 * 1024 - 1, .blink_time = 220 },
        { .throughput = 10 * 1024 - 1, .blink_time = 190 },
@@ -101,6 +114,11 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv,
        if (priv->blink_on == on && priv->blink_off == off)
                return 0;
 
+       if (off == 0) {
+               /* led is SOLID_ON */
+               on = IWL_LED_SOLID;
+       }
+
        IWL_DEBUG_LED(priv, "Led blink time compensation=%u\n",
                        priv->cfg->base_params->led_compensation);
        led_cmd.on = iwl_legacy_blink_compensation(priv, on,
index 60f597f796ca3343065c4136dfc76dd9bfe11ce0..353234a02c6d3e7bd3f5849ad37a85347e6a3174 100644 (file)
@@ -143,7 +143,7 @@ static void iwl_legacy_do_scan_abort(struct iwl_priv *priv)
                IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret);
                iwl_legacy_force_scan_end(priv);
        } else
-               IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n");
+               IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n");
 }
 
 /**
index 47c9da3834ea0157ef8a9d040b411f1e9d0fa862..66f0fb2bbe00a6d66c726d620ee8b4efe388edba 100644 (file)
@@ -110,7 +110,7 @@ static int iwl_legacy_process_add_sta_resp(struct iwl_priv *priv,
        /*
         * XXX: The MAC address in the command buffer is often changed from
         * the original sent to the device. That is, the MAC address
-        * written to the command buffer often is not the same MAC adress
+        * written to the command buffer often is not the same MAC address
         * read from the command buffer when the command returns. This
         * issue has not yet been resolved and this debugging is left to
         * observe the problem.
index ab87e1b73529e88f81e6096a18dd457bd86b93c3..cc7ebcee60e5bd6e9d49f2a1ae8c17dee1c31f21 100644 (file)
@@ -93,6 +93,7 @@ MODULE_LICENSE("GPL");
 struct iwl_mod_params iwl3945_mod_params = {
        .sw_crypto = 1,
        .restart_fw = 1,
+       .disable_hw_scan = 1,
        /* the rest are 0 by default */
 };
 
@@ -3824,10 +3825,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
        priv->force_reset[IWL_FW_RESET].reset_duration =
                IWL_DELAY_NEXT_FORCE_FW_RELOAD;
 
-
-       priv->tx_power_user_lmt = IWL_DEFAULT_TX_POWER;
-       priv->tx_power_next = IWL_DEFAULT_TX_POWER;
-
        if (eeprom->version < EEPROM_3945_EEPROM_VERSION) {
                IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n",
                         eeprom->version);
@@ -3960,8 +3957,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
         * "the hard way", rather than using device's scan.
         */
        if (iwl3945_mod_params.disable_hw_scan) {
-               dev_printk(KERN_DEBUG, &(pdev->dev),
-                       "sw scan support is deprecated\n");
+               IWL_DEBUG_INFO(priv, "Disabling hw_scan\n");
                iwl3945_hw_ops.hw_scan = NULL;
        }
 
@@ -4280,8 +4276,7 @@ MODULE_PARM_DESC(swcrypto,
                "using software crypto (default 1 [software])");
 module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan,
                int, S_IRUGO);
-MODULE_PARM_DESC(disable_hw_scan,
-               "disable hardware scanning (default 0) (deprecated)");
+MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)");
 #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
 module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "debug output mask");
index 91b3d8b9d7a5aceb2ecc0fbdc5d657dbe19a2cc8..a62fe24ee594cbbb5b462701ca3ec369b422a437 100644 (file)
@@ -2984,15 +2984,15 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
        struct iwl_priv *priv = container_of(work, struct iwl_priv,
                        txpower_work);
 
+       mutex_lock(&priv->mutex);
+
        /* If a scan happened to start before we got here
         * then just return; the statistics notification will
         * kick off another scheduled work to compensate for
         * any temperature delta we missed here. */
        if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
            test_bit(STATUS_SCANNING, &priv->status))
-               return;
-
-       mutex_lock(&priv->mutex);
+               goto out;
 
        /* Regardless of if we are associated, we must reconfigure the
         * TX power since frames can be sent on non-radar channels while
@@ -3002,7 +3002,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
        /* Update last_temperature to keep is_calib_needed from running
         * when it isn't needed... */
        priv->last_temperature = priv->temperature;
-
+out:
        mutex_unlock(&priv->mutex);
 }
 
@@ -3140,12 +3140,6 @@ static int iwl4965_init_drv(struct iwl_priv *priv)
 
        iwl_legacy_init_scan_params(priv);
 
-       /* Set the tx_power_user_lmt to the lowest power level
-        * this value will get overwritten by channel max power avg
-        * from eeprom */
-       priv->tx_power_user_lmt = IWL4965_TX_POWER_TARGET_POWER_MIN;
-       priv->tx_power_next = IWL4965_TX_POWER_TARGET_POWER_MIN;
-
        ret = iwl_legacy_init_channel_map(priv);
        if (ret) {
                IWL_ERR(priv, "initializing regulatory failed: %d\n", ret);
index 3ea31b659d1a5b620318d731c4036648e9ebd2b6..22e045b5bcee0a335baac193c8becdc8300314a1 100644 (file)
@@ -530,6 +530,9 @@ static struct iwl_ht_params iwl5000_ht_params = {
 struct iwl_cfg iwl5300_agn_cfg = {
        .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
        IWL_DEVICE_5000,
+       /* at least EEPROM 0x11A has wrong info */
+       .valid_tx_ant = ANT_ABC,        /* .cfg overwrite */
+       .valid_rx_ant = ANT_ABC,        /* .cfg overwrite */
        .ht_params = &iwl5000_ht_params,
 };
 
index b5cb3be0eb4b59536e18829f0c55799df9fa9ad9..ed0148d714de0d7f383c22ec554367b09ebfa015 100644 (file)
@@ -69,7 +69,7 @@ int iwl_alloc_isr_ict(struct iwl_priv *priv)
        if (!priv->_agn.ict_tbl_vir)
                return -ENOMEM;
 
-       /* align table to PAGE_SIZE boundry */
+       /* align table to PAGE_SIZE boundary */
        priv->_agn.aligned_ict_tbl_dma = ALIGN(priv->_agn.ict_tbl_dma, PAGE_SIZE);
 
        IWL_DEBUG_ISR(priv, "ict dma addr %Lx dma aligned %Lx diff %d\n",
index dfdbea6e8f99530f05ce3c7fec062f2a6ff1a381..fbbde0712fa58ffb495f66e5e31d1265c95c162e 100644 (file)
@@ -335,7 +335,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
        struct ieee80211_channel *channel = conf->channel;
        const struct iwl_channel_info *ch_info;
        int ret = 0;
-       bool ht_changed[NUM_IWL_RXON_CTX] = {};
 
        IWL_DEBUG_MAC80211(priv, "changed %#x", changed);
 
@@ -383,10 +382,8 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
 
                for_each_context(priv, ctx) {
                        /* Configure HT40 channels */
-                       if (ctx->ht.enabled != conf_is_ht(conf)) {
+                       if (ctx->ht.enabled != conf_is_ht(conf))
                                ctx->ht.enabled = conf_is_ht(conf);
-                               ht_changed[ctx->ctxid] = true;
-                       }
 
                        if (ctx->ht.enabled) {
                                if (conf_is_ht40_minus(conf)) {
@@ -455,8 +452,6 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
                if (!memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging)))
                        continue;
                iwlagn_commit_rxon(priv, ctx);
-               if (ht_changed[ctx->ctxid])
-                       iwlagn_update_qos(priv, ctx);
        }
  out:
        mutex_unlock(&priv->mutex);
index a709d05c5868f3e6a19d586bcdffd560cb69bf6f..0712b67283a4f7e1b4a4ae702623ba32fd61a933 100644 (file)
@@ -568,12 +568,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
        hdr_len = ieee80211_hdrlen(fc);
 
-       /* Find index into station table for destination station */
-       sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta);
-       if (sta_id == IWL_INVALID_STATION) {
-               IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
-                              hdr->addr1);
-               goto drop_unlock;
+       /* For management frames use broadcast id to do not break aggregation */
+       if (!ieee80211_is_data(fc))
+               sta_id = ctx->bcast_sta_id;
+       else {
+               /* Find index into station table for destination station */
+               sta_id = iwl_sta_id_or_broadcast(priv, ctx, info->control.sta);
+               if (sta_id == IWL_INVALID_STATION) {
+                       IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
+                                      hdr->addr1);
+                       goto drop_unlock;
+               }
        }
 
        IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
@@ -1224,12 +1229,16 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
             q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
 
                tx_info = &txq->txb[txq->q.read_ptr];
-               iwlagn_tx_status(priv, tx_info,
-                                txq_id >= IWLAGN_FIRST_AMPDU_QUEUE);
+
+               if (WARN_ON_ONCE(tx_info->skb == NULL))
+                       continue;
 
                hdr = (struct ieee80211_hdr *)tx_info->skb->data;
-               if (hdr && ieee80211_is_data_qos(hdr->frame_control))
+               if (ieee80211_is_data_qos(hdr->frame_control))
                        nfreed++;
+
+               iwlagn_tx_status(priv, tx_info,
+                                txq_id >= IWLAGN_FIRST_AMPDU_QUEUE);
                tx_info->skb = NULL;
 
                if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl)
index 6c30fa652e277a8bcb753ecd9eabbf811fb680b9..bafbe57c960256787c8bd83081c6acc69732e13d 100644 (file)
@@ -1040,7 +1040,7 @@ int iwl_apm_init(struct iwl_priv *priv)
        /*
         * Enable HAP INTA (interrupt from management bus) to
         * wake device's PCI Express link L1a -> L0s
-        * NOTE:  This is no-op for 3945 (non-existant bit)
+        * NOTE:  This is no-op for 3945 (non-existent bit)
         */
        iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
                                    CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
index 98aa8af01192bbe561b1bbf97d208dd3bdd5a54f..20b66469d68f2784e67e423546a60025e6da44a1 100644 (file)
@@ -241,7 +241,7 @@ struct iwl_eeprom_enhanced_txpwr {
 
 /* 6x00 Specific */
 #define EEPROM_6000_TX_POWER_VERSION    (4)
-#define EEPROM_6000_EEPROM_VERSION     (0x434)
+#define EEPROM_6000_EEPROM_VERSION     (0x423)
 
 /* 6x50 Specific */
 #define EEPROM_6050_TX_POWER_VERSION    (4)
index 55b8370bc6d4a6ff7cfe57bad3a18f2cfe094e43..474009a244d49851b634470077a8d8491b48da2d 100644 (file)
  * @finished_rb_num [0:11] - Indicates the index of the current RB
  *     in which the last frame was written to
  * @finished_fr_num [0:11] - Indicates the index of the RX Frame
- *     which was transfered
+ *     which was transferred
  */
 struct iwl_rb_status {
        __le16 closed_rb_num;
index 3a4d9e6b0421fa270c57cf443d783756c448d68e..914c77e445887adc60ea957e02b712aa1e592848 100644 (file)
@@ -143,7 +143,7 @@ static void iwl_do_scan_abort(struct iwl_priv *priv)
                IWL_DEBUG_SCAN(priv, "Send scan abort failed %d\n", ret);
                iwl_force_scan_end(priv);
        } else
-               IWL_DEBUG_SCAN(priv, "Sucessfully send scan abort\n");
+               IWL_DEBUG_SCAN(priv, "Successfully send scan abort\n");
 }
 
 /**
index 907ac890997c8da074272c60361fa3f262482afe..1cabcb39643f48e1ecd9d0b731ceb753399fa9d2 100644 (file)
@@ -57,7 +57,7 @@
  *   This is due to the fact the host talks exclusively
  *   to the UMAC and so there needs to be a special UMAC
  *   command for talking to the LMAC.
- *   This is how a wifi command is layed out:
+ *   This is how a wifi command is laid out:
  *    ------------------------
  *   | iwm_udma_out_wifi_hdr  |
  *    ------------------------
@@ -72,7 +72,7 @@
  *   Those commands are handled by the device's bootrom,
  *   and are typically sent when the UMAC and the LMAC
  *   are not yet available.
- *    *   This is how a non-wifi command is layed out:
+ *    *   This is how a non-wifi command is laid out:
  *    ---------------------------
  *   | iwm_udma_out_nonwifi_hdr  |
  *    ---------------------------
index 3216621fc55a020ecd081362d1633a30067a75bb..be98074c06085f90c08455a2ea53b353a34a3616 100644 (file)
@@ -197,7 +197,7 @@ int iwm_tx_credit_alloc(struct iwm_priv *iwm, int id, int nb)
        spin_lock(&iwm->tx_credit.lock);
 
        if (!iwm_tx_credit_ok(iwm, id, nb)) {
-               IWM_DBG_TX(iwm, DBG, "No credit avaliable for pool[%d]\n", id);
+               IWM_DBG_TX(iwm, DBG, "No credit available for pool[%d]\n", id);
                ret = -ENOSPC;
                goto out;
        }
index 60fd1afe89ac2ff7eee0c0c7df1f9d15c13ecec3..1453eec82a99288256e55bf7b9a408c3c1648408 100644 (file)
@@ -70,7 +70,7 @@ rdrf
        These commands are used to read the MAC, BBP and RF registers from the
        card.  These commands take one parameter that specifies the offset
        location that is to be read.  This parameter must be specified in
-       hexadecimal (its possible to preceed preceding the number with a "0x").
+       hexadecimal (its possible to precede preceding the number with a "0x").
 
        Path: /sys/kernel/debug/libertas_wireless/ethX/registers/
 
@@ -84,7 +84,7 @@ wrrf
        These commands are used to write the MAC, BBP and RF registers in the
        card.  These commands take two parameters that specify the offset
        location and the value that is to be written. This parameters must
-       be specified in hexadecimal (its possible to preceed the number
+       be specified in hexadecimal (its possible to precede the number
        with a "0x").
 
        Usage:
index 30ef0351bfc443fd889505d5c7421ce55b6ddadc..5caa2ac14d61083042c5cc841742c359742a9e1b 100644 (file)
@@ -1350,7 +1350,7 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
                 * we remove all keys like in the WPA/WPA2 setup,
                 * we just don't set RSN.
                 *
-                * Therefore: fall-throught
+                * Therefore: fall-through
                 */
        case WLAN_CIPHER_SUITE_TKIP:
        case WLAN_CIPHER_SUITE_CCMP:
index fc8121190d38e89f22553f0360b812f90e587cfb..8712cb213f2fa938d81793582c28048a95ce6328 100644 (file)
@@ -913,7 +913,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
                goto out3;
        }
 
-       /* Clear any interrupt cause that happend while sending
+       /* Clear any interrupt cause that happened while sending
         * firmware/initializing card */
        if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK);
        if_cs_enable_ints(card);
index 8b1417d3b71b6a1533ff100bde95a7752e391893..d2ac1dcd7e2e2eb26248a92f803b20f98b7850c9 100644 (file)
@@ -66,7 +66,7 @@
 #define IF_SPI_HOST_INT_CTRL_REG 0x40  /* Host interrupt controller reg */
 
 #define IF_SPI_CARD_INT_CAUSE_REG 0x44 /* Card interrupt cause reg */
-#define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interupt status reg */
+#define IF_SPI_CARD_INT_STATUS_REG 0x48 /* Card interrupt status reg */
 #define IF_SPI_CARD_INT_EVENT_MASK_REG 0x4C /* Card interrupt event mask */
 #define IF_SPI_CARD_INT_STATUS_MASK_REG        0x50 /* Card interrupt status mask */
 
index 56f439d58013650a840510278a3c87caa197bd47..f4f4257a9d67e4c1e6e4ac112cd03a71dd5ba944 100644 (file)
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(fake_hw_scan, "Install fake (no-op) hw-scan handler");
  *     an intersection to occur but each device will still use their
  *     respective regulatory requested domains. Subsequent radios will
  *     use the resulting intersection.
- * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We acomplish
+ * @HWSIM_REGTEST_WORLD_ROAM: Used for testing the world roaming. We accomplish
  *     this by using a custom beacon-capable regulatory domain for the first
  *     radio. All other device world roam.
  * @HWSIM_REGTEST_CUSTOM_WORLD: Used for testing the custom world regulatory
index 36952274950e3cf7537834a132d5374f7b2b7322..c1ceb4b23971ea884577bb876432e4a764301446 100644 (file)
@@ -137,6 +137,7 @@ struct mwl8k_tx_queue {
 struct mwl8k_priv {
        struct ieee80211_hw *hw;
        struct pci_dev *pdev;
+       int irq;
 
        struct mwl8k_device_info *device_info;
 
@@ -3761,9 +3762,11 @@ static int mwl8k_start(struct ieee80211_hw *hw)
        rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
                         IRQF_SHARED, MWL8K_NAME, hw);
        if (rc) {
+               priv->irq = -1;
                wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
                return -EIO;
        }
+       priv->irq = priv->pdev->irq;
 
        /* Enable TX reclaim and RX tasklets.  */
        tasklet_enable(&priv->poll_tx_task);
@@ -3800,6 +3803,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
        if (rc) {
                iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
                free_irq(priv->pdev->irq, hw);
+               priv->irq = -1;
                tasklet_disable(&priv->poll_tx_task);
                tasklet_disable(&priv->poll_rx_task);
        }
@@ -3818,7 +3822,10 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
 
        /* Disable interrupts */
        iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
-       free_irq(priv->pdev->irq, hw);
+       if (priv->irq != -1) {
+               free_irq(priv->pdev->irq, hw);
+               priv->irq = -1;
+       }
 
        /* Stop finalize join worker */
        cancel_work_sync(&priv->finalize_join_worker);
index b4772c1c6135c40fcad9859b6510eff0e1224182..3c7877a7c31cf67c542c806ab5b53b3da0362e8f 100644 (file)
@@ -1031,7 +1031,7 @@ int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
        else
                buf.tsc[4] = 0x10;
 
-       /* Wait upto 100ms for tx queue to empty */
+       /* Wait up to 100ms for tx queue to empty */
        for (k = 100; k > 0; k--) {
                udelay(1000);
                ret = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_TXQUEUEEMPTY,
index 356e6bb443a63fe7ac4f4611b34025d13d6f2c4d..a946991989c6f714805d734139cd0bd542b81e63 100644 (file)
@@ -465,7 +465,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
 
                if (slot < 0) {
                        /*
-                        * The device supports the choosen algorithm, but the
+                        * The device supports the chosen algorithm, but the
                         * firmware does not provide enough key slots to store
                         * all of them.
                         * But encryption offload for outgoing frames is always
index 7ecc0bda57b350b591ea6a9a5bad2b93c145c9fc..6d9204fef90b2aa902b7fb1f68f86eff4d88cc42 100644 (file)
@@ -287,7 +287,7 @@ static void p54spi_power_on(struct p54s_priv *priv)
        enable_irq(gpio_to_irq(p54spi_gpio_irq));
 
        /*
-        * need to wait a while before device can be accessed, the lenght
+        * need to wait a while before device can be accessed, the length
         * is just a guess
         */
        msleep(10);
index 9b344a921e742e29ce483450ea9313186f2d0e23..e18358725b69813077de8d9e55f8a98d5fa7a021 100644 (file)
@@ -56,6 +56,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
        {USB_DEVICE(0x0846, 0x4210)},   /* Netgear WG121 the second ? */
        {USB_DEVICE(0x0846, 0x4220)},   /* Netgear WG111 */
        {USB_DEVICE(0x09aa, 0x1000)},   /* Spinnaker Proto board */
+       {USB_DEVICE(0x0bf8, 0x1007)},   /* Fujitsu E-5400 USB */
        {USB_DEVICE(0x0cde, 0x0006)},   /* Medion 40900, Roper Europe */
        {USB_DEVICE(0x0db0, 0x6826)},   /* MSI UB54G (MS-6826) */
        {USB_DEVICE(0x107b, 0x55f2)},   /* Gateway WGU-210 (Gemtek) */
@@ -68,6 +69,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
        {USB_DEVICE(0x1915, 0x2235)},   /* Linksys WUSB54G Portable OEM */
        {USB_DEVICE(0x2001, 0x3701)},   /* DLink DWL-G120 Spinnaker */
        {USB_DEVICE(0x2001, 0x3703)},   /* DLink DWL-G122 */
+       {USB_DEVICE(0x2001, 0x3762)},   /* Conceptronic C54U */
        {USB_DEVICE(0x5041, 0x2234)},   /* Linksys WUSB54G */
        {USB_DEVICE(0x5041, 0x2235)},   /* Linksys WUSB54G Portable */
 
index 7834c26c295438e39ab1c63d3e1b0444ca81ef2f..042842e704de17945d7f61b9c6069072ad5230fe 100644 (file)
@@ -703,7 +703,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
        struct p54_tx_info *p54info;
        struct p54_hdr *hdr;
        struct p54_tx_data *txhdr;
-       unsigned int padding, len, extra_len;
+       unsigned int padding, len, extra_len = 0;
        int i, j, ridx;
        u16 hdr_flags = 0, aid = 0;
        u8 rate, queue = 0, crypt_offset = 0;
index d44f8e20cce08f963dcd73f046b944c938c4d118..266d45bf86f519426d0546d2b2769411d0f2a4af 100644 (file)
@@ -113,7 +113,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
         * be aligned on a 4-byte boundary. If WDS is enabled add another 6 bytes
         * and add WDS address information */
        if (likely(((long) skb->data & 0x03) | init_wds)) {
-               /* get the number of bytes to add and re-allign */
+               /* get the number of bytes to add and re-align */
                offset = (4 - (long) skb->data) & 0x03;
                offset += init_wds ? 6 : 0;
 
@@ -342,7 +342,7 @@ islpci_eth_receive(islpci_private *priv)
                         priv->pci_map_rx_address[index],
                         MAX_FRAGMENT_SIZE_RX + 2, PCI_DMA_FROMDEVICE);
 
-       /* update the skb structure and allign the buffer */
+       /* update the skb structure and align the buffer */
        skb_put(skb, size);
        if (offset) {
                /* shift the buffer allocation offset bytes to get the right frame */
index 49d9b267bc0f548b97746c4f53511b1734eab5ac..d7646f299bd3264c0d1cd24803178ca1b51cffba 100644 (file)
@@ -578,7 +578,7 @@ struct tx_msg {
     UCHAR  var[1];
 };
 
-/****** ECF Receive Control Stucture (RCS) Area at Shared RAM offset 0x0800  */
+/****** ECF Receive Control Structure (RCS) Area at Shared RAM offset 0x0800  */
 /* Structures for command specific parameters (rcs.var) */
 struct rx_packet_cmd {
     UCHAR rx_data_ptr[2];
index 70b9abbdeb9e99c9c59aab9e8cd242bd9a3750ca..8fbc5fa965e081f3a3e4b9a7c8e04d04ebd7c84a 100644 (file)
  * READ_CONTROL: 0 write BBP, 1 read BBP
  * BUSY: ASIC is busy executing BBP commands
  * BBP_PAR_DUR: 0 4 MAC clocks, 1 8 MAC clocks
- * BBP_RW_MODE: 0 serial, 1 paralell
+ * BBP_RW_MODE: 0 serial, 1 parallel
  */
 #define BBP_CSR_CFG                    0x101c
 #define BBP_CSR_CFG_VALUE              FIELD32(0x000000ff)
index 2ee6cebb9b259235e007dd51a9fc1eae77680813..dbf74d07d947e1894ea629287d470c809ce0dced 100644 (file)
@@ -1518,7 +1518,7 @@ static void rt2800_config_channel_rf2xxx(struct rt2x00_dev *rt2x00dev,
        if (rf->channel > 14) {
                /*
                 * When TX power is below 0, we should increase it by 7 to
-                * make it a positive value (Minumum value is -7).
+                * make it a positive value (Minimum value is -7).
                 * However this means that values between 0 and 7 have
                 * double meaning, and we should set a 7DBm boost flag.
                 */
index 4e368657a83c1d54fc321d160f24b1502acc5c16..37509d019910c8e03467c6c7a4f17b3f3ece0d7c 100644 (file)
@@ -730,8 +730,12 @@ static struct usb_device_id rt2800usb_device_table[] = {
        { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) },
+       { USB_DEVICE(0x050d, 0x825b), USB_DEVICE_DATA(&rt2800usb_ops) },
+       { USB_DEVICE(0x050d, 0x935a), USB_DEVICE_DATA(&rt2800usb_ops) },
+       { USB_DEVICE(0x050d, 0x935b), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Buffalo */
        { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) },
+       { USB_DEVICE(0x0411, 0x016f), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Conceptronic */
        { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) },
@@ -818,6 +822,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
        /* Pegatron */
        { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) },
+       { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Philips */
        { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Planex */
@@ -899,6 +904,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
        { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Sitecom */
        { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) },
+       /* Toshiba */
+       { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Zinwell */
        { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) },
 #endif
@@ -961,7 +968,6 @@ static struct usb_device_id rt2800usb_device_table[] = {
        { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) },
-       { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Planex */
        { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) },
@@ -975,8 +981,6 @@ static struct usb_device_id rt2800usb_device_table[] = {
        /* Sweex */
        { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) },
        { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) },
-       /* Toshiba */
-       { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) },
        /* Zyxel */
        { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) },
 #endif
index a3940d7300a4856aeb5cd8c06607cf93407c6f3f..7f10239f56a8171ab31ad5120f6bc4593ed6f123 100644 (file)
@@ -484,13 +484,13 @@ struct rt2x00intf_conf {
        enum nl80211_iftype type;
 
        /*
-        * TSF sync value, this is dependant on the operation type.
+        * TSF sync value, this is dependent on the operation type.
         */
        enum tsf_sync sync;
 
        /*
-        * The MAC and BSSID addressess are simple array of bytes,
-        * these arrays are little endian, so when sending the addressess
+        * The MAC and BSSID addresses are simple array of bytes,
+        * these arrays are little endian, so when sending the addresses
         * to the drivers, copy the it into a endian-signed variable.
         *
         * Note that all devices (except rt2500usb) have 32 bits
@@ -1131,7 +1131,7 @@ void rt2x00queue_stop_queue(struct data_queue *queue);
  * @drop: True to drop all pending frames.
  *
  * This function will flush the queue. After this call
- * the queue is guarenteed to be empty.
+ * the queue is guaranteed to be empty.
  */
 void rt2x00queue_flush_queue(struct data_queue *queue, bool drop);
 
index e7f67d5eda52341d488532a67f257008e6c26143..9416e36de29e900f253a69022ee735ea29b89052 100644 (file)
@@ -60,7 +60,7 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
         * Note that when NULL is passed as address we will send
         * 00:00:00:00:00 to the device to clear the address.
         * This will prevent the device being confused when it wants
-        * to ACK frames or consideres itself associated.
+        * to ACK frames or considers itself associated.
         */
        memset(conf.mac, 0, sizeof(conf.mac));
        if (mac)
index 5e9074bf2b8efbb7eac0ad72db70474604557a72..3f5688fbf3f7aa89624ba3c4b0a721a3872a795e 100644 (file)
@@ -237,7 +237,7 @@ void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
        }
 
        /*
-        * NOTE: Always count the payload as transfered,
+        * NOTE: Always count the payload as transferred,
         * even when alignment was set to zero. This is required
         * for determining the correct offset for the ICV data.
         */
index 9de9dbe943998e1790a8d514157eea8028410238..84eb6ad3637752c686a9cd8d1be0e058cacda162 100644 (file)
@@ -1062,8 +1062,10 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
         * Stop all work.
         */
        cancel_work_sync(&rt2x00dev->intf_work);
-       cancel_work_sync(&rt2x00dev->rxdone_work);
-       cancel_work_sync(&rt2x00dev->txdone_work);
+       if (rt2x00_is_usb(rt2x00dev)) {
+               cancel_work_sync(&rt2x00dev->rxdone_work);
+               cancel_work_sync(&rt2x00dev->txdone_work);
+       }
        destroy_workqueue(rt2x00dev->workqueue);
 
        /*
index 5d6e0b83151faad1598886aa405e37d3b5f3d7e0..063ebcce97f878c52f33d6d86f3d350e3e25e653 100644 (file)
@@ -51,7 +51,7 @@
  *   [rt2x00dump header][hardware descriptor][ieee802.11 frame]
  *
  * rt2x00dump header: The description of the dumped frame, as well as
- *     additional information usefull for debugging. See &rt2x00dump_hdr.
+ *     additional information useful for debugging. See &rt2x00dump_hdr.
  * hardware descriptor: Descriptor that was used to receive or transmit
  *     the frame.
  * ieee802.11 frame: The actual frame that was received or transmitted.
index c975b0a12e950a5bfc3764ecec16fb6478580b18..29abfdeb0b65bdaba82dde873c10fb5a5113ad57 100644 (file)
@@ -283,7 +283,7 @@ void rt2x00link_start_tuner(struct rt2x00_dev *rt2x00dev)
        /**
         * While scanning, link tuning is disabled. By default
         * the most sensitive settings will be used to make sure
-        * that all beacons and probe responses will be recieved
+        * that all beacons and probe responses will be received
         * during the scan.
         */
        if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags))
index 4b3c70eeef1f2cb02e5096337e7e2fbb539bfb56..4358051bfe1aa86b2346973d51e2a63ef4901839 100644 (file)
@@ -546,7 +546,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
        }
 
        /*
-        * When DMA allocation is required we should guarentee to the
+        * When DMA allocation is required we should guarantee to the
         * driver that the DMA is aligned to a 4-byte boundary.
         * However some drivers require L2 padding to pad the payload
         * rather then the header. This could be a requirement for
@@ -689,7 +689,7 @@ void rt2x00queue_for_each_entry(struct data_queue *queue,
        spin_unlock_irqrestore(&queue->index_lock, irqflags);
 
        /*
-        * Start from the TX done pointer, this guarentees that we will
+        * Start from the TX done pointer, this guarantees that we will
         * send out all frames in the correct order.
         */
        if (index_start < index_end) {
@@ -883,7 +883,7 @@ void rt2x00queue_flush_queue(struct data_queue *queue, bool drop)
        }
 
        /*
-        * Check if driver supports flushing, we can only guarentee
+        * Check if driver supports flushing, we can only guarantee
         * full support for flushing if the driver is able
         * to cancel all pending frames (drop = true).
         */
index 0c8b0c6996799348f46710af9952920ed52e8434..217861f8d95fb099669b0ed72b2bac37a6e60e86 100644 (file)
@@ -344,8 +344,8 @@ struct txentry_desc {
  *     only be touched after the device has signaled it is done with it.
  * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting
  *     for the signal to start sending.
- * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occured
- *     while transfering the data to the hardware. No TX status report will
+ * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occurred
+ *     while transferring the data to the hardware. No TX status report will
  *     be expected from the hardware.
  * @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and
  *     returned. It is now waiting for the status reporting before the
@@ -365,7 +365,7 @@ enum queue_entry_flags {
  * @flags: Entry flags, see &enum queue_entry_flags.
  * @queue: The data queue (&struct data_queue) to which this entry belongs.
  * @skb: The buffer which is currently being transmitted (for TX queue),
- *     or used to directly recieve data in (for RX queue).
+ *     or used to directly receive data in (for RX queue).
  * @entry_idx: The entry index number.
  * @priv_data: Private data belonging to this queue entry. The pointer
  *     points to data specific to a particular driver and queue type.
@@ -388,7 +388,7 @@ struct queue_entry {
  * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is
  *     owned by the hardware then the queue is considered to be full.
  * @Q_INDEX_DMA_DONE: Index pointer for the next entry which will have been
- *     transfered to the hardware.
+ *     transferred to the hardware.
  * @Q_INDEX_DONE: Index pointer to the next entry which will be completed by
  *     the hardware and for which we need to run the txdone handler. If this
  *     entry is not owned by the hardware the queue is considered to be empty.
@@ -627,7 +627,7 @@ static inline int rt2x00queue_threshold(struct data_queue *queue)
 }
 
 /**
- * rt2x00queue_status_timeout - Check if a timeout occured for STATUS reports
+ * rt2x00queue_status_timeout - Check if a timeout occurred for STATUS reports
  * @queue: Queue to check.
  */
 static inline int rt2x00queue_status_timeout(struct data_queue *queue)
@@ -637,7 +637,7 @@ static inline int rt2x00queue_status_timeout(struct data_queue *queue)
 }
 
 /**
- * rt2x00queue_timeout - Check if a timeout occured for DMA transfers
+ * rt2x00queue_timeout - Check if a timeout occurred for DMA transfers
  * @queue: Queue to check.
  */
 static inline int rt2x00queue_dma_timeout(struct data_queue *queue)
index fbe735f5b352319198a3fae5be0560b9e8b5b429..36f388f97d658e27c40defe1a9e3a79c585d2a15 100644 (file)
@@ -173,7 +173,7 @@ static void rt2x00usb_work_txdone_entry(struct queue_entry *entry)
        /*
         * If the transfer to hardware succeeded, it does not mean the
         * frame was send out correctly. It only means the frame
-        * was succesfully pushed to the hardware, we have no
+        * was successfully pushed to the hardware, we have no
         * way to determine the transmission status right now.
         * (Only indirectly by looking at the failed TX counters
         * in the register).
index 6aaf51fc7ad82fadd7faa0d450451ef7e37ac70b..e11c759ac9ed928ef85e6aa7a00e9aa20abc9b4b 100644 (file)
@@ -400,7 +400,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue);
  * @rt2x00dev: Pointer to &struct rt2x00_dev
  *
  * Check the health of the USB communication and determine
- * if timeouts have occured. If this is the case, this function
+ * if timeouts have occurred. If this is the case, this function
  * will reset all communication to restore functionality again.
  */
 void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev);
index bb0c781f4a1b2e27d5d310671d4e5f6cee6dd22b..0d7d93e1d398ee00b773b13e16717f0e67c9da84 100644 (file)
@@ -520,7 +520,7 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
                         *because hw will nerver use hw_rate
                         *when tcb_desc->use_driver_rate = false
                         *so we never set highest N rate here,
-                        *and N rate will all be controled by FW
+                        *and N rate will all be controlled by FW
                         *when tcb_desc->use_driver_rate = false
                         */
                        if (rtlmac->ht_enable) {
index f74a8701c67ddfc5fcb28724b673b97c9a29d64d..590f14f45a8900cf2c7eba2c1c4a1885fe570a48 100644 (file)
@@ -685,7 +685,7 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data)
 
        u8 efuse_data, word_cnts = 0;
        u16 efuse_addr = 0;
-       u8 hworden;
+       u8 hworden = 0;
        u8 tmpdata[8];
 
        if (data == NULL)
index 9cd7703c2a3035d06f1cdc8e8c781185f2899422..5938f6ee21e4e312ba2c0ff1ce98e4b62b4bc01a 100644 (file)
@@ -395,7 +395,7 @@ static void rtl_pci_init_aspm(struct ieee80211_hw *hw)
         * 0 - Disable ASPM,
         * 1 - Enable ASPM without Clock Req,
         * 2 - Enable ASPM with Clock Req,
-        * 3 - Alwyas Enable ASPM with Clock Req,
+        * 3 - Always Enable ASPM with Clock Req,
         * 4 - Always Enable ASPM without Clock Req.
         * set defult to RTL8192CE:3 RTL8192E:2
         * */
index 3336ca999dfd95a5f979c3fcbe476ccf130f9445..d26f957981adf16a1b3cb566d6287abf25bb3fb4 100644 (file)
@@ -179,7 +179,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
        }
 
        /*
-        *If a country IE has been recieved check its rule for this
+        *If a country IE has been received check its rule for this
         *channel first before enabling active scan. The passive scan
         *would have been enforced by the initial processing of our
         *custom regulatory domain.
index 5ef91374b230924dbd52be91d3be9d09ff963ea0..28a6ce3bc239612ef7834115f05b0688766438f4 100644 (file)
@@ -303,7 +303,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
        u16 box_reg, box_extreg;
        u8 u1b_tmp;
        bool isfw_read = false;
-       u8 buf_index;
+       u8 buf_index = 0;
        bool bwrite_sucess = false;
        u8 wait_h2c_limmit = 100;
        u8 wait_writeh2c_limmit = 100;
index a4b2613d6a8c205deee0af697b00f6882cd57213..f5d85735d6420d350b1e3376b506bbdad5b95a75 100644 (file)
@@ -246,7 +246,7 @@ static void _rtl_usb_io_handler_init(struct device *dev,
 
 static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw)
 {
-       struct rtl_priv *rtlpriv = rtl_priv(hw);
+       struct rtl_priv __maybe_unused *rtlpriv = rtl_priv(hw);
 
        mutex_destroy(&rtlpriv->io.bb_mutex);
 }
index 01226f8e70f948b32d9d820b61cd033d25dd9ef7..07db95ff9bc54b89f9448c4a58ed0777df37b4fa 100644 (file)
@@ -1555,7 +1555,7 @@ struct rtl_priv {
 
 
 /***************************************
-    Bluetooth Co-existance Related
+    Bluetooth Co-existence Related
 ****************************************/
 
 enum bt_ant_num {
index 0ade4bd617c03bcf5486354ea91e66aee55a2567..81f164bc4888f2389d86764c4c66a64295e9f18d 100644 (file)
@@ -104,7 +104,7 @@ int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer)
  * @wl: wl struct
  * @id: acx id
  * @buf: buffer for the response, including all headers, must work with dma
- * @len: lenght of buf
+ * @len: length of buf
  */
 int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len)
 {
index c1b3b3f03da257ca567c79a0dfcdc4af47fd387c..6af35265c900173cc58dcf36c0c68a5b595e3157 100644 (file)
@@ -179,7 +179,7 @@ static void wl1251_rx_body(struct wl1251 *wl,
        rx_buffer = skb_put(skb, length);
        wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length);
 
-       /* The actual lenght doesn't include the target's alignment */
+       /* The actual length doesn't include the target's alignment */
        skb->len = desc->length  - PLCP_HEADER_LENGTH;
 
        fc = (u16 *)skb->data;
index f0aa7ab97bf7ddcd52e9451befa96c8f1025981c..96324336f936bcdd047062bca63b041c5694db46 100644 (file)
@@ -359,7 +359,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer)
  * @wl: wl struct
  * @id: acx id
  * @buf: buffer for the response, including all headers, must work with dma
- * @len: lenght of buf
+ * @len: length of buf
  */
 int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len)
 {
index 856a8a2fff4f5fa7b35fcd295b1367d427b95245..8a8323896eecf265536384988d714417b0f28ea2 100644 (file)
@@ -497,7 +497,7 @@ struct conf_rx_settings {
 #define CONF_TX_RATE_RETRY_LIMIT       10
 
 /*
- * Rates supported for data packets when operating as AP. Note the absense
+ * Rates supported for data packets when operating as AP. Note the absence
  * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
  * one. The rate dropped is not mandatory under any operating mode.
  */
@@ -572,7 +572,7 @@ enum conf_tx_ac {
        CONF_TX_AC_BK = 1,         /* background */
        CONF_TX_AC_VI = 2,         /* video */
        CONF_TX_AC_VO = 3,         /* voice */
-       CONF_TX_AC_CTS2SELF = 4,   /* fictious AC, follows AC_VO */
+       CONF_TX_AC_CTS2SELF = 4,   /* fictitious AC, follows AC_VO */
        CONF_TX_AC_ANY_TID = 0x1f
 };
 
@@ -1169,7 +1169,7 @@ struct conf_memory_settings {
 
        /*
         * Minimum required free tx memory blocks in order to assure optimum
-        * performence
+        * performance
         *
         * Range: 0-120
         */
@@ -1177,7 +1177,7 @@ struct conf_memory_settings {
 
        /*
         * Minimum required free rx memory blocks in order to assure optimum
-        * performence
+        * performance
         *
         * Range: 0-120
         */
index c1aac8292089209f707de7b06e9e50817d3c4eea..00c771ea70bf99a67105b688567ba48ba0a96ac9 100644 (file)
@@ -94,7 +94,7 @@ static inline int wl1271_translate_addr(struct wl1271 *wl, int addr)
         * translated region.
         *
         * The translated regions occur next to each other in physical device
-        * memory, so just add the sizes of the preceeding address regions to
+        * memory, so just add the sizes of the preceding address regions to
         * get the offset to the new region.
         *
         * Currently, only the two first regions are addressed, and the
index 5b9dbeafec06a812bde9ecb54ea8cf91027fe3de..b1c7d031c39163686050d624246190e22ee2e348 100644 (file)
@@ -340,7 +340,7 @@ module_init(wl1271_init);
 module_exit(wl1271_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>");
+MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
 MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
 MODULE_FIRMWARE(WL1271_FW_NAME);
 MODULE_FIRMWARE(WL1271_AP_FW_NAME);
index 18cf01719ae0d0def752f9a039bb4f82f0bf699a..ffc745b17f4d631f88a98d3531e2f69b6776e6a4 100644 (file)
@@ -487,7 +487,7 @@ module_init(wl1271_init);
 module_exit(wl1271_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>");
+MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
 MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
 MODULE_FIRMWARE(WL1271_FW_NAME);
 MODULE_FIRMWARE(WL1271_AP_FW_NAME);
index e64403b6896d7f135af9f2743345dcfeb8de28f2..6ec06a4a4c6dfdbe220f39bc4f910445901fbb22 100644 (file)
@@ -204,7 +204,10 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[])
 
        kfree(wl->nvs);
 
-       wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
+       if (len != sizeof(struct wl1271_nvs_file))
+               return -EINVAL;
+
+       wl->nvs = kzalloc(len, GFP_KERNEL);
        if (!wl->nvs) {
                wl1271_error("could not allocate memory for the nvs file");
                ret = -ENOMEM;
index 3e5befe4d03b21e99c3533f2ea0e56af670b9a98..fc08f36fe1f512697423990015df2ca0f049ac11 100644 (file)
@@ -290,7 +290,7 @@ static void wl3501_get_from_wla(struct wl3501_card *this, u16 src, void *dest,
  *  \               \- IEEE 802.11 -/ \-------------- len --------------/
  *   \-struct wl3501_80211_tx_hdr--/   \-------- Ethernet Frame -------/
  *
- * Return = Postion in Card
+ * Return = Position in Card
  */
 static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len)
 {
@@ -1932,7 +1932,7 @@ static int wl3501_config(struct pcmcia_device *link)
        this->base_addr = dev->base_addr;
 
        if (!wl3501_get_flash_mac_addr(this)) {
-               printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n",
+               printk(KERN_WARNING "%s: Can't read MAC addr in flash ROM?\n",
                       dev->name);
                unregister_netdev(dev);
                goto failed;
index 0597d862fbd2edb47368fd13c4db04b0c4d918cc..e36117486c9146739e7d86d70864d81b694b4ad8 100644 (file)
@@ -169,7 +169,7 @@ static int rf2959_init_hw(struct zd_rf *rf)
                { CR85,  0x00 }, { CR86,  0x10 }, { CR87,  0x2A },
                { CR88,  0x10 }, { CR89,  0x24 }, { CR90,  0x18 },
                /* { CR91,  0x18 }, */
-               /* should solve continous CTS frame problems */
+               /* should solve continuous CTS frame problems */
                { CR91,  0x00 },
                { CR92,  0x0a }, { CR93,  0x00 }, { CR94,  0x01 },
                { CR95,  0x00 }, { CR96,  0x40 }, { CR97,  0x37 },
index 9e74eb1b67d508ac6e16a9462899eb5744ae7229..ba0a0ccb1fa0b01c467047cc2c2ce3baec02ee2b 100644 (file)
@@ -353,7 +353,7 @@ static int uw2453_init_hw(struct zd_rf *rf)
        };
 
        static const u32 rv[] = {
-               UW2453_REGWRITE(4, 0x2b),    /* configure reciever gain */
+               UW2453_REGWRITE(4, 0x2b),    /* configure receiver gain */
                UW2453_REGWRITE(5, 0x19e4f), /* configure transmitter gain */
                UW2453_REGWRITE(6, 0xf81ad), /* enable RX/TX filter tuning */
                UW2453_REGWRITE(7, 0x3fffe), /* disable TX gain in test mode */
index 58236e6d0921308f72e55accc7676bca0c64f42d..ab607bbd6291f716c246d5215b117e08247fe484 100644 (file)
@@ -643,7 +643,7 @@ static void rx_urb_complete(struct urb *urb)
        usb = urb->context;
        rx = &usb->rx;
 
-       zd_usb_reset_rx_idle_timer(usb);
+       tasklet_schedule(&rx->reset_timer_tasklet);
 
        if (length%rx->usb_packet_size > rx->usb_packet_size-4) {
                /* If there is an old first fragment, we don't care. */
@@ -812,6 +812,7 @@ void zd_usb_disable_rx(struct zd_usb *usb)
        __zd_usb_disable_rx(usb);
        mutex_unlock(&rx->setup_mutex);
 
+       tasklet_kill(&rx->reset_timer_tasklet);
        cancel_delayed_work_sync(&rx->idle_work);
 }
 
@@ -1106,6 +1107,13 @@ static void zd_rx_idle_timer_handler(struct work_struct *work)
        zd_usb_reset_rx(usb);
 }
 
+static void zd_usb_reset_rx_idle_timer_tasklet(unsigned long param)
+{
+       struct zd_usb *usb = (struct zd_usb *)param;
+
+       zd_usb_reset_rx_idle_timer(usb);
+}
+
 void zd_usb_reset_rx_idle_timer(struct zd_usb *usb)
 {
        struct zd_usb_rx *rx = &usb->rx;
@@ -1127,6 +1135,7 @@ static inline void init_usb_interrupt(struct zd_usb *usb)
 static inline void init_usb_rx(struct zd_usb *usb)
 {
        struct zd_usb_rx *rx = &usb->rx;
+
        spin_lock_init(&rx->lock);
        mutex_init(&rx->setup_mutex);
        if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) {
@@ -1136,11 +1145,14 @@ static inline void init_usb_rx(struct zd_usb *usb)
        }
        ZD_ASSERT(rx->fragment_length == 0);
        INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler);
+       rx->reset_timer_tasklet.func = zd_usb_reset_rx_idle_timer_tasklet;
+       rx->reset_timer_tasklet.data = (unsigned long)usb;
 }
 
 static inline void init_usb_tx(struct zd_usb *usb)
 {
        struct zd_usb_tx *tx = &usb->tx;
+
        spin_lock_init(&tx->lock);
        atomic_set(&tx->enabled, 0);
        tx->stopped = 0;
@@ -1671,6 +1683,10 @@ static void iowrite16v_urb_complete(struct urb *urb)
 
        if (urb->status && !usb->cmd_error)
                usb->cmd_error = urb->status;
+
+       if (!usb->cmd_error &&
+                       urb->actual_length != urb->transfer_buffer_length)
+               usb->cmd_error = -EIO;
 }
 
 static int zd_submit_waiting_urb(struct zd_usb *usb, bool last)
@@ -1805,7 +1821,7 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
        usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT),
                         req, req_len, iowrite16v_urb_complete, usb,
                         ep->desc.bInterval);
-       urb->transfer_flags |= URB_FREE_BUFFER | URB_SHORT_NOT_OK;
+       urb->transfer_flags |= URB_FREE_BUFFER;
 
        /* Submit previous URB */
        r = zd_submit_waiting_urb(usb, false);
index b3df2c8116cc6ef2d22234318ceacb4866a2481a..325d0f9892571a6724d993c0ab8c28fe7a752f6c 100644 (file)
@@ -183,6 +183,7 @@ struct zd_usb_rx {
        spinlock_t lock;
        struct mutex setup_mutex;
        struct delayed_work idle_work;
+       struct tasklet_struct reset_timer_tasklet;
        u8 fragment[2 * USB_MAX_RX_SIZE];
        unsigned int fragment_length;
        unsigned int usb_packet_size;
index 2642af4ee491ff3b4bca31adf964e7aa1923eb27..372572c0adc6d03ced8364c435e83d31772d582b 100644 (file)
@@ -786,7 +786,7 @@ static int xemaclite_mdio_read(struct mii_bus *bus, int phy_id, int reg)
  * @reg:       register number to write to
  * @val:       value to write to the register number specified by reg
  *
- * This fucntion waits till the device is ready to accept a new MDIO
+ * This function waits till the device is ready to accept a new MDIO
  * request and then writes the val to the MDIO Write Data register.
  */
 static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,
index ae07b3dfbcc160e9991c1dd8c7d695a581f67f3a..ec2800ff8d428241dcb68c36c0fda530719e20d0 100644 (file)
@@ -652,7 +652,7 @@ static irqreturn_t znet_interrupt(int irq, void *dev_id)
                                        dev->stats.tx_errors++;
 
                                /* Transceiver may be stuck if cable
-                                * was removed while emiting a
+                                * was removed while emitting a
                                 * packet. Flip it off, then on to
                                 * reset it. This is very empirical,
                                 * but it seems to work. */
index c9db49c10f452b925eeb859599591d08fdc9fcb2..8b63a691a9ed2d8ec06cb1b137e301fa46f8050d 100644 (file)
@@ -676,7 +676,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
 
        early_init_dt_check_for_initrd(node);
 
-       /* Retreive command line */
+       /* Retrieve command line */
        p = of_get_flat_dt_prop(node, "bootargs", &l);
        if (p != NULL && l > 0)
                strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
index dcd7857784f24373f673ca2d027cc6a4a06be590..d35e300b0ad12b103cc2dd5bb8a60fbfd49007ba 100644 (file)
@@ -136,7 +136,7 @@ EXPORT_SYMBOL(of_phy_find_device);
  * @hndlr: Link state callback for the network device
  * @iface: PHY data interface type
  *
- * Returns a pointer to the phy_device if successfull.  NULL otherwise
+ * Returns a pointer to the phy_device if successful.  NULL otherwise
  */
 struct phy_device *of_phy_connect(struct net_device *dev,
                                  struct device_node *phy_np,
index 1062b8ffe2448004c0f0d497bc2305fc25d9bdd6..246a92f677e4c8b7fc4febe1560b7aa3bdbfb60c 100644 (file)
@@ -141,7 +141,7 @@ struct pdcspath_attribute paths_attr_##_name = { \
  * @entry: A pointer to an allocated pdcspath_entry.
  * 
  * The general idea is that you don't read from the Stable Storage every time
- * you access the files provided by the facilites. We store a copy of the
+ * you access the files provided by the facilities. We store a copy of the
  * content of the stable storage WRT various paths in these structs. We read
  * these structs when reading the files, and we will write to these structs when
  * writing to the files, and only then write them back to the Stable Storage.
@@ -213,7 +213,7 @@ pdcspath_store(struct pdcspath_entry *entry)
 
        /* addr, devpath and count must be word aligned */
        if (pdc_stable_write(entry->addr, devpath, sizeof(*devpath)) != PDC_OK) {
-               printk(KERN_ERR "%s: an error occured when writing to PDC.\n"
+               printk(KERN_ERR "%s: an error occurred when writing to PDC.\n"
                                "It is likely that the Stable Storage data has been corrupted.\n"
                                "Please check it carefully upon next reboot.\n", __func__);
                WARN_ON(1);
index 855f389eea402710d4a97a2fa848384475a351bb..d92185a5523b88f48ab63647126f5503b210d1fb 100644 (file)
@@ -142,7 +142,7 @@ config PARPORT_AX88796
          the AX88796 network controller chip. This code is also available
          as a module (say M), called parport_ax88796.
 
-         The driver is not dependant on the AX88796 network driver, and
+         The driver is not dependent on the AX88796 network driver, and
          should not interfere with the networking functions of the chip.
 
 config PARPORT_1284
index 8901ecf6e037c99ab8d514687f091c6e598ba8dd..f9fd4b33a5463d554688ebb04a82e4fb54ee3c3d 100644 (file)
@@ -355,7 +355,7 @@ int parport_negotiate (struct parport *port, int mode)
                return 0;
        }
 
-       /* Go to compability forward idle mode */
+       /* Go to compatibility forward idle mode */
        if (port->ieee1284.mode != IEEE1284_MODE_COMPAT)
                parport_ieee1284_terminate (port);
 
index 8d62fb76cd41b0e0049fbce843899247cc7d9ecc..bc8ce48f07781f00dccc0c856194926562af9cc3 100644 (file)
@@ -1488,7 +1488,7 @@ static void __devinit winbond_check(int io, int key)
 
        outb(key, io);
        outb(key, io);     /* Write Magic Sequence to EFER, extended
-                             funtion enable register */
+                             function enable register */
        outb(0x20, io);    /* Write EFIR, extended function index register */
        devid = inb(io + 1);  /* Read EFDR, extended function data register */
        outb(0x21, io);
@@ -1527,7 +1527,7 @@ static void __devinit winbond_check2(int io, int key)
        x_oldid = inb(io + 2);
 
        outb(key, io);     /* Write Magic Byte to EFER, extended
-                             funtion enable register */
+                             function enable register */
        outb(0x20, io + 2);  /* Write EFIR, extended function index register */
        devid = inb(io + 2);  /* Read EFDR, extended function data register */
        outb(0x21, io + 1);
@@ -1569,7 +1569,7 @@ static void __devinit smsc_check(int io, int key)
 
        outb(key, io);
        outb(key, io);     /* Write Magic Sequence to EFER, extended
-                             funtion enable register */
+                             function enable register */
        outb(0x0d, io);    /* Write EFIR, extended function index register */
        oldid = inb(io + 1);  /* Read EFDR, extended function data register */
        outb(0x0e, io);
@@ -2550,7 +2550,6 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
                                         const struct parport_pc_via_data *via)
 {
        short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 };
-       struct resource *base_res;
        u32 ite8872set;
        u32 ite8872_lpt, ite8872_lpthi;
        u8 ite8872_irq, type;
@@ -2561,8 +2560,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
 
        /* make sure which one chip */
        for (i = 0; i < 5; i++) {
-               base_res = request_region(inta_addr[i], 32, "it887x");
-               if (base_res) {
+               if (request_region(inta_addr[i], 32, "it887x")) {
                        int test;
                        pci_write_config_dword(pdev, 0x60,
                                                0xe5000000 | inta_addr[i]);
@@ -2571,7 +2569,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
                        test = inb(inta_addr[i]);
                        if (test != 0xff)
                                break;
-                       release_region(inta_addr[i], 0x8);
+                       release_region(inta_addr[i], 32);
                }
        }
        if (i >= 5) {
@@ -2635,7 +2633,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq,
        /*
         * Release the resource so that parport_pc_probe_port can get it.
         */
-       release_resource(base_res);
+       release_region(inta_addr[i], 32);
        if (parport_pc_probe_port(ite8872_lpt, ite8872_lpthi,
                                   irq, PARPORT_DMA_NONE, &pdev->dev, 0)) {
                printk(KERN_INFO
index c8ff646c0b056e9fc8c81f3110fe53bb4b12df39..0fa466a91bf413995169f1751823e25784d70891 100644 (file)
@@ -88,4 +88,6 @@ config PCI_IOAPIC
        depends on HOTPLUG
        default y
 
-select NLS if (DMI || ACPI)
+config PCI_LABEL
+       def_bool y if (DMI || ACPI)
+       select NLS
index 98d61c8e984bc218c823fcaeecb02fdcf18183a3..c85f744270a56664cb91a720624cfc97dc29c6ee 100644 (file)
@@ -56,10 +56,10 @@ obj-$(CONFIG_TILE) += setup-bus.o setup-irq.o
 # ACPI Related PCI FW Functions
 # ACPI _DSM provided firmware instance and string name
 #
-obj-$(CONFIG_ACPI)    += pci-acpi.o pci-label.o
+obj-$(CONFIG_ACPI)    += pci-acpi.o
 
 # SMBIOS provided firmware instance and labels
-obj-$(CONFIG_DMI)    += pci-label.o
+obj-$(CONFIG_PCI_LABEL) += pci-label.o
 
 # Cardbus & CompactPCI use setup-bus
 obj-$(CONFIG_HOTPLUG) += setup-bus.o
index 3bc72d18b121d3cff5ebcb7c8c05a5a06cdff78a..8f3faf343f754c83322bc4efecc803ef01ed2b03 100644 (file)
@@ -351,7 +351,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
         * To handle different BIOS behavior, we look for _OSC on a root
         * bridge preferentially (according to PCI fw spec). Later for
         * OSHP within the scope of the hotplug controller and its parents,
-        * upto the host bridge under which this controller exists.
+        * up to the host bridge under which this controller exists.
         */
        handle = acpi_find_root_bridge_handle(pdev);
        if (handle) {
index e610cfe4f07bc6e98b48ebc510fe8b52291da26c..2f67e9bc2f9650ee9ed1e1fdbd74e137613fa404 100644 (file)
@@ -585,7 +585,7 @@ static void remove_bridge(acpi_handle handle)
 
        /*
         * On root bridges with hotplug slots directly underneath (ie,
-        * no p2p bridge inbetween), we call cleanup_bridge(). 
+        * no p2p bridge between), we call cleanup_bridge(). 
         *
         * The else clause cleans up root bridges that either had no
         * hotplug slots at all, or had a p2p bridge underneath.
index ef7411c660b99f0352548fb989fb6f5fa7dc158e..758adb5f47fd9cd729bb96df0c8d19f21a5bb757 100644 (file)
@@ -290,7 +290,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes,
  * @dn: device node of slot
  *
  * This subroutine will register a hotplugable slot with the
- * PCI hotplug infrastructure. This routine is typicaly called
+ * PCI hotplug infrastructure. This routine is typically called
  * during boot time, if the hotplug slots are present at boot time,
  * or is called later, by the dlpar add code, if the slot is
  * being dynamically added during runtime.
index 7da3bef60d8708c12f2cc421de27ef968b00eb1e..d552d2c77844327010074ee71550e58ccb0a3280 100644 (file)
@@ -1299,7 +1299,7 @@ static void iommu_detach_domain(struct dmar_domain *domain,
 static struct iova_domain reserved_iova_list;
 static struct lock_class_key reserved_rbtree_key;
 
-static void dmar_init_reserved_ranges(void)
+static int dmar_init_reserved_ranges(void)
 {
        struct pci_dev *pdev = NULL;
        struct iova *iova;
@@ -1313,8 +1313,10 @@ static void dmar_init_reserved_ranges(void)
        /* IOAPIC ranges shouldn't be accessed by DMA */
        iova = reserve_iova(&reserved_iova_list, IOVA_PFN(IOAPIC_RANGE_START),
                IOVA_PFN(IOAPIC_RANGE_END));
-       if (!iova)
+       if (!iova) {
                printk(KERN_ERR "Reserve IOAPIC range failed\n");
+               return -ENODEV;
+       }
 
        /* Reserve all PCI MMIO to avoid peer-to-peer access */
        for_each_pci_dev(pdev) {
@@ -1327,11 +1329,13 @@ static void dmar_init_reserved_ranges(void)
                        iova = reserve_iova(&reserved_iova_list,
                                            IOVA_PFN(r->start),
                                            IOVA_PFN(r->end));
-                       if (!iova)
+                       if (!iova) {
                                printk(KERN_ERR "Reserve iova failed\n");
+                               return -ENODEV;
+                       }
                }
        }
-
+       return 0;
 }
 
 static void domain_reserve_special_ranges(struct dmar_domain *domain)
@@ -1835,7 +1839,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
 
        ret = iommu_attach_domain(domain, iommu);
        if (ret) {
-               domain_exit(domain);
+               free_domain_mem(domain);
                goto error;
        }
 
@@ -2213,7 +2217,7 @@ static int __init iommu_prepare_static_identity_mapping(int hw)
        return 0;
 }
 
-int __init init_dmars(void)
+static int __init init_dmars(int force_on)
 {
        struct dmar_drhd_unit *drhd;
        struct dmar_rmrr_unit *rmrr;
@@ -2265,7 +2269,7 @@ int __init init_dmars(void)
                /*
                 * TBD:
                 * we could share the same root & context tables
-                * amoung all IOMMU's. Need to Split it later.
+                * among all IOMMU's. Need to Split it later.
                 */
                ret = iommu_alloc_root_entry(iommu);
                if (ret) {
@@ -2393,8 +2397,15 @@ int __init init_dmars(void)
         *   enable translation
         */
        for_each_drhd_unit(drhd) {
-               if (drhd->ignored)
+               if (drhd->ignored) {
+                       /*
+                        * we always have to disable PMRs or DMA may fail on
+                        * this device
+                        */
+                       if (force_on)
+                               iommu_disable_protect_mem_regions(drhd->iommu);
                        continue;
+               }
                iommu = drhd->iommu;
 
                iommu_flush_write_buffer(iommu);
@@ -3240,9 +3251,15 @@ static int device_notifier(struct notifier_block *nb,
        if (!domain)
                return 0;
 
-       if (action == BUS_NOTIFY_UNBOUND_DRIVER && !iommu_pass_through)
+       if (action == BUS_NOTIFY_UNBOUND_DRIVER && !iommu_pass_through) {
                domain_remove_one_dev_info(domain, pdev);
 
+               if (!(domain->flags & DOMAIN_FLAG_VIRTUAL_MACHINE) &&
+                   !(domain->flags & DOMAIN_FLAG_STATIC_IDENTITY) &&
+                   list_empty(&domain->devices))
+                       domain_exit(domain);
+       }
+
        return 0;
 }
 
@@ -3277,12 +3294,21 @@ int __init intel_iommu_init(void)
        if (no_iommu || dmar_disabled)
                return -ENODEV;
 
-       iommu_init_mempool();
-       dmar_init_reserved_ranges();
+       if (iommu_init_mempool()) {
+               if (force_on)
+                       panic("tboot: Failed to initialize iommu memory\n");
+               return  -ENODEV;
+       }
+
+       if (dmar_init_reserved_ranges()) {
+               if (force_on)
+                       panic("tboot: Failed to reserve iommu ranges\n");
+               return  -ENODEV;
+       }
 
        init_no_remapping_devices();
 
-       ret = init_dmars();
+       ret = init_dmars(force_on);
        if (ret) {
                if (force_on)
                        panic("tboot: Failed to initialize DMARs\n");
@@ -3391,6 +3417,11 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain,
                domain->iommu_count--;
                domain_update_iommu_cap(domain);
                spin_unlock_irqrestore(&domain->iommu_lock, tmp_flags);
+
+               spin_lock_irqsave(&iommu->lock, tmp_flags);
+               clear_bit(domain->id, iommu->domain_ids);
+               iommu->domains[domain->id] = NULL;
+               spin_unlock_irqrestore(&iommu->lock, tmp_flags);
        }
 
        spin_unlock_irqrestore(&device_domain_lock, flags);
@@ -3607,9 +3638,9 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
 
                pte = dmar_domain->pgd;
                if (dma_pte_present(pte)) {
-                       free_pgtable_page(dmar_domain->pgd);
                        dmar_domain->pgd = (struct dma_pte *)
                                phys_to_virt(dma_pte_addr(pte));
+                       free_pgtable_page(pte);
                }
                dmar_domain->agaw--;
        }
index a22557b20283de2e84c477dcaae07ed3872fc359..3607faf28a4d702d2ea84970ddd053a0a5751253 100644 (file)
@@ -289,7 +289,7 @@ int free_irte(int irq)
  * source validation type
  */
 #define SVT_NO_VERIFY          0x0  /* no verification is required */
-#define SVT_VERIFY_SID_SQ      0x1  /* verify using SID and SQ fiels */
+#define SVT_VERIFY_SID_SQ      0x1  /* verify using SID and SQ fields */
 #define SVT_VERIFY_BUS         0x2  /* verify bus of request-id */
 
 /*
index 7914951ef29a9bab0b4bf4371f6d396503abd4ac..9606e599a47552f9119425c077f62a0c807d3b9f 100644 (file)
@@ -391,7 +391,7 @@ reserve_iova(struct iova_domain *iovad,
                                break;
        }
 
-       /* We are here either becasue this is the first reserver node
+       /* We are here either because this is the first reserver node
         * or need to insert remaining non overlap addr range
         */
        iova = __insert_new_range(iovad, pfn_lo, pfn_hi);
index d86ea8b0113701ecbbcb26de06c20f6d60089510..135df164a4c1e897e4d36a7d5a49336518669480 100644 (file)
@@ -781,7 +781,7 @@ static int pci_pm_resume(struct device *dev)
 
 #endif /* !CONFIG_SUSPEND */
 
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
 
 static int pci_pm_freeze(struct device *dev)
 {
@@ -970,7 +970,7 @@ static int pci_pm_restore(struct device *dev)
        return error;
 }
 
-#else /* !CONFIG_HIBERNATION */
+#else /* !CONFIG_HIBERNATE_CALLBACKS */
 
 #define pci_pm_freeze          NULL
 #define pci_pm_freeze_noirq    NULL
@@ -981,7 +981,7 @@ static int pci_pm_restore(struct device *dev)
 #define pci_pm_restore         NULL
 #define pci_pm_restore_noirq   NULL
 
-#endif /* !CONFIG_HIBERNATION */
+#endif /* !CONFIG_HIBERNATE_CALLBACKS */
 
 #ifdef CONFIG_PM_RUNTIME
 
index a8a277a2e0d05ad414d64d347dbfd7517538673c..f8deb3e380a2a5dc6b457f0bc34995d4f010609b 100644 (file)
@@ -645,7 +645,7 @@ pci_adjust_legacy_attr(struct pci_bus *b, enum pci_mmap_state mmap_type)
  * a per-bus basis.  This routine creates the files and ties them into
  * their associated read, write and mmap files from pci-sysfs.c
  *
- * On error unwind, but don't propogate the error to the caller
+ * On error unwind, but don't propagate the error to the caller
  * as it is ok to set up the PCI bus without these files.
  */
 void pci_create_legacy_files(struct pci_bus *b)
index bd80f6378463503d851e198527510682d6c0aef0..5129ed6d8fa7a401ab725f76eb437a779b703d4f 100644 (file)
@@ -263,7 +263,7 @@ static void quirk_vialatency(struct pci_dev *dev)
         *      This happens to include the IDE controllers....
         *
         *      VIA only apply this fix when an SB Live! is present but under
-        *      both Linux and Windows this isnt enough, and we have seen
+        *      both Linux and Windows this isn't enough, and we have seen
         *      corruption without SB Live! but with things like 3 UDMA IDE
         *      controllers. So we ignore that bit of the VIA recommendation..
         */
@@ -2680,7 +2680,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge);
  * This is a quirk for the Ricoh MMC controller found as a part of
  * some mulifunction chips.
 
- * This is very similiar and based on the ricoh_mmc driver written by
+ * This is very similar and based on the ricoh_mmc driver written by
  * Philip Langdale. Thank you for these magic sequences.
  *
  * These chips implement the four main memory card controllers (SD, MMC, MS, xD)
index 89d0a6a88df7b4ea5479630e4657cee8d912b475..ebf51ad1b71478f08532edcdda8b3acf9d711bb7 100644 (file)
@@ -676,10 +676,10 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
                        min_align = align1 >> 1;
                align += aligns[order];
        }
-       size0 = calculate_memsize(size, min_size, 0, resource_size(b_res), align);
+       size0 = calculate_memsize(size, min_size, 0, resource_size(b_res), min_align);
        size1 = !add_size ? size :
                calculate_memsize(size, min_size+add_size, 0,
-                               resource_size(b_res), align);
+                               resource_size(b_res), min_align);
        if (!size0 && !size1) {
                if (b_res->start || b_res->end)
                        dev_info(&bus->self->dev, "disabling bridge window "
index fc7906eaf22877f16e0904219ec2544e6f3ebfa4..3e447d0387b7d358b2d3f88effdfad3757ac886c 100644 (file)
@@ -54,7 +54,7 @@ static struct pccard_operations i82092aa_operations = {
        .set_mem_map            = i82092aa_set_mem_map,
 };
 
-/* The card can do upto 4 sockets, allocate a structure for each of them */
+/* The card can do up to 4 sockets, allocate a structure for each of them */
 
 struct socket_info {
        int     number;
index 42fbf1a75576abf6540923a834e2ddf4df045ea7..e8c19def1b0f501863008b3dc892d18bd4cdbe5c 100644 (file)
@@ -173,7 +173,7 @@ static int pcmcia_access_config(struct pcmcia_device *p_dev,
        c = p_dev->function_config;
 
        if (!(c->state & CONFIG_LOCKED)) {
-               dev_dbg(&p_dev->dev, "Configuration isnt't locked\n");
+               dev_dbg(&p_dev->dev, "Configuration isn't locked\n");
                mutex_unlock(&s->ops_mutex);
                return -EACCES;
        }
index 453c54c97612833b341a1e9787d9a8d51c7ec223..4c3e94c0ae85336a9fcee6511d570e1ab4b058e5 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <mach/balloon3.h>
 
+#include <asm/mach-types.h>
+
 #include "soc_common.h"
 
 /*
@@ -127,6 +129,9 @@ static int __init balloon3_pcmcia_init(void)
 {
        int ret;
 
+       if (!machine_is_balloon3())
+               return -ENODEV;
+
        balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
        if (!balloon3_pcmcia_device)
                return -ENOMEM;
index 25afe637c6573e52448925eeb0090455ede758dc..c21888eebb58fe19266351fa9b11bc9f5bcdae05 100644 (file)
@@ -187,7 +187,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
                         * We need to hack around the const qualifier as
                         * well to keep this ugly workaround localized and
                         * not force it to the rest of the code. Barf bags
-                        * avaliable in the seat pocket in front of you!
+                        * available in the seat pocket in front of you!
                         */
                        ((socket_state_t *)state)->Vcc = 50;
                        ((socket_state_t *)state)->Vpp = 50;
index b7e596620db16c594a7ba3cc73c2bbd9643b0e43..b829e655457b7df517175dae74099d7275d0c1e3 100644 (file)
@@ -69,15 +69,15 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
        for (i = 0; i < ARRAY_SIZE(irqs); i++) {
                if (irqs[i].sock != skt->nr)
                        continue;
-               if (gpio_request(IRQ_TO_GPIO(irqs[i].irq), irqs[i].str) < 0) {
+               if (gpio_request(irq_to_gpio(irqs[i].irq), irqs[i].str) < 0) {
                        pr_err("%s: sock %d unable to request gpio %d\n",
-                               __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq));
+                               __func__, skt->nr, irq_to_gpio(irqs[i].irq));
                        ret = -EBUSY;
                        goto error;
                }
-               if (gpio_direction_input(IRQ_TO_GPIO(irqs[i].irq)) < 0) {
+               if (gpio_direction_input(irq_to_gpio(irqs[i].irq)) < 0) {
                        pr_err("%s: sock %d unable to set input gpio %d\n",
-                               __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq));
+                               __func__, skt->nr, irq_to_gpio(irqs[i].irq));
                        ret = -EINVAL;
                        goto error;
                }
@@ -86,7 +86,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 
 error:
        for (; i >= 0; i--) {
-               gpio_free(IRQ_TO_GPIO(irqs[i].irq));
+               gpio_free(irq_to_gpio(irqs[i].irq));
        }
        return (ret);
 }
@@ -97,7 +97,7 @@ static void trizeps_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
        /* free allocated gpio's */
        gpio_free(GPIO_PRDY);
        for (i = 0; i < ARRAY_SIZE(irqs); i++)
-               gpio_free(IRQ_TO_GPIO(irqs[i].irq));
+               gpio_free(irq_to_gpio(irqs[i].irq));
 }
 
 static unsigned long trizeps_pcmcia_status[2];
@@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void)
 {
        int ret;
 
+       if (!machine_is_trizeps4() && !machine_is_trizeps4wl())
+               return -ENODEV;
+
        trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
        if (!trizeps_pcmcia_device)
                return -ENOMEM;
index 9ffa97d0b16c3655469deb0f4895694034ff3182..a71789486cdf0d61cc159332ea22a5b9ae62e502 100644 (file)
@@ -691,7 +691,7 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket)
                /*
                 * those are either single or dual slot CB with additional functions
                 * like 1394, smartcard reader, etc. check the TIEALL flag for them
-                * the TIEALL flag binds the IRQ of all functions toghether.
+                * the TIEALL flag binds the IRQ of all functions together.
                 * we catch the single slot variants later.
                 */
                sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
index 2ee442c2a5db094df620a50bcbdf03072fc64336..0485e394712aa4645cc695230f2dcaaca1664af3 100644 (file)
@@ -187,7 +187,8 @@ config MSI_LAPTOP
        depends on ACPI
        depends on BACKLIGHT_CLASS_DEVICE
        depends on RFKILL
-       depends on SERIO_I8042
+       depends on INPUT && SERIO_I8042
+       select INPUT_SPARSEKMAP
        ---help---
          This is a driver for laptops built by MSI (MICRO-STAR
          INTERNATIONAL):
index 5ea6c3477d17da4f17f3f07059329fdff1212da3..ac4e7f83ce6c8a4914af0e2df7080bd956b26f6f 100644 (file)
@@ -89,7 +89,7 @@ MODULE_LICENSE("GPL");
 #define ACERWMID_EVENT_GUID "676AA15E-6A47-4D9F-A2CC-1E6D18D14026"
 
 MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB");
-MODULE_ALIAS("wmi:6AF4F258-B401-42Fd-BE91-3D4AC2D7C0D3");
+MODULE_ALIAS("wmi:6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3");
 MODULE_ALIAS("wmi:676AA15E-6A47-4D9F-A2CC-1E6D18D14026");
 
 enum acer_wmi_event_ids {
index efc776cb0c664e0c8bf19c092c0a48367d4e1043..832a3fd7c1c8538ef77fd26c628e0ddd2c1644d6 100644 (file)
@@ -201,8 +201,8 @@ static int asus_wmi_input_init(struct asus_wmi *asus)
        if (!asus->inputdev)
                return -ENOMEM;
 
-       asus->inputdev->name = asus->driver->input_phys;
-       asus->inputdev->phys = asus->driver->input_name;
+       asus->inputdev->name = asus->driver->input_name;
+       asus->inputdev->phys = asus->driver->input_phys;
        asus->inputdev->id.bustype = BUS_HOST;
        asus->inputdev->dev.parent = &asus->platform_device->dev;
 
index 0ddc434fb93ba2bdb8144f5937ba66707d3c72f5..649dcadd8ea372973cd45db1b5b8274847baff36 100644 (file)
@@ -67,9 +67,11 @@ static const struct key_entry eeepc_wmi_keymap[] = {
        { KE_KEY, 0x82, { KEY_CAMERA } },
        { KE_KEY, 0x83, { KEY_CAMERA_ZOOMIN } },
        { KE_KEY, 0x88, { KEY_WLAN } },
+       { KE_KEY, 0xbd, { KEY_CAMERA } },
        { KE_KEY, 0xcc, { KEY_SWITCHVIDEOMODE } },
        { KE_KEY, 0xe0, { KEY_PROG1 } }, /* Task Manager */
        { KE_KEY, 0xe1, { KEY_F14 } }, /* Change Resolution */
+       { KE_KEY, 0xe8, { KEY_SCREENLOCK } },
        { KE_KEY, 0xe9, { KEY_BRIGHTNESS_ZERO } },
        { KE_KEY, 0xeb, { KEY_CAMERA_ZOOMOUT } },
        { KE_KEY, 0xec, { KEY_CAMERA_UP } },
index 6c12db503161b9d5c34cceee2d19cee9e80fa291..c2f4bd8013b520a549c418e7c72644030fa560f4 100644 (file)
@@ -202,7 +202,7 @@ static int mid_read_temp(struct thermal_zone_device *tzd, unsigned long *temp)
        if (ret)
                return ret;
 
-       /* Shift bits to accomodate the lower two data bits */
+       /* Shift bits to accommodate the lower two data bits */
        adc_val = (data << 2);
        addr++;
 
index d653104b59cb25540d17a85d78f298eea75fd48a..464bb3fc4d88b1c7d8fc9583b48fee3fec610a4f 100644 (file)
@@ -74,6 +74,19 @@ struct pmic_gpio {
        u32                     trigger_type;
 };
 
+static void pmic_program_irqtype(int gpio, int type)
+{
+       if (type & IRQ_TYPE_EDGE_RISING)
+               intel_scu_ipc_update_register(GPIO0 + gpio, 0x20, 0x20);
+       else
+               intel_scu_ipc_update_register(GPIO0 + gpio, 0x00, 0x20);
+
+       if (type & IRQ_TYPE_EDGE_FALLING)
+               intel_scu_ipc_update_register(GPIO0 + gpio, 0x10, 0x10);
+       else
+               intel_scu_ipc_update_register(GPIO0 + gpio, 0x00, 0x10);
+};
+
 static int pmic_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
 {
        if (offset > 8) {
@@ -166,16 +179,38 @@ static int pmic_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
        return pg->irq_base + offset;
 }
 
+static void pmic_bus_lock(struct irq_data *data)
+{
+       struct pmic_gpio *pg = irq_data_get_irq_chip_data(data);
+
+       mutex_lock(&pg->buslock);
+}
+
+static void pmic_bus_sync_unlock(struct irq_data *data)
+{
+       struct pmic_gpio *pg = irq_data_get_irq_chip_data(data);
+
+       if (pg->update_type) {
+               unsigned int gpio = pg->update_type & ~GPIO_UPDATE_TYPE;
+
+               pmic_program_irqtype(gpio, pg->trigger_type);
+               pg->update_type = 0;
+       }
+       mutex_unlock(&pg->buslock);
+}
+
 /* the gpiointr register is read-clear, so just do nothing. */
 static void pmic_irq_unmask(struct irq_data *data) { }
 
 static void pmic_irq_mask(struct irq_data *data) { }
 
 static struct irq_chip pmic_irqchip = {
-       .name           = "PMIC-GPIO",
-       .irq_mask       = pmic_irq_mask,
-       .irq_unmask     = pmic_irq_unmask,
-       .irq_set_type   = pmic_irq_type,
+       .name                   = "PMIC-GPIO",
+       .irq_mask               = pmic_irq_mask,
+       .irq_unmask             = pmic_irq_unmask,
+       .irq_set_type           = pmic_irq_type,
+       .irq_bus_lock           = pmic_bus_lock,
+       .irq_bus_sync_unlock    = pmic_bus_sync_unlock,
 };
 
 static irqreturn_t pmic_irq_handler(int irq, void *data)
index de434c6dc2d661133175ddf11464b4dac48f118e..d347116d150e38146eedf6e817e51afc84898169 100644 (file)
@@ -570,6 +570,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
                },
                .callback = dmi_check_cb,
        },
+       {
+               .ident = "R410 Plus",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR,
+                                       "SAMSUNG ELECTRONICS CO., LTD."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "R410P"),
+                       DMI_MATCH(DMI_BOARD_NAME, "R460"),
+               },
+               .callback = dmi_check_cb,
+       },
        {
                .ident = "R518",
                .matches = {
@@ -591,12 +601,12 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
                .callback = dmi_check_cb,
        },
        {
-               .ident = "N150/N210/N220",
+               .ident = "N150/N210/N220/N230",
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR,
                                        "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220"),
-                       DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220/N230"),
+                       DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220/N230"),
                },
                .callback = dmi_check_cb,
        },
@@ -771,6 +781,7 @@ static int __init samsung_init(void)
 
        /* create a backlight device to talk to this one */
        memset(&props, 0, sizeof(struct backlight_properties));
+       props.type = BACKLIGHT_PLATFORM;
        props.max_brightness = sabi_config->max_brightness;
        backlight_device = backlight_device_register("samsung", &sdev->dev,
                                                     NULL, &backlight_ops,
index e642f5f295046edf07f9d16aed5bc26f5dde8731..8f709aec4da0ac2ebb81d09e19baea9932506f26 100644 (file)
@@ -138,6 +138,8 @@ MODULE_PARM_DESC(kbd_backlight_timeout,
                 "1 for 30 seconds, 2 for 60 seconds and 3 to disable timeout "
                 "(default: 0)");
 
+static void sony_nc_kbd_backlight_resume(void);
+
 enum sony_nc_rfkill {
        SONY_WIFI,
        SONY_BLUETOOTH,
@@ -771,11 +773,6 @@ static int sony_nc_handles_setup(struct platform_device *pd)
        if (!handles)
                return -ENOMEM;
 
-       sysfs_attr_init(&handles->devattr.attr);
-       handles->devattr.attr.name = "handles";
-       handles->devattr.attr.mode = S_IRUGO;
-       handles->devattr.show = sony_nc_handles_show;
-
        for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
                if (!acpi_callsetfunc(sony_nc_acpi_handle,
                                        "SN00", i + 0x20, &result)) {
@@ -785,11 +782,18 @@ static int sony_nc_handles_setup(struct platform_device *pd)
                }
        }
 
-       /* allow reading capabilities via sysfs */
-       if (device_create_file(&pd->dev, &handles->devattr)) {
-               kfree(handles);
-               handles = NULL;
-               return -1;
+       if (debug) {
+               sysfs_attr_init(&handles->devattr.attr);
+               handles->devattr.attr.name = "handles";
+               handles->devattr.attr.mode = S_IRUGO;
+               handles->devattr.show = sony_nc_handles_show;
+
+               /* allow reading capabilities via sysfs */
+               if (device_create_file(&pd->dev, &handles->devattr)) {
+                       kfree(handles);
+                       handles = NULL;
+                       return -1;
+               }
        }
 
        return 0;
@@ -798,7 +802,8 @@ static int sony_nc_handles_setup(struct platform_device *pd)
 static int sony_nc_handles_cleanup(struct platform_device *pd)
 {
        if (handles) {
-               device_remove_file(&pd->dev, &handles->devattr);
+               if (debug)
+                       device_remove_file(&pd->dev, &handles->devattr);
                kfree(handles);
                handles = NULL;
        }
@@ -808,6 +813,11 @@ static int sony_nc_handles_cleanup(struct platform_device *pd)
 static int sony_find_snc_handle(int handle)
 {
        int i;
+
+       /* not initialized yet, return early */
+       if (!handles)
+               return -1;
+
        for (i = 0; i < 0x10; i++) {
                if (handles->cap[i] == handle) {
                        dprintk("found handle 0x%.4x (offset: 0x%.2x)\n",
@@ -1168,6 +1178,9 @@ static int sony_nc_resume(struct acpi_device *device)
        /* re-read rfkill state */
        sony_nc_rfkill_update();
 
+       /* restore kbd backlight states */
+       sony_nc_kbd_backlight_resume();
+
        return 0;
 }
 
@@ -1355,6 +1368,7 @@ out_no_enum:
 #define KBDBL_HANDLER  0x137
 #define KBDBL_PRESENT  0xB00
 #define        SET_MODE        0xC00
+#define SET_STATE      0xD00
 #define SET_TIMEOUT    0xE00
 
 struct kbd_backlight {
@@ -1377,6 +1391,10 @@ static ssize_t __sony_nc_kbd_backlight_mode_set(u8 value)
                                (value << 0x10) | SET_MODE, &result))
                return -EIO;
 
+       /* Try to turn the light on/off immediately */
+       sony_call_snc_handle(KBDBL_HANDLER, (value << 0x10) | SET_STATE,
+                       &result);
+
        kbdbl_handle->mode = value;
 
        return 0;
@@ -1458,7 +1476,7 @@ static int sony_nc_kbd_backlight_setup(struct platform_device *pd)
 {
        int result;
 
-       if (sony_call_snc_handle(0x137, KBDBL_PRESENT, &result))
+       if (sony_call_snc_handle(KBDBL_HANDLER, KBDBL_PRESENT, &result))
                return 0;
        if (!(result & 0x02))
                return 0;
@@ -1501,13 +1519,36 @@ outkzalloc:
 static int sony_nc_kbd_backlight_cleanup(struct platform_device *pd)
 {
        if (kbdbl_handle) {
+               int result;
+
                device_remove_file(&pd->dev, &kbdbl_handle->mode_attr);
                device_remove_file(&pd->dev, &kbdbl_handle->timeout_attr);
+
+               /* restore the default hw behaviour */
+               sony_call_snc_handle(KBDBL_HANDLER, 0x1000 | SET_MODE, &result);
+               sony_call_snc_handle(KBDBL_HANDLER, SET_TIMEOUT, &result);
+
                kfree(kbdbl_handle);
        }
        return 0;
 }
 
+static void sony_nc_kbd_backlight_resume(void)
+{
+       int ignore = 0;
+
+       if (!kbdbl_handle)
+               return;
+
+       if (kbdbl_handle->mode == 0)
+               sony_call_snc_handle(KBDBL_HANDLER, SET_MODE, &ignore);
+
+       if (kbdbl_handle->timeout != 0)
+               sony_call_snc_handle(KBDBL_HANDLER,
+                               (kbdbl_handle->timeout << 0x10) | SET_TIMEOUT,
+                               &ignore);
+}
+
 static void sony_nc_backlight_setup(void)
 {
        acpi_handle unused;
index a08561f5349ef038decaf8edcd73528f30f056a9..efb3b6b9bcdbe0746011c5762ec875218ac669ce 100644 (file)
@@ -8618,8 +8618,7 @@ static bool __pure __init tpacpi_is_valid_fw_id(const char* const s,
                tpacpi_is_fw_digit(s[1]) &&
                s[2] == t && s[3] == 'T' &&
                tpacpi_is_fw_digit(s[4]) &&
-               tpacpi_is_fw_digit(s[5]) &&
-               s[6] == 'W' && s[7] == 'W';
+               tpacpi_is_fw_digit(s[5]);
 }
 
 /* returns 0 - probe ok, or < 0 - probe error.
index 4a651f69e17c0c2c26f1e30b1bfb6c187d2b25cb..bc00693d0c79fbf8981f65f2494c12ae7a365555 100644 (file)
@@ -320,7 +320,7 @@ void pnp_remove_card_device(struct pnp_dev *dev)
  * pnp_request_card_device - Searches for a PnP device under the specified card
  * @clink: pointer to the card link, cannot be NULL
  * @id: pointer to a PnP ID structure that explains the rules for finding the device
- * @from: Starting place to search from. If NULL it will start from the begining.
+ * @from: Starting place to search from. If NULL it will start from the beginning.
  */
 struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
                                        const char *id, struct pnp_dev *from)
@@ -369,7 +369,7 @@ err_out:
 
 /**
  * pnp_release_card_device - call this when the driver no longer needs the device
- * @dev: pointer to the PnP device stucture
+ * @dev: pointer to the PnP device structure
  */
 void pnp_release_card_device(struct pnp_dev *dev)
 {
index 8591f6ab1b3562f6642e0adb20afb198d2087def..b859d16cf78c548462f90bf6c37f7a7c84f9266a 100644 (file)
@@ -219,7 +219,7 @@ void pnpbios_print_status(const char *module, u16 status)
                       module);
                break;
        case PNP_HARDWARE_ERROR:
-               printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occured\n",
+               printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occurred\n",
                       module);
                break;
        default:
index f0d3376b58ba1710a7dbc7ab45cd89ca79e87041..258ca596e1bcce7fc0af5229fddd7b0bfef4174a 100644 (file)
@@ -35,7 +35,7 @@ config NTP_PPS
        depends on PPS && !NO_HZ
        help
          This option adds support for direct in-kernel time
-         syncronization using an external PPS signal.
+         synchronization using an external PPS signal.
 
          It doesn't work on tickless systems at the moment.
 
index 8000985d0e8c80f3df68802b9210736a25f499f2..643697f7139070d61cd03015a6d8d6980aa889e2 100644 (file)
@@ -919,7 +919,7 @@ EXPORT_SYMBOL_GPL(ps3_disable_pm);
  * @offset: Offset in bytes from the start of the trace buffer.
  * @buf: Copy destination.
  * @count: Maximum count of bytes to copy.
- * @bytes_copied: Pointer to a variable that will recieve the number of
+ * @bytes_copied: Pointer to a variable that will receive the number of
  *  bytes copied to @buf.
  *
  * On error @buf will contain any successfully copied trace buffer data
@@ -974,7 +974,7 @@ EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb);
  * @offset: Offset in bytes from the start of the trace buffer.
  * @buf: A __user copy destination.
  * @count: Maximum count of bytes to copy.
- * @bytes_copied: Pointer to a variable that will recieve the number of
+ * @bytes_copied: Pointer to a variable that will receive the number of
  *  bytes copied to @buf.
  *
  * On error @buf will contain any successfully copied trace buffer data
@@ -1074,7 +1074,7 @@ EXPORT_SYMBOL_GPL(ps3_disable_pm_interrupts);
 
 /**
  * ps3_lpm_open - Open the logical performance monitor device.
- * @tb_type: Specifies the type of trace buffer lv1 sould use for this lpm
+ * @tb_type: Specifies the type of trace buffer lv1 should use for this lpm
  *  instance, specified by one of enum ps3_lpm_tb_type.
  * @tb_cache: Optional user supplied buffer to use as the trace buffer cache.
  *  If NULL, the driver will allocate and manage an internal buffer.
index d37c445f0eda5374f6efe6f7781e8cabe9e7d90b..1b98367110c49132ef1d98999fd795f1873a9aba 100644 (file)
@@ -80,7 +80,7 @@ static void __maybe_unused _dump_sm_header(
  *
  * Currently all messages received from the system manager are either
  * (16 bytes header + 8 bytes payload = 24 bytes) or (16 bytes header
- * + 16 bytes payload = 32 bytes).  This knowlege is used to simplify
+ * + 16 bytes payload = 32 bytes).  This knowledge is used to simplify
  * the logic.
  */
 
index 3a59d5f018d39126f575d1c31b241812e85359ef..ee893581d4b7ea8df5e386216de9610fcdc0c3e2 100644 (file)
@@ -295,7 +295,7 @@ static int __devinit rio_add_device(struct rio_dev *rdev)
 }
 
 /**
- * rio_enable_rx_tx_port - enable input reciever and output transmitter of
+ * rio_enable_rx_tx_port - enable input receiver and output transmitter of
  * given port
  * @port: Master port associated with the RIO network
  * @local: local=1 select local port otherwise a far device is reached
index c29719cacbca00e108203361a25ee70cb5c8017f..86c9a091a2ffdbfb3cac0868f17824ee9f4e5b6d 100644 (file)
@@ -1171,16 +1171,17 @@ static int rio_hdid_setup(char *str)
 
 __setup("riohdid=", rio_hdid_setup);
 
-void rio_register_mport(struct rio_mport *port)
+int rio_register_mport(struct rio_mport *port)
 {
        if (next_portid >= RIO_MAX_MPORTS) {
                pr_err("RIO: reached specified max number of mports\n");
-               return;
+               return 1;
        }
 
        port->id = next_portid++;
        port->host_deviceid = rio_get_hdid(port->id);
        list_add_tail(&port->node, &rio_mports);
+       return 0;
 }
 
 EXPORT_SYMBOL_GPL(rio_local_get_device_id);
index 095016a9dec16930f7ed0947c0e607717678b16a..ac2701b22e7133f8239a3136b18a5f85799f8578 100644 (file)
@@ -418,3 +418,4 @@ DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1848, idtg2_switch_init);
 DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1616, idtg2_switch_init);
 DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTVPS1616, idtg2_switch_init);
 DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTSPS1616, idtg2_switch_init);
+DECLARE_RIO_SWITCH_INIT(RIO_VID_IDT, RIO_DID_IDTCPS1432, idtg2_switch_init);
index 3ffc6979d164e820e4218420449e8a22f51700db..0fae51c4845a3cf703f220c11d313be6a8ee099c 100644 (file)
@@ -1313,7 +1313,7 @@ static int _regulator_enable(struct regulator_dev *rdev)
                                return -EINVAL;
 
                        /* Query before enabling in case configuration
-                        * dependant.  */
+                        * dependent.  */
                        ret = _regulator_get_enable_time(rdev);
                        if (ret >= 0) {
                                delay = ret;
index a8f4ecfb0843b1ce31f79b9a95b14f8e8d1f5466..daff7fd0e95c14d7ace35894e7ad8351334f4107 100644 (file)
@@ -262,7 +262,7 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client,
 
        if (err) {
                dev_warn(max8952->dev, "VID0/1 gpio invalid: "
-                               "DVS not avilable.\n");
+                               "DVS not available.\n");
                max8952->vid0 = 0;
                max8952->vid1 = 0;
                /* Mark invalid */
index 09b4437b3e616aa57cdfec861b2b2ddf0ff9dd59..39013867cbd6cf0deeffcd59cb4c43280cac4618 100644 (file)
@@ -171,7 +171,7 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
        err = __rtc_read_alarm(rtc, &alrm);
 
        if (!err && !rtc_valid_tm(&alrm.time))
-               rtc_set_alarm(rtc, &alrm);
+               rtc_initialize_alarm(rtc, &alrm);
 
        strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE);
        dev_set_name(&rtc->dev, "rtc%d", id);
index 8ec6b069a7f5803921a074852dc3c61f678f1443..ef6316acec43a3312c00c6d8ca27b5ec8314f526 100644 (file)
@@ -375,6 +375,32 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
 }
 EXPORT_SYMBOL_GPL(rtc_set_alarm);
 
+/* Called once per device from rtc_device_register */
+int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
+{
+       int err;
+
+       err = rtc_valid_tm(&alarm->time);
+       if (err != 0)
+               return err;
+
+       err = mutex_lock_interruptible(&rtc->ops_lock);
+       if (err)
+               return err;
+
+       rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time);
+       rtc->aie_timer.period = ktime_set(0, 0);
+       if (alarm->enabled) {
+               rtc->aie_timer.enabled = 1;
+               timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node);
+       }
+       mutex_unlock(&rtc->ops_lock);
+       return err;
+}
+EXPORT_SYMBOL_GPL(rtc_initialize_alarm);
+
+
+
 int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled)
 {
        int err = mutex_lock_interruptible(&rtc->ops_lock);
@@ -454,7 +480,7 @@ EXPORT_SYMBOL_GPL(rtc_update_irq_enable);
  * @rtc: pointer to the rtc device
  *
  * This function is called when an AIE, UIE or PIE mode interrupt
- * has occured (or been emulated).
+ * has occurred (or been emulated).
  *
  * Triggers the registered irq_task function callback.
  */
index 518a76ec71cab46717903154db6713870593dcdb..e39b77a4609af46902dc71ec2f2c6c72b6426c0a 100644 (file)
@@ -60,7 +60,7 @@ static void at91_rtc_decodetime(unsigned int timereg, unsigned int calreg,
        /*
         * The Calendar Alarm register does not have a field for
         * the year - so these will return an invalid value.  When an
-        * alarm is set, at91_alarm_year wille store the current year.
+        * alarm is set, at91_alarm_year will store the current year.
         */
        tm->tm_year  = bcd2bin(date & AT91_RTC_CENT) * 100;     /* century */
        tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8);    /* year */
index ca9cff85ab8a8f6d34faf6173524184daca730b2..90d866272c8ea5095981afaa62396f03d92343b6 100644 (file)
@@ -20,9 +20,9 @@
  * write would be discarded and things quickly fall apart.
  *
  * To keep this delay from significantly degrading performance (we, in theory,
- * would have to sleep for up to 1 second everytime we wanted to write a
+ * would have to sleep for up to 1 second every time we wanted to write a
  * register), we only check the write pending status before we start to issue
- * a new write.  We bank on the idea that it doesnt matter when the sync
+ * a new write.  We bank on the idea that it doesn't matter when the sync
  * happens so long as we don't attempt another write before it does.  The only
  * time userspace would take this penalty is when they try and do multiple
  * operations right after another ... but in this case, they need to take the
@@ -250,6 +250,8 @@ static int bfin_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
                bfin_rtc_int_set_alarm(rtc);
        else
                bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY));
+
+       return 0;
 }
 
 static int bfin_rtc_read_time(struct device *dev, struct rtc_time *tm)
index 316f484999b55fb861667b5c6950654959ab7b75..80f9c88214c5e61987001d10479094cb8787f2a6 100644 (file)
@@ -220,6 +220,7 @@ static int __init coh901331_probe(struct platform_device *pdev)
        }
        clk_disable(rtap->clk);
 
+       platform_set_drvdata(pdev, rtap);
        rtap->rtc = rtc_device_register("coh901331", &pdev->dev, &coh901331_ops,
                                         THIS_MODULE);
        if (IS_ERR(rtap->rtc)) {
@@ -227,11 +228,10 @@ static int __init coh901331_probe(struct platform_device *pdev)
                goto out_no_rtc;
        }
 
-       platform_set_drvdata(pdev, rtap);
-
        return 0;
 
  out_no_rtc:
+       platform_set_drvdata(pdev, NULL);
  out_no_clk_enable:
        clk_put(rtap->clk);
  out_no_clk:
index ec8701ce99f99a585d6fac157e45433ae572e9e4..ae16250c762f84ab7fd2958b0fa643fff1480c28 100644 (file)
@@ -240,7 +240,7 @@ static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev)
        spin_lock_init(&rtc->lock);
 
        /*
-        * The RTC is on a seperate power domain and can keep it's state
+        * The RTC is on a separate power domain and can keep it's state
         * across a chip power cycle. If the RTC has never been previously
         * setup, then set it up now for the first time.
         */
index 174036dda78652ce106afc23d12699f1d310000b..20494b5edc3c74cc787df17a0d25f554bcf37370 100644 (file)
@@ -257,6 +257,8 @@ static int __devinit max8925_rtc_probe(struct platform_device *pdev)
                goto out_irq;
        }
 
+       dev_set_drvdata(&pdev->dev, info);
+
        info->rtc_dev = rtc_device_register("max8925-rtc", &pdev->dev,
                                        &max8925_rtc_ops, THIS_MODULE);
        ret = PTR_ERR(info->rtc_dev);
@@ -265,7 +267,6 @@ static int __devinit max8925_rtc_probe(struct platform_device *pdev)
                goto out_rtc;
        }
 
-       dev_set_drvdata(&pdev->dev, info);
        platform_set_drvdata(pdev, info);
 
        return 0;
index c420064695598edbe9cdc42c5767d35cc21d2811..c5ac03793e7910fec863f70130496cd3a3d60e9c 100644 (file)
@@ -401,6 +401,7 @@ const struct platform_device_id mc13xxx_rtc_idtable[] = {
        }, {
                .name = "mc13892-rtc",
        },
+       { }
 };
 
 static struct platform_driver mc13xxx_rtc_driver = {
index 332a2c4a891cc2dbd3802749b95d19e9519aac48..b2f096871a97cc5157dbbe75ee80738a941134b1 100644 (file)
@@ -342,6 +342,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
 
        mrst_rtc.irq = rtc_irq;
        mrst_rtc.iomem = iomem;
+       mrst_rtc.dev = dev;
+       dev_set_drvdata(dev, &mrst_rtc);
 
        mrst_rtc.rtc = rtc_device_register(driver_name, dev,
                                &mrst_rtc_ops, THIS_MODULE);
@@ -350,8 +352,6 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
                goto cleanup0;
        }
 
-       mrst_rtc.dev = dev;
-       dev_set_drvdata(dev, &mrst_rtc);
        rename_region(iomem, dev_name(&mrst_rtc.rtc->dev));
 
        spin_lock_irq(&rtc_lock);
@@ -376,9 +376,10 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
        return 0;
 
 cleanup1:
-       mrst_rtc.dev = NULL;
        rtc_device_unregister(mrst_rtc.rtc);
 cleanup0:
+       dev_set_drvdata(dev, NULL);
+       mrst_rtc.dev = NULL;
        release_region(iomem->start, iomem->end + 1 - iomem->start);
        dev_err(dev, "rtc-mrst: unable to initialise\n");
        return retval;
index de0dd7b1f146e0e7fff07bd30487b1da9add0ca1..bcae8dd41496ab089d43e6639fedfd4272dca035 100644 (file)
@@ -394,7 +394,7 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
        return 0;
 
 fail2:
-       free_irq(omap_rtc_timer, NULL);
+       free_irq(omap_rtc_timer, rtc);
 fail1:
        rtc_device_unregister(rtc);
 fail0:
index 714964913e5eb37d9c9dff9f0f346bbe6d41d5e7..b3466c491cd35cbbd93a64df0f1dbcf070c84e6c 100644 (file)
@@ -336,7 +336,6 @@ static void s3c_rtc_release(struct device *dev)
 
        /* do not clear AIE here, it may be needed for wake */
 
-       s3c_rtc_setpie(dev, 0);
        free_irq(s3c_rtc_alarmno, rtc_dev);
        free_irq(s3c_rtc_tickno, rtc_dev);
 }
@@ -408,7 +407,6 @@ static int __devexit s3c_rtc_remove(struct platform_device *dev)
        platform_set_drvdata(dev, NULL);
        rtc_device_unregister(rtc);
 
-       s3c_rtc_setpie(&dev->dev, 0);
        s3c_rtc_setaie(&dev->dev, 0);
 
        clk_disable(rtc_clk);
index 9aae49139a0a81d8b75c1822c9dd5d55f526893b..b00aad2620d4f81aa80d79192175dcde950d7fb2 100644 (file)
@@ -573,7 +573,7 @@ static int x1205_probe(struct i2c_client *client,
 
        i2c_set_clientdata(client, rtc);
 
-       /* Check for power failures and eventualy enable the osc */
+       /* Check for power failures and eventually enable the osc */
        if ((err = x1205_get_status(client, &sr)) == 0) {
                if (sr & X1205_SR_RTCF) {
                        dev_err(&client->dev,
index 4d2df2f76ea0daa718215c179e88fe2b45249516..475e603fc584f8547e6171eaf8cdb325ec085d1f 100644 (file)
@@ -2314,15 +2314,14 @@ static void dasd_flush_request_queue(struct dasd_block *block)
 
 static int dasd_open(struct block_device *bdev, fmode_t mode)
 {
-       struct dasd_block *block = bdev->bd_disk->private_data;
        struct dasd_device *base;
        int rc;
 
-       if (!block)
+       base = dasd_device_from_gendisk(bdev->bd_disk);
+       if (!base)
                return -ENODEV;
 
-       base = block->base;
-       atomic_inc(&block->open_count);
+       atomic_inc(&base->block->open_count);
        if (test_bit(DASD_FLAG_OFFLINE, &base->flags)) {
                rc = -ENODEV;
                goto unlock;
@@ -2355,21 +2354,28 @@ static int dasd_open(struct block_device *bdev, fmode_t mode)
                goto out;
        }
 
+       dasd_put_device(base);
        return 0;
 
 out:
        module_put(base->discipline->owner);
 unlock:
-       atomic_dec(&block->open_count);
+       atomic_dec(&base->block->open_count);
+       dasd_put_device(base);
        return rc;
 }
 
 static int dasd_release(struct gendisk *disk, fmode_t mode)
 {
-       struct dasd_block *block = disk->private_data;
+       struct dasd_device *base;
 
-       atomic_dec(&block->open_count);
-       module_put(block->base->discipline->owner);
+       base = dasd_device_from_gendisk(disk);
+       if (!base)
+               return -ENODEV;
+
+       atomic_dec(&base->block->open_count);
+       module_put(base->discipline->owner);
+       dasd_put_device(base);
        return 0;
 }
 
@@ -2378,20 +2384,20 @@ static int dasd_release(struct gendisk *disk, fmode_t mode)
  */
 static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
 {
-       struct dasd_block *block;
        struct dasd_device *base;
 
-       block = bdev->bd_disk->private_data;
-       if (!block)
+       base = dasd_device_from_gendisk(bdev->bd_disk);
+       if (!base)
                return -ENODEV;
-       base = block->base;
 
        if (!base->discipline ||
-           !base->discipline->fill_geometry)
+           !base->discipline->fill_geometry) {
+               dasd_put_device(base);
                return -EINVAL;
-
-       base->discipline->fill_geometry(block, geo);
-       geo->start = get_start_sect(bdev) >> block->s2b_shift;
+       }
+       base->discipline->fill_geometry(base->block, geo);
+       geo->start = get_start_sect(bdev) >> base->block->s2b_shift;
+       dasd_put_device(base);
        return 0;
 }
 
@@ -2528,7 +2534,6 @@ void dasd_generic_remove(struct ccw_device *cdev)
        dasd_set_target_state(device, DASD_STATE_NEW);
        /* dasd_delete_device destroys the device reference. */
        block = device->block;
-       device->block = NULL;
        dasd_delete_device(device);
        /*
         * life cycle of block is bound to device, so delete it after
@@ -2650,7 +2655,6 @@ int dasd_generic_set_offline(struct ccw_device *cdev)
        dasd_set_target_state(device, DASD_STATE_NEW);
        /* dasd_delete_device destroys the device reference. */
        block = device->block;
-       device->block = NULL;
        dasd_delete_device(device);
        /*
         * life cycle of block is bound to device, so delete it after
index 1654a24817be9d9104d50dcb2eac74c4e2e98616..87a0cf160fe56761dc0b1609f6b37bcfb9b88e6e 100644 (file)
@@ -2207,7 +2207,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
  * DASD_3990_ERP_CONTROL_CHECK
  *
  * DESCRIPTION
- *   Does a generic inspection if a control check occured and sets up
+ *   Does a generic inspection if a control check occurred and sets up
  *   the related error recovery procedure
  *
  * PARAMETER
@@ -2250,7 +2250,7 @@ dasd_3990_erp_inspect(struct dasd_ccw_req *erp)
        struct dasd_ccw_req *erp_new = NULL;
        char *sense;
 
-       /* if this problem occured on an alias retry on base */
+       /* if this problem occurred on an alias retry on base */
        erp_new = dasd_3990_erp_inspect_alias(erp);
        if (erp_new)
                return erp_new;
@@ -2282,7 +2282,7 @@ dasd_3990_erp_inspect(struct dasd_ccw_req *erp)
  * DASD_3990_ERP_ADD_ERP
  *
  * DESCRIPTION
- *   This funtion adds an additional request block (ERP) to the head of
+ *   This function adds an additional request block (ERP) to the head of
  *   the given cqr (or erp).
  *   For a command mode cqr the erp is initialized as an default erp
  *   (retry TIC).
index cb6a67bc89ff97a725fe22d8bd90b71e6bcb502d..d71511c7850a8560014ceee03c468e4da24c361a 100644 (file)
@@ -302,7 +302,7 @@ dasd_parse_keyword( char *parsestring ) {
 /*
  * Try to interprete the first element on the comma separated parse string
  * as a device number or a range of devices. If the interpretation is
- * successfull, create the matching dasd_devmap entries and return a pointer
+ * successful, create the matching dasd_devmap entries and return a pointer
  * to the residual string.
  * If interpretation fails or in case of an error, return an error code.
  */
@@ -674,6 +674,36 @@ dasd_device_from_cdev(struct ccw_device *cdev)
        return device;
 }
 
+void dasd_add_link_to_gendisk(struct gendisk *gdp, struct dasd_device *device)
+{
+       struct dasd_devmap *devmap;
+
+       devmap = dasd_find_busid(dev_name(&device->cdev->dev));
+       if (IS_ERR(devmap))
+               return;
+       spin_lock(&dasd_devmap_lock);
+       gdp->private_data = devmap;
+       spin_unlock(&dasd_devmap_lock);
+}
+
+struct dasd_device *dasd_device_from_gendisk(struct gendisk *gdp)
+{
+       struct dasd_device *device;
+       struct dasd_devmap *devmap;
+
+       if (!gdp->private_data)
+               return NULL;
+       device = NULL;
+       spin_lock(&dasd_devmap_lock);
+       devmap = gdp->private_data;
+       if (devmap && devmap->device) {
+               device = devmap->device;
+               dasd_get_device(device);
+       }
+       spin_unlock(&dasd_devmap_lock);
+       return device;
+}
+
 /*
  * SECTION: files in sysfs
  */
index 29143eda9dd903b4a8f897ade5eee20dcaecaf91..85dddb1e4126be512d843ceef08123fd86cc1b0d 100644 (file)
@@ -239,7 +239,6 @@ static void dasd_ext_handler(unsigned int ext_int_code,
        addr_t ip;
        int rc;
 
-       kstat_cpu(smp_processor_id()).irqs[EXTINT_DSD]++;
        switch (ext_int_code >> 24) {
        case DASD_DIAG_CODE_31BIT:
                ip = (addr_t) param32;
@@ -250,6 +249,7 @@ static void dasd_ext_handler(unsigned int ext_int_code,
        default:
                return;
        }
+       kstat_cpu(smp_processor_id()).irqs[EXTINT_DSD]++;
        if (!ip) {              /* no intparm: unsolicited interrupt */
                DBF_EVENT(DBF_NOTICE, "%s", "caught unsolicited "
                              "interrupt");
index 459f2cbe80fccca7c3e0d338bbe18f8bb7123de4..3ebdf5f92f8f945fabad2e9744fa82f106b8a33b 100644 (file)
@@ -2037,7 +2037,7 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device,
                return;
 
        /* summary unit check */
-       if ((sense[7] == 0x0D) &&
+       if ((sense[27] & DASD_SENSE_BIT_0) && (sense[7] == 0x0D) &&
            (scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK)) {
                dasd_alias_handle_summary_unit_check(device, irb);
                return;
@@ -2053,7 +2053,8 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device,
        /* loss of device reservation is handled via base devices only
         * as alias devices may be used with several bases
         */
-       if (device->block && (sense[7] == 0x3F) &&
+       if (device->block && (sense[27] & DASD_SENSE_BIT_0) &&
+           (sense[7] == 0x3F) &&
            (scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK) &&
            test_bit(DASD_FLAG_IS_RESERVED, &device->flags)) {
                if (device->features & DASD_FEATURE_FAILONSLCK)
@@ -2858,7 +2859,7 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev,
        /*
         * struct PFX_eckd_data has up to 2 byte as extended parameter
         * this is needed for write full track and has to be mentioned
-        * seperately
+        * separately
         * add 8 instead of 2 to keep 8 byte boundary
         */
        pfx_datasize = sizeof(struct PFX_eckd_data) + 8;
index 5505bc07e1e7cccccb84549943d89b772533d199..19a1ff03d65ef25c5320585c04064916827a41bb 100644 (file)
@@ -73,7 +73,7 @@ int dasd_gendisk_alloc(struct dasd_block *block)
        if (base->features & DASD_FEATURE_READONLY ||
            test_bit(DASD_FLAG_DEVICE_RO, &base->flags))
                set_disk_ro(gdp, 1);
-       gdp->private_data = block;
+       dasd_add_link_to_gendisk(gdp, base);
        gdp->queue = block->request_queue;
        block->gdp = gdp;
        set_capacity(block->gdp, 0);
index df9f6999411def84414938e65df42d699b33bfcc..d1e4f2c1264c54225a70307b0830343a5e5c5f0c 100644 (file)
@@ -686,6 +686,9 @@ struct dasd_device *dasd_device_from_cdev(struct ccw_device *);
 struct dasd_device *dasd_device_from_cdev_locked(struct ccw_device *);
 struct dasd_device *dasd_device_from_devindex(int);
 
+void dasd_add_link_to_gendisk(struct gendisk *, struct dasd_device *);
+struct dasd_device *dasd_device_from_gendisk(struct gendisk *);
+
 int dasd_parse(void);
 int dasd_busid_known(const char *);
 
index 26075e95b1bad786db8ff7b0e8504521fe8f3d68..72261e4c516de89e836a2afb3d646d24b947ecfd 100644 (file)
@@ -42,16 +42,22 @@ dasd_ioctl_api_version(void __user *argp)
 static int
 dasd_ioctl_enable(struct block_device *bdev)
 {
-       struct dasd_block *block = bdev->bd_disk->private_data;
+       struct dasd_device *base;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
 
-       dasd_enable_device(block->base);
+       base = dasd_device_from_gendisk(bdev->bd_disk);
+       if (!base)
+               return -ENODEV;
+
+       dasd_enable_device(base);
        /* Formatting the dasd device can change the capacity. */
        mutex_lock(&bdev->bd_mutex);
-       i_size_write(bdev->bd_inode, (loff_t)get_capacity(block->gdp) << 9);
+       i_size_write(bdev->bd_inode,
+                    (loff_t)get_capacity(base->block->gdp) << 9);
        mutex_unlock(&bdev->bd_mutex);
+       dasd_put_device(base);
        return 0;
 }
 
@@ -62,11 +68,14 @@ dasd_ioctl_enable(struct block_device *bdev)
 static int
 dasd_ioctl_disable(struct block_device *bdev)
 {
-       struct dasd_block *block = bdev->bd_disk->private_data;
+       struct dasd_device *base;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
 
+       base = dasd_device_from_gendisk(bdev->bd_disk);
+       if (!base)
+               return -ENODEV;
        /*
         * Man this is sick. We don't do a real disable but only downgrade
         * the device to DASD_STATE_BASIC. The reason is that dasdfmt uses
@@ -75,7 +84,7 @@ dasd_ioctl_disable(struct block_device *bdev)
         * using the BIODASDFMT ioctl. Therefore the correct state for the
         * device is DASD_STATE_BASIC that allows to do basic i/o.
         */
-       dasd_set_target_state(block->base, DASD_STATE_BASIC);
+       dasd_set_target_state(base, DASD_STATE_BASIC);
        /*
         * Set i_size to zero, since read, write, etc. check against this
         * value.
@@ -83,6 +92,7 @@ dasd_ioctl_disable(struct block_device *bdev)
        mutex_lock(&bdev->bd_mutex);
        i_size_write(bdev->bd_inode, 0);
        mutex_unlock(&bdev->bd_mutex);
+       dasd_put_device(base);
        return 0;
 }
 
@@ -191,26 +201,36 @@ static int dasd_format(struct dasd_block *block, struct format_data_t *fdata)
 static int
 dasd_ioctl_format(struct block_device *bdev, void __user *argp)
 {
-       struct dasd_block *block = bdev->bd_disk->private_data;
+       struct dasd_device *base;
        struct format_data_t fdata;
+       int rc;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
        if (!argp)
                return -EINVAL;
-
-       if (block->base->features & DASD_FEATURE_READONLY ||
-           test_bit(DASD_FLAG_DEVICE_RO, &block->base->flags))
+       base = dasd_device_from_gendisk(bdev->bd_disk);
+       if (!base)
+               return -ENODEV;
+       if (base->features & DASD_FEATURE_READONLY ||
+           test_bit(DASD_FLAG_DEVICE_RO, &base->flags)) {
+               dasd_put_device(base);
                return -EROFS;
-       if (copy_from_user(&fdata, argp, sizeof(struct format_data_t)))
+       }
+       if (copy_from_user(&fdata, argp, sizeof(struct format_data_t))) {
+               dasd_put_device(base);
                return -EFAULT;
+       }
        if (bdev != bdev->bd_contains) {
                pr_warning("%s: The specified DASD is a partition and cannot "
                           "be formatted\n",
-                          dev_name(&block->base->cdev->dev));
+                          dev_name(&base->cdev->dev));
+               dasd_put_device(base);
                return -EINVAL;
        }
-       return dasd_format(block, &fdata);
+       rc = dasd_format(base->block, &fdata);
+       dasd_put_device(base);
+       return rc;
 }
 
 #ifdef CONFIG_DASD_PROFILE
@@ -340,8 +360,8 @@ static int dasd_ioctl_information(struct dasd_block *block,
 static int
 dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp)
 {
-       struct dasd_block *block =  bdev->bd_disk->private_data;
-       int intval;
+       struct dasd_device *base;
+       int intval, rc;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
@@ -350,10 +370,17 @@ dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp)
                return -EINVAL;
        if (get_user(intval, (int __user *)argp))
                return -EFAULT;
-       if (!intval && test_bit(DASD_FLAG_DEVICE_RO, &block->base->flags))
+       base = dasd_device_from_gendisk(bdev->bd_disk);
+       if (!base)
+               return -ENODEV;
+       if (!intval && test_bit(DASD_FLAG_DEVICE_RO, &base->flags)) {
+               dasd_put_device(base);
                return -EROFS;
+       }
        set_disk_ro(bdev->bd_disk, intval);
-       return dasd_set_feature(block->base->cdev, DASD_FEATURE_READONLY, intval);
+       rc = dasd_set_feature(base->cdev, DASD_FEATURE_READONLY, intval);
+       dasd_put_device(base);
+       return rc;
 }
 
 static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
@@ -372,59 +399,78 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
 int dasd_ioctl(struct block_device *bdev, fmode_t mode,
               unsigned int cmd, unsigned long arg)
 {
-       struct dasd_block *block = bdev->bd_disk->private_data;
+       struct dasd_block *block;
+       struct dasd_device *base;
        void __user *argp;
+       int rc;
 
        if (is_compat_task())
                argp = compat_ptr(arg);
        else
                argp = (void __user *)arg;
 
-       if (!block)
-                return -ENODEV;
-
        if ((_IOC_DIR(cmd) != _IOC_NONE) && !arg) {
                PRINT_DEBUG("empty data ptr");
                return -EINVAL;
        }
 
+       base = dasd_device_from_gendisk(bdev->bd_disk);
+       if (!base)
+               return -ENODEV;
+       block = base->block;
+       rc = 0;
        switch (cmd) {
        case BIODASDDISABLE:
-               return dasd_ioctl_disable(bdev);
+               rc = dasd_ioctl_disable(bdev);
+               break;
        case BIODASDENABLE:
-               return dasd_ioctl_enable(bdev);
+               rc = dasd_ioctl_enable(bdev);
+               break;
        case BIODASDQUIESCE:
-               return dasd_ioctl_quiesce(block);
+               rc = dasd_ioctl_quiesce(block);
+               break;
        case BIODASDRESUME:
-               return dasd_ioctl_resume(block);
+               rc = dasd_ioctl_resume(block);
+               break;
        case BIODASDFMT:
-               return dasd_ioctl_format(bdev, argp);
+               rc = dasd_ioctl_format(bdev, argp);
+               break;
        case BIODASDINFO:
-               return dasd_ioctl_information(block, cmd, argp);
+               rc = dasd_ioctl_information(block, cmd, argp);
+               break;
        case BIODASDINFO2:
-               return dasd_ioctl_information(block, cmd, argp);
+               rc = dasd_ioctl_information(block, cmd, argp);
+               break;
        case BIODASDPRRD:
-               return dasd_ioctl_read_profile(block, argp);
+               rc = dasd_ioctl_read_profile(block, argp);
+               break;
        case BIODASDPRRST:
-               return dasd_ioctl_reset_profile(block);
+               rc = dasd_ioctl_reset_profile(block);
+               break;
        case BLKROSET:
-               return dasd_ioctl_set_ro(bdev, argp);
+               rc = dasd_ioctl_set_ro(bdev, argp);
+               break;
        case DASDAPIVER:
-               return dasd_ioctl_api_version(argp);
+               rc = dasd_ioctl_api_version(argp);
+               break;
        case BIODASDCMFENABLE:
-               return enable_cmf(block->base->cdev);
+               rc = enable_cmf(base->cdev);
+               break;
        case BIODASDCMFDISABLE:
-               return disable_cmf(block->base->cdev);
+               rc = disable_cmf(base->cdev);
+               break;
        case BIODASDREADALLCMB:
-               return dasd_ioctl_readall_cmb(block, cmd, argp);
+               rc = dasd_ioctl_readall_cmb(block, cmd, argp);
+               break;
        default:
                /* if the discipline has an ioctl method try it. */
-               if (block->base->discipline->ioctl) {
-                       int rval = block->base->discipline->ioctl(block, cmd, argp);
-                       if (rval != -ENOIOCTLCMD)
-                               return rval;
-               }
-
-               return -EINVAL;
+               if (base->discipline->ioctl) {
+                       rc = base->discipline->ioctl(block, cmd, argp);
+                       if (rc == -ENOIOCTLCMD)
+                               rc = -EINVAL;
+               } else
+                       rc = -EINVAL;
        }
+       dasd_put_device(base);
+       return rc;
 }
index 4c023761946f6bc196783a859f3a0ce60cded9f2..e21a5c39ef20f2f29609ee989eb75213e6f99f84 100644 (file)
@@ -604,7 +604,7 @@ __raw3270_size_device(struct raw3270 *rp)
        /*
         * To determine the size of the 3270 device we need to do:
         * 1) send a 'read partition' data stream to the device
-        * 2) wait for the attn interrupt that preceeds the query reply
+        * 2) wait for the attn interrupt that precedes the query reply
         * 3) do a read modified to get the query reply
         * To make things worse we have to cope with intervention
         * required (3270 device switched to 'stand-by') and command
index e090a307fdeee341c66502d75ade8edf58f13afe..87cd0ab242de92fdb01cc8cadd4c5a5c4f221db7 100644 (file)
@@ -139,7 +139,7 @@ tapechar_read(struct file *filp, char __user *data, size_t count, loff_t *ppos)
        /*
         * If the tape isn't terminated yet, do it now. And since we then
         * are at the end of the tape there wouldn't be anything to read
-        * anyways. So we return immediatly.
+        * anyways. So we return immediately.
         */
        if(device->required_tapemarks) {
                return tape_std_terminate_write(device);
index d33554df2b0678318e3434fd960c3a2374e1e064..2db1482b406e67517de0bf6585a673f91468457c 100644 (file)
@@ -328,7 +328,7 @@ tty3270_write_callback(struct raw3270_request *rq, void *data)
 
        tp = (struct tty3270 *) rq->view;
        if (rq->rc != 0) {
-               /* Write wasn't successfull. Refresh all. */
+               /* Write wasn't successful. Refresh all. */
                tp->update_flags = TTY_UPDATE_ALL;
                tty3270_set_timer(tp, 1);
        }
index df14c51f653224d37b6ac29c87ad4a778f2b2af9..8e04c00cf0ad10d522128b97e33cefcf3b870adf 100644 (file)
@@ -541,15 +541,24 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
        int force, ret;
        unsigned long i;
 
-       if (!dev_fsm_final_state(cdev) &&
-           cdev->private->state != DEV_STATE_DISCONNECTED)
-               return -EAGAIN;
+       /* Prevent conflict between multiple on-/offline processing requests. */
        if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)
                return -EAGAIN;
+       /* Prevent conflict between internal I/Os and on-/offline processing. */
+       if (!dev_fsm_final_state(cdev) &&
+           cdev->private->state != DEV_STATE_DISCONNECTED) {
+               ret = -EAGAIN;
+               goto out_onoff;
+       }
+       /* Prevent conflict between pending work and on-/offline processing.*/
+       if (work_pending(&cdev->private->todo_work)) {
+               ret = -EAGAIN;
+               goto out_onoff;
+       }
 
        if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) {
-               atomic_set(&cdev->private->onoff, 0);
-               return -EINVAL;
+               ret = -EINVAL;
+               goto out_onoff;
        }
        if (!strncmp(buf, "force\n", count)) {
                force = 1;
@@ -574,6 +583,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
 out:
        if (cdev->drv)
                module_put(cdev->drv->driver.owner);
+out_onoff:
        atomic_set(&cdev->private->onoff, 0);
        return (ret < 0) ? ret : count;
 }
@@ -1311,10 +1321,12 @@ static int purge_fn(struct device *dev, void *data)
 
        spin_lock_irq(cdev->ccwlock);
        if (is_blacklisted(id->ssid, id->devno) &&
-           (cdev->private->state == DEV_STATE_OFFLINE)) {
+           (cdev->private->state == DEV_STATE_OFFLINE) &&
+           (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) {
                CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid,
                              id->devno);
                ccw_device_sched_todo(cdev, CDEV_TODO_UNREG);
+               atomic_set(&cdev->private->onoff, 0);
        }
        spin_unlock_irq(cdev->ccwlock);
        /* Abort loop in case of pending signal. */
index a845695ac314dc5dd7e1c3733bacd35216a88235..6084103672b5ee9df3732958cff89f8d78653ec0 100644 (file)
@@ -318,7 +318,7 @@ ccw_device_sense_id_done(struct ccw_device *cdev, int err)
 
 /**
   * ccw_device_notify() - inform the device's driver about an event
-  * @cdev: device for which an event occured
+  * @cdev: device for which an event occurred
   * @event: event that occurred
   *
   * Returns:
@@ -688,7 +688,7 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event)
            (scsw_stctl(&cdev->private->irb.scsw) & SCSW_STCTL_STATUS_PEND)) {
                /*
                 * No final status yet or final status not yet delivered
-                * to the device driver. Can't do path verfication now,
+                * to the device driver. Can't do path verification now,
                 * delay until final status was delivered.
                 */
                cdev->private->flags.doverify = 1;
index 479c665e9e7c25f91996eeb287770384009c9b7a..e8f267eb88873b2a65e8d0cb05bcce3dc5c2c33c 100644 (file)
@@ -407,8 +407,11 @@ static inline void account_sbals(struct qdio_q *q, int count)
        q->q_stats.nr_sbals[pos]++;
 }
 
-static void announce_buffer_error(struct qdio_q *q, int count)
+static void process_buffer_error(struct qdio_q *q, int count)
 {
+       unsigned char state = (q->is_input_q) ? SLSB_P_INPUT_NOT_INIT :
+                                       SLSB_P_OUTPUT_NOT_INIT;
+
        q->qdio_error |= QDIO_ERROR_SLSB_STATE;
 
        /* special handling for no target buffer empty */
@@ -426,6 +429,12 @@ static void announce_buffer_error(struct qdio_q *q, int count)
        DBF_ERROR("F14:%2x F15:%2x",
                  q->sbal[q->first_to_check]->element[14].flags & 0xff,
                  q->sbal[q->first_to_check]->element[15].flags & 0xff);
+
+       /*
+        * Interrupts may be avoided as long as the error is present
+        * so change the buffer state immediately to avoid starvation.
+        */
+       set_buf_states(q, q->first_to_check, state, count);
 }
 
 static inline void inbound_primed(struct qdio_q *q, int count)
@@ -506,8 +515,7 @@ static int get_inbound_buffer_frontier(struct qdio_q *q)
                        account_sbals(q, count);
                break;
        case SLSB_P_INPUT_ERROR:
-               announce_buffer_error(q, count);
-               /* process the buffer, the upper layer will take care of it */
+               process_buffer_error(q, count);
                q->first_to_check = add_buf(q->first_to_check, count);
                atomic_sub(count, &q->nr_buf_used);
                if (q->irq_ptr->perf_stat_enabled)
@@ -677,8 +685,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q)
                        account_sbals(q, count);
                break;
        case SLSB_P_OUTPUT_ERROR:
-               announce_buffer_error(q, count);
-               /* process the buffer, the upper layer will take care of it */
+               process_buffer_error(q, count);
                q->first_to_check = add_buf(q->first_to_check, count);
                atomic_sub(count, &q->nr_buf_used);
                if (q->irq_ptr->perf_stat_enabled)
@@ -1649,26 +1656,26 @@ static int __init init_QDIO(void)
 {
        int rc;
 
-       rc = qdio_setup_init();
+       rc = qdio_debug_init();
        if (rc)
                return rc;
+       rc = qdio_setup_init();
+       if (rc)
+               goto out_debug;
        rc = tiqdio_allocate_memory();
        if (rc)
                goto out_cache;
-       rc = qdio_debug_init();
-       if (rc)
-               goto out_ti;
        rc = tiqdio_register_thinints();
        if (rc)
-               goto out_debug;
+               goto out_ti;
        return 0;
 
-out_debug:
-       qdio_debug_exit();
 out_ti:
        tiqdio_free_memory();
 out_cache:
        qdio_setup_exit();
+out_debug:
+       qdio_debug_exit();
        return rc;
 }
 
@@ -1676,8 +1683,8 @@ static void __exit exit_QDIO(void)
 {
        tiqdio_unregister_thinints();
        tiqdio_free_memory();
-       qdio_debug_exit();
        qdio_setup_exit();
+       qdio_debug_exit();
 }
 
 module_init(init_QDIO);
index 88ebd114735b3cd984c23efb56fc6a38b69f3a35..9688f3985b072ebec20d049e73bfb6d49bfc3a46 100644 (file)
@@ -76,7 +76,7 @@ struct ica_z90_status {
 
 /**
  * Large random numbers are pulled in 4096 byte chunks from the crypto cards
- * and stored in a page. Be carefull when increasing this buffer due to size
+ * and stored in a page. Be careful when increasing this buffer due to size
  * limitations for AP requests.
  */
 #define ZCRYPT_RNG_BUFFER_SIZE 4096
index 414427d64a8ff6f46b3b7e375c7db97a95a66dac..607998f0b7d8580c05c4fec47cf672bfad9d3c14 100644 (file)
@@ -381,10 +381,10 @@ static void kvm_extint_handler(unsigned int ext_int_code,
        u16 subcode;
        u32 param;
 
-       kstat_cpu(smp_processor_id()).irqs[EXTINT_VRT]++;
        subcode = ext_int_code >> 16;
        if ((subcode & 0xff00) != VIRTIO_SUBCODE_64)
                return;
+       kstat_cpu(smp_processor_id()).irqs[EXTINT_VRT]++;
 
        /* The LSB might be overloaded, we have to mask it */
        vq = (struct virtqueue *)(param64 & ~1UL);
index 9feb62febb3d53c4434ded6b1825081855510d09..da8aa75bb20ba8f41785cf6e4c9d5500b70df777 100644 (file)
@@ -779,7 +779,7 @@ claw_irq_handler(struct ccw_device *cdev,
        case CLAW_START_WRITE:
                if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) {
                        dev_info(&cdev->dev,
-                               "%s: Unit Check Occured in "
+                               "%s: Unit Check Occurred in "
                                "write channel\n", dev->name);
                        clear_bit(0, (void *)&p_ch->IO_active);
                        if (p_ch->irb->ecw[0] & 0x80) {
index 8c921fc3511a5e741b187e9f32e763f004b11427..2d602207541b20a95ed590c4186e2705cf7c077a 100644 (file)
@@ -184,7 +184,7 @@ static void ctcmpc_chx_resend(fsm_instance *, int, void *);
 static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg);
 
 /**
- * Check return code of a preceeding ccw_device call, halt_IO etc...
+ * Check return code of a preceding ccw_device call, halt_IO etc...
  *
  * ch  :       The channel, the error belongs to.
  * Returns the error code (!= 0) to inspect.
index 7fbc4adbb6d554678a5a03423a8167ab95069ac2..49d1cfc3217e8ab61587210e05b46e8ca186b017 100644 (file)
@@ -1123,7 +1123,7 @@ list_modified:
        list_for_each_entry_safe(ipm, tmp, &card->ipm_list, list){
                switch (ipm->ipm_state) {
                case LCS_IPM_STATE_SET_REQUIRED:
-                       /* del from ipm_list so noone else can tamper with
+                       /* del from ipm_list so no one else can tamper with
                         * this entry */
                        list_del_init(&ipm->list);
                        spin_unlock_irqrestore(&card->ipm_lock, flags);
index 10a3a3b4dd3e9ef45aa817a0214f0406f5f9a430..85cc53117ea6e03f6b2d79f8f6116bfd9d995f64 100644 (file)
@@ -1107,7 +1107,7 @@ static int qeth_setup_card(struct qeth_card *card)
        INIT_LIST_HEAD(card->ip_tbd_list);
        INIT_LIST_HEAD(&card->cmd_waiter_list);
        init_waitqueue_head(&card->wait_q);
-       /* intial options */
+       /* initial options */
        qeth_set_intial_options(card);
        /* IP address takeover */
        INIT_LIST_HEAD(&card->ipato.entries);
index a0e05ef6592436e361b7173982001d9c9ae6ba13..8512b5c0ef82868d0a5ac87b0d813b84abacff81 100644 (file)
@@ -1083,7 +1083,7 @@ static void zfcp_fsf_send_els_handler(struct zfcp_fsf_req *req)
                }
                break;
        case FSF_SBAL_MISMATCH:
-               /* should never occure, avoided in zfcp_fsf_send_els */
+               /* should never occur, avoided in zfcp_fsf_send_els */
                /* fall through */
        default:
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
index 8da5ed644c2b4314a4cc362f874e22efa02c4e52..98e97d90835b673e770af3911e876537644073b7 100644 (file)
@@ -391,7 +391,7 @@ int zfcp_qdio_open(struct zfcp_qdio *qdio)
        if (do_QDIO(cdev, QDIO_FLAG_SYNC_INPUT, 0, 0, QDIO_MAX_BUFFERS_PER_Q))
                goto failed_qdio;
 
-       /* set index of first avalable SBALS / number of available SBALS */
+       /* set index of first available SBALS / number of available SBALS */
        qdio->req_q_idx = 0;
        atomic_set(&qdio->req_q_free, QDIO_MAX_BUFFERS_PER_Q);
        atomic_set_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &qdio->adapter->status);
index e8566224fe4b48f5e1751acbe344a91c0ca10452..6b4678a7900a086e711d4bf9a7f6004bc2efcb3c 100644 (file)
@@ -13,7 +13,7 @@
  * TODO: Erase/program both banks of a 8MB SIMM.
  *
  * It is anticipated that programming an OS Flash will be a routine
- * procedure. In the same time it is exeedingly dangerous because
+ * procedure. In the same time it is exceedingly dangerous because
  * a user can program its OBP flash with OS image and effectively
  * kill the machine.
  *
index 0bb09c286cb4f734f64960db263d33f4db3a2ebc..cd30819a0a303a5a0eb116d441f062ebf659f478 100644 (file)
@@ -6,7 +6,7 @@
 #define MAX1617_CPU_TEMP       0x01 /* Processor die temp in C */
 #define MAX1617_STATUS         0x02 /* Chip status bits        */
 
-/* Read-only versions of changable registers. */
+/* Read-only versions of changeable registers. */
 #define MAX1617_RD_CFG_BYTE    0x03 /* Config register         */
 #define MAX1617_RD_CVRATE_BYTE 0x04 /* Temp conversion rate    */
 #define MAX1617_RD_AMB_HIGHLIM 0x05 /* Ambient high limit      */
index 3343824855d03271a8271cbd9e351199b8d0bdfd..040f7214e5b7a5c3782743a4a66a456aea79df81 100644 (file)
@@ -61,7 +61,7 @@ static twa_message_type twa_aen_table[] = {
        {0x0000, "AEN queue empty"},
        {0x0001, "Controller reset occurred"},
        {0x0002, "Degraded unit detected"},
-       {0x0003, "Controller error occured"},
+       {0x0003, "Controller error occurred"},
        {0x0004, "Background rebuild failed"},
        {0x0005, "Background rebuild done"},
        {0x0006, "Incomplete unit detected"},
index 8b9f9d17e7fef481aa09d00d8febae597c8a89c9..49dcf03c631a52f971170d6ee029083a69edab34 100644 (file)
@@ -8,7 +8,7 @@
 
    Copyright (C) 1999-2010 3ware Inc.
 
-   Kernel compatiblity By:     Andre Hedrick <andre@suse.com>
+   Kernel compatibility By:    Andre Hedrick <andre@suse.com>
    Non-Copyright (C) 2000      Andre Hedrick <andre@suse.com>
 
    This program is free software; you can redistribute it and/or modify
index a064a092c6040b2c1971bfa01c73089dee689c1e..ec822e3b7a27b1e6df94338aa87f08a0426b4c75 100644 (file)
@@ -31,7 +31,7 @@ ABSOLUTE      StatusAddress = 0       ; Addr to receive status return
 ABSOLUTE       ReceiveMsgAddress = 0   ; Addr to receive msg
 ;
 ; This is the magic component for handling scatter-gather.  Each of the
-; SG components is preceeded by a script fragment which moves the
+; SG components is preceded by a script fragment which moves the
 ; necessary amount of data and jumps to the next SG segment.  The final
 ; SG segment jumps back to .  However, this address is the first SG script
 ; segment.
index 0b42a51257f27d3b4a73a2c348e68dc924fbf712..aa623da333c8f809fe3c198707ffa7c0a3885e56 100644 (file)
@@ -34,7 +34,7 @@ ABSOLUTE      StatusAddress = 0       ; Addr to receive status return
 ABSOLUTE       ReceiveMsgAddress = 0   ; Addr to receive msg
 ;
 ; This is the magic component for handling scatter-gather.  Each of the
-; SG components is preceeded by a script fragment which moves the
+; SG components is preceded by a script fragment which moves the
 ; necessary amount of data and jumps to the next SG segment.  The final
 ; SG segment jumps back to .  However, this address is the first SG script
 ; segment.
index e40cdfb7541f102b8778df8f52007b708ebe42bf..dcd716d686007b662175b51f46d2493802e60ac8 100644 (file)
@@ -2509,7 +2509,7 @@ static void FPT_ssel(unsigned long port, unsigned char p_card)
                                WR_HARPOON(port + hp_autostart_3,
                                           (SELECT + SELCHK_STRT));
 
-                               /* Setup our STATE so we know what happend when
+                               /* Setup our STATE so we know what happened when
                                   the wheels fall off. */
                                currSCCB->Sccb_scsistat = SELECT_ST;
 
@@ -2900,7 +2900,7 @@ static void FPT_SendMsg(unsigned long port, unsigned char message)
  *
  * Function: FPT_sdecm
  *
- * Description: Determine the proper responce to the message from the
+ * Description: Determine the proper response to the message from the
  *              target device.
  *
  *---------------------------------------------------------------------*/
index e7cd2fcbe03635f5b91e12e47de3aa5e071d49e8..165e4dd865d9c025393a24ad8a349173952f290f 100644 (file)
@@ -1198,12 +1198,12 @@ static irqreturn_t NCR5380_intr(int dummy, void *dev_id)
                                 */
 
                                if ((NCR5380_read(MODE_REG) & MR_DMA) && ((basr & BASR_END_DMA_TRANSFER) || !(basr & BASR_PHASE_MATCH))) {
-                                       int transfered;
+                                       int transferred;
 
                                        if (!hostdata->connected)
                                                panic("scsi%d : received end of DMA interrupt with no connected cmd\n", instance->hostno);
 
-                                       transfered = (hostdata->dmalen - NCR5380_dma_residual(instance));
+                                       transferred = (hostdata->dmalen - NCR5380_dma_residual(instance));
                                        hostdata->connected->SCp.this_residual -= transferred;
                                        hostdata->connected->SCp.ptr += transferred;
                                        hostdata->dmalen = 0;
@@ -1563,7 +1563,7 @@ failed:
  *      bytes to transfer, **data - pointer to data pointer.
  * 
  * Returns : -1 when different phase is entered without transferring
- *      maximum number of bytes, 0 if all bytes or transfered or exit
+ *      maximum number of bytes, 0 if all bytes or transferred or exit
  *      is in same phase.
  *
  *      Also, *phase, *count, *data are modified in place.
@@ -1800,7 +1800,7 @@ static int do_abort(struct Scsi_Host *host) {
  *      bytes to transfer, **data - pointer to data pointer.
  * 
  * Returns : -1 when different phase is entered without transferring
- *      maximum number of bytes, 0 if all bytes or transfered or exit
+ *      maximum number of bytes, 0 if all bytes or transferred or exit
  *      is in same phase.
  *
  *      Also, *phase, *count, *data are modified in place.
index 118ce83a737ce70ce0249a89b2f892921c5f3919..061995741444b379b007886f7fe0bd2acb7b8ac1 100644 (file)
@@ -747,8 +747,8 @@ char * get_container_type(unsigned tindex)
  * Arguments: [1] pointer to void [1] int
  *
  * Purpose: Sets SCSI inquiry data strings for vendor, product
- * and revision level. Allows strings to be set in platform dependant
- * files instead of in OS dependant driver source.
+ * and revision level. Allows strings to be set in platform dependent
+ * files instead of in OS dependent driver source.
  */
 
 static void setinqstr(struct aac_dev *dev, void *data, int tindex)
index 29ab00016b78e9d0118608746a033a2a8f107151..ffb587817efce6de2443434007dcf72abaf39572 100644 (file)
@@ -1259,7 +1259,7 @@ struct aac_dev
 #define CACHE_UNSTABLE         2
 
 /*
- *     Lets the client know at which level the data was commited on
+ *     Lets the client know at which level the data was committed on
  *     a write request
  */
 
index dd7ad3ba2dadc57154f1ea44ef8efff2dd80b3c2..e7d0d47b91855eb11b123b7add90ff950481a9ff 100644 (file)
@@ -421,7 +421,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
        if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned)))
                return -EBUSY;
        /*
-        *      There are 5 cases with the wait and reponse requested flags.
+        *      There are 5 cases with the wait and response requested flags.
         *      The only invalid cases are if the caller requests to wait and
         *      does not request a response and if the caller does not want a
         *      response and the Fib is not allocated from pool. If a response
index 081c6de92bc5b5e060f3bf20eebbfa1e8b58c5c2..bfd618a6949956f70e41ecd9a910f8422c7a02bb 100644 (file)
@@ -4544,7 +4544,7 @@ AscMemWordCopyPtrToLram(PortAddr iop_base, ushort s_addr,
  * Copy 4 bytes to LRAM.
  *
  * The source data is assumed to be in little-endian order in memory
- * and is maintained in little-endian order when writen to LRAM.
+ * and is maintained in little-endian order when written to LRAM.
  */
 static void
 AscMemDWordCopyPtrToLram(PortAddr iop_base,
index d058f1ab82b5612c328bafeba1b48a89c311f2a1..1c10b796c1a25c3153a978555025a749af026979 100644 (file)
@@ -461,7 +461,7 @@ static int aha1740_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *)
        /* The Adaptec Spec says the card is so fast that the loops
            will only be executed once in the code below. Even if this
            was true with the fastest processors when the spec was
-           written, it doesn't seem to be true with todays fast
+           written, it doesn't seem to be true with today's fast
            processors. We print a warning if the code is executed more
            often than LOOPCNT_WARN. If this happens, it should be
            investigated. If the count reaches LOOPCNT_MAX, we assume
index 95ee50385188cfd7d1270ae63d0ed31ae4a77f32..9b059422aacbf4a585074ecdc51a62ed1ebe870f 100644 (file)
@@ -473,7 +473,7 @@ struct hardware_scb {
  *     o A residual has occurred if SG_FULL_RESID is set in sgptr,
  *       or residual_sgptr does not have SG_LIST_NULL set.
  *
- *     o We are transfering the last segment if residual_datacnt has
+ *     o We are transferring the last segment if residual_datacnt has
  *       the SG_LAST_SEG flag set.
  *
  * Host:
@@ -516,7 +516,7 @@ struct hardware_scb {
  */
 
 /*
- * Definition of a scatter/gather element as transfered to the controller.
+ * Definition of a scatter/gather element as transferred to the controller.
  * The aic7xxx chips only support a 24bit length.  We use the top byte of
  * the length to store additional address bits and a flag to indicate
  * that a given segment terminates the transfer.  This gives us an
index 0666c22ab55b60934e815e35fc37edea6ef4eac5..7e12c31ccfda478321291b76916b1bed68d283be 100644 (file)
@@ -305,7 +305,7 @@ register HS_MAILBOX {
 }
 
 /*
- * Sequencer Interupt Status
+ * Sequencer Interrupt Status
  */
 register SEQINTSTAT {
        address                 0x00C
@@ -685,7 +685,7 @@ register DCHRXMSG0 {
 }
 
 /*
- * CMC Recieve Message 0
+ * CMC Receive Message 0
  */
 register CMCRXMSG0 {
        address                 0x090
@@ -696,7 +696,7 @@ register CMCRXMSG0 {
 }
 
 /*
- * Overlay Recieve Message 0
+ * Overlay Receive Message 0
  */
 register OVLYRXMSG0 {
        address                 0x090
@@ -732,7 +732,7 @@ register DCHRXMSG1 {
 }
 
 /*
- * CMC Recieve Message 1
+ * CMC Receive Message 1
  */
 register CMCRXMSG1 {
        address                 0x091
@@ -742,7 +742,7 @@ register CMCRXMSG1 {
 }
 
 /*
- * Overlay Recieve Message 1
+ * Overlay Receive Message 1
  */
 register OVLYRXMSG1 {
        address                 0x091
@@ -777,7 +777,7 @@ register DCHRXMSG2 {
 }
 
 /*
- * CMC Recieve Message 2
+ * CMC Receive Message 2
  */
 register CMCRXMSG2 {
        address                 0x092
@@ -787,7 +787,7 @@ register CMCRXMSG2 {
 }
 
 /*
- * Overlay Recieve Message 2
+ * Overlay Receive Message 2
  */
 register OVLYRXMSG2 {
        address                 0x092
@@ -816,7 +816,7 @@ register DCHRXMSG3 {
 }
 
 /*
- * CMC Recieve Message 3
+ * CMC Receive Message 3
  */
 register CMCRXMSG3 {
        address                 0x093
@@ -826,7 +826,7 @@ register CMCRXMSG3 {
 }
 
 /*
- * Overlay Recieve Message 3
+ * Overlay Receive Message 3
  */
 register OVLYRXMSG3 {
        address                 0x093
@@ -1249,7 +1249,7 @@ register TARGPCISTAT {
 
 /*
  * LQ Packet In
- * The last LQ Packet recieved
+ * The last LQ Packet received
  */
 register LQIN {
        address                 0x020
@@ -2573,7 +2573,7 @@ register IOPDNCTL {
 }
 
 /*
- * Shaddow Host Address.
+ * Shadow Host Address.
  */
 register SHADDR {
        address                 0x060
@@ -3983,7 +3983,7 @@ scratch_ram {
 
        /*
         * The maximum amount of time to wait, when interrupt coalescing
-        * is enabled, before issueing a CMDCMPLT interrupt for a completed
+        * is enabled, before issuing a CMDCMPLT interrupt for a completed
         * command.
         */
        INT_COALESCING_TIMER {
index 2fb78e35a9e5c7ce09672e011b0eef9af6050809..3a36d9362a10f5e064a0867ebe54f5e2bdd91c16 100644 (file)
@@ -567,7 +567,7 @@ BEGIN_CRITICAL;
        shr     SELOID, 4, SCB_SCSIID;
        /*
         * If we want to send a message to the device, ensure
-        * we are selecting with atn irregardless of our packetized
+        * we are selecting with atn regardless of our packetized
         * agreement.  Since SPI4 only allows target reset or PPR
         * messages if this is a packetized connection, the change
         * to our negotiation table entry for this selection will
@@ -960,7 +960,7 @@ p_status_okay:
  * This is done to allow the host to send messages outside of an identify
  * sequence while protecting the seqencer from testing the MK_MESSAGE bit
  * on an SCB that might not be for the current nexus. (For example, a
- * BDR message in responce to a bad reselection would leave us pointed to
+ * BDR message in response to a bad reselection would leave us pointed to
  * an SCB that doesn't have anything to do with the current target).
  *
  * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag,
@@ -1507,7 +1507,7 @@ service_fifo:
                 * If the other FIFO needs loading, then it
                 * must not have claimed the S/G cache yet
                 * (SG_CACHE_AVAIL would have been cleared in
-                * the orginal FIFO mode and we test this above).
+                * the original FIFO mode and we test this above).
                 * Return to the idle loop so we can process the
                 * FIFO not currently on the bus first.
                 */
@@ -1521,7 +1521,7 @@ idle_sgfetch_okay:
 idle_sgfetch_start:
        /*
         * We fetch a "cacheline aligned" and sized amount of data
-        * so we don't end up referencing a non-existant page.
+        * so we don't end up referencing a non-existent page.
         * Cacheline aligned is in quotes because the kernel will
         * set the prefetch amount to a reasonable level if the
         * cacheline size is unknown.
@@ -1551,7 +1551,7 @@ idle_sg_avail:
        test    DFSTATUS, PRELOAD_AVAIL jz return;
        /*
         * On the A, preloading a segment before HDMAENACK
-        * comes true can clobber the shaddow address of the
+        * comes true can clobber the shadow address of the
         * first segment in the S/G FIFO.  Wait until it is
         * safe to proceed.
         */
@@ -2004,10 +2004,10 @@ pkt_handle_xfer:
         * Defer handling of this NONPACKREQ until we
         * can be sure it pertains to this FIFO.  SAVEPTRS
         * will not be asserted if the NONPACKREQ is for us,
-        * so we must simulate it if shaddow is valid.  If
-        * shaddow is not valid, keep running this FIFO until we
+        * so we must simulate it if shadow is valid.  If
+        * shadow is not valid, keep running this FIFO until we
         * have satisfied the transfer by loading segments and
-        * waiting for either shaddow valid or last_seg_done.
+        * waiting for either shadow valid or last_seg_done.
         */
        test    MDFFSTAT, SHVALID jnz pkt_saveptrs;
 pkt_service_fifo:
@@ -2171,7 +2171,7 @@ pkt_status_check_nonpackreq:
        /*
         * The unexpected nonpkt phase handler assumes that any
         * data channel use will have a FIFO reference count.  It
-        * turns out that the status handler doesn't need a refernce
+        * turns out that the status handler doesn't need a references
         * count since the status received flag, and thus completion
         * processing, cannot be set until the handler is finished.
         * We increment the count here to make the nonpkt handler
index 3233bf5644358a7fa2ba3fe1d5f7cd9a1a05c373..5f8617dd43bb6afdab903e47c06bff08d0c1987e 100644 (file)
@@ -562,7 +562,7 @@ ahd_targetcmd_offset(struct ahd_softc *ahd, u_int index)
 }
 #endif
 
-/*********************** Miscelaneous Support Functions ***********************/
+/*********************** Miscellaneous Support Functions ***********************/
 /*
  * Return pointers to the transfer negotiation information
  * for the specified our_id/remote_id pair.
@@ -599,7 +599,7 @@ void
 ahd_outw(struct ahd_softc *ahd, u_int port, u_int value)
 {
        /*
-        * Write low byte first to accomodate registers
+        * Write low byte first to accommodate registers
         * such as PRGMCNT where the order maters.
         */
        ahd_outb(ahd, port, value & 0xFF);
@@ -2067,7 +2067,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
                 * that requires host assistance for completion.
                 * While handling the message phase(s), we will be
                 * notified by the sequencer after each byte is
-                * transfered so we can track bus phase changes.
+                * transferred so we can track bus phase changes.
                 *
                 * If this is the first time we've seen a HOST_MSG_LOOP
                 * interrupt, initialize the state of the host message
@@ -2487,7 +2487,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat)
                /*
                 * Although the driver does not care about the
                 * 'Selection in Progress' status bit, the busy
-                * LED does.  SELINGO is only cleared by a successfull
+                * LED does.  SELINGO is only cleared by a successful
                 * selection, so we must manually clear it to insure
                 * the LED turns off just incase no future successful
                 * selections occur (e.g. no devices on the bus).
@@ -3548,7 +3548,7 @@ ahd_clear_critical_section(struct ahd_softc *ahd)
                ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) & ~STEP);
                ahd_outb(ahd, SIMODE1, simode1);
                /*
-                * SCSIINT seems to glitch occassionally when
+                * SCSIINT seems to glitch occasionally when
                 * the interrupt masks are restored.  Clear SCSIINT
                 * one more time so that only persistent errors
                 * are seen as a real interrupt.
@@ -3838,7 +3838,7 @@ ahd_validate_width(struct ahd_softc *ahd, struct ahd_initiator_tinfo *tinfo,
 
 /*
  * Update the bitmask of targets for which the controller should
- * negotiate with at the next convenient oportunity.  This currently
+ * negotiate with at the next convenient opportunity.  This currently
  * means the next time we send the initial identify messages for
  * a new transaction.
  */
@@ -4200,7 +4200,7 @@ ahd_update_neg_table(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
 
        /*
         * During packetized transfers, the target will
-        * give us the oportunity to send command packets
+        * give us the opportunity to send command packets
         * without us asserting attention.
         */
        if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) == 0)
@@ -5651,7 +5651,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
 
                /*
                 * Requeue all tagged commands for this target
-                * currently in our posession so they can be
+                * currently in our possession so they can be
                 * converted to untagged commands.
                 */
                ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
@@ -6245,7 +6245,7 @@ ahd_shutdown(void *arg)
 /*
  * Reset the controller and record some information about it
  * that is only available just after a reset.  If "reinit" is
- * non-zero, this reset occured after initial configuration
+ * non-zero, this reset occurred after initial configuration
  * and the caller requests that the chip be fully reinitialized
  * to a runable state.  Chip interrupts are *not* enabled after
  * a reinitialization.  The caller must enable interrupts via
@@ -6495,7 +6495,7 @@ ahd_init_scbdata(struct ahd_softc *ahd)
        }
 
        /*
-        * Note that we were successfull
+        * Note that we were successful
         */
        return (0); 
 
@@ -7079,7 +7079,7 @@ ahd_init(struct ahd_softc *ahd)
                return (ENOMEM);
 
        /*
-        * Verify that the compiler hasn't over-agressively
+        * Verify that the compiler hasn't over-aggressively
         * padded important structures.
         */
        if (sizeof(struct hardware_scb) != 64)
@@ -10087,7 +10087,7 @@ ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf,
                return (error);
 
        /*
-        * Write the data.  If we don't get throught the loop at
+        * Write the data.  If we don't get through the loop at
         * least once, the arguments were invalid.
         */
        retval = EINVAL;
index 25d066624476e3b60ac0119d803f75bdfe5d721b..7d48700257a7aff109850ea641379779ebe17b0b 100644 (file)
@@ -1441,7 +1441,7 @@ ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev,
                usertags = ahd_linux_user_tagdepth(ahd, devinfo);
                if (!was_queuing) {
                        /*
-                        * Start out agressively and allow our
+                        * Start out aggressively and allow our
                         * dynamic queue depth algorithm to take
                         * care of the rest.
                         */
index 17444bc18bca01e642d0f88596950fcb2f6624f0..f695774645c1b1971a878d2cf4c041144d0494e1 100644 (file)
@@ -440,7 +440,7 @@ struct hardware_scb {
  *     o A residual has occurred if SG_FULL_RESID is set in sgptr,
  *       or residual_sgptr does not have SG_LIST_NULL set.
  *
- *     o We are transfering the last segment if residual_datacnt has
+ *     o We are transferring the last segment if residual_datacnt has
  *       the SG_LAST_SEG flag set.
  *
  * Host:
@@ -494,7 +494,7 @@ struct hardware_scb {
  */
 
 /*
- * Definition of a scatter/gather element as transfered to the controller.
+ * Definition of a scatter/gather element as transferred to the controller.
  * The aic7xxx chips only support a 24bit length.  We use the top byte of
  * the length to store additional address bits and a flag to indicate
  * that a given segment terminates the transfer.  This gives us an
index 9a96e55da39ad6406090b5f693c0396d1512d64f..ba0b411d03e2e1fa8df22648ed466e0197e34e13 100644 (file)
@@ -351,7 +351,7 @@ register SSTAT2 {
        address                 0x00d
        access_mode RO
        field   OVERRUN         0x80
-       field   SHVALID         0x40    /* Shaddow Layer non-zero */
+       field   SHVALID         0x40    /* Shadow Layer non-zero */
        field   EXP_ACTIVE      0x10    /* SCSI Expander Active */
        field   CRCVALERR       0x08    /* CRC doesn't match (U3 only) */
        field   CRCENDERR       0x04    /* No terminal CRC packet (U3 only) */
index 5a4cfc954a9fd80a5c32c003cd99f40796107c79..e60041e8f2d10fc2a505511a9bab28c968335e97 100644 (file)
@@ -57,10 +57,10 @@ PREFIX = "ahc_"
  * a later time.  This problem cannot be resolved by holding a single entry
  * in scratch ram since a reconnecting target can request sense and this will
  * create yet another SCB waiting for selection.  The solution used here is to 
- * use byte 27 of the SCB as a psuedo-next pointer and to thread a list
+ * use byte 27 of the SCB as a pseudo-next pointer and to thread a list
  * of SCBs that are awaiting selection.  Since 0-0xfe are valid SCB indexes, 
  * SCB_LIST_NULL is 0xff which is out of range.  An entry is also added to
- * this list everytime a request sense occurs or after completing a non-tagged
+ * this list every time a request sense occurs or after completing a non-tagged
  * command for which a second SCB has been queued.  The sequencer will
  * automatically consume the entries.
  */
@@ -752,7 +752,7 @@ idle_loop:
 
        /*
         * We fetch a "cacheline aligned" and sized amount of data
-        * so we don't end up referencing a non-existant page.
+        * so we don't end up referencing a non-existent page.
         * Cacheline aligned is in quotes because the kernel will
         * set the prefetch amount to a reasonable level if the
         * cacheline size is unknown.
@@ -1485,7 +1485,7 @@ p_status_okay:
  * This is done to allow the host to send messages outside of an identify
  * sequence while protecting the seqencer from testing the MK_MESSAGE bit
  * on an SCB that might not be for the current nexus. (For example, a
- * BDR message in responce to a bad reselection would leave us pointed to
+ * BDR message in response to a bad reselection would leave us pointed to
  * an SCB that doesn't have anything to do with the current target).
  *
  * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag,
@@ -1999,7 +1999,7 @@ if ((ahc->flags & AHC_TARGETROLE) != 0) {
  * from out to in, wait an additional data release delay before continuing.
  */
 change_phase:
-       /* Wait for preceeding I/O session to complete. */
+       /* Wait for preceding I/O session to complete. */
        test    SCSISIGI, ACKI jnz .;
 
        /* Change the phase */
index e021b4812d585a377d446bd677c5cb8a40db2ff2..dc28b0a91b22706c1a5b715677635bdaff9b6f95 100644 (file)
@@ -427,7 +427,7 @@ ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index)
 }
 #endif
 
-/*********************** Miscelaneous Support Functions ***********************/
+/*********************** Miscellaneous Support Functions ***********************/
 /*
  * Determine whether the sequencer reported a residual
  * for this SCB/transaction.
@@ -1243,7 +1243,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
                 * that requires host assistance for completion.
                 * While handling the message phase(s), we will be
                 * notified by the sequencer after each byte is
-                * transfered so we can track bus phase changes.
+                * transferred so we can track bus phase changes.
                 *
                 * If this is the first time we've seen a HOST_MSG_LOOP
                 * interrupt, initialize the state of the host message
@@ -1487,7 +1487,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
                       scbptr, ahc_inb(ahc, ARG_1),
                       ahc->scb_data->hscbs[scbptr].tag);
                ahc_dump_card_state(ahc);
-               panic("for saftey");
+               panic("for safety");
                break;
        }
        case OUT_OF_RANGE:
@@ -1733,7 +1733,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
                /*
                 * Although the driver does not care about the
                 * 'Selection in Progress' status bit, the busy
-                * LED does.  SELINGO is only cleared by a successfull
+                * LED does.  SELINGO is only cleared by a successful
                 * selection, so we must manually clear it to insure
                 * the LED turns off just incase no future successful
                 * selections occur (e.g. no devices on the bus).
@@ -1943,7 +1943,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
                        if (lastphase != P_BUSFREE) {
                                /*
                                 * Renegotiate with this device at the
-                                * next oportunity just in case this busfree
+                                * next opportunity just in case this busfree
                                 * is due to a negotiation mismatch with the
                                 * device.
                                 */
@@ -2442,7 +2442,7 @@ ahc_validate_width(struct ahc_softc *ahc, struct ahc_initiator_tinfo *tinfo,
 
 /*
  * Update the bitmask of targets for which the controller should
- * negotiate with at the next convenient oportunity.  This currently
+ * negotiate with at the next convenient opportunity.  This currently
  * means the next time we send the initial identify messages for
  * a new transaction.
  */
@@ -4131,7 +4131,7 @@ ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
 
                /*
                 * Requeue all tagged commands for this target
-                * currently in our posession so they can be
+                * currently in our possession so they can be
                 * converted to untagged commands.
                 */
                ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
@@ -4581,7 +4581,7 @@ ahc_shutdown(void *arg)
 /*
  * Reset the controller and record some information about it
  * that is only available just after a reset.  If "reinit" is
- * non-zero, this reset occured after initial configuration
+ * non-zero, this reset occurred after initial configuration
  * and the caller requests that the chip be fully reinitialized
  * to a runable state.  Chip interrupts are *not* enabled after
  * a reinitialization.  The caller must enable interrupts via
@@ -4899,7 +4899,7 @@ ahc_init_scbdata(struct ahc_softc *ahc)
        ahc->next_queued_scb = ahc_get_scb(ahc);
 
        /*
-        * Note that we were successfull
+        * Note that we were successful
         */
        return (0); 
 
index 4a359bb307c6e38cc9e17cfc547968b6271b98d8..c6251bb4f438fff7f15d36e0d65fae407667673d 100644 (file)
@@ -294,7 +294,7 @@ static uint32_t aic7xxx_extended;
  * dubious at best.  To my knowledge, this option has never actually
  * solved a PCI parity problem, but on certain machines with broken PCI
  * chipset configurations where stray PCI transactions with bad parity are
- * the norm rather than the exception, the error messages can be overwelming.
+ * the norm rather than the exception, the error messages can be overwhelming.
  * It's included in the driver for completeness.
  *   0    = Shut off PCI parity check
  *   non-0 = reverse polarity pci parity checking
@@ -1318,7 +1318,7 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
                usertags = ahc_linux_user_tagdepth(ahc, devinfo);
                if (!was_queuing) {
                        /*
-                        * Start out agressively and allow our
+                        * Start out aggressively and allow our
                         * dynamic queue depth algorithm to take
                         * care of the rest.
                         */
index 2b11a4272364d4ebe53f2428a1ce89b74cff12bc..6917b4f5ac9e02525fd0525ac641b02611dca71d 100644 (file)
@@ -789,7 +789,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
        ahc->bus_intr = ahc_pci_intr;
        ahc->bus_chip_init = ahc_pci_chip_init;
 
-       /* Remeber how the card was setup in case there is no SEEPROM */
+       /* Remember how the card was setup in case there is no SEEPROM */
        if ((ahc_inb(ahc, HCNTRL) & POWRDN) == 0) {
                ahc_pause(ahc);
                if ((ahc->features & AHC_ULTRA2) != 0)
@@ -860,7 +860,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
        }
 
        /*
-        * We cannot perform ULTRA speeds without the presense
+        * We cannot perform ULTRA speeds without the presence
         * of the external precision resistor.
         */
        if ((ahc->features & AHC_ULTRA) != 0) {
@@ -969,7 +969,7 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
 }
 
 /*
- * Test for the presense of external sram in an
+ * Test for the presence of external sram in an
  * "unshared" configuration.
  */
 static int
index e4064433842e62d8c876d478658b5d2597493007..f1586a437906753ae8fd008c7869e239b8c3459f 100644 (file)
@@ -803,7 +803,7 @@ macro_arglist:
 |      macro_arglist ',' T_ARG
        {
                if ($1 == 0) {
-                       stop("Comma without preceeding argument in arg list",
+                       stop("Comma without preceding argument in arg list",
                             EX_DATAERR);
                        /* NOTREACHED */
                }
@@ -1319,8 +1319,8 @@ code:
 ;
 
        /*
-        * This grammer differs from the one in the aic7xxx
-        * reference manual since the grammer listed there is
+        * This grammar differs from the one in the aic7xxx
+        * reference manual since the grammar listed there is
         * ambiguous and causes a shift/reduce conflict.
         * It also seems more logical as the "immediate"
         * argument is listed as the second arg like the
@@ -1799,7 +1799,7 @@ format_3_instr(int opcode, symbol_ref_t *src,
        instr = seq_alloc();
        f3_instr = &instr->format.format3;
        if (address->symbol == NULL) {
-               /* 'dot' referrence.  Use the current instruction pointer */
+               /* 'dot' reference.  Use the current instruction pointer */
                addr = instruction_ptr + address->offset;
        } else if (address->symbol->type == UNINITIALIZED) {
                /* forward reference */
index ff46aa6801bfc6cbd2558c3e3fe26df5c2b84c43..708326df076623f698b96fbc9b8741300b8c69b2 100644 (file)
@@ -115,7 +115,7 @@ macro_arglist:
 |      macro_arglist ',' T_ARG
        {
                if ($1 == 0) {
-                       stop("Comma without preceeding argument in arg list",
+                       stop("Comma without preceding argument in arg list",
                             EX_DATAERR);
                        /* NOTREACHED */
                }
index 4ff60a08df0f184c2c84ed32093669e006a39b59..5b212f0df898c07640cd67f5116beade78ec0c10 100644 (file)
@@ -905,7 +905,7 @@ struct aic_dev_data {
  * problems with architectures I can't test on (because I don't have one,
  * such as the Alpha based systems) which happen to give faults for
  * non-aligned memory accesses, care was taken to align this structure
- * in a way that gauranteed all accesses larger than 8 bits were aligned
+ * in a way that guaranteed all accesses larger than 8 bits were aligned
  * on the appropriate boundary.  It's also organized to try and be more
  * cache line efficient.  Be careful when changing this lest you might hurt
  * overall performance and bring down the wrath of the masses.
@@ -1180,7 +1180,7 @@ static int aic7xxx_pci_parity = 0;
  * the card's registers in a hex dump format tailored to each model of
  * controller.
  * 
- * NOTE: THE CONTROLLER IS LEFT IN AN UNUSEABLE STATE BY THIS OPTION.
+ * NOTE: THE CONTROLLER IS LEFT IN AN UNUSABLE STATE BY THIS OPTION.
  *       YOU CANNOT BOOT UP WITH THIS OPTION, IT IS FOR DEBUGGING PURPOSES
  *       ONLY
  */
@@ -3467,7 +3467,7 @@ aic7xxx_reset_current_bus(struct aic7xxx_host *p)
   /* Turn off the bus' current operations, after all, we shouldn't have any
    * valid commands left to cause a RSELI and SELO once we've tossed the
    * bus away with this reset, so we might as well shut down the sequencer
-   * until the bus is restarted as oppossed to saving the current settings
+   * until the bus is restarted as opposed to saving the current settings
    * and restoring them (which makes no sense to me). */
 
   /* Turn on the bus reset. */
@@ -4070,7 +4070,7 @@ aic7xxx_handle_seqint(struct aic7xxx_host *p, unsigned char intstat)
             aic_dev->max_q_depth = aic_dev->temp_q_depth = 1;
             /*
              * We set this command up as a bus device reset.  However, we have
-             * to clear the tag type as it's causing us problems.  We shouldnt
+             * to clear the tag type as it's causing us problems.  We shouldn't
              * have to worry about any other commands being active, since if
              * the device is refusing tagged commands, this should be the
              * first tagged command sent to the device, however, we do have
@@ -9748,7 +9748,7 @@ skip_pci_controller:
     }
 
     /*
-     * We are commited now, everything has been checked and this card
+     * We are committed now, everything has been checked and this card
      * has been found, now we just set it up
      */
 
@@ -9906,7 +9906,7 @@ skip_pci_controller:
    *  2: All PCI controllers with BIOS_ENABLED next, according to BIOS
    *     address, going from lowest to highest.
    *  3: Remaining VLB/EISA controllers going in slot order.
-   *  4: Remaining PCI controllers, going in PCI device order (reversable)
+   *  4: Remaining PCI controllers, going in PCI device order (reversible)
    */
 
   {
index 1565be9ebd496a9ba1e951ced23a6cbafcd15820..823ff28732292480c17ff0f55b2d5b777f21a6de 100644 (file)
@@ -51,7 +51,7 @@
  * use byte 27 of the SCB as a pseudo-next pointer and to thread a list
  * of SCBs that are awaiting selection.  Since 0-0xfe are valid SCB indexes, 
  * SCB_LIST_NULL is 0xff which is out of range.  An entry is also added to
- * this list everytime a request sense occurs or after completing a non-tagged
+ * this list every time a request sense occurs or after completing a non-tagged
  * command for which a second SCB has been queued.  The sequencer will
  * automatically consume the entries.
  */
@@ -696,7 +696,7 @@ p_status:
  * This is done to allow the hsot to send messages outside of an identify
  * sequence while protecting the seqencer from testing the MK_MESSAGE bit
  * on an SCB that might not be for the current nexus. (For example, a
- * BDR message in responce to a bad reselection would leave us pointed to
+ * BDR message in response to a bad reselection would leave us pointed to
  * an SCB that doesn't have anything to do with the current target).
  * Otherwise, treat MSG_OUT as a 1 byte message to send (abort, abort tag,
  * bus device reset).
@@ -716,8 +716,8 @@ p_mesgout_identify:
        } else {
                and     SINDEX,0x7,SCB_TCL;     /* lun */
        }
-       and     A,DISCENB,SCB_CONTROL;  /* mask off disconnect privledge */
-       or      SINDEX,A;               /* or in disconnect privledge */
+       and     A,DISCENB,SCB_CONTROL;  /* mask off disconnect privilege */
+       or      SINDEX,A;               /* or in disconnect privilege */
        or      SINDEX,MSG_IDENTIFYFLAG;
 p_mesgout_mk_message:
        test    SCB_CONTROL,MK_MESSAGE  jz p_mesgout_tag;
index 40273a747d2905ecd54d9863b693b9b484c37145..dd6cc8008b1642e3a04b74e005dca472356bb029 100644 (file)
 * The host accesses this scratch in a different manner from the
 * link sequencer. The sequencer has to use LSEQ registers
 * LmSCRPAGE and LmMnSCRPAGE to access the scratch memory. A flat
-* mapping of the scratch memory is avaliable for software
+* mapping of the scratch memory is available for software
 * convenience and to prevent corruption while the sequencer is
 * running. This memory is mapped onto addresses 800h - 9FFh.
 *
index ec166726b3149d2a270ffc3f1a491262b8c4dcd5..c454e44cf51c6653b8fd050c681ba64eea719b63 100644 (file)
  */
 #define TIMEOUT_TIME 10
 /*
- * Define this if you want to have verbose explaination of SCSI
+ * Define this if you want to have verbose explanation of SCSI
  * status/messages.
  */
 #undef CONFIG_ACORNSCSI_CONSTANTS
@@ -1561,7 +1561,7 @@ void acornscsi_message(AS_Host *host)
        /*
         * If we were negociating sync transfer, we don't yet know if
         * this REJECT is for the sync transfer or for the tagged queue/wide
-        * transfer.  Re-initiate sync transfer negociation now, and if
+        * transfer.  Re-initiate sync transfer negotiation now, and if
         * we got a REJECT in response to SDTR, then it'll be set to DONE.
         */
        if (host->device[host->SCpnt->device->id].sync_state == SYNC_SENT_REQUEST)
index 8d2172a0b3518305622db0fda8d39503db46ece2..01bc715a3aece75393868d78af3cfb4f53456db4 100644 (file)
@@ -223,8 +223,8 @@ typedef enum {
  * Synchronous transfer state
  */
 typedef enum {                                 /* Synchronous transfer state           */
-    SYNC_ASYNCHRONOUS,                         /* don't negociate synchronous transfers*/
-    SYNC_NEGOCIATE,                            /* start negociation                    */
+    SYNC_ASYNCHRONOUS,                         /* don't negotiate synchronous transfers*/
+    SYNC_NEGOCIATE,                            /* start negotiation                    */
     SYNC_SENT_REQUEST,                         /* sent SDTR message                    */
     SYNC_COMPLETED,                            /* received SDTR reply                  */
 } syncxfer_t;
@@ -322,7 +322,7 @@ typedef struct acornscsi_hostdata {
     /* per-device info */
     struct {
        unsigned char   sync_xfer;              /* synchronous transfer (SBIC value)    */
-       syncxfer_t      sync_state;             /* sync xfer negociation state          */
+       syncxfer_t      sync_state;             /* sync xfer negotiation state          */
        unsigned char   disconnect_ok:1;        /* device can disconnect                */
     } device[8];
     unsigned long      busyluns[64 / sizeof(unsigned long)];/* array of bits indicating LUNs busy      */
index 2836fe248df9ef5ab1cc42a939e468ec0602bfe3..a750aa72b8ef27249a8925e49feee8cf5baf1811 100644 (file)
@@ -228,7 +228,7 @@ static const char *arxescsi_info(struct Scsi_Host *host)
  * Params  : buffer - a buffer to write information to
  *          start  - a pointer into this buffer set by this routine to the start
  *                   of the required information.
- *          offset - offset into information that we have read upto.
+ *          offset - offset into information that we have read up to.
  *          length - length of buffer
  *          host_no - host number to return information for
  *          inout  - 0 for reading, 1 for writing.
index c9902b5c1f2b3b788119c9e46a270696eb5abee4..547987b86384e9fa693e43c0e5b27f23f52ae8b1 100644 (file)
@@ -344,7 +344,7 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
  * Params   : buffer - a buffer to write information to
  *           start  - a pointer into this buffer set by this routine to the start
  *                    of the required information.
- *           offset - offset into information that we have read upto.
+ *           offset - offset into information that we have read up to.
  *           length - length of buffer
  *           host_no - host number to return information for
  *           inout  - 0 for reading, 1 for writing.
index d8435132f46157774559e26a59af0347c2441304..edfd12b48c285ee6d11a3497599b68ea1b1b0e63 100644 (file)
@@ -429,7 +429,7 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
  * Params   : buffer - a buffer to write information to
  *           start  - a pointer into this buffer set by this routine to the start
  *                    of the required information.
- *           offset - offset into information that we have read upto.
+ *           offset - offset into information that we have read up to.
  *           length - length of buffer
  *           host_no - host number to return information for
  *           inout  - 0 for reading, 1 for writing.
index 2b2ce21e227ea95200ec437f2d2a29f7d1cc356e..e85c40b6e19b162bdff9a20c203af426b746cf41 100644 (file)
@@ -2119,7 +2119,7 @@ request_sense:
         * executed, unless a target connects to us.
         */
        if (info->reqSCpnt)
-               printk(KERN_WARNING "scsi%d.%c: loosing request command\n",
+               printk(KERN_WARNING "scsi%d.%c: losing request command\n",
                        info->host->host_no, '0' + SCpnt->device->id);
        info->reqSCpnt = SCpnt;
 }
@@ -2294,7 +2294,7 @@ static int fas216_noqueue_command_lck(struct scsi_cmnd *SCpnt,
                 * If we don't have an IRQ, then we must poll the card for
                 * it's interrupt, and use that to call this driver's
                 * interrupt routine.  That way, we keep the command
-                * progressing.  Maybe we can add some inteligence here
+                * progressing.  Maybe we can add some intelligence here
                 * and go to sleep if we know that the device is going
                 * to be some time (eg, disconnected).
                 */
index f30f8d659dc4d47ef70d6e9be3b59f6a44dde00a..84b7127c01212409a97f793d6f87a8bdb0a17c80 100644 (file)
@@ -203,11 +203,11 @@ typedef enum {
 } fasdmatype_t;
 
 typedef enum {
-       neg_wait,                                       /* Negociate with device                */
-       neg_inprogress,                                 /* Negociation sent                     */
-       neg_complete,                                   /* Negociation complete                 */
-       neg_targcomplete,                               /* Target completed negociation         */
-       neg_invalid                                     /* Negociation not supported            */
+       neg_wait,                                       /* Negotiate with device                */
+       neg_inprogress,                                 /* Negotiation sent                     */
+       neg_complete,                                   /* Negotiation complete                 */
+       neg_targcomplete,                               /* Target completed negotiation         */
+       neg_invalid                                     /* Negotiation not supported            */
 } neg_t;
 
 #define MAGIC  0x441296bdUL
index e2297b4c1b9e8ef546fb87cff49f9e67172d0026..9274c0677b9c1d38c8334a6a69c7dc66c2dd581b 100644 (file)
@@ -232,7 +232,7 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
  * Params   : buffer  - a buffer to write information to
  *           start   - a pointer into this buffer set by this routine to the start
  *                     of the required information.
- *           offset  - offset into information that we have read upto.
+ *           offset  - offset into information that we have read up to.
  *           length  - length of buffer
  *           inout   - 0 for reading, 1 for writing.
  * Returns  : length of data written to buffer.
index 88b2928b4d3b76a18cf9d8354d8350dd9f5f745c..ea439f93ed81132ad97cbb0885d9893160a6cf22 100644 (file)
@@ -464,7 +464,7 @@ static void free_all_tags(void)
  *
  * Parameters: Scsi_Cmnd *cmd
  *    The command to work on. The first scatter buffer's data are
- *    assumed to be already transfered into ptr/this_residual.
+ *    assumed to be already transferred into ptr/this_residual.
  */
 
 static void merge_contiguous_buffers(Scsi_Cmnd *cmd)
@@ -1720,7 +1720,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd, int tag)
  *     bytes to transfer, **data - pointer to data pointer.
  *
  * Returns : -1 when different phase is entered without transferring
- *     maximum number of bytes, 0 if all bytes are transfered or exit
+ *     maximum number of bytes, 0 if all bytes are transferred or exit
  *     is in same phase.
  *
  *     Also, *phase, *count, *data are modified in place.
@@ -1911,7 +1911,7 @@ static int do_abort(struct Scsi_Host *host)
  *     bytes to transfer, **data - pointer to data pointer.
  *
  * Returns : -1 when different phase is entered without transferring
- *     maximum number of bytes, 0 if all bytes or transfered or exit
+ *     maximum number of bytes, 0 if all bytes or transferred or exit
  *     is in same phase.
  *
  *     Also, *phase, *count, *data are modified in place.
index 76029d570beb8634c121c47f6a7eb5e906df9a14..7e6eca4a125e91f75c55280dbbc34ee3d03a9010 100644 (file)
@@ -1228,7 +1228,7 @@ TCM_5:                    /* isolation complete..  */
        printk(" \n%x %x %x %s\n ",assignid_map,mbuf[0],mbuf[1],&mbuf[2]); */
        i = 15;
        j = mbuf[0];
-       if ((j & 0x20) != 0) {  /* bit5=1:ID upto 7      */
+       if ((j & 0x20) != 0) {  /* bit5=1:ID up to 7      */
                i = 7;
        }
        if ((j & 0x06) == 0) {  /* IDvalid?             */
index 5218de4ab35a35b2b6817dd591535f025507f32a..fbd1dc2c15f7fb9e3c9193b0c6bdce92585fc0d5 100644 (file)
@@ -877,7 +877,7 @@ struct be_all_if_id {
                                                 */
 #define CXN_KILLED_PDU_SIZE_EXCEEDS_DSL 3      /* Connection got invalidated
                                                 * internally
-                                                * due to a recieved PDU
+                                                * due to a received PDU
                                                 * size > DSL
                                                 */
 #define CXN_KILLED_BURST_LEN_MISMATCH   4      /* Connection got invalidated
@@ -886,7 +886,7 @@ struct be_all_if_id {
                                                 * FBL/MBL.
                                                 */
 #define CXN_KILLED_AHS_RCVD            5       /* Connection got invalidated
-                                                * internally due to a recieved
+                                                * internally due to a received
                                                 * PDU Hdr that has
                                                 * AHS */
 #define CXN_KILLED_HDR_DIGEST_ERR      6       /* Connection got invalidated
@@ -899,12 +899,12 @@ struct be_all_if_id {
                                                 * pdu hdr
                                                 */
 #define CXN_KILLED_STALE_ITT_TTT_RCVD  8       /* Connection got invalidated
-                                                * internally due to a recieved
+                                                * internally due to a received
                                                 * ITT/TTT that does not belong
                                                 * to this Connection
                                                 */
 #define CXN_KILLED_INVALID_ITT_TTT_RCVD 9      /* Connection got invalidated
-                                                * internally due to recieved
+                                                * internally due to received
                                                 * ITT/TTT value > Max
                                                 * Supported ITTs/TTTs
                                                 */
@@ -936,21 +936,21 @@ struct be_all_if_id {
                                                 * index.
                                                 */
 #define CXN_KILLED_OVER_RUN_RESIDUAL   16      /* Command got invalidated
-                                                * internally due to recived
+                                                * internally due to received
                                                 * command has residual
                                                 * over run bytes.
                                                 */
 #define CXN_KILLED_UNDER_RUN_RESIDUAL  17      /* Command got invalidated
-                                                * internally due to recived
+                                                * internally due to received
                                                 * command has residual under
                                                 * run bytes.
                                                 */
 #define CMD_KILLED_INVALID_STATSN_RCVD 18      /* Command got invalidated
-                                                * internally due to a recieved
+                                                * internally due to a received
                                                 * PDU has an invalid StatusSN
                                                 */
 #define CMD_KILLED_INVALID_R2T_RCVD    19      /* Command got invalidated
-                                                * internally due to a recieved
+                                                * internally due to a received
                                                 * an R2T with some invalid
                                                 * fields in it
                                                 */
@@ -973,7 +973,7 @@ struct be_all_if_id {
                                                 */
 #define CMD_CXN_KILLED_INVALID_DATASN_RCVD 24  /* Command got invalidated
                                                 * internally due to a
-                                                * recieved PDU has an invalid
+                                                * received PDU has an invalid
                                                 * DataSN
                                                 */
 #define CXN_INVALIDATE_NOTIFY          25      /* Connection invalidation
index 1cd5c8b0618d5a3ae7a9575a08b601429f2d0805..91838c51fb76458fc573958581f7453ee1870952 100644 (file)
@@ -355,7 +355,7 @@ bfa_msix_lpu_err(struct bfa_s *bfa, int vec)
                        /*
                         * ERR_PSS bit needs to be cleared as well in case
                         * interrups are shared so driver's interrupt handler is
-                        * still called eventhough it is already masked out.
+                        * still called even though it is already masked out.
                         */
                        curr_value = readl(
                                        bfa->ioc.ioc_regs.pss_err_status_reg);
index 648c84176722ce108d556ffc4efd4c883ee16b34..207f598877c74d3d1532b182a5392b8d22313c66 100644 (file)
@@ -145,7 +145,7 @@ struct bfa_fw_io_stats_s {
        u32     ioh_data_oor_event;     /*  Data out of range */
        u32     ioh_ro_ooo_event;       /*  Relative offset out of range */
        u32     ioh_cpu_owned_event;    /*  IOH hit -iost owned by f/w */
-       u32     ioh_unexp_frame_event;  /*  unexpected frame recieved
+       u32     ioh_unexp_frame_event;  /*  unexpected frame received
                                                 *   count */
        u32     ioh_err_int;            /*  IOH error int during data-phase
                                                 *   for scsi write
@@ -566,8 +566,8 @@ struct bfa_itnim_iostats_s {
        u32     input_reqs;             /*  Data in-bound requests      */
        u32     output_reqs;            /*  Data out-bound requests     */
        u32     io_comps;               /*  Total IO Completions        */
-       u32     wr_throughput;          /*  Write data transfered in bytes */
-       u32     rd_throughput;          /*  Read data transfered in bytes  */
+       u32     wr_throughput;          /*  Write data transferred in bytes */
+       u32     rd_throughput;          /*  Read data transferred in bytes  */
 
        u32     iocomp_ok;              /*  Slowpath IO completions     */
        u32     iocomp_underrun;        /*  IO underrun         */
index 8e764fae8dc9fb90d4d9bc8cc357bf562ac8a2fc..bf0067e0fd0da5592401e57e36fcaf5e7ca1b72f 100644 (file)
@@ -315,7 +315,7 @@ struct fc_plogi_csp_s {
                        query_dbc:1,
                        hg_supp:1;
 #endif
-       __be16          rxsz;           /* recieve data_field size */
+       __be16          rxsz;           /* receive data_field size */
        __be16          conseq;
        __be16          ro_bitmap;
        __be32          e_d_tov;
index f674f9318629c71f3bf97a0c4c072175268303e4..9b43ca4b67788cd133880b2c647d75bb8859a877 100644 (file)
@@ -1033,7 +1033,7 @@ bfa_fcs_fabric_delvport(struct bfa_fcs_fabric_s *fabric,
 
 
 /*
- * Lookup for a vport withing a fabric given its pwwn
+ * Lookup for a vport within a fabric given its pwwn
  */
 struct bfa_fcs_vport_s *
 bfa_fcs_fabric_vport_lookup(struct bfa_fcs_fabric_s *fabric, wwn_t pwwn)
index 0fd63168573f2bb42d2318917fcaf00026a049dd..61cdce4bd913031342baddcdf4d65ea2cbcabb99 100644 (file)
@@ -705,7 +705,7 @@ enum rport_event {
        RPSM_EVENT_ADDRESS_CHANGE = 15, /*  Rport's PID has changed     */
        RPSM_EVENT_ADDRESS_DISC = 16,   /*  Need to Discover rport's PID */
        RPSM_EVENT_PRLO_RCVD   = 17,    /*  PRLO from remote device     */
-       RPSM_EVENT_PLOGI_RETRY = 18,    /*  Retry PLOGI continously */
+       RPSM_EVENT_PLOGI_RETRY = 18,    /*  Retry PLOGI continuously */
 };
 
 /*
index 43fa986bb5860b5d932365036dbf8098867b20a5..1d6be8c144734a085bb7c90f7a5b5703f876557f 100644 (file)
@@ -1149,7 +1149,7 @@ bfa_fcs_lport_fdmi_sm_offline(struct bfa_fcs_lport_fdmi_s *fdmi,
                } else {
                        /*
                         * For a base port, we should first register the HBA
-                        * atribute. The HBA attribute also contains the base
+                        * attribute. The HBA attribute also contains the base
                         *  port registration.
                         */
                        bfa_sm_set_state(fdmi,
index 1d34921f88bf97348f0e086a71b338c5ecdce8c6..16d9a5f61c18b1151e31ba9d546f92cd7820ff5b 100644 (file)
@@ -1035,7 +1035,7 @@ bfa_fcxp_free(struct bfa_fcxp_s *fcxp)
  * @param[in]  rport   BFA rport pointer. Could be left NULL for WKA rports
  * @param[in]  vf_id   virtual Fabric ID
  * @param[in]  lp_tag  lport tag
- * @param[in]  cts     use Continous sequence
+ * @param[in]  cts     use Continuous sequence
  * @param[in]  cos     fc Class of Service
  * @param[in]  reqlen  request length, does not include FCHS length
  * @param[in]  fchs    fc Header Pointer. The header content will be copied
@@ -5022,7 +5022,7 @@ bfa_uf_start(struct bfa_s *bfa)
 }
 
 /*
- * Register handler for all unsolicted recieve frames.
+ * Register handler for all unsolicted receive frames.
  *
  * @param[in]  bfa             BFA instance
  * @param[in]  ufrecv  receive handler function
index 331ad992a5812c53f02a4f0cf2d1e0911b2965da..5902a45c080fe8fc6fac75a2fa6b8122b460e5d3 100644 (file)
@@ -127,7 +127,7 @@ struct bfa_fcxp_req_info_s {
                                         * rport nexus is established
                                         */
        struct fchs_s   fchs;   /*  request FC header structure */
-       u8              cts;    /*  continous sequence */
+       u8              cts;    /*  continuous sequence */
        u8              class;  /*  FC class for the request/response */
        u16     max_frmsz;      /*  max send frame size */
        u16     vf_id;  /*  vsan tag if applicable */
index 44524cf55d3396b6c2339357bd3bdeebd400c390..0fd510a015616aec6c3031692ec59e47c89b6794 100644 (file)
@@ -1278,7 +1278,7 @@ bfad_setup_intr(struct bfad_s *bfad)
                         * interrupts into one vector, so even if we
                         * can try to request less vectors, we don't
                         * know how to associate interrupt events to
-                        *  vectors. Linux doesn't dupicate vectors
+                        *  vectors. Linux doesn't duplicate vectors
                         * in the MSIX table for this case.
                         */
 
index 69d031d9846990eca3b3cb61ad90339c10de0dc1..97a61b4d81b7eeb5f9b906ce6ad3ec44b1542d2f 100644 (file)
@@ -898,7 +898,7 @@ struct fcoe_confqe {
 
 
 /*
- * FCoE conection data base
+ * FCoE connection data base
  */
 struct fcoe_conn_db {
 #if defined(__BIG_ENDIAN)
index 7a11a255157fba5b1f6f5a7392c680ac5e6ca537..52c358427ce21db7ee04cfaa4cd5c21aa3d1b019 100644 (file)
@@ -397,7 +397,7 @@ void bnx2fc_process_els_compl(struct bnx2fc_cmd *els_req,
                             &els_req->req_flags)) {
                BNX2FC_ELS_DBG("Timer context finished processing this "
                           "els - 0x%x\n", els_req->xid);
-               /* This IO doesnt receive cleanup completion */
+               /* This IO doesn't receive cleanup completion */
                kref_put(&els_req->refcount, bnx2fc_cmd_release);
                return;
        }
index d3fc302c241adb5d907bc43afa5fb95c0ef15e00..1decefbf32e348ac4d1530fdb0a31690ab480e92 100644 (file)
@@ -1273,7 +1273,7 @@ static void bnx2fc_lun_reset_cmpl(struct bnx2fc_cmd *io_req)
                                                 bnx2fc_cmd_release);
                                                        /* timer hold */
                                rc = bnx2fc_initiate_abts(cmd);
-                               /* abts shouldnt fail in this context */
+                               /* abts shouldn't fail in this context */
                                WARN_ON(rc != SUCCESS);
                        } else
                                printk(KERN_ERR PFX "lun_rst: abts already in"
@@ -1308,7 +1308,7 @@ static void bnx2fc_tgt_reset_cmpl(struct bnx2fc_cmd *io_req)
                                kref_put(&io_req->refcount,
                                         bnx2fc_cmd_release); /* timer hold */
                        rc = bnx2fc_initiate_abts(cmd);
-                       /* abts shouldnt fail in this context */
+                       /* abts shouldn't fail in this context */
                        WARN_ON(rc != SUCCESS);
 
                } else
index 7cc05e4e82d59e3a45f45fc4168dad91d4e06b05..a2e3830bd2688b8e07a08d5e7877d938f34a93c0 100644 (file)
@@ -395,7 +395,7 @@ void bnx2fc_rport_event_handler(struct fc_lport *lport,
                rp = rport->dd_data;
                if (rport->port_id == FC_FID_DIR_SERV) {
                        /*
-                        * bnx2fc_rport structure doesnt exist for
+                        * bnx2fc_rport structure doesn't exist for
                         * directory server.
                         * We should not come here, as lport will
                         * take care of fabric login
index 1da34c019b8a8f8bd71f54992948729b5d4d503f..f0b89513faed35704cb6c6ff02d1beb5ffc64407 100644 (file)
@@ -173,7 +173,7 @@ void bnx2i_arm_cq_event_coalescing(struct bnx2i_endpoint *ep, u8 action)
 
 /**
  * bnx2i_get_rq_buf - copy RQ buffer contents to driver buffer
- * @conn:              iscsi connection on which RQ event occured
+ * @conn:              iscsi connection on which RQ event occurred
  * @ptr:               driver buffer to which RQ buffer contents is to
  *                     be copied
  * @len:               length of valid data inside RQ buf
index 0a20fd5f7102237cadbf267f2eead60569462fe6..9267844519c99c7386a3a753843e798ccc3f4e62 100644 (file)
@@ -262,9 +262,9 @@ struct cxgbi_skb_tx_cb {
 enum cxgbi_skcb_flags {
        SKCBF_TX_NEED_HDR,      /* packet needs a header */
        SKCBF_RX_COALESCED,     /* received whole pdu */
-       SKCBF_RX_HDR,           /* recieved pdu header */
-       SKCBF_RX_DATA,          /* recieved pdu payload */
-       SKCBF_RX_STATUS,        /* recieved ddp status */
+       SKCBF_RX_HDR,           /* received pdu header */
+       SKCBF_RX_DATA,          /* received pdu payload */
+       SKCBF_RX_STATUS,        /* received ddp status */
        SKCBF_RX_DATA_DDPD,     /* pdu payload ddp'd */
        SKCBF_RX_HCRC_ERR,      /* header digest error */
        SKCBF_RX_DCRC_ERR,      /* data digest error */
index b0f8523e665f94d6d292a40a2e66bdd578462673..b10b3841535ce97cd765e6243ef8f3376deabeab 100644 (file)
@@ -235,7 +235,7 @@ struct ScsiReqBlk {
 
        u8 sg_count;                    /* No of HW sg entries for this request */
        u8 sg_index;                    /* Index of HW sg entry for this request */
-       size_t total_xfer_length;       /* Total number of bytes remaining to be transfered */
+       size_t total_xfer_length;       /* Total number of bytes remaining to be transferred */
        size_t request_length;          /* Total number of bytes in this request */
        /*
         * The sense buffer handling function, request_sense, uses
@@ -1774,7 +1774,7 @@ static void dc395x_handle_interrupt(struct AdapterCtlBlk *acb,
                dc395x_statev(acb, srb, &scsi_status);
 
                /* 
-                * if there were any exception occured scsi_status
+                * if there were any exception occurred scsi_status
                 * will be modify to bus free phase new scsi_status
                 * transfer out from ... previous dc395x_statev
                 */
@@ -1954,11 +1954,11 @@ static void sg_verify_length(struct ScsiReqBlk *srb)
 static void sg_update_list(struct ScsiReqBlk *srb, u32 left)
 {
        u8 idx;
-       u32 xferred = srb->total_xfer_length - left; /* bytes transfered */
+       u32 xferred = srb->total_xfer_length - left; /* bytes transferred */
        struct SGentry *psge = srb->segment_x + srb->sg_index;
 
        dprintkdbg(DBG_0,
-               "sg_update_list: Transfered %i of %i bytes, %i remain\n",
+               "sg_update_list: Transferred %i of %i bytes, %i remain\n",
                xferred, srb->total_xfer_length, left);
        if (xferred == 0) {
                /* nothing to update since we did not transfer any data */
@@ -1990,7 +1990,7 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left)
 
 
 /*
- * We have transfered a single byte (PIO mode?) and need to update
+ * We have transferred a single byte (PIO mode?) and need to update
  * the count of bytes remaining (total_xfer_length) and update the sg
  * entry to either point to next byte in the current sg entry, or of
  * already at the end to point to the start of the next sg entry
@@ -2029,7 +2029,7 @@ static void cleanup_after_transfer(struct AdapterCtlBlk *acb,
 
 
 /*
- * Those no of bytes will be transfered w/ PIO through the SCSI FIFO
+ * Those no of bytes will be transferred w/ PIO through the SCSI FIFO
  * Seems to be needed for unknown reasons; could be a hardware bug :-(
  */
 #define DC395x_LASTPIO 4
@@ -2256,7 +2256,7 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
                        DC395x_read32(acb, TRM_S1040_DMA_CXCNT),
                        srb->total_xfer_length, d_left_counter);
 #if DC395x_LASTPIO
-               /* KG: Less than or equal to 4 bytes can not be transfered via DMA, it seems. */
+               /* KG: Less than or equal to 4 bytes can not be transferred via DMA, it seems. */
                if (d_left_counter
                    && srb->total_xfer_length <= DC395x_LASTPIO) {
                        size_t left_io = srb->total_xfer_length;
index b38360e5fe4fa28f0fac24f9cb530b097fdcf4ea..fbf35e37701ef402fce936d133c1eb5fa5cb90b6 100644 (file)
@@ -617,7 +617,7 @@ struct ScsiInqData
 #define NTC_DO_SEND_START              0x08    /* Send start command SPINUP            */
 #define NTC_DO_DISCONNECT              0x04    /* Enable SCSI disconnect               */
 #define NTC_DO_SYNC_NEGO               0x02    /* Sync negotiation                     */
-#define NTC_DO_PARITY_CHK              0x01    /* (it sould define at NAC)             */
+#define NTC_DO_PARITY_CHK              0x01    /* (it should define at NAC)            */
                                                /* Parity check enable                  */
 
 /************************************************************************/
index 564e6ecd17c2d1feb7e9330aa129464f8b714bf0..0119b814779744ccfc448bceddcaac3a7e195fcc 100644 (file)
@@ -394,12 +394,14 @@ int scsi_dh_activate(struct request_queue *q, activate_complete fn, void *data)
        unsigned long flags;
        struct scsi_device *sdev;
        struct scsi_device_handler *scsi_dh = NULL;
+       struct device *dev = NULL;
 
        spin_lock_irqsave(q->queue_lock, flags);
        sdev = q->queuedata;
        if (sdev && sdev->scsi_dh_data)
                scsi_dh = sdev->scsi_dh_data->scsi_dh;
-       if (!scsi_dh || !get_device(&sdev->sdev_gendev) ||
+       dev = get_device(&sdev->sdev_gendev);
+       if (!scsi_dh || !dev ||
            sdev->sdev_state == SDEV_CANCEL ||
            sdev->sdev_state == SDEV_DEL)
                err = SCSI_DH_NOSYS;
@@ -410,12 +412,13 @@ int scsi_dh_activate(struct request_queue *q, activate_complete fn, void *data)
        if (err) {
                if (fn)
                        fn(data, err);
-               return err;
+               goto out;
        }
 
        if (scsi_dh->activate)
                err = scsi_dh->activate(sdev, fn, data);
-       put_device(&sdev->sdev_gendev);
+out:
+       put_device(dev);
        return err;
 }
 EXPORT_SYMBOL_GPL(scsi_dh_activate);
index 7cae0bc853901c01b9f5bfa3b1167b9150707239..42fe52902add9b81740643da4195899c9eff3f6b 100644 (file)
@@ -541,7 +541,7 @@ static int alua_check_sense(struct scsi_device *sdev,
  *
  * Evaluate the Target Port Group State.
  * Returns SCSI_DH_DEV_OFFLINED if the path is
- * found to be unuseable.
+ * found to be unusable.
  */
 static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
 {
@@ -620,7 +620,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
                break;
        case TPGS_STATE_OFFLINE:
        case TPGS_STATE_UNAVAILABLE:
-               /* Path unuseable for unavailable/offline */
+               /* Path unusable for unavailable/offline */
                err = SCSI_DH_DEV_OFFLINED;
                break;
        default:
index a90c4cb8ea8b29cb29abf267a1b74d5baf64ca35..a4aa1c31ff72ebbdd7faed93b79dcb72fc199e0d 100644 (file)
@@ -79,9 +79,9 @@
    typedef struct  {
 #endif
 
-   uSHORT       cylinders;      /* Upto 1024 */
-   uCHAR        heads;          /* Upto 255 */
-   uCHAR        sectors;        /* Upto 63 */
+   uSHORT       cylinders;      /* Up to 1024 */
+   uCHAR        heads;          /* Up to 255 */
+   uCHAR        sectors;        /* Up to 63 */
 
 #ifdef  __cplusplus
 
index 53925ac178fd1b13fd11747ec2fefa8033f00fa7..0eb4fe6a4c8a3e31c106e30dadd624634a8a6f80 100644 (file)
@@ -63,7 +63,7 @@
  *          ep:[y|n]      eisa_probe=[1|0]  CONFIG_EISA defined
  *          pp:[y|n]      pci_probe=[1|0]   CONFIG_PCI  defined
  *
- *          The default action is to perform probing if the corrisponding
+ *          The default action is to perform probing if the corresponding
  *          bus is configured and to skip probing otherwise.
  *
  *        + If pci_probe is in effect and a list of I/O  ports is specified
index c93f007e702f3767b94a5f393d5a04ef55603770..9d38be2a41f975fcdbd7a572388b6b7c03f4a2d9 100644 (file)
@@ -656,7 +656,7 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport,
                 * If non-FIP, we may have gotten an SID by accepting an FLOGI
                 * from a point-to-point connection.  Switch to using
                 * the source mac based on the SID.  The destination
-                * MAC in this case would have been set by receving the
+                * MAC in this case would have been set by receiving the
                 * FLOGI.
                 */
                if (fip->state == FIP_ST_NON_FIP) {
@@ -1876,7 +1876,7 @@ static void fcoe_ctlr_vn_send(struct fcoe_ctlr *fip,
  * fcoe_ctlr_vn_rport_callback - Event handler for rport events.
  * @lport: The lport which is receiving the event
  * @rdata: remote port private data
- * @event: The event that occured
+ * @event: The event that occurred
  *
  * Locking Note:  The rport lock must not be held when calling this function.
  */
index 69b7aa54f43fc2e6d943512d35dcb4b2e6de9c2a..643f6d500fe7ec409818a01c09a19fcc4e7f3fc7 100644 (file)
  Future Domain sold DOS BIOS source for $250 and the UN*X driver source was
  $750, but these required a non-disclosure agreement, so even if I could
  have afforded them, they would *not* have been useful for writing this
- publically distributable driver.  Future Domain technical support has
+ publicly distributable driver.  Future Domain technical support has
  provided some information on the phone and have sent a few useful FAXs.
  They have been much more helpful since they started to recognize that the
  word "Linux" refers to an operating system :-).
index 2b48d79bad94a4fd6f167900581370aa3f8b29d2..3c53c3478ee71224ada8d48488e665c6dd9e35c7 100644 (file)
@@ -411,7 +411,7 @@ int fnic_rq_cmpl_handler(struct fnic *fnic, int rq_work_to_do)
                        err = vnic_rq_fill(&fnic->rq[i], fnic_alloc_rq_frame);
                        if (err)
                                shost_printk(KERN_ERR, fnic->lport->host,
-                                            "fnic_alloc_rq_frame cant alloc"
+                                            "fnic_alloc_rq_frame can't alloc"
                                             " frame\n");
                }
                tot_rq_work_done += cur_work_done;
index 22d02404d15f6ce1a86a2b2fbccb852d8fd21003..538b31c2cf58037e96828e7dedfc87cf9074d44e 100644 (file)
@@ -1123,7 +1123,7 @@ void fnic_rport_exch_reset(struct fnic *fnic, u32 port_id)
                                            fc_lun.scsi_lun, io_req)) {
                        /*
                         * Revert the cmd state back to old state, if
-                        * it hasnt changed in between. This cmd will get
+                        * it hasn't changed in between. This cmd will get
                         * aborted later by scsi_eh, or cleaned up during
                         * lun reset
                         */
@@ -1208,7 +1208,7 @@ void fnic_terminate_rport_io(struct fc_rport *rport)
                                            fc_lun.scsi_lun, io_req)) {
                        /*
                         * Revert the cmd state back to old state, if
-                        * it hasnt changed in between. This cmd will get
+                        * it hasn't changed in between. This cmd will get
                         * aborted later by scsi_eh, or cleaned up during
                         * lun reset
                         */
index 427a56d3117e048f8823cc2084f139678d95b989..81182badfeb10f62c5e499c8d587198ac37fa696 100644 (file)
@@ -566,7 +566,7 @@ generic_NCR5380_biosparam(struct scsi_device *sdev, struct block_device *bdev,
  *     @dst: buffer to read into
  *     @len: buffer length
  *
- *     Perform a psuedo DMA mode read from an NCR53C400 or equivalent
+ *     Perform a pseudo DMA mode read from an NCR53C400 or equivalent
  *     controller
  */
  
@@ -650,7 +650,7 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst,
  *     @dst: buffer to read into
  *     @len: buffer length
  *
- *     Perform a psuedo DMA mode read from an NCR53C400 or equivalent
+ *     Perform a pseudo DMA mode read from an NCR53C400 or equivalent
  *     controller
  */
 
index 120a0625a7b5d1ba61f556a020ba79aa8abe3f5b..d969855ac64af24d350a78ac09d3f807c249bf6f 100644 (file)
@@ -895,7 +895,7 @@ typedef struct {
         u8          ldr_no;                 /* log. drive no. */
         u8          rw_attribs;             /* r/w attributes */
         u8          cluster_type;           /* cluster properties */
-        u8          media_changed;          /* Flag:MOUNT/UNMOUNT occured */
+        u8          media_changed;          /* Flag:MOUNT/UNMOUNT occurred */
         u32         start_sec;              /* start sector */
     } hdr[MAX_LDRIVES];                         /* host drives */
     struct {
index 2ce26eb7a1ec5c24062a2764181dfc3a8666c578..50bb54150a7899d015c75e403545ecfb78b619c1 100644 (file)
@@ -300,7 +300,7 @@ static int __devinit gvp11_probe(struct zorro_dev *z,
        /*
         * Rumors state that some GVP ram boards use the same product
         * code as the SCSI controllers. Therefore if the board-size
-        * is not 64KB we asume it is a ram board and bail out.
+        * is not 64KB we assume it is a ram board and bail out.
         */
        if (zorro_resource_len(z) != 0x10000)
                return -ENODEV;
index 99aa0e5699bc9369eb144fc2c144b4082ce15348..26cd9d1d7571b1674b5c6967c321b4abcc1dc531 100644 (file)
@@ -3,7 +3,7 @@
  * 
  * (The IMM is the embedded controller in the ZIP Plus drive.)
  * 
- * My unoffical company acronym list is 21 pages long:
+ * My unofficial company acronym list is 21 pages long:
  *      FLA:    Four letter acronym with built in facility for
  *              future expansion to five letters.
  */
index 9627d062e16b3e819c11db4b5865f2f7a4cb8d85..dd741bcd6ccd78e1190fad6dd688b826756b0cdf 100644 (file)
@@ -242,7 +242,7 @@ static u8 i91udftNvRam[64] =
 
 static u8 initio_rate_tbl[8] = /* fast 20      */
 {
-                               /* nanosecond devide by 4 */
+                               /* nanosecond divide by 4 */
        12,                     /* 50ns,  20M   */
        18,                     /* 75ns,  13.3M */
        25,                     /* 100ns, 10M   */
@@ -1917,7 +1917,7 @@ static int int_initio_scsi_rst(struct initio_host * host)
 }
 
 /**
- *     int_initio_scsi_resel   -       Reselection occured
+ *     int_initio_scsi_resel   -       Reselection occurred
  *     @host: InitIO host adapter
  *
  *     A SCSI reselection event has been signalled and the interrupt
index e58af9e95506c923a84bb7b3a98638a7147ba31e..219b901bdc25fc151246a293cb6424dc66af2191 100644 (file)
@@ -116,7 +116,7 @@ typedef struct {
 #define TUL_SBusId      0x89   /* 09 R   SCSI BUS ID                   */
 #define TUL_STimeOut    0x8A   /* 0A W   Sel/Resel Time Out Register   */
 #define TUL_SIdent      0x8A   /* 0A R   Identify Message Register     */
-#define TUL_SAvail      0x8A   /* 0A R   Availiable Counter Register   */
+#define TUL_SAvail      0x8A   /* 0A R   Available Counter Register   */
 #define TUL_SData       0x8B   /* 0B R/W SCSI data in/out              */
 #define TUL_SFifo       0x8C   /* 0C R/W FIFO                          */
 #define TUL_SSignal     0x90   /* 10 R/W SCSI signal in/out            */
@@ -389,7 +389,7 @@ struct scsi_ctrl_blk {
 /* Bit Definition for status */
 #define SCB_RENT        0x01
 #define SCB_PEND        0x02
-#define SCB_CONTIG      0x04   /* Contigent Allegiance */
+#define SCB_CONTIG      0x04   /* Contingent Allegiance */
 #define SCB_SELECT      0x08
 #define SCB_BUSY        0x10
 #define SCB_DONE        0x20
index b2511acd39bd3feeb7f87e6f956ffae6b8e73780..218f71a8726ea2538f42a519e50ea46c71864797 100644 (file)
 /*          - Fix path/name for scsi_hosts.h include for 2.6 kernels         */
 /*          - Fix sort order of 7k                                           */
 /*          - Remove 3 unused "inline" functions                             */
-/* 7.12.xx  - Use STATIC functions whereever possible                        */
+/* 7.12.xx  - Use STATIC functions wherever possible                        */
 /*          - Clean up deprecated MODULE_PARM calls                          */
 /* 7.12.05  - Remove Version Matching per IBM request                        */
 /*****************************************************************************/
@@ -1665,7 +1665,7 @@ ips_flash_copperhead(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb)
        int datasize;
 
        /* Trombone is the only copperhead that can do packet flash, but only
-        * for firmware. No one said it had to make sence. */
+        * for firmware. No one said it had to make sense. */
        if (IPS_IS_TROMBONE(ha) && pt->CoppCP.cmd.flashfw.type == IPS_FW_IMAGE) {
                if (ips_usrcmd(ha, pt, scb))
                        return IPS_SUCCESS;
index 4e49fbcfe8affffe92d9b8830d5f6b6160f7f11d..f2df0593332ba9ec0ed02de16a699e799bc21ed7 100644 (file)
@@ -1193,7 +1193,7 @@ typedef struct {
 #define IPS_VER_SEBRING "7.12.02"
 #define IPS_VER_KEYWEST "7.12.02"
 
-/* Compatability IDs for various adapters */
+/* Compatibility IDs for various adapters */
 #define IPS_COMPAT_UNKNOWN ""
 #define IPS_COMPAT_CURRENT "KW710"
 #define IPS_COMPAT_SERVERAID1 "2.25.01"
index a860452a8f714ecfe2ff4b96cd91e2e0165db4bd..3df985305f69eb3447827ff310063e4359009266 100644 (file)
@@ -295,7 +295,7 @@ static int iscsi_sw_tcp_xmit(struct iscsi_conn *conn)
                rc = iscsi_sw_tcp_xmit_segment(tcp_conn, segment);
                /*
                 * We may not have been able to send data because the conn
-                * is getting stopped. libiscsi will know so propogate err
+                * is getting stopped. libiscsi will know so propagate err
                 * for it to do the right thing.
                 */
                if (rc == -EAGAIN)
index 28231badd9e6f77fa4e06cbbbdc11eb420d9a7a2..77035a746f6027e5f232140349e7339c5901f2e9 100644 (file)
@@ -1042,7 +1042,7 @@ static void fc_exch_set_addr(struct fc_exch *ep,
 }
 
 /**
- * fc_seq_els_rsp_send() - Send an ELS response using infomation from
+ * fc_seq_els_rsp_send() - Send an ELS response using information from
  *                        the existing sequence/exchange.
  * @fp:              The received frame
  * @els_cmd:  The ELS command to be sent
@@ -1153,7 +1153,7 @@ static void fc_seq_send_ack(struct fc_seq *sp, const struct fc_frame *rx_fp)
  * fc_exch_send_ba_rjt() - Send BLS Reject
  * @rx_fp:  The frame being rejected
  * @reason: The reason the frame is being rejected
- * @explan: The explaination for the rejection
+ * @explan: The explanation for the rejection
  *
  * This is for rejecting BA_ABTS only.
  */
index b1b03af158bf651bd2a930bff74eeaadb94ef565..5b799a37ad0991dca76bf05b643ed5ef44cad341 100644 (file)
@@ -870,7 +870,7 @@ static void fc_fcp_resp(struct fc_fcp_pkt *fsp, struct fc_frame *fp)
                                fsp->scsi_resid = ntohl(rp_ex->fr_resid);
                                /*
                                 * The cmnd->underflow is the minimum number of
-                                * bytes that must be transfered for this
+                                * bytes that must be transferred for this
                                 * command.  Provided a sense condition is not
                                 * present, make sure the actual amount
                                 * transferred is at least the underflow value
@@ -1306,7 +1306,7 @@ static int fc_lun_reset(struct fc_lport *lport, struct fc_fcp_pkt *fsp,
 }
 
 /**
- * fc_tm_done() - Task Managment response handler
+ * fc_tm_done() - Task Management response handler
  * @seq: The sequence that the response is on
  * @fp:         The response frame
  * @arg: The FCP packet the response is for
index 8c08b210001d87357613cf7136c82f7abbf4bc28..906bbcad0e2d400786ad42d8ff1f412b8a66575a 100644 (file)
@@ -52,7 +52,7 @@
  * while making the callback. To ensure that the rport is not free'd while
  * processing the callback the rport callbacks are serialized through a
  * single-threaded workqueue. An rport would never be free'd while in a
- * callback handler becuase no other rport work in this queue can be executed
+ * callback handler because no other rport work in this queue can be executed
  * at the same time.
  *
  * When discovery succeeds or fails a callback is made to the lport as
@@ -163,7 +163,7 @@ static int fc_frame_drop(struct fc_lport *lport, struct fc_frame *fp)
  * fc_lport_rport_callback() - Event handler for rport events
  * @lport: The lport which is receiving the event
  * @rdata: private remote port data
- * @event: The event that occured
+ * @event: The event that occurred
  *
  * Locking Note: The rport lock should not be held when calling
  *              this function.
@@ -379,7 +379,7 @@ static void fc_lport_add_fc4_type(struct fc_lport *lport, enum fc_fh_type type)
 
 /**
  * fc_lport_recv_rlir_req() - Handle received Registered Link Incident Report.
- * @lport: Fibre Channel local port recieving the RLIR
+ * @lport: Fibre Channel local port receiving the RLIR
  * @fp:           The RLIR request frame
  *
  * Locking Note: The lport lock is expected to be held before calling
@@ -396,7 +396,7 @@ static void fc_lport_recv_rlir_req(struct fc_lport *lport, struct fc_frame *fp)
 
 /**
  * fc_lport_recv_echo_req() - Handle received ECHO request
- * @lport: The local port recieving the ECHO
+ * @lport: The local port receiving the ECHO
  * @fp:           ECHO request frame
  *
  * Locking Note: The lport lock is expected to be held before calling
@@ -432,7 +432,7 @@ static void fc_lport_recv_echo_req(struct fc_lport *lport,
 
 /**
  * fc_lport_recv_rnid_req() - Handle received Request Node ID data request
- * @lport: The local port recieving the RNID
+ * @lport: The local port receiving the RNID
  * @fp:           The RNID request frame
  *
  * Locking Note: The lport lock is expected to be held before calling
@@ -491,7 +491,7 @@ static void fc_lport_recv_rnid_req(struct fc_lport *lport,
 
 /**
  * fc_lport_recv_logo_req() - Handle received fabric LOGO request
- * @lport: The local port recieving the LOGO
+ * @lport: The local port receiving the LOGO
  * @fp:           The LOGO request frame
  *
  * Locking Note: The lport lock is exected to be held before calling
@@ -771,7 +771,7 @@ EXPORT_SYMBOL(fc_lport_set_local_id);
 
 /**
  * fc_lport_recv_flogi_req() - Receive a FLOGI request
- * @lport: The local port that recieved the request
+ * @lport: The local port that received the request
  * @rx_fp: The FLOGI frame
  *
  * A received FLOGI request indicates a point-to-point connection.
@@ -858,7 +858,7 @@ out:
  * if an rport should handle the request.
  *
  * Locking Note: This function should not be called with the lport
- *              lock held becuase it will grab the lock.
+ *              lock held because it will grab the lock.
  */
 static void fc_lport_recv_els_req(struct fc_lport *lport,
                                  struct fc_frame *fp)
@@ -925,7 +925,7 @@ struct fc4_prov fc_lport_els_prov = {
  * @fp: The frame the request is in
  *
  * Locking Note: This function should not be called with the lport
- *              lock held becuase it may grab the lock.
+ *              lock held because it may grab the lock.
  */
 static void fc_lport_recv_req(struct fc_lport *lport,
                              struct fc_frame *fp)
index f3f693b772ac17681b298872d69e5c2dd748882e..874e29d9533f901ee761358a92fc5b824e2c985c 100644 (file)
@@ -240,7 +240,7 @@ static int sas_ex_phy_discover_helper(struct domain_device *dev, u8 *disc_req,
                                       disc_resp, DISCOVER_RESP_SIZE);
                if (res)
                        return res;
-               /* This is detecting a failure to transmit inital
+               /* This is detecting a failure to transmit initial
                 * dev to host FIS as described in section G.5 of
                 * sas-2 r 04b */
                dr = &((struct smp_resp *)disc_resp)->disc;
index 4e0faa00b96fff4ccd3406ffdd55abecf9bd4645..17d789325f4014b39aa3807de7c1d7f1b47bf333 100644 (file)
@@ -4515,7 +4515,7 @@ static FC_RPORT_ATTR(field, S_IRUGO, lpfc_show_rport_##field, NULL)
  * Description:
  * This function is called by the transport after the @fc_vport's symbolic name
  * has been changed. This function re-registers the symbolic name with the
- * switch to propogate the change into the fabric if the vport is active.
+ * switch to propagate the change into the fabric if the vport is active.
  **/
 static void
 lpfc_set_vport_symbolic_name(struct fc_vport *fc_vport)
index 793b9f1131fbb446e13102eeac0a8d4b5b04ea38..77b2871d96b7f5bafba168dd125437c598fc2d4e 100644 (file)
@@ -1939,7 +1939,7 @@ out:
  * @rxxri: Receive exchange id
  * @len: Number of data bytes
  *
- * This function allocates and posts a data buffer of sufficient size to recieve
+ * This function allocates and posts a data buffer of sufficient size to receive
  * an unsolicted CT command.
  **/
 static int lpfcdiag_loop_post_rxbufs(struct lpfc_hba *phba, uint16_t rxxri,
index a753581509d6d22ddba46d76b669fcc5603fa6f9..3d967741c70849a437532e02dbd90d0c5a5f6bef 100644 (file)
@@ -908,7 +908,7 @@ lpfc_debugfs_dumpData_open(struct inode *inode, struct file *file)
        if (!debug)
                goto out;
 
-       /* Round to page boundry */
+       /* Round to page boundary */
        printk(KERN_ERR "9059 BLKGRD:  %s: _dump_buf_data=0x%p\n",
                        __func__, _dump_buf_data);
        debug->buffer = _dump_buf_data;
@@ -938,7 +938,7 @@ lpfc_debugfs_dumpDif_open(struct inode *inode, struct file *file)
        if (!debug)
                goto out;
 
-       /* Round to page boundry */
+       /* Round to page boundary */
        printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%s\n",
                __func__, _dump_buf_dif, file->f_dentry->d_name.name);
        debug->buffer = _dump_buf_dif;
@@ -2158,7 +2158,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
                        debugfs_create_dir(name, phba->hba_debugfs_root);
                if (!vport->vport_debugfs_root) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
-                                        "0417 Cant create debugfs\n");
+                                        "0417 Can't create debugfs\n");
                        goto debug_failed;
                }
                atomic_inc(&phba->debugfs_vport_count);
@@ -2211,7 +2211,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
                                 vport, &lpfc_debugfs_op_nodelist);
        if (!vport->debug_nodelist) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
-                                "0409 Cant create debugfs nodelist\n");
+                                "0409 Can't create debugfs nodelist\n");
                goto debug_failed;
        }
 
index 735028fedda50592f58465686a473274b33c14f3..d34b69f9cdb17d5efd288b55da1fa1543ac965f6 100644 (file)
@@ -102,7 +102,7 @@ lpfc_els_chk_latt(struct lpfc_vport *vport)
                         phba->pport->port_state);
 
        /* CLEAR_LA should re-enable link attention events and
-        * we should then imediately take a LATT event. The
+        * we should then immediately take a LATT event. The
         * LATT processing should call lpfc_linkdown() which
         * will cleanup any left over in-progress discovery
         * events.
@@ -1599,7 +1599,7 @@ out:
  * This routine is the completion callback function for issuing the Port
  * Login (PLOGI) command. For PLOGI completion, there must be an active
  * ndlp on the vport node list that matches the remote node ID from the
- * PLOGI reponse IOCB. If such ndlp does not exist, the PLOGI is simply
+ * PLOGI response IOCB. If such ndlp does not exist, the PLOGI is simply
  * ignored and command IOCB released. The PLOGI response IOCB status is
  * checked for error conditons. If there is error status reported, PLOGI
  * retry shall be attempted by invoking the lpfc_els_retry() routine.
index 154c715fb3af5dcda71b3085b7260ccaff39f25d..301498301a8f339ef9a44e33eae94de6bddba09f 100644 (file)
@@ -739,7 +739,7 @@ lpfc_do_work(void *p)
 
 /*
  * This is only called to handle FC worker events. Since this a rare
- * occurance, we allocate a struct lpfc_work_evt structure here instead of
+ * occurrence, we allocate a struct lpfc_work_evt structure here instead of
  * embedding it in the IOCB.
  */
 int
@@ -1348,7 +1348,7 @@ lpfc_register_fcf(struct lpfc_hba *phba)
        int rc;
 
        spin_lock_irq(&phba->hbalock);
-       /* If the FCF is not availabe do nothing. */
+       /* If the FCF is not available do nothing. */
        if (!(phba->fcf.fcf_flag & FCF_AVAILABLE)) {
                phba->hba_flag &= ~(FCF_TS_INPROG | FCF_RR_INPROG);
                spin_unlock_irq(&phba->hbalock);
@@ -1538,7 +1538,7 @@ lpfc_match_fcf_conn_list(struct lpfc_hba *phba,
 
                /*
                 * If user did not specify any addressing mode, or if the
-                * prefered addressing mode specified by user is not supported
+                * preferred addressing mode specified by user is not supported
                 * by FCF, allow fabric to pick the addressing mode.
                 */
                *addr_mode = bf_get(lpfc_fcf_record_mac_addr_prov,
@@ -1553,7 +1553,7 @@ lpfc_match_fcf_conn_list(struct lpfc_hba *phba,
                                FCFCNCT_AM_SPMA) ?
                                LPFC_FCF_SPMA : LPFC_FCF_FPMA;
                /*
-                * If the user specified a prefered address mode, use the
+                * If the user specified a preferred address mode, use the
                 * addr mode only if FCF support the addr_mode.
                 */
                else if ((conn_entry->conn_rec.flags & FCFCNCT_AM_VALID) &&
@@ -3117,7 +3117,7 @@ lpfc_mbx_cmpl_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
                 * back at reg login state so this
                 * mbox needs to be ignored becase
                 * there is another reg login in
-                * proccess.
+                * process.
                 */
                spin_lock_irq(shost->host_lock);
                ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL;
@@ -4477,7 +4477,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
        if ((vport->fc_flag & FC_RSCN_MODE) &&
            !(vport->fc_flag & FC_NDISC_ACTIVE)) {
                if (lpfc_rscn_payload_check(vport, did)) {
-                       /* If we've already recieved a PLOGI from this NPort
+                       /* If we've already received a PLOGI from this NPort
                         * we don't need to try to discover it again.
                         */
                        if (ndlp->nlp_flag & NLP_RCV_PLOGI)
@@ -4493,7 +4493,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport, uint32_t did)
                } else
                        ndlp = NULL;
        } else {
-               /* If we've already recieved a PLOGI from this NPort,
+               /* If we've already received a PLOGI from this NPort,
                 * or we are already in the process of discovery on it,
                 * we don't need to try to discover it again.
                 */
@@ -5756,7 +5756,7 @@ lpfc_read_fcoe_param(struct lpfc_hba *phba,
  * @size: Size of the data buffer.
  * @rec_type: Record type to be searched.
  *
- * This function searches config region data to find the begining
+ * This function searches config region data to find the beginning
  * of the record specified by record_type. If record found, this
  * function return pointer to the record else return NULL.
  */
index e6ebe516cfbb0ac1619397106bd4f1cb0f3bb15b..505f88443b5c401559947e5eb0b9b365a15432f4 100644 (file)
@@ -4466,7 +4466,7 @@ lpfc_sli4_driver_resource_unset(struct lpfc_hba *phba)
 }
 
 /**
- * lpfc_init_api_table_setup - Set up init api fucntion jump table
+ * lpfc_init_api_table_setup - Set up init api function jump table
  * @phba: The hba struct for which this call is being executed.
  * @dev_grp: The HBA PCI-Device group number.
  *
@@ -4850,7 +4850,7 @@ out_free_mem:
  *
  * Return codes
  *     0 - successful
- *     -ENOMEM - No availble memory
+ *     -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 int
@@ -5730,7 +5730,7 @@ lpfc_destroy_bootstrap_mbox(struct lpfc_hba *phba)
  *
  * Return codes
  *     0 - successful
- *     -ENOMEM - No availble memory
+ *     -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 static int
@@ -5835,7 +5835,7 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
  *
  * Return codes
  *     0 - successful
- *     -ENOMEM - No availble memory
+ *     -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 static int
@@ -5894,7 +5894,7 @@ lpfc_setup_endian_order(struct lpfc_hba *phba)
  *
  * Return codes
  *      0 - successful
- *      -ENOMEM - No availble memory
+ *      -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 static int
@@ -6189,7 +6189,7 @@ out_error:
  *
  * Return codes
  *      0 - successful
- *      -ENOMEM - No availble memory
+ *      -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 static void
@@ -6253,7 +6253,7 @@ lpfc_sli4_queue_destroy(struct lpfc_hba *phba)
  *
  * Return codes
  *      0 - successful
- *      -ENOMEM - No availble memory
+ *      -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 int
@@ -6498,7 +6498,7 @@ out_error:
  *
  * Return codes
  *      0 - successful
- *      -ENOMEM - No availble memory
+ *      -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 void
@@ -6543,7 +6543,7 @@ lpfc_sli4_queue_unset(struct lpfc_hba *phba)
  *
  * Return codes
  *      0 - successful
- *      -ENOMEM - No availble memory
+ *      -ENOMEM - No available memory
  **/
 static int
 lpfc_sli4_cq_event_pool_create(struct lpfc_hba *phba)
@@ -6704,7 +6704,7 @@ lpfc_sli4_cq_event_release_all(struct lpfc_hba *phba)
  *
  * Return codes
  *      0 - successful
- *      -ENOMEM - No availble memory
+ *      -ENOMEM - No available memory
  *      -EIO - The mailbox failed to complete successfully.
  **/
 int
index dba32dfdb59b2f6fd7663922547ac6a9447fc368..fbab9734e9b4e94560c75165c07530b25e3131e8 100644 (file)
@@ -1834,7 +1834,7 @@ lpfc_sli4_mbox_opcode_get(struct lpfc_hba *phba, struct lpfcMboxq *mbox)
  * @fcf_index: index to fcf table.
  *
  * This routine routine allocates and constructs non-embedded mailbox command
- * for reading a FCF table entry refered by @fcf_index.
+ * for reading a FCF table entry referred by @fcf_index.
  *
  * Return: pointer to the mailbox command constructed if successful, otherwise
  * NULL.
index f3cfbe2ce98697c22c4fa3970b30fb5cd8eededc..f2b1bbcb196ff4e0e6a023427850e9db1277ae5f 100644 (file)
@@ -50,7 +50,7 @@
  * and subcategory. The event type must come first.
  * The subcategory further defines the data that follows in the rest
  * of the payload. Each category will have its own unique header plus
- * any addtional data unique to the subcategory.
+ * any additional data unique to the subcategory.
  * The payload sent via the fc transport is one-way driver->application.
  */
 
index 52b35159fc352d7b27c3f7ee02cd9b1873d7cd7b..0d92d4205ea617908efad357da8ddf3aeb5229ae 100644 (file)
@@ -658,7 +658,7 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
        return 0;
 }
 /**
- * lpfc_release_rpi - Release a RPI by issueing unreg_login mailbox cmd.
+ * lpfc_release_rpi - Release a RPI by issuing unreg_login mailbox cmd.
  * @phba : Pointer to lpfc_hba structure.
  * @vport: Pointer to lpfc_vport structure.
  * @rpi  : rpi to be release.
index 2b962b020cfb28493c96c03de358a9ad1fb530a4..fe7cc84e773beaf6b60d0e15ce44dd7c75991ec5 100644 (file)
@@ -577,7 +577,7 @@ lpfc_new_scsi_buf_s3(struct lpfc_vport *vport, int num_to_alloc)
                        iocb->un.fcpi64.bdl.addrHigh = 0;
                        iocb->ulpBdeCount = 0;
                        iocb->ulpLe = 0;
-                       /* fill in responce BDE */
+                       /* fill in response BDE */
                        iocb->unsli3.fcp_ext.rbde.tus.f.bdeFlags =
                                                        BUFF_TYPE_BDE_64;
                        iocb->unsli3.fcp_ext.rbde.tus.f.bdeSize =
@@ -1217,10 +1217,10 @@ lpfc_scsi_prep_dma_buf_s3(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd)
                                     (2 * sizeof(struct ulp_bde64)));
                        data_bde->addrHigh = putPaddrHigh(physaddr);
                        data_bde->addrLow = putPaddrLow(physaddr);
-                       /* ebde count includes the responce bde and data bpl */
+                       /* ebde count includes the response bde and data bpl */
                        iocb_cmd->unsli3.fcp_ext.ebde_count = 2;
                } else {
-                       /* ebde count includes the responce bde and data bdes */
+                       /* ebde count includes the response bde and data bdes */
                        iocb_cmd->unsli3.fcp_ext.ebde_count = (num_bde + 1);
                }
        } else {
@@ -2380,7 +2380,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
                }
                /*
                 * The cmnd->underflow is the minimum number of bytes that must
-                * be transfered for this command.  Provided a sense condition
+                * be transferred for this command.  Provided a sense condition
                 * is not present, make sure the actual amount transferred is at
                 * least the underflow value or fail.
                 */
@@ -2873,7 +2873,7 @@ lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_vport *vport,
 }
 
 /**
- * lpfc_scsi_api_table_setup - Set up scsi api fucntion jump table
+ * lpfc_scsi_api_table_setup - Set up scsi api function jump table
  * @phba: The hba struct for which this call is being executed.
  * @dev_grp: The HBA PCI-Device group number.
  *
index 5932273870a593b044d2cd77a3ac22a5b4996453..ce645b20a6ad3eda03f03c5ccc1059406476d1f2 100644 (file)
@@ -130,7 +130,7 @@ struct lpfc_scsi_buf {
        dma_addr_t nonsg_phys;  /* Non scatter-gather physical address. */
 
        /*
-        * data and dma_handle are the kernel virutal and bus address of the
+        * data and dma_handle are the kernel virtual and bus address of the
         * dma-able buffer containing the fcp_cmd, fcp_rsp and a scatter
         * gather bde list that supports the sg_tablesize value.
         */
index 4746dcd756dd0bcb493f7e99accf88f184c18e1f..dacabbe0a5861652e0cb9aa4c4014390c83c7b79 100644 (file)
@@ -2817,7 +2817,7 @@ void lpfc_poll_eratt(unsigned long ptr)
  * This function is called from the interrupt context when there is a ring
  * event for the fcp ring. The caller does not hold any lock.
  * The function processes each response iocb in the response ring until it
- * finds an iocb with LE bit set and chains all the iocbs upto the iocb with
+ * finds an iocb with LE bit set and chains all the iocbs up to the iocb with
  * LE bit set. The function will call the completion handler of the command iocb
  * if the response iocb indicates a completion for a command iocb or it is
  * an abort completion. The function will call lpfc_sli_process_unsol_iocb
@@ -5117,7 +5117,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba)
 
        /* Setting state unknown so lpfc_sli_abort_iocb_ring
         * would get IOCB_ERROR from lpfc_sli_issue_iocb, allowing
-        * it to fail all oustanding SCSI IO.
+        * it to fail all outstanding SCSI IO.
         */
        spin_lock_irq(&phba->pport->work_port_lock);
        phba->pport->work_port_events &= ~WORKER_MBOX_TMO;
@@ -6031,7 +6031,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag)
 }
 
 /**
- * lpfc_mbox_api_table_setup - Set up mbox api fucntion jump table
+ * lpfc_mbox_api_table_setup - Set up mbox api function jump table
  * @phba: The hba struct for which this call is being executed.
  * @dev_grp: The HBA PCI-Device group number.
  *
@@ -6847,7 +6847,7 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number,
 }
 
 /**
- * lpfc_sli_api_table_setup - Set up sli api fucntion jump table
+ * lpfc_sli_api_table_setup - Set up sli api function jump table
  * @phba: The hba struct for which this call is being executed.
  * @dev_grp: The HBA PCI-Device group number.
  *
@@ -7521,7 +7521,7 @@ lpfc_sli_ring_taggedbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
        struct lpfc_dmabuf *mp, *next_mp;
        struct list_head *slp = &pring->postbufq;
 
-       /* Search postbufq, from the begining, looking for a match on tag */
+       /* Search postbufq, from the beginning, looking for a match on tag */
        spin_lock_irq(&phba->hbalock);
        list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) {
                if (mp->buffer_tag == tag) {
@@ -7565,7 +7565,7 @@ lpfc_sli_ringpostbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
        struct lpfc_dmabuf *mp, *next_mp;
        struct list_head *slp = &pring->postbufq;
 
-       /* Search postbufq, from the begining, looking for a match on phys */
+       /* Search postbufq, from the beginning, looking for a match on phys */
        spin_lock_irq(&phba->hbalock);
        list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) {
                if (mp->phys == phys) {
@@ -8438,7 +8438,7 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba)
  * for possible error attention events. The caller must hold the hostlock
  * with spin_lock_irq().
  *
- * This fucntion returns 1 when there is Error Attention in the Host Attention
+ * This function returns 1 when there is Error Attention in the Host Attention
  * Register and returns 0 otherwise.
  **/
 static int
@@ -8491,7 +8491,7 @@ unplug_err:
  * for possible error attention events. The caller must hold the hostlock
  * with spin_lock_irq().
  *
- * This fucntion returns 1 when there is Error Attention in the Host Attention
+ * This function returns 1 when there is Error Attention in the Host Attention
  * Register and returns 0 otherwise.
  **/
 static int
@@ -8581,7 +8581,7 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba)
  * This function is called from timer soft interrupt context to check HBA's
  * error attention register bit for error attention events.
  *
- * This fucntion returns 1 when there is Error Attention in the Host Attention
+ * This function returns 1 when there is Error Attention in the Host Attention
  * Register and returns 0 otherwise.
  **/
 int
@@ -9684,7 +9684,7 @@ out:
  * @cq: Pointer to the completion queue.
  * @wcqe: Pointer to a completion queue entry.
  *
- * This routine process a slow-path work-queue or recieve queue completion queue
+ * This routine process a slow-path work-queue or receive queue completion queue
  * entry.
  *
  * Return: true if work posted to worker thread, otherwise false.
@@ -12971,7 +12971,7 @@ lpfc_sli4_build_dflt_fcf_record(struct lpfc_hba *phba,
  * record and processing it one at a time starting from the @fcf_index
  * for initial FCF discovery or fast FCF failover rediscovery.
  *
- * Return 0 if the mailbox command is submitted sucessfully, none 0
+ * Return 0 if the mailbox command is submitted successfully, none 0
  * otherwise.
  **/
 int
@@ -13032,7 +13032,7 @@ fail_fcf_scan:
  * This routine is invoked to read an FCF record indicated by @fcf_index
  * and to use it for FLOGI roundrobin FCF failover.
  *
- * Return 0 if the mailbox command is submitted sucessfully, none 0
+ * Return 0 if the mailbox command is submitted successfully, none 0
  * otherwise.
  **/
 int
@@ -13078,7 +13078,7 @@ fail_fcf_read:
  * This routine is invoked to read an FCF record indicated by @fcf_index to
  * determine whether it's eligible for FLOGI roundrobin failover list.
  *
- * Return 0 if the mailbox command is submitted sucessfully, none 0
+ * Return 0 if the mailbox command is submitted successfully, none 0
  * otherwise.
  **/
 int
index c212694a97145ef626e5a9095d081784eba461e3..f2684dd09ed0d4e04d1fdba58f389bd113ef5148 100644 (file)
@@ -284,7 +284,7 @@ mega_query_adapter(adapter_t *adapter)
 
        adapter->host->max_id = 16;     /* max targets per channel */
 
-       adapter->host->max_lun = 7;     /* Upto 7 luns for non disk devices */
+       adapter->host->max_lun = 7;     /* Up to 7 luns for non disk devices */
 
        adapter->host->cmd_per_lun = max_cmd_per_lun;
 
@@ -3734,7 +3734,7 @@ mega_m_to_n(void __user *arg, nitioctl_t *uioc)
         * check is the application conforms to NIT. We do not have to do much
         * in that case.
         * We exploit the fact that the signature is stored in the very
-        * begining of the structure.
+        * beginning of the structure.
         */
 
        if( copy_from_user(signature, arg, 7) )
index 853411911b2e0166d9a263b94f2c3383bb6c04cb..9a7897f8ca4375a7d4e9786b6c7b2daabe3aab86 100644 (file)
@@ -532,9 +532,9 @@ struct uioctl_t {
 
 /*
  * struct mcontroller is used to pass information about the controllers in the
- * system. Its upto the application how to use the information. We are passing
+ * system. Its up to the application how to use the information. We are passing
  * as much info about the cards as possible and useful. Before issuing the
- * call to find information about the cards, the applicaiton needs to issue a
+ * call to find information about the cards, the application needs to issue a
  * ioctl first to find out the number of controllers in the system.
  */
 #define MAX_CONTROLLERS 32
@@ -804,7 +804,7 @@ typedef struct {
        unsigned long           base;
        void __iomem            *mmio_base;
 
-       /* mbox64 with mbox not aligned on 16-byte boundry */
+       /* mbox64 with mbox not aligned on 16-byte boundary */
        mbox64_t        *una_mbox64;
        dma_addr_t      una_mbox64_dma;
 
index ce2487a888edd00af7af742ea6ba05126aac0243..e01c6f7c2caceae39dac634ee425bb794fdfdad4 100644 (file)
@@ -660,7 +660,7 @@ typedef struct {
  * @lparam     : logical drives parameters
  * @span       : span
  *
- * 8-LD logical drive with upto 8 spans
+ * 8-LD logical drive with up to 8 spans
  */
 typedef struct {
        logdrv_param_t  lparam;
@@ -673,7 +673,7 @@ typedef struct {
  * @lparam     : logical drives parameters
  * @span       : span
  *
- * 8-LD logical drive with upto 4 spans
+ * 8-LD logical drive with up to 4 spans
  */
 typedef struct {
        logdrv_param_t  lparam;
@@ -720,7 +720,7 @@ typedef struct {
  * @ldrv       : logical drives information
  * @pdrv       : physical drives information
  *
- * Disk array for 8LD logical drives with upto 8 spans
+ * Disk array for 8LD logical drives with up to 8 spans
  */
 typedef struct {
        uint8_t                 numldrv;
@@ -737,7 +737,7 @@ typedef struct {
  * @ldrv       : logical drives information
  * @pdrv       : physical drives information
  *
- * Disk array for 8LD logical drives with upto 4 spans
+ * Disk array for 8LD logical drives with up to 4 spans
  */
 typedef struct {
        uint8_t                 numldrv;
index 5708cb27d0783df3525fa1789dd10859a647f921..1dba32870b4c16cc58cbb4ed28d74b370bb39c57 100644 (file)
@@ -2689,7 +2689,7 @@ megaraid_reset_handler(struct scsi_cmnd *scp)
                                (MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT) - i));
                }
 
-               // bailout if no recovery happended in reset time
+               // bailout if no recovery happened in reset time
                if (adapter->outstanding_cmds == 0) {
                        break;
                }
@@ -3452,7 +3452,7 @@ megaraid_mbox_display_scb(adapter_t *adapter, scb_t *scb)
  * megaraid_mbox_setup_device_map - manage device ids
  * @adapter    : Driver's soft state
  *
- * Manange the device ids to have an appropraite mapping between the kernel
+ * Manange the device ids to have an appropriate mapping between the kernel
  * scsi addresses and megaraid scsi and logical drive addresses. We export
  * scsi devices on their actual addresses, whereas the logical drives are
  * exported on a virtual scsi channel.
@@ -3973,7 +3973,7 @@ megaraid_sysfs_get_ldmap_timeout(unsigned long data)
  * NOTE: The commands issuance functionality is not generalized and
  * implemented in context of "get ld map" command only. If required, the
  * command issuance logical can be trivially pulled out and implemented as a
- * standalone libary. For now, this should suffice since there is no other
+ * standalone library. For now, this should suffice since there is no other
  * user of this interface.
  *
  * Return 0 on success.
index 635b228c3ead37be3213fae2ef9468732538d9c9..046dcc672ec1a4ddcf3fddff1537422a44bae267 100644 (file)
@@ -1347,7 +1347,7 @@ struct megasas_instance {
        struct timer_list io_completion_timer;
        struct list_head internal_reset_pending_q;
 
-       /* Ptr to hba specfic information */
+       /* Ptr to hba specific information */
        void *ctrl_context;
        u8      msi_flag;
        struct msix_entry msixentry;
index bbd10c81fd9cee59796b0528175984f107e74c4d..66d4cea4df988afc44820d52abc1b053c562d961 100644 (file)
@@ -1698,7 +1698,7 @@ void megasas_do_ocr(struct megasas_instance *instance)
  * megasas_wait_for_outstanding -      Wait for all outstanding cmds
  * @instance:                          Adapter soft state
  *
- * This function waits for upto MEGASAS_RESET_WAIT_TIME seconds for FW to
+ * This function waits for up to MEGASAS_RESET_WAIT_TIME seconds for FW to
  * complete all its outstanding commands. Returns error if one or more IOs
  * are pending after this time period. It also marks the controller dead.
  */
index 20e6b88693411835c755f91b1be046eda0b2cc0a..165454d525916c8dc07d24a4cc7b71df217af392 100644 (file)
@@ -21,7 +21,7 @@
  *  05-21-08  02.00.05  Fixed typo in name of Mpi2SepRequest_t.
  *  10-02-08  02.00.06  Removed Untagged and No Disconnect values from SCSI IO
  *                      Control field Task Attribute flags.
- *                      Moved LUN field defines to mpi2.h becasue they are
+ *                      Moved LUN field defines to mpi2.h because they are
  *                      common to many structures.
  *  05-06-09  02.00.07  Changed task management type of Query Unit Attention to
  *                      Query Asynchronous Event.
index 5e001ffd4c13410c8f34cfb51962e3483b1ed6c7..3346357031e9749547d453e92a2a2903ef8f9b93 100644 (file)
@@ -925,7 +925,7 @@ _base_interrupt(int irq, void *bus_id)
 }
 
 /**
- * mpt2sas_base_release_callback_handler - clear interupt callback handler
+ * mpt2sas_base_release_callback_handler - clear interrupt callback handler
  * @cb_idx: callback index
  *
  * Return nothing.
@@ -1113,7 +1113,7 @@ _base_restore_msix_table(struct MPT2SAS_ADAPTER *ioc)
  * @ioc: per adapter object
  *
  * Check to see if card is capable of MSIX, and set number
- * of avaliable msix vectors
+ * of available msix vectors
  */
 static int
 _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc)
@@ -1595,7 +1595,7 @@ mpt2sas_base_put_smid_scsi_io(struct MPT2SAS_ADAPTER *ioc, u16 smid, u16 handle)
 
 
 /**
- * mpt2sas_base_put_smid_hi_priority - send Task Managment request to firmware
+ * mpt2sas_base_put_smid_hi_priority - send Task Management request to firmware
  * @ioc: per adapter object
  * @smid: system request message index
  *
@@ -2599,7 +2599,7 @@ _base_wait_for_doorbell_int(struct MPT2SAS_ADAPTER *ioc, int timeout,
                int_status = readl(&ioc->chip->HostInterruptStatus);
                if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) {
                        dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
-                           "successfull count(%d), timeout(%d)\n", ioc->name,
+                           "successful count(%d), timeout(%d)\n", ioc->name,
                            __func__, count, timeout));
                        return 0;
                }
@@ -2640,7 +2640,7 @@ _base_wait_for_doorbell_ack(struct MPT2SAS_ADAPTER *ioc, int timeout,
                int_status = readl(&ioc->chip->HostInterruptStatus);
                if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) {
                        dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
-                           "successfull count(%d), timeout(%d)\n", ioc->name,
+                           "successful count(%d), timeout(%d)\n", ioc->name,
                            __func__, count, timeout));
                        return 0;
                } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) {
@@ -2688,7 +2688,7 @@ _base_wait_for_doorbell_not_used(struct MPT2SAS_ADAPTER *ioc, int timeout,
                doorbell_reg = readl(&ioc->chip->Doorbell);
                if (!(doorbell_reg & MPI2_DOORBELL_USED)) {
                        dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
-                           "successfull count(%d), timeout(%d)\n", ioc->name,
+                           "successful count(%d), timeout(%d)\n", ioc->name,
                            __func__, count, timeout));
                        return 0;
                }
index 6afd67b324fe44ee602dd3ec585db2e0cce2d790..6861244249a3e543c54a68d34125f48ab5603eef 100644 (file)
@@ -93,7 +93,7 @@ struct config_request{
  * @mpi_reply: reply message frame
  * Context: none.
  *
- * Function for displaying debug info helpfull when debugging issues
+ * Function for displaying debug info helpful when debugging issues
  * in this module.
  */
 static void
index e92b77af5484919f2bde2d692557151b8e55f7f6..d72f1f2b1392eb5c49ba5efd5f3fae06e69b0b3d 100644 (file)
@@ -116,7 +116,7 @@ _ctl_sas_device_find_by_handle(struct MPT2SAS_ADAPTER *ioc, u16 handle)
  * @mpi_reply: reply message frame
  * Context: none.
  *
- * Function for displaying debug info helpfull when debugging issues
+ * Function for displaying debug info helpful when debugging issues
  * in this module.
  */
 static void
@@ -688,6 +688,13 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc,
                goto out;
        }
 
+       /* Check for overflow and wraparound */
+       if (karg.data_sge_offset * 4 > ioc->request_sz ||
+           karg.data_sge_offset > (UINT_MAX / 4)) {
+               ret = -EINVAL;
+               goto out;
+       }
+
        /* copy in request message frame from user */
        if (copy_from_user(mpi_request, mf, karg.data_sge_offset*4)) {
                printk(KERN_ERR "failure at %s:%d/%s()!\n", __FILE__, __LINE__,
@@ -1963,7 +1970,7 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)
        Mpi2DiagBufferPostReply_t *mpi_reply;
        int rc, i;
        u8 buffer_type;
-       unsigned long timeleft;
+       unsigned long timeleft, request_size, copy_size;
        u16 smid;
        u16 ioc_status;
        u8 issue_reset = 0;
@@ -1999,6 +2006,8 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)
                return -ENOMEM;
        }
 
+       request_size = ioc->diag_buffer_sz[buffer_type];
+
        if ((karg.starting_offset % 4) || (karg.bytes_to_read % 4)) {
                printk(MPT2SAS_ERR_FMT "%s: either the starting_offset "
                    "or bytes_to_read are not 4 byte aligned\n", ioc->name,
@@ -2006,13 +2015,23 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)
                return -EINVAL;
        }
 
+       if (karg.starting_offset > request_size)
+               return -EINVAL;
+
        diag_data = (void *)(request_data + karg.starting_offset);
        dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: diag_buffer(%p), "
            "offset(%d), sz(%d)\n", ioc->name, __func__,
            diag_data, karg.starting_offset, karg.bytes_to_read));
 
+       /* Truncate data on requests that are too large */
+       if ((diag_data + karg.bytes_to_read < diag_data) ||
+           (diag_data + karg.bytes_to_read > request_data + request_size))
+               copy_size = request_size - karg.starting_offset;
+       else
+               copy_size = karg.bytes_to_read;
+
        if (copy_to_user((void __user *)uarg->diagnostic_data,
-           diag_data, karg.bytes_to_read)) {
+           diag_data, copy_size)) {
                printk(MPT2SAS_ERR_FMT "%s: Unable to write "
                    "mpt_diag_read_buffer_t data @ %p\n", ioc->name,
                    __func__, diag_data);
index 6ceb7759bfe5e04b21f320c1f482248dcf8e82e0..d2064a0533ae8d6f6bbb3ea00d48c438541faff4 100644 (file)
@@ -397,7 +397,7 @@ _scsih_get_sas_address(struct MPT2SAS_ADAPTER *ioc, u16 handle,
  * @is_raid: [flag] 1 = raid object, 0 = sas object
  *
  * Determines whether this device should be first reported device to
- * to scsi-ml or sas transport, this purpose is for persistant boot device.
+ * to scsi-ml or sas transport, this purpose is for persistent boot device.
  * There are primary, alternate, and current entries in bios page 2. The order
  * priority is primary, alternate, then current.  This routine saves
  * the corresponding device object and is_raid flag in the ioc object.
@@ -2671,10 +2671,10 @@ _scsih_block_io_to_children_attached_directly(struct MPT2SAS_ADAPTER *ioc,
  * @handle: device handle
  * Context: interrupt time.
  *
- * This code is to initiate the device removal handshake protocal
+ * This code is to initiate the device removal handshake protocol
  * with controller firmware.  This function will issue target reset
  * using high priority request queue.  It will send a sas iounit
- * controll request (MPI2_SAS_OP_REMOVE_DEVICE) from this completion.
+ * control request (MPI2_SAS_OP_REMOVE_DEVICE) from this completion.
  *
  * This is designed to send muliple task management request at the same
  * time to the fifo. If the fifo is full, we will append the request,
@@ -2749,9 +2749,9 @@ _scsih_tm_tr_send(struct MPT2SAS_ADAPTER *ioc, u16 handle)
  * @reply: reply message frame(lower 32bit addr)
  * Context: interrupt time.
  *
- * This is the sas iounit controll completion routine.
+ * This is the sas iounit control completion routine.
  * This code is part of the code to initiate the device removal
- * handshake protocal with controller firmware.
+ * handshake protocol with controller firmware.
  *
  * Return 1 meaning mf should be freed from _base_interrupt
  *        0 means the mf is freed from this function.
@@ -2878,8 +2878,8 @@ _scsih_tm_volume_tr_complete(struct MPT2SAS_ADAPTER *ioc, u16 smid,
  *
  * This is the target reset completion routine.
  * This code is part of the code to initiate the device removal
- * handshake protocal with controller firmware.
- * It will send a sas iounit controll request (MPI2_SAS_OP_REMOVE_DEVICE)
+ * handshake protocol with controller firmware.
+ * It will send a sas iounit control request (MPI2_SAS_OP_REMOVE_DEVICE)
  *
  * Return 1 meaning mf should be freed from _base_interrupt
  *        0 means the mf is freed from this function.
@@ -2984,7 +2984,7 @@ _scsih_check_for_pending_tm(struct MPT2SAS_ADAPTER *ioc, u16 smid)
  *
  * This routine added to better handle cable breaker.
  *
- * This handles the case where driver recieves multiple expander
+ * This handles the case where driver receives multiple expander
  * add and delete events in a single shot.  When there is a delete event
  * the routine will void any pending add events waiting in the event queue.
  *
@@ -3511,7 +3511,7 @@ _scsih_normalize_sense(char *sense_buffer, struct sense_info *data)
 
 #ifdef CONFIG_SCSI_MPT2SAS_LOGGING
 /**
- * _scsih_scsi_ioc_info - translated non-successfull SCSI_IO request
+ * _scsih_scsi_ioc_info - translated non-successful SCSI_IO request
  * @ioc: per adapter object
  * @scmd: pointer to scsi command object
  * @mpi_reply: reply mf payload returned from firmware
@@ -5138,7 +5138,7 @@ _scsih_sas_broadcast_primative_event(struct MPT2SAS_ADAPTER *ioc,
        unsigned long flags;
        int r;
 
-       dewtprintk(ioc, printk(MPT2SAS_INFO_FMT "broadcast primative: "
+       dewtprintk(ioc, printk(MPT2SAS_INFO_FMT "broadcast primitive: "
            "phy number(%d), width(%d)\n", ioc->name, event_data->PhyNum,
            event_data->PortWidth));
        dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
index 46cc3825638d63fe50c6bd104214489b59c472ef..835d8d66e696cb8f2ad49e3bad6132c52d2a1d03 100644 (file)
@@ -2679,7 +2679,7 @@ static    struct script script0 __initdata = {
 }/*-------------------------< RESEL_TAG >-------------------*/,{
        /*
        **      Read IDENTIFY + SIMPLE + TAG using a single MOVE.
-       **      Agressive optimization, is'nt it?
+       **      Aggressive optimization, is'nt it?
        **      No need to test the SIMPLE TAG message, since the 
        **      driver only supports conformant devices for tags. ;-)
        */
index 6b8b021400f848d9770684e4c1a5aebe4d2374e6..f6a50c98c36fa46f15ef82474d55fd633efbaf36 100644 (file)
@@ -1288,7 +1288,7 @@ static irqreturn_t do_nsp32_isr(int irq, void *dev_id)
                        nsp32_dbg(NSP32_DEBUG_INTR, "SSACK=0x%lx", 
                                    nsp32_read4(base, SAVED_SACK_CNT));
 
-                       scsi_set_resid(SCpnt, 0); /* all data transfered! */
+                       scsi_set_resid(SCpnt, 0); /* all data transferred! */
                }
 
                /*
@@ -1630,7 +1630,7 @@ static int nsp32_busfree_occur(struct scsi_cmnd *SCpnt, unsigned short execph)
 
                        /*
                         * If SAVEDSACKCNT == 0, it means SavedDataPointer is
-                        * come after data transfering.
+                        * come after data transferring.
                         */
                        if (s_sacklen > 0) {
                                /*
@@ -1785,7 +1785,7 @@ static void nsp32_adjust_busfree(struct scsi_cmnd *SCpnt, unsigned int s_sacklen
                   the head element of the sg. restlen is correctly calculated. */
        }
 
-       /* calculate the rest length for transfering */
+       /* calculate the rest length for transferring */
        restlen = sentlen - s_sacklen;
 
        /* update adjusting current SG table entry */
index 9565acf1aa729d888d99f347eee5956436bd4960..c0221829069c8b02fcbaafb9b255b0aa4035ea41 100644 (file)
@@ -507,7 +507,7 @@ typedef struct _nsp32_lunt {
 /*
  * SCSI TARGET/LUN definition
  */
-#define NSP32_HOST_SCSIID    7  /* SCSI initiator is everytime defined as 7 */
+#define NSP32_HOST_SCSIID    7  /* SCSI initiator is every time defined as 7 */
 #define MAX_TARGET          8
 #define MAX_LUN                     8  /* XXX: In SPI3, max number of LUN is 64. */
 
index 521e2182d45bf44394f6a419bfbcabe57430bb19..58f5be4740e9af378c7eb44d2786ab8e28367f39 100644 (file)
@@ -1366,7 +1366,7 @@ error:
 /* The values below are based on the OnStream frame payload size of 32K == 2**15,
  * that is, OSST_FRAME_SHIFT + OSST_SECTOR_SHIFT must be 15. With a minimum block
  * size of 512 bytes, we need to be able to resolve 32K/512 == 64 == 2**6 positions
- * inside each frame. Finaly, OSST_SECTOR_MASK == 2**OSST_FRAME_SHIFT - 1.
+ * inside each frame. Finally, OSST_SECTOR_MASK == 2**OSST_FRAME_SHIFT - 1.
  */
 #define OSST_FRAME_SHIFT  6
 #define OSST_SECTOR_SHIFT 9
@@ -3131,7 +3131,7 @@ static int osst_flush_write_buffer(struct osst_tape *STp, struct osst_request **
                }
 #if DEBUG
                if (debugging)
-                       printk(OSST_DEB_MSG "%s:D: Flushing %d bytes, Transfering %d bytes in %d lblocks.\n",
+                       printk(OSST_DEB_MSG "%s:D: Flushing %d bytes, Transferring %d bytes in %d lblocks.\n",
                                                 name, offset, transfer, blks);
 #endif
 
@@ -3811,7 +3811,7 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo
 
                        if (transfer == 0) {
                                printk(KERN_WARNING
-                                 "%s:W: Nothing can be transfered, requested %Zd, tape block size (%d%c).\n",
+                                 "%s:W: Nothing can be transferred, requested %Zd, tape block size (%d%c).\n",
                                        name, count, STp->block_size < 1024?
                                        STp->block_size:STp->block_size/1024,
                                        STp->block_size<1024?'b':'k');
index 11d26c57f3f8200fecd94ea76e07eda9f3e14568..b4fea98ba276656ed6a043cfeacb6ceb1c888caf 100644 (file)
@@ -413,7 +413,7 @@ typedef struct os_dat_s {
  * AUX
  */
 typedef struct os_aux_s {
-        __be32          format_id;              /* hardware compability AUX is based on */
+        __be32          format_id;              /* hardware compatibility AUX is based on */
         char            application_sig[4];     /* driver used to write this media */
         __be32          hdwr;                   /* reserved */
         __be32          update_frame_cntr;      /* for configuration frame */
index be3f33d31a99dc3e359190e233ae91b48e2066fe..54bdf6d85c6d4e0346369fed960becdaa958216f 100644 (file)
@@ -742,7 +742,7 @@ static void nsp_pio_read(struct scsi_cmnd *SCpnt)
 
                res = nsp_fifo_count(SCpnt) - ocount;
                //nsp_dbg(NSP_DEBUG_DATA_IO, "ptr=0x%p this=0x%x ocount=0x%x res=0x%x", SCpnt->SCp.ptr, SCpnt->SCp.this_residual, ocount, res);
-               if (res == 0) { /* if some data avilable ? */
+               if (res == 0) { /* if some data available ? */
                        if (stat == BUSPHASE_DATA_IN) { /* phase changed? */
                                //nsp_dbg(NSP_DEBUG_DATA_IO, " wait for data this=%d", SCpnt->SCp.this_residual);
                                continue;
index 18b6c55cd08cd845052c963cf9d7a87c5d8bc67b..8b7db1e53c107f3bf04dc5ac015ef25948a1bd60 100644 (file)
@@ -339,7 +339,7 @@ update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number)
 
 /**
  * bar4_shift - function is called to shift BAR base address
- * @pm8001_ha : our hba card infomation
+ * @pm8001_ha : our hba card information
  * @shiftValue : shifting value in memory bar.
  */
 static int bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue)
index 833a5201eda4dd0b640c0e33d5eac0212fd7acd4..909132041c075d1b5f9af97feba298e52a4c6ae8 100644 (file)
@@ -209,7 +209,7 @@ struct  pio_setup_fis {
 
 /*
  * brief the data structure of SATA Completion Response
- * use to discribe the sata task response (64 bytes)
+ * use to describe the sata task response (64 bytes)
  */
 struct sata_completion_resp {
        __le32  tag;
@@ -951,7 +951,7 @@ struct set_dev_state_resp {
 #define PCIE_EVENT_INTERRUPT           0x003044
 #define PCIE_ERROR_INTERRUPT_ENABLE    0x003048
 #define PCIE_ERROR_INTERRUPT           0x00304C
-/* signature defintion for host scratch pad0 register */
+/* signature definition for host scratch pad0 register */
 #define SPC_SOFT_RESET_SIGNATURE       0x252acbcd
 /* Signature for Soft Reset */
 
index bdb6b27dedd6ec707d3775f39f6fc73405eb8f81..aa05e661d113d11989dcc35dd2a5948b6edf230f 100644 (file)
@@ -445,7 +445,7 @@ struct fw_control_info {
 struct fw_control_ex {
        struct fw_control_info *fw_control;
        void                    *buffer;/* keep buffer pointer to be
-       freed when the responce comes*/
+       freed when the response comes*/
        void                    *virtAddr;/* keep virtual address of the data */
        void                    *usrAddr;/* keep virtual address of the
        user data */
index bcf858e88c64eb2e0c53ed49be6624259e11864c..7f636b118287a7bb0f9e3ac7d1cdecb27ed0598d 100644 (file)
@@ -213,7 +213,7 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
  * pmcraid_slave_configure - Configures a SCSI device
  * @scsi_dev: scsi device struct
  *
- * This fucntion is executed by SCSI mid layer just after a device is first
+ * This function is executed by SCSI mid layer just after a device is first
  * scanned (i.e. it has responded to an INQUIRY). For VSET resources, the
  * timeout value (default 30s) will be over-written to a higher value (60s)
  * and max_sectors value will be over-written to 512. It also sets queue depth
@@ -2122,7 +2122,7 @@ static void pmcraid_fail_outstanding_cmds(struct pmcraid_instance *pinstance)
  *
  * This function executes most of the steps required for IOA reset. This gets
  * called by user threads (modprobe/insmod/rmmod) timer, tasklet and midlayer's
- * 'eh_' thread. Access to variables used for controling the reset sequence is
+ * 'eh_' thread. Access to variables used for controlling the reset sequence is
  * synchronized using host lock. Various functions called during reset process
  * would make use of a single command block, pointer to which is also stored in
  * adapter instance structure.
@@ -2994,7 +2994,7 @@ static int pmcraid_abort_complete(struct pmcraid_cmd *cancel_cmd)
 
        /* If the abort task is not timed out we will get a Good completion
         * as sense_key, otherwise we may get one the following responses
-        * due to subsquent bus reset or device reset. In case IOASC is
+        * due to subsequent bus reset or device reset. In case IOASC is
         * NR_SYNC_REQUIRED, set sync_reqd flag for the corresponding resource
         */
        if (ioasc == PMCRAID_IOASC_UA_BUS_WAS_RESET ||
@@ -3814,6 +3814,9 @@ static long pmcraid_ioctl_passthrough(
                        rc = -EFAULT;
                        goto out_free_buffer;
                }
+       } else if (request_size < 0) {
+               rc = -EINVAL;
+               goto out_free_buffer;
        }
 
        /* check if we have any additional command parameters */
@@ -3933,7 +3936,7 @@ static long pmcraid_ioctl_passthrough(
 
                        /* if abort task couldn't find the command i.e it got
                         * completed prior to aborting, return good completion.
-                        * if command got aborted succesfully or there was IOA
+                        * if command got aborted successfully or there was IOA
                         * reset due to abort task itself getting timedout then
                         * return -ETIMEDOUT
                         */
@@ -5932,7 +5935,7 @@ static int __devinit pmcraid_probe(
         * However, firmware supports 64-bit streaming DMA buffers, whereas
         * coherent buffers are to be 32-bit. Since pci_alloc_consistent always
         * returns memory within 4GB (if not, change this logic), coherent
-        * buffers are within firmware acceptible address ranges.
+        * buffers are within firmware acceptable address ranges.
         */
        if ((sizeof(dma_addr_t) == 4) ||
            pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
index 4db210d93947275efd67e493549d75162fdf21e1..34e4c915002ef37332afc6ea949e94d90a8b22b3 100644 (file)
@@ -1024,7 +1024,7 @@ static struct pmcraid_ioasc_error pmcraid_ioasc_error_table[] = {
 
 
 /*
- * pmcraid_ioctl_header - definition of header structure that preceeds all the
+ * pmcraid_ioctl_header - definition of header structure that precedes all the
  * buffers given as ioctl arguments.
  *
  * .signature           : always ASCII string, "PMCRAID"
index 5dec684bf0103d5cb9fd244d5b3a706ab1109720..8ba5744c267e1ccd23894be93982d061dbb8f15e 100644 (file)
@@ -78,7 +78,7 @@
        - Clean up vchan handling
     Rev  3.23.33 July 3, 2003, Jes Sorensen
        - Don't define register access macros before define determining MMIO.
-         This just happend to work out on ia64 but not elsewhere.
+         This just happened to work out on ia64 but not elsewhere.
        - Don't try and read from the card while it is in reset as
          it won't respond and causes an MCA
     Rev  3.23.32 June 23, 2003, Jes Sorensen
index 6c51c0a35b9ef73db898327f898fc5c4c8b76582..ee20353c8550445a985f4eda63846c075299b41c 100644 (file)
@@ -2086,7 +2086,7 @@ struct ct_sns_pkt {
 };
 
 /*
- * SNS command structures -- for 2200 compatability.
+ * SNS command structures -- for 2200 compatibility.
  */
 #define        RFT_ID_SNS_SCMD_LEN     22
 #define        RFT_ID_SNS_CMD_SIZE     60
index 631fefc8482dc40d424846497ba4c4554ef6bd48..f5ba09c8a663d002b585cbc9b6dcde940c20b9c2 100644 (file)
@@ -539,7 +539,7 @@ struct sts_entry_24xx {
         * If DIF Error is set in comp_status, these additional fields are
         * defined:
         * &data[10] : uint8_t report_runt_bg[2];       - computed guard
-        * &data[12] : uint8_t actual_dif[8];           - DIF Data recieved
+        * &data[12] : uint8_t actual_dif[8];           - DIF Data received
         * &data[20] : uint8_t expected_dif[8];         - DIF Data computed
        */
 };
index d17ed9a94a0ca56f1a9b9dcc2b1ab1a52fd6a09b..712518d05128421ba422cb348ad3a73258efcfe1 100644 (file)
@@ -414,7 +414,7 @@ skip_rio:
                                    "marked OFFLINE!\n");
                                vha->flags.online = 0;
                        } else {
-                               /* Check to see if MPI timeout occured */
+                               /* Check to see if MPI timeout occurred */
                                if ((mbx & MBX_3) && (ha->flags.port0))
                                        set_bit(MPI_RESET_NEEDED,
                                            &vha->dpc_flags);
index 7a7c0ecfe7dd741632d79f800e44bca4a152c36b..34893397ac84ef5b4aeebf883a5ac3d0b3d0a88c 100644 (file)
@@ -303,7 +303,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
                            !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
 
                                qla_printk(KERN_WARNING, ha,
-                                   "Mailbox command timeout occured. "
+                                   "Mailbox command timeout occurred. "
                                    "Scheduling ISP " "abort. eeh_busy: 0x%x\n",
                                    ha->flags.eeh_busy);
                                set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
@@ -321,7 +321,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
                            !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
 
                                qla_printk(KERN_WARNING, ha,
-                                   "Mailbox command timeout occured. "
+                                   "Mailbox command timeout occurred. "
                                    "Issuing ISP abort.\n");
 
                                set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags);
@@ -3789,7 +3789,7 @@ qla2x00_loopback_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq,
        mcp->mb[20] = LSW(MSD(mreq->send_dma));
        mcp->mb[21] = MSW(MSD(mreq->send_dma));
 
-       /* recieve data address */
+       /* receive data address */
        mcp->mb[16] = LSW(mreq->rcv_dma);
        mcp->mb[17] = MSW(mreq->rcv_dma);
        mcp->mb[6] = LSW(MSD(mreq->rcv_dma));
index 76ec876e6b21b627c7fe8be7b40a445d35d4db15..455fe134d31dd95defb4e829260236c44d09d2ea 100644 (file)
@@ -2598,7 +2598,7 @@ qla82xx_calc_dsd_lists(uint16_t dsds)
  * qla82xx_start_scsi() - Send a SCSI command to the ISP
  * @sp: command to send to the ISP
  *
- * Returns non-zero if a failure occured, else zero.
+ * Returns non-zero if a failure occurred, else zero.
  */
 int
 qla82xx_start_scsi(srb_t *sp)
index 75a966c94860e0cd0e05b903759645c7c460f739..aa774752916549a9c41087f3d634a07bd1287648 100644 (file)
@@ -1046,7 +1046,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
 
 eh_bus_reset_done:
        qla_printk(KERN_INFO, vha->hw, "%s: reset %s\n", __func__,
-           (ret == FAILED) ? "failed" : "succeded");
+           (ret == FAILED) ? "failed" : "succeeded");
 
        return ret;
 }
@@ -1136,7 +1136,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
 
 eh_host_reset_lock:
        qla_printk(KERN_INFO, ha, "%s: reset %s\n", __func__,
-           (ret == FAILED) ? "failed" : "succeded");
+           (ret == FAILED) ? "failed" : "succeeded");
 
        return ret;
 }
@@ -3902,7 +3902,7 @@ uint32_t qla82xx_error_recovery(scsi_qla_host_t *base_vha)
                        continue;
                if (atomic_read(&other_pdev->enable_cnt)) {
                        DEBUG17(qla_printk(KERN_INFO, ha,
-                           "Found PCI func availabe and enabled at 0x%x\n",
+                           "Found PCI func available and enabled at 0x%x\n",
                            fn));
                        pci_dev_put(other_pdev);
                        break;
index c1f8d1b150f701341470ec011cd69ded8e7befd0..4757878d59dd735395ebfb41ad9d444b0823c697 100644 (file)
@@ -182,7 +182,7 @@ struct srb {
        uint16_t flags;         /* (1) Status flags. */
 
 #define SRB_DMA_VALID          BIT_3   /* DMA Buffer mapped. */
-#define SRB_GOT_SENSE          BIT_4   /* sense data recieved. */
+#define SRB_GOT_SENSE          BIT_4   /* sense data received. */
        uint8_t state;          /* (1) Status flags. */
 
 #define SRB_NO_QUEUE_STATE      0      /* Request is in between states */
index bbb2e903d38a8ee54b7a6715a20795cad77db8a8..48e2241ddaf49ec37f3f8d4fe61ca545c52458f7 100644 (file)
@@ -1338,7 +1338,7 @@ exit_init_hba:
        }
 
        DEBUG2(printk("scsi%ld: initialize adapter: %s\n", ha->host_no,
-           status == QLA_ERROR ? "FAILED" : "SUCCEDED"));
+           status == QLA_ERROR ? "FAILED" : "SUCCEEDED"));
        return status;
 }
 
index b3831bd2947986e4183bfdb56ae1ab409aa0228a..945cc328f57f705d636400090e9217656e406d57 100644 (file)
@@ -28,7 +28,7 @@
 #define         FM93C56A_ERASE       0x3
 #define         FM93C56A_ERASE_ALL   0x0
 
-/* Command Extentions */
+/* Command Extensions */
 #define         FM93C56A_WEN_EXT        0x3
 #define         FM93C56A_WRITE_ALL_EXT  0x1
 #define         FM93C56A_WDS_EXT        0x0
index a4acb0dd7bebfb5c2c41bab8e509f4441c603798..230ba097d28ca0d8e50d2dd05af3f24c8b6520c8 100644 (file)
@@ -1213,7 +1213,7 @@ recover_ha_init_adapter:
 
        clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags);
        DEBUG2(printk("scsi%ld: recover adapter: %s\n", ha->host_no,
-           status == QLA_ERROR ? "FAILED" : "SUCCEDED"));
+           status == QLA_ERROR ? "FAILED" : "SUCCEEDED"));
 
        return status;
 }
@@ -2110,7 +2110,7 @@ static int qla4xxx_eh_abort(struct scsi_cmnd *cmd)
 
        ql4_printk(KERN_INFO, ha,
            "scsi%ld:%d:%d: Abort command - %s\n",
-           ha->host_no, id, lun, (ret == SUCCESS) ? "succeded" : "failed");
+           ha->host_no, id, lun, (ret == SUCCESS) ? "succeeded" : "failed");
 
        return ret;
 }
@@ -2278,7 +2278,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd)
                return_status = SUCCESS;
 
        ql4_printk(KERN_INFO, ha, "HOST RESET %s.\n",
-                  return_status == FAILED ? "FAILED" : "SUCCEDED");
+                  return_status == FAILED ? "FAILED" : "SUCCEEDED");
 
        return return_status;
 }
@@ -2492,7 +2492,7 @@ qla4xxx_pci_slot_reset(struct pci_dev *pdev)
        /* Initialize device or resume if in suspended state */
        rc = pci_enable_device(pdev);
        if (rc) {
-               ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: Cant re-enable "
+               ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: Can't re-enable "
                    "device after reset\n", ha->host_no, __func__);
                goto exit_slot_reset;
        }
index fa5758cbdedb10a4c8bf5424c6c189afb47fd2e9..6888b2ca5bfcdaa470dd7c44219f2507247f46f9 100644 (file)
@@ -2454,7 +2454,7 @@ static void scsi_debug_slave_destroy(struct scsi_device *sdp)
                printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %u>\n",
                       sdp->host->host_no, sdp->channel, sdp->id, sdp->lun);
        if (devip) {
-               /* make this slot avaliable for re-use */
+               /* make this slot available for re-use */
                devip->used = 0;
                sdp->hostdata = NULL;
        }
index 6d5c7ff43f5bdaf1984a62696e8acb03cdead3c5..e9901b8f8443ec3cf6b75487cf36d57584bccd17 100644 (file)
@@ -411,8 +411,6 @@ static void scsi_run_queue(struct request_queue *q)
        list_splice_init(&shost->starved_list, &starved_list);
 
        while (!list_empty(&starved_list)) {
-               int flagset;
-
                /*
                 * As long as shost is accepting commands and we have
                 * starved queues, call blk_run_queue. scsi_request_fn
@@ -435,20 +433,7 @@ static void scsi_run_queue(struct request_queue *q)
                        continue;
                }
 
-               spin_unlock(shost->host_lock);
-
-               spin_lock(sdev->request_queue->queue_lock);
-               flagset = test_bit(QUEUE_FLAG_REENTER, &q->queue_flags) &&
-                               !test_bit(QUEUE_FLAG_REENTER,
-                                       &sdev->request_queue->queue_flags);
-               if (flagset)
-                       queue_flag_set(QUEUE_FLAG_REENTER, sdev->request_queue);
-               __blk_run_queue(sdev->request_queue, false);
-               if (flagset)
-                       queue_flag_clear(QUEUE_FLAG_REENTER, sdev->request_queue);
-               spin_unlock(sdev->request_queue->queue_lock);
-
-               spin_lock(shost->host_lock);
+               blk_run_queue_async(sdev->request_queue);
        }
        /* put any unprocessed entries back */
        list_splice(&starved_list, &shost->starved_list);
index a2ed201885ae3b453d657509ce6f774981098815..26a8a45584ef844f02c9b31528918cc129e7c775 100644 (file)
@@ -499,7 +499,7 @@ scsi_netlink_init(void)
                                SCSI_NL_GRP_CNT, scsi_nl_rcv_msg, NULL,
                                THIS_MODULE);
        if (!scsi_nl_sock) {
-               printk(KERN_ERR "%s: register of recieve handler failed\n",
+               printk(KERN_ERR "%s: register of receive handler failed\n",
                                __func__);
                netlink_unregister_notifier(&scsi_netlink_notifier);
                return;
index e44ff64233fd5fbe00a4aa675081bcac319739af..e63912510fb9349b31ede55df1c0b20011b6235e 100644 (file)
@@ -322,14 +322,8 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
                kfree(evt);
        }
 
-       if (sdev->request_queue) {
-               sdev->request_queue->queuedata = NULL;
-               /* user context needed to free queue */
-               scsi_free_queue(sdev->request_queue);
-               /* temporary expedient, try to catch use of queue lock
-                * after free of sdev */
-               sdev->request_queue = NULL;
-       }
+       /* NULL queue means the device can't be used */
+       sdev->request_queue = NULL;
 
        scsi_target_reap(scsi_target(sdev));
 
@@ -937,6 +931,12 @@ void __scsi_remove_device(struct scsi_device *sdev)
        if (sdev->host->hostt->slave_destroy)
                sdev->host->hostt->slave_destroy(sdev);
        transport_destroy_device(dev);
+
+       /* cause the request function to reject all I/O requests */
+       sdev->request_queue->queuedata = NULL;
+
+       /* Freeing the queue signals to block that we're done */
+       scsi_free_queue(sdev->request_queue);
        put_device(dev);
 }
 
index f67282058ba1de39a83426241669bab4ce224d53..8bca8c25ba69e61454d7bcf9a4d77971d991fc2d 100644 (file)
@@ -93,7 +93,7 @@ struct scsi_cmnd *scsi_host_get_command(struct Scsi_Host *shost,
 
        /*
         * The blk helpers are used to the READ/WRITE requests
-        * transfering data from a initiator point of view. Since
+        * transferring data from a initiator point of view. Since
         * we are in target mode we want the opposite.
         */
        rq = blk_get_request(shost->uspace_req_q, !write, gfp_mask);
index 2941d2d92c9472349da1a29edd103e5094aa295b..815069d13f9b57edc5ddaf22dbb223c452d74811 100644 (file)
@@ -2378,7 +2378,7 @@ fc_flush_devloss(struct Scsi_Host *shost)
  * fc_remove_host - called to terminate any fc_transport-related elements for a scsi host.
  * @shost:     Which &Scsi_Host
  *
- * This routine is expected to be called immediately preceeding the
+ * This routine is expected to be called immediately preceding the
  * a driver's call to scsi_remove_host().
  *
  * WARNING: A driver utilizing the fc_transport, which fails to call
@@ -2458,7 +2458,7 @@ static void fc_terminate_rport_io(struct fc_rport *rport)
 }
 
 /**
- * fc_starget_delete - called to delete the scsi decendents of an rport
+ * fc_starget_delete - called to delete the scsi descendants of an rport
  * @work:      remote port to be operated on.
  *
  * Deletes target and all sdevs.
@@ -3816,28 +3816,17 @@ fail_host_msg:
 static void
 fc_bsg_goose_queue(struct fc_rport *rport)
 {
-       int flagset;
-       unsigned long flags;
-
        if (!rport->rqst_q)
                return;
 
+       /*
+        * This get/put dance makes no sense
+        */
        get_device(&rport->dev);
-
-       spin_lock_irqsave(rport->rqst_q->queue_lock, flags);
-       flagset = test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags) &&
-                 !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags);
-       if (flagset)
-               queue_flag_set(QUEUE_FLAG_REENTER, rport->rqst_q);
-       __blk_run_queue(rport->rqst_q, false);
-       if (flagset)
-               queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q);
-       spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags);
-
+       blk_run_queue_async(rport->rqst_q);
        put_device(&rport->dev);
 }
 
-
 /**
  * fc_bsg_rport_dispatch - process rport bsg requests and dispatch to LLDD
  * @q:         rport request queue
index b61ebec6bca7e82f77f067490293ffda1e8a7933..bd0806e64e857172a8af6061a87b0e4b52758836 100644 (file)
@@ -1055,7 +1055,7 @@ static int sd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
  *     @arg: this is third argument given to ioctl(2) system call.
  *     Often contains a pointer.
  *
- *     Returns 0 if successful (some ioctls return postive numbers on
+ *     Returns 0 if successful (some ioctls return positive numbers on
  *     success as well). Returns a negated errno value in case of error.
  *
  *     Note: most ioctls are forward onto the block subsystem or further
index aefadc6a1607231173f7126a3e4bac44b16f583e..95019c747cc17cad69ed22c9091c2228b914c23b 100644 (file)
@@ -567,7 +567,7 @@ static const struct block_device_operations sr_bdops =
        .revalidate_disk = sr_block_revalidate_disk,
        /* 
         * No compat_ioctl for now because sr_block_ioctl never
-        * seems to pass arbitary ioctls down to host drivers.
+        * seems to pass arbitrary ioctls down to host drivers.
         */
 };
 
index 4f0e5485ffde4bf0b859a3786191861f83e0a62f..07eaef1c722b729740aefeb239994e683534026a 100644 (file)
@@ -467,7 +467,7 @@ static void free_all_tags( void )
  *
  * Parameters: struct scsi_cmnd *cmd
  *    The command to work on. The first scatter buffer's data are
- *    assumed to be already transfered into ptr/this_residual.
+ *    assumed to be already transferred into ptr/this_residual.
  */
 
 static void merge_contiguous_buffers(struct scsi_cmnd *cmd)
@@ -1717,7 +1717,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd,
  *     bytes to transfer, **data - pointer to data pointer.
  * 
  * Returns : -1 when different phase is entered without transferring
- *     maximum number of bytes, 0 if all bytes are transfered or exit
+ *     maximum number of bytes, 0 if all bytes are transferred or exit
  *     is in same phase.
  *
  *     Also, *phase, *count, *data are modified in place.
@@ -1904,7 +1904,7 @@ static int do_abort (struct Scsi_Host *host)
  *     bytes to transfer, **data - pointer to data pointer.
  * 
  * Returns : -1 when different phase is entered without transferring
- *     maximum number of bytes, 0 if all bytes or transfered or exit
+ *     maximum number of bytes, 0 if all bytes or transferred or exit
  *     is in same phase.
  *
  *     Also, *phase, *count, *data are modified in place.
index 190107ae120b5241d02864d94e6420cb826a3785..012c86edd59f950cedcd2284a26d0b49d153f036 100644 (file)
@@ -774,7 +774,7 @@ static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
 
        /* printk("sym53c416_reset\n"); */
        base = SCpnt->device->host->io_port;
-       /* search scsi_id - fixme, we shouldnt need to iterate for this! */
+       /* search scsi_id - fixme, we shouldn't need to iterate for this! */
        for(i = 0; i < host_index && scsi_id == -1; i++)
                if(hosts[i].base == base)
                        scsi_id = hosts[i].scsi_id;
index 7b08d6caaa99b35c58afb1b071385287acf67c6f..63952ee300b56034fcd4e25930c280e3c16a0b49 100644 (file)
@@ -1449,7 +1449,7 @@ static struct SYM_FWB_SCR SYM_FWB_SCR = {
                PADDR_B (msg_weird_seen),
        /*
         *  We donnot handle extended messages from SCRIPTS.
-        *  Read the amount of data correponding to the 
+        *  Read the amount of data corresponding to the 
         *  message length and call the C code.
         */
        SCR_COPY (1),
index ae1fb179b88e571ea6e0e0ad544d6449476a0299..c87d72443a16826c1bbd8e8790740b8104cb38a1 100644 (file)
@@ -1326,7 +1326,7 @@ static struct SYM_FWB_SCR SYM_FWB_SCR = {
                PADDR_B (msg_weird_seen),
        /*
         *  We donnot handle extended messages from SCRIPTS.
-        *  Read the amount of data correponding to the 
+        *  Read the amount of data corresponding to the 
         *  message length and call the C code.
         */
        SCR_STORE_REL (scratcha, 1),
index 2c3e89ddf069fb66fad54c46912216c97daa1ff8..d92fe4037e942faef6472ae57d87b0a74e24c0a3 100644 (file)
@@ -2457,7 +2457,7 @@ static void sym_int_ma (struct sym_hcb *np)
                }
 
                /*
-                *  The data in the dma fifo has not been transfered to
+                *  The data in the dma fifo has not been transferred to
                 *  the target -> add the amount to the rest
                 *  and clear the data.
                 *  Check the sstat2 register in case of wide transfer.
@@ -5094,7 +5094,7 @@ fail:
 }
 
 /*
- *  Lun control block deallocation. Returns the number of valid remaing LCBs
+ *  Lun control block deallocation. Returns the number of valid remaining LCBs
  *  for the target.
  */
 int sym_free_lcb(struct sym_hcb *np, u_char tn, u_char ln)
index 883cac10daf9b15a129549b3fecd73aa871f6af2..6f9af0de7ec3ef55a6a75a16a231e96dd485cce8 100644 (file)
@@ -50,7 +50,7 @@
  *  from the SCRIPTS code. In addition, cache line alignment 
  *  is guaranteed for power of 2 cache line size.
  *
- *  This allocator has been developped for the Linux sym53c8xx  
+ *  This allocator has been developed for the Linux sym53c8xx  
  *  driver, since this O/S does not provide naturally aligned 
  *  allocations.
  *  It has the advantage of allowing the driver to use private 
index 0571ef9639cbc15b6d5ace0384c03a895900ff7d..9f4b58b7daaded8801e2724a8fce3ecfd6441166 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/stat.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
index 5f697e0bd0095c97f1c21326bc6c073a8fc61d40..4468ae3610f7bfdc06f4f1f12adc5749a74a1602 100644 (file)
@@ -1843,7 +1843,7 @@ check_setup_args(char *key, int *flags, int *val, char *buf)
  *
  * The original driver used to rely on a fixed sx_table, containing periods
  * for (only) the lower limits of the respective input-clock-frequency ranges
- * (8-10/12-15/16-20 MHz). Although it seems, that no problems ocurred with
+ * (8-10/12-15/16-20 MHz). Although it seems, that no problems occurred with
  * this setting so far, it might be desirable to adjust the transfer periods
  * closer to the really attached, possibly 25% higher, input-clock, since
  * - the wd33c93 may really use a significant shorter period, than it has
index db451ae0a36811427165b9d0431d3b38d356ec8e..9ee0afef2d161f1c63d1ffdef321e33794b041aa 100644 (file)
@@ -837,7 +837,7 @@ static inline Scb *alloc_scbs(struct Scsi_Host *host, int needed)
                }
        }
 
-       /* Take the lock, then check we didnt get beaten, if so try again */
+       /* Take the lock, then check we didn't get beaten, if so try again */
        spin_lock_irqsave(&scbpool_lock, flags);
        if (freescbs < needed) {
                spin_unlock_irqrestore(&scbpool_lock, flags);
index 04113e5304a01c0827b817079be3b4d32a7fc029..1e824fb1649bfc9a2d5b218f457c95796bc0447c 100644 (file)
@@ -515,7 +515,7 @@ void __init sfi_init_late(void)
 }
 
 /*
- * The reason we put it here becasue we need wait till the /sys/firmware
+ * The reason we put it here because we need wait till the /sys/firmware
  * is setup, then our interface can be registered in /sys/firmware/sfi
  */
 core_initcall(sfi_sysfs_init);
index 5a4e0afb9ad6dc39e8a3bb041c72d0b8f21e60f7..08de58e7f59f7f6521ffb5122078103473c66117 100644 (file)
@@ -661,7 +661,7 @@ static void readwriter(struct pl022 *pl022)
 {
 
        /*
-        * The FIFO depth is different inbetween primecell variants.
+        * The FIFO depth is different between primecell variants.
         * I believe filling in too much in the FIFO might cause
         * errons in 8bit wide transfers on ARM variants (just 8 words
         * FIFO, means only 8x8 = 64 bits in FIFO) at least.
@@ -722,7 +722,7 @@ static void readwriter(struct pl022 *pl022)
                 * This inner reader takes care of things appearing in the RX
                 * FIFO as we're transmitting. This will happen a lot since the
                 * clock starts running when you put things into the TX FIFO,
-                * and then things are continously clocked into the RX FIFO.
+                * and then things are continuously clocked into the RX FIFO.
                 */
                while ((readw(SSP_SR(pl022->virtbase)) & SSP_SR_MASK_RNE)
                       && (pl022->rx < pl022->rx_end)) {
@@ -842,7 +842,7 @@ static void dma_callback(void *data)
 
        unmap_free_dma_scatter(pl022);
 
-       /* Update total bytes transfered */
+       /* Update total bytes transferred */
        msg->actual_length += pl022->cur_transfer->len;
        if (pl022->cur_transfer->cs_change)
                pl022->cur_chip->
@@ -1224,7 +1224,7 @@ static irqreturn_t pl022_interrupt_handler(int irq, void *dev_id)
                                 "number of bytes on a 16bit bus?)\n",
                                 (u32) (pl022->rx - pl022->rx_end));
                }
-               /* Update total bytes transfered */
+               /* Update total bytes transferred */
                msg->actual_length += pl022->cur_transfer->len;
                if (pl022->cur_transfer->cs_change)
                        pl022->cur_chip->
@@ -1415,11 +1415,11 @@ static void do_polling_transfer(struct pl022 *pl022)
                       SSP_CR1(pl022->virtbase));
 
                dev_dbg(&pl022->adev->dev, "polling transfer ongoing ...\n");
-               /* FIXME: insert a timeout so we don't hang here indefinately */
+               /* FIXME: insert a timeout so we don't hang here indefinitely */
                while (pl022->tx < pl022->tx_end || pl022->rx < pl022->rx_end)
                        readwriter(pl022);
 
-               /* Update total byte transfered */
+               /* Update total byte transferred */
                message->actual_length += pl022->cur_transfer->len;
                if (pl022->cur_transfer->cs_change)
                        pl022->cur_chip->cs_control(SSP_CHIP_DESELECT);
@@ -1555,7 +1555,7 @@ static int stop_queue(struct pl022 *pl022)
         * A wait_queue on the pl022->busy could be used, but then the common
         * execution path (pump_messages) would be required to call wake_up or
         * friends on every SPI message. Do this instead */
-       while (!list_empty(&pl022->queue) && pl022->busy && limit--) {
+       while ((!list_empty(&pl022->queue) || pl022->busy) && limit--) {
                spin_unlock_irqrestore(&pl022->queue_lock, flags);
                msleep(10);
                spin_lock_irqsave(&pl022->queue_lock, flags);
@@ -2129,7 +2129,7 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
                        "probe - problem registering spi master\n");
                goto err_spi_register;
        }
-       dev_dbg(dev, "probe succeded\n");
+       dev_dbg(dev, "probe succeeded\n");
        /*
         * Disable the silicon block pclk and any voltage domain and just
         * power it up and clock it when it's needed
@@ -2184,7 +2184,7 @@ pl022_remove(struct amba_device *adev)
        spi_unregister_master(pl022->master);
        spi_master_put(pl022->master);
        amba_set_drvdata(adev, NULL);
-       dev_dbg(&adev->dev, "remove succeded\n");
+       dev_dbg(&adev->dev, "remove succeeded\n");
        return 0;
 }
 
index 3c9ade69643f6526128114afbf892aae6958e28a..b50563d320e1705b2c0b7a77d334414fb80cda28 100644 (file)
@@ -480,7 +480,7 @@ static irqreturn_t au1550_spi_dma_irq_callback(struct au1550_spi *hw)
                au1xxx_dbdma_stop(hw->dma_rx_ch);
                au1xxx_dbdma_stop(hw->dma_tx_ch);
 
-               /* get number of transfered bytes */
+               /* get number of transferred bytes */
                hw->rx_count = hw->len - au1xxx_get_dma_residue(hw->dma_rx_ch);
                hw->tx_count = hw->len - au1xxx_get_dma_residue(hw->dma_tx_ch);
 
index 9a6196461b27a0318fc52a8150eb0ee5161fac0c..871e337c917fe7313621e651be0da62891545b05 100644 (file)
@@ -345,7 +345,7 @@ static void int_error_stop(struct dw_spi *dws, const char *msg)
 
 void dw_spi_xfer_done(struct dw_spi *dws)
 {
-       /* Update total byte transfered return count actual bytes read */
+       /* Update total byte transferred return count actual bytes read */
        dws->cur_msg->actual_length += dws->len;
 
        /* Move to next transfer */
@@ -821,7 +821,7 @@ static int stop_queue(struct dw_spi *dws)
 
        spin_lock_irqsave(&dws->lock, flags);
        dws->run = QUEUE_STOPPED;
-       while (!list_empty(&dws->queue) && dws->busy && limit--) {
+       while ((!list_empty(&dws->queue) || dws->busy) && limit--) {
                spin_unlock_irqrestore(&dws->lock, flags);
                msleep(10);
                spin_lock_irqsave(&dws->lock, flags);
index fb0bce564844d572a71d0dad70823dbdcab544b5..b23e452adaf7d94cb09f255e5c745fdd0627500c 100644 (file)
@@ -46,7 +46,7 @@
 #define SPI_INT_RXFI                   (1 << 4)
 #define SPI_INT_MSTI                   (1 << 5)
 
-/* TX RX interrupt level threshhold, max can be 256 */
+/* TX RX interrupt level threshold, max can be 256 */
 #define SPI_INT_THRESHOLD              32
 
 enum dw_ssi_type {
index 0ba35df9a6df910d63ae2bb0375e91f1adf093cd..d3570071e98f47e8b6ecd3d4834eab7278972898 100644 (file)
@@ -512,7 +512,7 @@ static int ep93xx_spi_read_write(struct ep93xx_spi *espi)
  *
  * This function processes one SPI transfer given in @t. Function waits until
  * transfer is complete (may sleep) and updates @msg->status based on whether
- * transfer was succesfully processed or not.
+ * transfer was successfully processed or not.
  */
 static void ep93xx_spi_process_transfer(struct ep93xx_spi *espi,
                                        struct spi_message *msg,
index a429b01d0285edba75055df0dd49b6a5184ec68f..dc25bee8d33f1d6f93deea0030712a681579b1d0 100644 (file)
@@ -700,7 +700,7 @@ static void int_transfer_complete(struct driver_data *drv_data)
        if (!pxa25x_ssp_comp(drv_data))
                write_SSTO(0, reg);
 
-       /* Update total byte transfered return count actual bytes read */
+       /* Update total byte transferred return count actual bytes read */
        drv_data->cur_msg->actual_length += drv_data->len -
                                (drv_data->rx_end - drv_data->rx);
 
@@ -759,7 +759,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data)
 
                /*
                 * PXA25x_SSP has no timeout, set up rx threshould for the
-                * remaing RX bytes.
+                * remaining RX bytes.
                 */
                if (pxa25x_ssp_comp(drv_data)) {
 
@@ -1493,7 +1493,7 @@ static int stop_queue(struct driver_data *drv_data)
         * execution path (pump_messages) would be required to call wake_up or
         * friends on every SPI message. Do this instead */
        drv_data->run = QUEUE_STOPPED;
-       while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) {
+       while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
                spin_unlock_irqrestore(&drv_data->lock, flags);
                msleep(10);
                spin_lock_irqsave(&drv_data->lock, flags);
index 34bb17f030197d0ab395e17b75475ff30c123ec5..82b9a428c323eab0a0ea2fa4d8f033ba67025ee5 100644 (file)
@@ -957,7 +957,7 @@ EXPORT_SYMBOL_GPL(spi_sync);
  * drivers may DMA directly into and out of the message buffers.
  *
  * This call should be used by drivers that require exclusive access to the
- * SPI bus. It has to be preceeded by a spi_bus_lock call. The SPI bus must
+ * SPI bus. It has to be preceded by a spi_bus_lock call. The SPI bus must
  * be released by a spi_bus_unlock call when the exclusive access is over.
  *
  * It returns zero on success, else a negative error code.
index a28462486df8c6f53eabd609a01e18cc8d361314..f706dba165cf6812fc364271d3086424ce12aa36 100644 (file)
@@ -905,7 +905,7 @@ static void bfin_spi_pump_transfers(unsigned long data)
                        "IO write error!\n");
                message->state = ERROR_STATE;
        } else {
-               /* Update total byte transfered */
+               /* Update total byte transferred */
                message->actual_length += drv_data->len_in_bytes;
                /* Move to next transfer of this msg */
                message->state = bfin_spi_next_transfer(drv_data);
@@ -1284,7 +1284,7 @@ static inline int bfin_spi_stop_queue(struct bfin_spi_master_data *drv_data)
         * friends on every SPI message. Do this instead
         */
        drv_data->running = false;
-       while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) {
+       while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
                spin_unlock_irqrestore(&drv_data->lock, flags);
                msleep(10);
                spin_lock_irqsave(&drv_data->lock, flags);
index 900e921ab80e511540b29950bb56d84c46f42476..496f895a002479ac93d71d32c4c21713ebb1f491 100644 (file)
@@ -474,7 +474,7 @@ static int fsl_espi_setup(struct spi_device *spi)
        mpc8xxx_spi = spi_master_get_devdata(spi->master);
        reg_base = mpc8xxx_spi->reg_base;
 
-       hw_mode = cs->hw_mode; /* Save orginal settings */
+       hw_mode = cs->hw_mode; /* Save original settings */
        cs->hw_mode = mpc8xxx_spi_read_reg(
                        &reg_base->csmode[spi->chip_select]);
        /* mask out bits we are going to set */
index a467b20baac8d652ea322daff5b996b07f98072e..6f34963b3c6445f7a0417bd76a6123bc62106233 100644 (file)
@@ -670,7 +670,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus,
                ssb_printk(KERN_ERR PFX "No SPROM available!\n");
                return -ENODEV;
        }
-       if (bus->chipco.dev) {  /* can be unavailible! */
+       if (bus->chipco.dev) {  /* can be unavailable! */
                /*
                 * get SPROM offset: SSB_SPROM_BASE1 except for
                 * chipcommon rev >= 31 or chip ID is 0x4312 and
index 4f7cc8d13277ddb84126430923202f9fa7938ac7..5f34d7a3e3a5eb08aa89ba6c616ed431c1cc57ee 100644 (file)
@@ -185,7 +185,7 @@ bool ssb_is_sprom_available(struct ssb_bus *bus)
        /* this routine differs from specs as we do not access SPROM directly
           on PCMCIA */
        if (bus->bustype == SSB_BUSTYPE_PCI &&
-           bus->chipco.dev &&  /* can be unavailible! */
+           bus->chipco.dev &&  /* can be unavailable! */
            bus->chipco.dev->id.revision >= 31)
                return bus->chipco.capabilities & SSB_CHIPCO_CAP_SPROM;
 
index 18b43fcb4171bc267585bf90dc133c2dd57a1f4c..e3786f161bc34676294d89a1bfa2182bf64e44c9 100644 (file)
@@ -117,8 +117,6 @@ source "drivers/staging/hv/Kconfig"
 
 source "drivers/staging/vme/Kconfig"
 
-source "drivers/staging/memrar/Kconfig"
-
 source "drivers/staging/sep/Kconfig"
 
 source "drivers/staging/iio/Kconfig"
@@ -133,8 +131,6 @@ source "drivers/staging/wlags49_h2/Kconfig"
 
 source "drivers/staging/wlags49_h25/Kconfig"
 
-source "drivers/staging/samsung-laptop/Kconfig"
-
 source "drivers/staging/sm7xx/Kconfig"
 
 source "drivers/staging/dt3155v4l/Kconfig"
index cfd13cd55efbb96778c190299c8e0850a784adc1..f0d5c53156123e15b73d91368f85e56d75237284 100644 (file)
@@ -40,7 +40,6 @@ obj-$(CONFIG_VT6655)          += vt6655/
 obj-$(CONFIG_VT6656)           += vt6656/
 obj-$(CONFIG_HYPERV)           += hv/
 obj-$(CONFIG_VME_BUS)          += vme/
-obj-$(CONFIG_MRST_RAR_HANDLER) += memrar/
 obj-$(CONFIG_DX_SEP)            += sep/
 obj-$(CONFIG_IIO)              += iio/
 obj-$(CONFIG_CS5535_GPIO)      += cs5535_gpio/
@@ -49,7 +48,6 @@ obj-$(CONFIG_XVMALLOC)                += zram/
 obj-$(CONFIG_ZCACHE)           += zcache/
 obj-$(CONFIG_WLAGS49_H2)       += wlags49_h2/
 obj-$(CONFIG_WLAGS49_H25)      += wlags49_h25/
-obj-$(CONFIG_SAMSUNG_LAPTOP)   += samsung-laptop/
 obj-$(CONFIG_FB_SM7XX)         += sm7xx/
 obj-$(CONFIG_VIDEO_DT3155)     += dt3155v4l/
 obj-$(CONFIG_CRYSTALHD)                += crystalhd/
index c6488e0d1305def2366cd462cbe611a66aacc47b..41223f953589a117f8b89923e7838e71ec9d5c20 100644 (file)
@@ -237,7 +237,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQE
                          pProt->CreditsCurrentSeek));
         
         if (pProt->CreditsAvailable >= pProt->CreditsCurrentSeek) {
-                /* we have enough credits to fullfill at least 1 packet waiting in the queue */
+                /* we have enough credits to fulfill at least 1 packet waiting in the queue */
             pProt->CreditsCurrentSeek = 0;
             pProt->SendStateFlags &= ~HCI_SEND_WAIT_CREDITS;  
             doPendingSends = true;
@@ -285,7 +285,7 @@ static void FailureCallback(void *pContext, int Status)
 {
     struct gmbox_proto_hci_uart  *pProt = (struct gmbox_proto_hci_uart *)pContext; 
     
-        /* target assertion occured */           
+        /* target assertion occurred */           
     NotifyTransportFailure(pProt, Status);  
 }
 
@@ -507,7 +507,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
         
     } while (false);
         
-        /* check if we need to disable the reciever */
+        /* check if we need to disable the receiver */
     if (status || blockRecv) {
         DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_DISABLE, PROC_IO_SYNC); 
     }
index 67a058492c4d981dc2657a119706c8a85a5a6266..5ead58d5febd9514fe3f06f07ec240952a0baa9b 100644 (file)
@@ -72,7 +72,7 @@ aggr_process_bar(void *cntxt, u8 tid, u16 seq_no);
  * This event is to initiate/modify the receive side window.
  * Target will send WMI_ADDBA_REQ_EVENTID event to host - to setup 
  * recv re-ordering queues. Target will negotiate ADDBA with peer, 
- * and indicate via this event after succesfully completing the 
+ * and indicate via this event after successfully completing the 
  * negotiation. This happens in two situations:
  *  1. Initial setup of aggregation
  *  2. Renegotiation of current recv window.
index 08cb013090beefdb87748946f51f2d4b708535f3..379d65224e3a171eb9d20e61036ac6072166fb7e 100644 (file)
 #define PAL_NUM_COMPL_DATA_BLOCK_EVENT              0x48
 #define PAL_SHORT_RANGE_MODE_CHANGE_COMPL_EVENT     0x4C
 #define PAL_AMP_STATUS_CHANGE_EVENT                 0x4D
-/*======== End of PAL events definiton =================*/
+/*======== End of PAL events definition =================*/
 
 
 /*======== Timeouts (not part of HCI cmd, but input to PAL engine) =========*/
@@ -430,7 +430,7 @@ typedef struct  hci_event_hw_err_t {
     u8 hw_err_code;
 } POSTPACK HCI_EVENT_HW_ERR;
 
-/* Flush occured event */
+/* Flush occurred event */
 /* Qos Violation event */
 typedef struct  hci_event_handle_t {
     u8 event_code;
index 3a3d00da0b8116dda955d797fe3b7f80412fcc4d..b7a123086ccf823e49d36663937d07fca4dee04e 100644 (file)
@@ -44,7 +44,7 @@ extern "C" {
 #define DBGLOG_MODULEID_NUM_MAX          16 /* Upper limit is width of mask */
 
 /*
- * Please ensure that the definition of any new module intrduced is captured
+ * Please ensure that the definition of any new module introduced is captured
  * between the DBGLOG_MODULEID_START and DBGLOG_MODULEID_END defines. The 
  * structure is required for the parser to correctly pick up the values for
  * different modules.
index 5c40d8a2229d7a492c28b66671a4725f0bc9021d..7027fac8f37edf47bbd7491499ea01c4ff17be64 100644 (file)
@@ -92,7 +92,7 @@ typedef PREPACK struct {
 #define EPPING_CMD_RESET_RECV_CNT       2   /* reset recv count */
 #define EPPING_CMD_CAPTURE_RECV_CNT     3   /* fetch recv count, 4-byte count returned in CmdBuffer_t */
 #define EPPING_CMD_NO_ECHO              4   /* non-echo packet test (tx-only) */
-#define EPPING_CMD_CONT_RX_START        5   /* continous RX packets, parameters are in CmdBuffer_h */
+#define EPPING_CMD_CONT_RX_START        5   /* continuous RX packets, parameters are in CmdBuffer_h */
 #define EPPING_CMD_CONT_RX_STOP         6   /* stop continuous RX packet transmission */
 
     /* test command parameters may be no more than 8 bytes */
index 8bfc75940c8f3336b7a35bdf19bd8f06ec46ef08..a9e05fa0f6598965cd42b48c732a8cb615e5a133 100644 (file)
@@ -31,7 +31,7 @@
  */
 typedef enum {
 #if defined(AR6002_REV4) || defined(AR6003)
-/* Add these definitions for compatability  */
+/* Add these definitions for compatibility  */
 #define WHAL_INI_DATA_ID_BB_RFGAIN_LNA1 WHAL_INI_DATA_ID_BB_RFGAIN
 #define WHAL_INI_DATA_ID_BB_RFGAIN_LNA2 WHAL_INI_DATA_ID_BB_RFGAIN
     WHAL_INI_DATA_ID_NULL               =0,
index 9ca1f2ac2cbf3b0481591ca96ebbd6ae81ffcfcd..7d94aee508b3eecfc3b5a5b8578e953178ca8446 100644 (file)
@@ -43,8 +43,8 @@ typedef enum {
     PN15_PATTERN
 }TX_DATA_PATTERN;
 
-/* Continous tx
-   mode : TCMD_CONT_TX_OFF - Disabling continous tx
+/* Continuous tx
+   mode : TCMD_CONT_TX_OFF - Disabling continuous tx
           TCMD_CONT_TX_SINE - Enable continuous unmodulated tx
           TCMD_CONT_TX_FRAME- Enable continuous modulated tx
    freq : Channel freq in Mhz. (e.g 2412 for channel 1 in 11 g)
index c645af373442dffe11d5fd48d908521b3f9b8aaf..4e6343485362813b95d3500a7eeeb2a8fe7f404a 100644 (file)
@@ -1568,8 +1568,8 @@ typedef PREPACK struct {
                                    switch to ps-poll mode
                                   default = 3 */
 
-       u32 scoContStompMax;   /* max number of continous stomp allowed in opt mode.
-                                   if excedded switch to pspoll mode
+       u32 scoContStompMax;   /* max number of continuous stomp allowed in opt mode.
+                                   if exceeded switch to pspoll mode
                                     default = 3 */
 
        u32 scoMinlowRateMbps; /* Low rate threshold */
@@ -2084,7 +2084,7 @@ typedef PREPACK struct {
 /*
  * BSS INFO HDR version 2.0
  * With 6 bytes HTC header and 6 bytes of WMI header
- * WMI_BSS_INFO_HDR cannot be accomodated in the removed 802.11 management
+ * WMI_BSS_INFO_HDR cannot be accommodated in the removed 802.11 management
  * header space.
  * - Reduce the ieMask to 2 bytes as only two bit flags are used
  * - Remove rssi and compute it on the host. rssi = snr - 95
@@ -2911,7 +2911,7 @@ typedef PREPACK struct {
     u8 pktID; /* packet ID to identify parent packet */
     u8 rateIdx; /* rate index on successful transmission */
     u8 ackFailures; /* number of ACK failures in tx attempt */
-#if 0 /* optional params currently ommitted. */
+#if 0 /* optional params currently omitted. */
     u32 queueDelay; // usec delay measured Tx Start time - host delivery time
     u32 mediaDelay; // usec delay measured ACK rx time - host delivery time
 #endif
index 5ebb8285d135ceb4341099aa5bb90cb9da7257aa..36acba66d49f321115dee8083160209125e6ff9e 100644 (file)
@@ -191,7 +191,7 @@ typedef PREPACK struct {
 } POSTPACK WMIX_GPIO_INTR_ACK_CMD;
 
 /*
- * Target informs Host of GPIO interrupts that have ocurred since the
+ * Target informs Host of GPIO interrupts that have occurred since the
  * last WMIX_GIPO_INTR_ACK_CMD was received.  Additional information --
  * the current GPIO input values is provided -- in order to support
  * use of a GPIO interrupt as a Data Valid signal for other GPIO pins.
index 1bc2488788ab65b15dfa83fca59d292e23f86b02..4fb767559f8292a43e2e733f589183658503853e 100644 (file)
@@ -209,7 +209,7 @@ struct htc_endpoint_credit_dist {
 typedef enum _HTC_CREDIT_DIST_REASON {
     HTC_CREDIT_DIST_SEND_COMPLETE = 0,     /* credits available as a result of completed
                                               send operations (MANDATORY) resulting in credit reports */
-    HTC_CREDIT_DIST_ACTIVITY_CHANGE = 1,   /* a change in endpoint activity occured (OPTIONAL) */
+    HTC_CREDIT_DIST_ACTIVITY_CHANGE = 1,   /* a change in endpoint activity occurred (OPTIONAL) */
     HTC_CREDIT_DIST_SEEK_CREDITS,          /* an endpoint needs to "seek" credits (OPTIONAL) */
     HTC_DUMP_CREDIT_STATE                  /* for debugging, dump any state information that is kept by
                                               the distribution function */
@@ -253,7 +253,7 @@ struct htc_endpoint_stats {
     u32 RxPacketsBundled;       /* count of recv packets received in a bundle */
     u32 RxBundleLookAheads;     /* count of number of bundled lookaheads */
     u32 RxBundleIndFromHdr;     /* count of the number of bundle indications from the HTC header */
-    u32 RxAllocThreshHit;       /* count of the number of times the recv allocation threshhold was hit */
+    u32 RxAllocThreshHit;       /* count of the number of times the recv allocation threshold was hit */
     u32 RxAllocThreshBytes;     /* total number of bytes */
 };
 
@@ -391,7 +391,7 @@ int    HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket);
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 void        HTCStop(HTC_HANDLE HTCHandle);
 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-  @desc: Destory HTC service
+  @desc: Destroy HTC service
   @function name: HTCDestroy
   @input: HTCHandle 
   @output:
index ae54e1f48e506d0295fba48a46406d70cdc39935..33fa0209026d7e3982602686f5e2419a47afd229 100644 (file)
@@ -341,7 +341,7 @@ static void SeekCredits(struct common_credit_state_info *pCredInfo,
         credits = min(pCredInfo->CurrentFreeCredits,pEPDist->TxCreditsSeek);
 
         if (credits >= pEPDist->TxCreditsSeek) {
-                /* we found some to fullfill the seek request */
+                /* we found some to fulfill the seek request */
             break;
         }
 
@@ -364,8 +364,8 @@ static void SeekCredits(struct common_credit_state_info *pCredInfo,
 
             if ((pCurEpDist->TxCreditsAssigned - need) >= pCurEpDist->TxCreditsMin) {
                     /* the current one has been allocated more than it's minimum and it
-                     * has enough credits assigned above it's minimum to fullfill our need
-                     * try to take away just enough to fullfill our need */
+                     * has enough credits assigned above it's minimum to fulfill our need
+                     * try to take away just enough to fulfill our need */
                 ReduceCredits(pCredInfo,
                               pCurEpDist,
                               pCurEpDist->TxCreditsAssigned - need);
index c96f6e9c99c6bbdd88899c6869393fead708ee52..4aa75ee2cb130dbbd8ec651e3a9d9d0a36e6694c 100644 (file)
@@ -372,7 +372,7 @@ void android_ar6k_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bo
             }
         }
         if (needWake) {
-            /* keep host wake up if there is any event and packate comming in*/
+            /* keep host wake up if there is any event and packate coming in*/
             if (wowledon) {
                 char buf[32];
                 int len = sprintf(buf, "on");
index 27cb02dfad3cc7f116b66c083a751fc382098f8f..97d6ce63b5c06d25281a9f0850261c2e583dad4d 100644 (file)
@@ -520,7 +520,7 @@ dbglog_parse_debug_logs(s8 *datap, u32 len)
 int
 ar6000_dbglog_get_debug_logs(struct ar6_softc *ar)
 {
-    u32 data[8]; /* Should be able to accomodate struct dbglog_buf_s */
+    u32 data[8]; /* Should be able to accommodate struct dbglog_buf_s */
     u32 address;
     u32 length;
     u32 dropped;
@@ -2063,7 +2063,7 @@ ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs)
  * - In case of surprise removal, the hcd already frees up the pending
  *   for the device and hence there is no need to unregister the function
  *   driver inorder to get these requests. For planned removal, the function
- *   driver has to explictly unregister itself to have the hcd return all the
+ *   driver has to explicitly unregister itself to have the hcd return all the
  *   pending requests before the data structures for the devices are freed up.
  *   Note that as per the current implementation, the function driver will
  *   end up releasing all the devices since there is no API to selectively
@@ -2982,7 +2982,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
     /* If target is not associated */
     if( (!ar->arConnected && !bypasswmi)
 #ifdef CONFIG_HOST_TCMD_SUPPORT
-     /* TCMD doesnt support any data, free the buf and return */
+     /* TCMD doesn't support any data, free the buf and return */
     || (ar->arTargetMode == AR6000_TCMD_MODE)
 #endif
                                             ) {
@@ -6393,7 +6393,7 @@ static void DoHTCSendPktsTest(struct ar6_softc *ar, int MapNo, HTC_ENDPOINT_ID e
 /*
  * Add support for adding and removing a virtual adapter for soft AP.
  * Some OS requires different adapters names for station and soft AP mode.
- * To support these requirement, create and destory a netdevice  instance
+ * To support these requirement, create and destroy a netdevice  instance
  * when the AP mode is operational. A full fledged support for virual device
  * is not implemented. Rather a virtual interface is created and is linked
  * with the existing physical device instance during the operation of the 
index 0ddaee21f9d79dcb9f8f733fde51244a12f13cf1..a00bf0a598711b6459a3363204cdf0494484fe95 100644 (file)
@@ -4867,7 +4867,7 @@ wmi_set_country(struct wmi_t *wmip, u8 *countryCode)
 #ifdef CONFIG_HOST_TCMD_SUPPORT
 /* WMI  layer doesn't need to know the data type of the test cmd.
    This would be beneficial for customers like Qualcomm, who might
-   have different test command requirements from differnt manufacturers
+   have different test command requirements from different manufacturers
  */
 int
 wmi_test_cmd(struct wmi_t *wmip, u8 *buf, u32 len)
index 32909e2938d57f0d730ba59c6bcd852300e73d44..20cca24ff5f0138a69cac049e3ba1cb29e3b1b84 100644 (file)
@@ -412,7 +412,7 @@ struct _MINI_ADAPTER
 
        // this to keep track of the Tx and Rx MailBox Registers.
        atomic_t                    CurrNumFreeTxDesc;
-       // to keep track the no of byte recieved
+       // to keep track the no of byte received
        USHORT                          PrevNumRecvDescs;
        USHORT                          CurrNumRecvDescs;
        UINT                            u32TotalDSD;
@@ -527,7 +527,7 @@ struct _MINI_ADAPTER
        BOOLEAN                 bStatusWrite;
        UINT                    uiNVMDSDSize;
        UINT                    uiVendorExtnFlag;
-        //it will always represent choosed DSD at any point of time.
+        //it will always represent chosen DSD at any point of time.
         // Generally it is Active DSD but in case of NVM RD/WR it might be different.
        UINT                    ulFlashCalStart;
        ULONG                   ulFlashControlSectionStart;
@@ -546,10 +546,10 @@ struct _MINI_ADAPTER
        PFLASH_CS_INFO psFlashCSInfo ;
        PFLASH2X_VENDORSPECIFIC_INFO psFlash2xVendorInfo;
        UINT uiFlashBaseAdd; //Flash start address
-       UINT uiActiveISOOffset; //Active ISO offset choosen before f/w download
+       UINT uiActiveISOOffset; //Active ISO offset chosen before f/w download
        FLASH2X_SECTION_VAL eActiveISO; //Active ISO section val
-       FLASH2X_SECTION_VAL eActiveDSD; //Active DSD val choosen before f/w download
-       UINT uiActiveDSDOffsetAtFwDld;  //For accessing Active DSD choosen before f/w download
+       FLASH2X_SECTION_VAL eActiveDSD; //Active DSD val chosen before f/w download
+       UINT uiActiveDSDOffsetAtFwDld;  //For accessing Active DSD chosen before f/w download
        UINT uiFlashLayoutMajorVersion ;
        UINT uiFlashLayoutMinorVersion;
        BOOLEAN bAllDSDWriteAllow ;
index 9be184f143e53eec564596b0bf838e228bf08dcc..c0ee95a713432090005d08d925fd7986db6f7dcb 100644 (file)
@@ -384,7 +384,7 @@ static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter,stConvergenceSLT
                }
                if(psfCSType->cCPacketClassificationRule.u8Protocol == 0)
                {
-                       //we didnt get protocol field filled in by the BS
+                       //we didn't get protocol field filled in by the BS
                        pstClassifierEntry->ucProtocolLength=0;
                }
                else
@@ -879,7 +879,7 @@ static VOID CopyToAdapter( register PMINI_ADAPTER Adapter,          /**<Pointer to the A
 
                                                /*
                                                        Passing the argument u8PHSI instead of clsid. Because for DL with no classifier rule,
-                                                       clsid will be zero hence we cant have multiple PHS rules for the same SF.
+                                                       clsid will be zero hence we can't have multiple PHS rules for the same SF.
                                                        To support multiple PHS rule, passing u8PHSI.
                                                */
 
@@ -1103,7 +1103,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
        BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  "u8TrafficIndicationPreference    : 0x%X",
                pstAddIndication->sfAuthorizedSet.u8TrafficIndicationPreference);
 
-       BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  " Total Classifiers Recieved              : 0x%X",pstAddIndication->sfAuthorizedSet.u8TotalClassifiers);
+       BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  " Total Classifiers Received              : 0x%X",pstAddIndication->sfAuthorizedSet.u8TotalClassifiers);
 
        nCurClassifierCnt = pstAddIndication->sfAuthorizedSet.u8TotalClassifiers;
 
@@ -1305,7 +1305,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
        BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  "u8TrafficIndicationPreference    : 0x%02X",
                pstAddIndication->sfAdmittedSet.u8TrafficIndicationPreference);
 
-       BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  " Total Classifiers Recieved              : 0x%X",pstAddIndication->sfAdmittedSet.u8TotalClassifiers);
+       BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  " Total Classifiers Received              : 0x%X",pstAddIndication->sfAdmittedSet.u8TotalClassifiers);
 
        nCurClassifierCnt = pstAddIndication->sfAdmittedSet.u8TotalClassifiers;
 
@@ -1502,7 +1502,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
        BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  " u8TrafficIndicationPreference   : 0x%X",
                pstAddIndication->sfActiveSet.u8TrafficIndicationPreference);
 
-       BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  " Total Classifiers Recieved              : 0x%X",pstAddIndication->sfActiveSet.u8TotalClassifiers);
+       BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL,  " Total Classifiers Received              : 0x%X",pstAddIndication->sfActiveSet.u8TotalClassifiers);
 
        nCurClassifierCnt = pstAddIndication->sfActiveSet.u8TotalClassifiers;
 
@@ -1696,7 +1696,7 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer,UINT *p
                //No Special handling send the message as it is
                return 1;
        }
-       // For DSA_REQ, only upto "psfAuthorizedSet" parameter should be accessed by driver!
+       // For DSA_REQ, only up to "psfAuthorizedSet" parameter should be accessed by driver!
 
        pstAddIndication=kmalloc(sizeof(*pstAddIndication), GFP_KERNEL);
        if(NULL==pstAddIndication)
@@ -1788,7 +1788,7 @@ static inline stLocalSFAddIndicationAlt
        BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage ");
        /*
        //Need to Allocate memory to contain the SUPER Large structures
-       //Our driver cant create these structures on Stack :(
+       //Our driver can't create these structures on Stack :(
        */
        pstAddIndicationDest=kmalloc(sizeof(stLocalSFAddIndicationAlt), GFP_KERNEL);
 
@@ -1957,7 +1957,7 @@ INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter)
 {
        /*
        //Need to Allocate memory to contain the SUPER Large structures
-       //Our driver cant create these structures on Stack
+       //Our driver can't create these structures on Stack
        */
        Adapter->caDsxReqResp=kmalloc(sizeof(stLocalSFAddIndicationAlt)+LEADER_SIZE, GFP_KERNEL);
        if(!Adapter->caDsxReqResp)
index f17a4f13474c3904d605e405da096a4ec10faee6..e34531b638e82f38bf5db17387f914d221b7269e 100644 (file)
@@ -62,7 +62,7 @@ typedef struct _S_MIBS_HOST_INFO
        ULONG                   NumDesUsed;
        ULONG                   CurrNumFreeDesc;
        ULONG                   PrevNumFreeDesc;
-       // to keep track the no of byte recieved
+       // to keep track the no of byte received
        ULONG                   PrevNumRcevBytes;
        ULONG                   CurrNumRcevBytes;
 
index 91b6fbe33c9160f1f130e50e7211ed052ee5c03c..5b4fd372ec367a4a818ddf34e9921b27eea36987 100644 (file)
@@ -287,7 +287,7 @@ static BOOLEAN MatchSrcIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule,IPV6Head
 
        for(uiLoopIndex=0;uiLoopIndex<uiCountIPSrcAddresses;uiLoopIndex+=uiIpv6AddrNoLongWords)
        {
-               BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Address In Recieved Packet : \n ");
+               BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Address In Received Packet : \n ");
                DumpIpv6Address(aulSrcIP);
                BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Mask In Classifier Rule: \n");
                DumpIpv6Address(&pstClassifierRule->stSrcIpAddress.ulIpv6Mask[uiLoopIndex]);
@@ -340,7 +340,7 @@ static BOOLEAN MatchDestIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule,IPV6Hea
 
        for(uiLoopIndex=0;uiLoopIndex<uiCountIPDestinationAddresses;uiLoopIndex+=uiIpv6AddrNoLongWords)
        {
-               BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Address In Recieved Packet : \n ");
+               BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Address In Received Packet : \n ");
                DumpIpv6Address(aulDestIP);
                BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Mask In Classifier Rule: \n");
                DumpIpv6Address(&pstClassifierRule->stDestIpAddress.ulIpv6Mask[uiLoopIndex]);
index bf5c0ad86610936a20f715ba2d7c004bfec2b86a..96fa4ead7930052f3abb3ad9e123eab84f051aca 100644 (file)
@@ -11,7 +11,7 @@ Input parameters:             IN PMINI_ADAPTER Adapter   - Miniport Adapter Context
 
 
 Return:                                BCM_STATUS_SUCCESS - If Wakeup of the HW Interface was successful.
-                                               Other           - If an error occured.
+                                               Other           - If an error occurred.
 */
 
 
@@ -26,7 +26,7 @@ Input parameters:             IN PMINI_ADAPTER Adapter   - Miniport Adapter Context
 
 
 Return:                                BCM_STATUS_SUCCESS - If Idle mode response related HW configuration was successful.
-                                               Other           - If an error occured.
+                                               Other           - If an error occurred.
 */
 
 /*
index 220ff922bdcffca89cfa4dbb1d20f223c54632d6..67719d57256d237e31a85c2bde10aa47b3d27986 100644 (file)
@@ -80,8 +80,8 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
                }
                case -EINPROGRESS:
                {
-                       //This situation may happend when URBunlink is used. for detail check usb_unlink_urb documentation.
-                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occured... something very bad is going on");
+                       //This situation may happened when URBunlink is used. for detail check usb_unlink_urb documentation.
+                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on");
                        break ;
                        //return;
                }
index 533f8ebe0f8426ff528f2ef6f1596db1b40ac494..806ef5d18522dedd6a976f32422b408fd238a0a6 100644 (file)
@@ -34,7 +34,7 @@ GetBulkInRcb(PS_INTERFACE_ADAPTER psIntfAdapter)
        return pRcb;
 }
 
-/*this is receive call back - when pkt avilable for receive (BULK IN- end point)*/
+/*this is receive call back - when pkt available for receive (BULK IN- end point)*/
 static void read_bulk_callback(struct urb *urb)
 {
        struct sk_buff *skb = NULL;
@@ -123,7 +123,7 @@ static void read_bulk_callback(struct urb *urb)
        if((ntohs(pLeader->Vcid) == VCID_CONTROL_PACKET) ||
            (!(pLeader->Status >= 0x20  &&  pLeader->Status <= 0x3F)))
        {
-           BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_CTRL, DBG_LVL_ALL, "Recived control pkt...");
+           BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_CTRL, DBG_LVL_ALL, "Received control pkt...");
                *(PUSHORT)skb->data = pLeader->Status;
                memcpy(skb->data+sizeof(USHORT), urb->transfer_buffer +
                        (sizeof(LEADER)), pLeader->PLength);
@@ -142,7 +142,7 @@ static void read_bulk_callback(struct urb *urb)
                  * Data Packet, Format a proper Ethernet Header
                  * and give it to the stack
                  */
-        BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Recived Data pkt...");
+        BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Received Data pkt...");
                skb_reserve(skb, 2 + SKB_RESERVE_PHS_BYTES);
                memcpy(skb->data+ETH_HLEN, (PUCHAR)urb->transfer_buffer + sizeof(LEADER), pLeader->PLength);
                skb->dev = Adapter->dev;
@@ -151,7 +151,7 @@ static void read_bulk_callback(struct urb *urb)
                skb_put (skb, pLeader->PLength + ETH_HLEN);
                Adapter->PackInfo[QueueIndex].uiTotalRxBytes+=pLeader->PLength;
                Adapter->PackInfo[QueueIndex].uiThisPeriodRxBytes+= pLeader->PLength;
-        BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Recived Data pkt of len :0x%X", pLeader->PLength);
+        BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Received Data pkt of len :0x%X", pLeader->PLength);
 
                if(netif_running(Adapter->dev))
                {
@@ -237,7 +237,7 @@ Input parameters:           IN PMINI_ADAPTER Adapter   - Miniport Adapter Context
 
 
 Return:                                TRUE  - If Rx was successful.
-                                       Other - If an error occured.
+                                       Other - If an error occurred.
 */
 
 BOOLEAN InterfaceRx (PS_INTERFACE_ADAPTER psIntfAdapter)
index e4f8eb70be1e2131de6901f5d46ea56cd75f7b8e..f859cf1c47b04f7dad66c259c5534ff11ff6af57 100644 (file)
@@ -241,7 +241,7 @@ typedef struct bulkwrmbuffer
 
 typedef enum _FLASH2X_SECTION_VAL
 {
-       NO_SECTION_VAL = 0, //no section is choosen when absolute offset is given for RD/WR
+       NO_SECTION_VAL = 0, //no section is chosen when absolute offset is given for RD/WR
        ISO_IMAGE1,
        ISO_IMAGE2,
        DSD0,
index f4cf41c0e46bbc51e019338c37e170bfb35d7965..a55d4228e8e056d886d56934cd45ed50487e4f0d 100644 (file)
@@ -213,7 +213,7 @@ static VOID CheckAndSendPacketFromIndex(PMINI_ADAPTER Adapter, PacketInfo *psSF)
                                BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "For Queue: %zd\n", psSF-Adapter->PackInfo);
                                BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "\nAvailable Tokens = %d required = %d\n",
                                        psSF->uiCurrentTokenCount, iPacketLen);
-                               //this part indicates that becuase of non-availability of the tokens
+                               //this part indicates that because of non-availability of the tokens
                                //pkt has not been send out hence setting the pending flag indicating the host to send it out
                                //first next iteration  .
                                psSF->uiPendedLast = TRUE;
index d624f35d055139888f65f95029a82c94da4eedbb..c5003b62234c87654eb589136d8bcd19d033cb4f 100644 (file)
@@ -602,7 +602,7 @@ VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter,PUCHAR pucBuffer)
                                Adapter->LinkStatus=LINKUP_DONE;
                                Adapter->bPHSEnabled = *(pucBuffer+3);
                        Adapter->bETHCSEnabled = *(pucBuffer+4) & ETH_CS_MASK;
-                               BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "PHS Support Status Recieved In LinkUp Ack : %x \n",Adapter->bPHSEnabled);
+                               BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "PHS Support Status Received In LinkUp Ack : %x \n",Adapter->bPHSEnabled);
                                if((FALSE == Adapter->bShutStatus)&&
                                        (FALSE == Adapter->IdleMode))
                                {
@@ -1153,7 +1153,7 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter)
 
        /*
      * 1. If the LED Settings fails, do not stop and do the Firmware download.
-     * 2. This init would happend only if the cfg file is present, else
+     * 2. This init would happened only if the cfg file is present, else
      *    call from the ioctl context.
      */
 
@@ -1185,7 +1185,7 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter)
                status = PropagateCalParamsFromFlashToMemory(ps_adapter);
                if(status)
                {
-                       BCM_DEBUG_PRINT(ps_adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL," Propogation of Cal param failed .." );
+                       BCM_DEBUG_PRINT(ps_adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL," Propagation of Cal param failed .." );
                        goto OUT;
                }
        }
index feade9451b2e01c279291c4baca1ba0f34e4d49d..c97020f0fb6a3aa26d82c0373df39b01e4c06dc9 100644 (file)
@@ -727,7 +727,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "%s  CLS UserPrio:%x CLS VLANID:%x\n",__FUNCTION__,ntohs(*((USHORT *)pstClassifierRule->usUserPriority)),pstClassifierRule->usVLANID);
 
-       /* In case FW didn't recieve the TLV, the priority field should be ignored */
+       /* In case FW didn't receive the TLV, the priority field should be ignored */
        if(pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_USER_PRIORITY_VALID))
        {
                if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame)
index 890778450a86fcefd55d60015064e0ce7068c021..ab131806e2c9ce0431cff2e0a4cda0dde95691cd 100644 (file)
@@ -21,7 +21,7 @@
 #define VENDOR_PHS_PARAM_LENGTH 10
 #define MAX_NUM_ACTIVE_BS 10
 #define AUTH_TOKEN_LENGTH      10
-#define NUM_HARQ_CHANNELS      16      //Changed from 10 to 16 to accomodate all HARQ channels
+#define NUM_HARQ_CHANNELS      16      //Changed from 10 to 16 to accommodate all HARQ channels
 #define VENDOR_CLASSIFIER_PARAM_LENGTH 1 //Changed the size to 1 byte since we dnt use it
 #define  VENDOR_SPECIF_QOS_PARAM 1
 #define VENDOR_PHS_PARAM_LENGTH        10
@@ -109,13 +109,13 @@ typedef struct _stPhsRuleSI {
     B_UINT8                         u8PHSI;
        /**  PHSF Length Of The Service Flow*/
     B_UINT8                         u8PHSFLength;
-    /** String of bytes containing header information to be supressed by the sending CS and reconstructed by the receiving CS*/
+    /** String of bytes containing header information to be suppressed by the sending CS and reconstructed by the receiving CS*/
     B_UINT8                         u8PHSF[MAX_PHS_LENGTHS];
        /**  PHSM Length Of The Service Flow*/
     B_UINT8                         u8PHSMLength;
        /**  PHS Mask for the SF*/
     B_UINT8                         u8PHSM[MAX_PHS_LENGTHS];
-       /**  8bit Total number of bytes to be supressed for the Service Flow*/
+       /**  8bit Total number of bytes to be suppressed for the Service Flow*/
     B_UINT8                         u8PHSS;
        /**  8bit Indicates whether or not Packet Header contents need to be verified prior to supression */
     B_UINT8                         u8PHSV;
index c7292373a65f8fb4c873f4d1a7b05005834b29bd..4da5b7b54a1a9f32946ebd5d9b113c2a16561004 100644 (file)
@@ -313,7 +313,7 @@ INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter)
 //             uiNumBytes - Number of bytes to be read from the EEPROM.
 //
 // Returns:
-//             OSAL_STATUS_SUCCESS - if EEPROM read is successfull.
+//             OSAL_STATUS_SUCCESS - if EEPROM read is successful.
 //             <FAILURE>                       - if failed.
 //-----------------------------------------------------------------------------
 
@@ -431,7 +431,7 @@ INT BeceemEEPROMBulkRead(
 //             uiNumBytes - Number of bytes to be read from the FLASH.
 //
 // Returns:
-//             OSAL_STATUS_SUCCESS - if FLASH read is successfull.
+//             OSAL_STATUS_SUCCESS - if FLASH read is successful.
 //             <FAILURE>                       - if failed.
 //-----------------------------------------------------------------------------
 
@@ -1174,7 +1174,7 @@ static INT BeceemFlashBulkWrite(
        if(NULL == pTempBuff)
                goto BeceemFlashBulkWrite_EXIT;
 //
-// check if the data to be written is overlapped accross sectors
+// check if the data to be written is overlapped across sectors
 //
        if(uiOffset+uiNumBytes < uiSectBoundary)
        {
@@ -1390,7 +1390,7 @@ static INT BeceemFlashBulkWriteStatus(
                goto BeceemFlashBulkWriteStatus_EXIT;
 
 //
-// check if the data to be written is overlapped accross sectors
+// check if the data to be written is overlapped across sectors
 //
        if(uiOffset+uiNumBytes < uiSectBoundary)
        {
@@ -2020,7 +2020,7 @@ INT BeceemEEPROMBulkWrite(
 //             uiNumBytes - Number of bytes to be read from the NVM.
 //
 // Returns:
-//             OSAL_STATUS_SUCCESS - if NVM read is successfull.
+//             OSAL_STATUS_SUCCESS - if NVM read is successful.
 //             <FAILURE>                       - if failed.
 //-----------------------------------------------------------------------------
 
@@ -2083,7 +2083,7 @@ INT BeceemNVMRead(
 //             uiNumBytes - Number of bytes to be written..
 //
 // Returns:
-//             OSAL_STATUS_SUCCESS - if NVM write is successfull.
+//             OSAL_STATUS_SUCCESS - if NVM write is successful.
 //             <FAILURE>                       - if failed.
 //-----------------------------------------------------------------------------
 
@@ -2218,7 +2218,7 @@ INT BeceemNVMWrite(
 //          uiSectorSize - sector size
 //
 // Returns:
-//             OSAL_STATUS_SUCCESS - if NVM write is successfull.
+//             OSAL_STATUS_SUCCESS - if NVM write is successful.
 //             <FAILURE>                       - if failed.
 //-----------------------------------------------------------------------------
 
@@ -2430,7 +2430,7 @@ INT BcmInitNVM(PMINI_ADAPTER ps_adapter)
 *Input Parameter:
 *              Adapter data structure
 *Return Value :
-*              0. means sucess;
+*              0. means success;
 */
 /***************************************************************************/
 
@@ -2998,7 +2998,7 @@ INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlas
        /*
        *       Considering all the section for which end offset can be calculated or directly given
        *       in CS Structure. if matching case does not exist, return STATUS_FAILURE indicating section
-       *       endoffset can't be calculated or given in CS Stucture.
+       *       endoffset can't be calculated or given in CS Structure.
        */
 
        INT SectStartOffset = 0 ;
@@ -3173,7 +3173,7 @@ INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2
 *      @uiNumBytes : Number of Bytes for Read
 *
 *      Return value:-
-*              return true on sucess and STATUS_FAILURE on fail.
+*              return true on success and STATUS_FAILURE on fail.
 */
 
 INT BcmFlash2xBulkRead(
@@ -3241,7 +3241,7 @@ INT BcmFlash2xBulkRead(
 *      @uiNumBytes : Number of Bytes for Write
 *
 *      Return value:-
-*              return true on sucess and STATUS_FAILURE on fail.
+*              return true on success and STATUS_FAILURE on fail.
 *
 */
 
@@ -3308,7 +3308,7 @@ INT BcmFlash2xBulkWrite(
 *      @Adapter :-Drivers private Data Structure
 *
 *      Return Value:-
-*              Return STATUS_SUCESS if get sucess in setting the right DSD else negaive error code
+*              Return STATUS_SUCESS if get success in setting the right DSD else negaive error code
 *
 **/
 static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter)
@@ -3384,7 +3384,7 @@ static INT BcmGetActiveISO(PMINI_ADAPTER Adapter)
 *      @uiOffset : Offset provided in the Flash
 *
 *      Return Value:-
-*      Sucess:-TRUE ,  offset is writable
+*      Success:-TRUE ,  offset is writable
 *      Failure:-FALSE, offset is RO
 *
 **/
@@ -3441,7 +3441,7 @@ static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap)
        @Adapter:-Driver private Data Structure
 *
 *      Return value:-
-*      Sucess:- STATUS_SUCESS
+*      Success:- STATUS_SUCESS
 *      Failure:- negative error code
 **/
 
@@ -3783,7 +3783,7 @@ INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectV
                                        // This is a SPECIAL Case which will only happen if the current highest priority ISO has priority value = 0x7FFFFFFF.
                                        // We will write 1 to the current Highest priority ISO And then shall increase the priority of the requested ISO
                                        // by user
-                                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happend, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal);
+                                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happened, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal);
                                        SectImagePriority = htonl(0x1);
                                        Status = BcmFlash2xBulkWrite(Adapter,
                                                                &SectImagePriority,
@@ -3853,7 +3853,7 @@ INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectV
                                        // This is a SPECIAL Case which will only happen if the current highest priority DSD has priority value = 0x7FFFFFFF.
                                        // We will write 1 to the current Highest priority DSD And then shall increase the priority of the requested DSD
                                        // by user
-                                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happend, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal);
+                                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, NVM_RW, DBG_LVL_ALL, "SectImagePriority wraparound happened, eFlash2xSectVal: 0x%x\n",eFlash2xSectVal);
                                        SectImagePriority = htonl(0x1);
 
                                        Status = BcmFlash2xBulkWrite(Adapter,
@@ -4119,7 +4119,7 @@ INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut)
                                                                                                MAX_RW_SIZE);
                                IsThisHeaderSector = FALSE ;
                        }
-                       //substracting the written Data
+                       //subtracting the written Data
                        uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize ;
                }
 
@@ -4250,7 +4250,7 @@ INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut)
                                IsThisHeaderSector = FALSE ;
                        }
 
-                       //substracting the written Data
+                       //subtracting the written Data
                        uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize ;
                }
 
@@ -4268,7 +4268,7 @@ BcmFlash2xCorruptSig : this API is used to corrupt the written sig in Bcm Header
 @eFlash2xSectionVal :- Flash section val which has header
 
 Return Value :-
-       Sucess :- If Section is present and writable, corrupt the sig and return STATUS_SUCCESS
+       Success :- If Section is present and writable, corrupt the sig and return STATUS_SUCCESS
        Failure :-Return negative error code
 
 
@@ -4301,7 +4301,7 @@ BcmFlash2xWriteSig :-this API is used to Write the sig if requested Section has
 @eFlashSectionVal :- Flash section val which has header
 
 Return Value :-
-       Sucess :- If Section is present and writable write the sig and return STATUS_SUCCESS
+       Success :- If Section is present and writable write the sig and return STATUS_SUCCESS
        Failure :-Return negative error code
 
 **/
@@ -4504,7 +4504,7 @@ BcmCopySection :- This API is used to copy the One section in another. Both sect
                             in case of numofBytes  equal zero complete section will be copied.
 
 Return Values-
-       Sucess : Return STATUS_SUCCESS
+       Success : Return STATUS_SUCCESS
        Faillure :- return negative error code
 
 **/
@@ -4621,7 +4621,7 @@ SaveHeaderIfPresent :- This API is use to Protect the Header in case of Header S
 @uiOffset :- Flash offset that has to be written.
 
 Return value :-
-       Sucess :- On sucess return STATUS_SUCCESS
+       Success :- On success return STATUS_SUCCESS
        Faillure :- Return negative error code
 
 **/
@@ -4634,7 +4634,7 @@ INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset)
        UINT uiSectAlignAddr = 0;
        UINT sig = 0;
 
-       //making the offset sector alligned
+       //making the offset sector aligned
        uiSectAlignAddr = uiOffset & ~(Adapter->uiSectorSize - 1);
 
 
@@ -4643,7 +4643,7 @@ INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset)
        (uiSectAlignAddr == BcmGetSectionValEndOffset(Adapter,DSD0)- Adapter->uiSectorSize))
        {
 
-               //offset from the sector boundry having the header map
+               //offset from the sector boundary having the header map
                offsetToProtect = Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader % Adapter->uiSectorSize;
                HeaderSizeToProtect = sizeof(DSD_HEADER);
                bHasHeader = TRUE ;
@@ -4697,7 +4697,7 @@ BcmDoChipSelect : This will selcet the appropriate chip for writing.
 @Adapater :- Bcm Driver Private Data Structure
 
 OutPut:-
-       Select the Appropriate chip and retrn status Sucess
+       Select the Appropriate chip and retrn status Success
 **/
 static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset)
 {
@@ -5086,7 +5086,7 @@ static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
        {
                if(IsSectionWritable(Adapter,eFlash2xSectionVal) != TRUE)
                {
-                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence cant Corrupt signature");
+                       BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence can't Corrupt signature");
                        return SECTOR_IS_NOT_WRITABLE;
                }
        }
@@ -5155,7 +5155,7 @@ static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
 
        if(IsSectionWritable(Adapter,eFlash2xSectionVal) != TRUE)
        {
-               BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence cant Corrupt signature");
+               BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Section is not Writable...Hence can't Corrupt signature");
                return SECTOR_IS_NOT_WRITABLE;
        }
 
index 99e67669f26bcd5fd05e1d988be702f2218f377a..f8facb0786ec9c24e5fa7c847326d7572b22da99 100644 (file)
@@ -71,7 +71,7 @@ the driver. The devices use a single worldwide regulatory domain, with channels
 passive operation. Transmission on those channels is suppressed until
 appropriate other traffic is observed on those channels.
 
-Within the driver, we use the ficticious country code "X2" to represent this
+Within the driver, we use the fictitious country code "X2" to represent this
 worldwide regulatory domain. There is currently no interface to configure a
 different domain.
 
index 65313fa0cf4a9346aa9b20e5c8b0b8f5fdc546ea..71c3571ee14314e1a975db29d0b5705d6c512795 100644 (file)
@@ -264,7 +264,7 @@ extern SDIOH_API_RC sdioh_disable_func_intr(void)
 }
 #endif                         /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */
 
-/* Configure callback to client when we recieve client interrupt */
+/* Configure callback to client when we receive client interrupt */
 extern SDIOH_API_RC
 sdioh_interrupt_register(sdioh_info_t *sd, sdioh_cb_fn_t fn, void *argh)
 {
index cbfa1c1b7059c9198e8ecea76410303f35ccc0f2..1cf6c5dc2bb75a602452490309c3fc98201df60b 100644 (file)
@@ -46,7 +46,7 @@ extern int sdioh_mmc_irq(int irq);
 #include <mach/gpio.h>
 #endif
 
-/* Customer specific Host GPIO defintion  */
+/* Customer specific Host GPIO definition  */
 static int dhd_oob_gpio_num = -1;      /* GG 19 */
 
 module_param(dhd_oob_gpio_num, int, 0644);
index 02c6d446934ca604340528b4c5641211c49022ef..dd0375793875ce1cdffadf0ea5f27608cbabeca1 100644 (file)
@@ -478,7 +478,7 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
                        dhd_set_packet_filter(1, dhd);
 
                        /* if dtim skip setup as default force it
-                        * to wake each thrid dtim
+                        * to wake each third dtim
                         * for better power saving.
                         * Note that side effect is chance to miss BC/MC
                         * packet
index 106627040db078c8870887cb0bd8e8dd73490931..464f52af1315b8fc3107cd209fa0a345275b4c93 100644 (file)
@@ -3659,7 +3659,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
                         * control pkt receives.
                         * Later we use buffer-poll for data as well
                         * as control packets.
-                        * This is required becuase dhd receives full
+                        * This is required because dhd receives full
                         * frame in gSPI unlike SDIO.
                         * After the frame is received we have to
                         * distinguish whether it is data
@@ -3744,7 +3744,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
                                        bus->dhd->rx_errors++;
                                        dhd_os_sdunlock_rxq(bus->dhd);
                                        /* Force retry w/normal header read.
-                                        * Don't attemp NAK for
+                                        * Don't attempt NAK for
                                         * gSPI
                                         */
                                        dhdsdio_rxfail(bus, true,
index 774b4e916b29a34d24290dbaf35165a8746bdc83..c1b07ae316746f384edd65d5f18d1bc578a271a8 100644 (file)
@@ -1079,7 +1079,7 @@ static int ieee_hw_init(struct ieee80211_hw *hw)
         */
        hw->max_rates = 2;      /* Primary rate and 1 fallback rate */
 
-       hw->channel_change_time = 7 * 1000;     /* channel change time is dependant on chip and band  */
+       hw->channel_change_time = 7 * 1000;     /* channel change time is dependent on chip and band  */
        hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
 
        hw->rate_control_algorithm = "minstrel_ht";
index c6cdcd9409568b6360ba073adaa084e3056bb52d..f00865957881a51ec783cba4b51d5cc27ee1791c 100644 (file)
@@ -89,7 +89,7 @@ u32 wl_ampdu_dbg =
 /* structure to hold tx fifo information and pre-loading state
  * counters specific to tx underflows of ampdus
  * some counters might be redundant with the ones in wlc or ampdu structures.
- * This allows to maintain a specific state independantly of
+ * This allows to maintain a specific state independently of
  * how often and/or when the wlc counters are updated.
  */
 typedef struct wlc_fifo_info {
@@ -265,7 +265,7 @@ static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb)
 
        scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu;
 
-       /* go back to legacy size if some preloading is occuring */
+       /* go back to legacy size if some preloading is occurring */
        for (i = 0; i < NUM_FFPLD_FIFO; i++) {
                if (ampdu->fifo_tb[i].ampdu_pld_size > FFPLD_PLD_INCR)
                        scb_ampdu->max_pdu = AMPDU_NUM_MPDU_LEGACY;
@@ -406,7 +406,7 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
                /*
                   compute a new dma xfer rate for max_mpdu @ max mcs.
                   This is the minimum dma rate that
-                  can acheive no unferflow condition for the current mpdu size.
+                  can achieve no unferflow condition for the current mpdu size.
                 */
                /* note : we divide/multiply by 100 to avoid integer overflows */
                fifo->dmaxferrate =
index 5a96dc3cdb36eb0cff4c016bc12c6a926f855d24..4b6e181c7dc9cead08bb8d1e6b5da9922fba29db 100644 (file)
@@ -1915,7 +1915,7 @@ void wlc_bmac_phy_reset(struct wlc_hw_info *wlc_hw)
 
        phy_bw_clkbits = wlc_phy_clk_bwbits(wlc_hw->band->pi);
 
-       /* Specfic reset sequence required for NPHY rev 3 and 4 */
+       /* Specific reset sequence required for NPHY rev 3 and 4 */
        if (WLCISNPHY(wlc_hw->band) && NREV_GE(wlc_hw->band->phyrev, 3) &&
            NREV_LE(wlc_hw->band->phyrev, 4)) {
                /* Set the PHY bandwidth */
index 639b5d7c9603214e182948f4bd0444f12ea3948a..ab7ab850e199275703e5dfca1826a9e681ae4f8e 100644 (file)
@@ -6283,7 +6283,7 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
               ((preamble_type[1] == WLC_MM_PREAMBLE) ==
                (txh->MModeFbrLen != 0)));
 
-       ac = wme_fifo2ac[queue];
+       ac = skb_get_queue_mapping(p);
        if (SCB_WME(scb) && qos && wlc->edcf_txop[ac]) {
                uint frag_dur, dur, dur_fallback;
 
@@ -6919,8 +6919,7 @@ prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
                preamble = 0;
                if (IS_CCK(rspec)) {
                        if (rxh->PhyRxStatus_0 & PRXS0_SHORTH)
-                               WL_ERROR("Short CCK\n");
-                       rx_status->flag |= RX_FLAG_SHORTPRE;
+                               rx_status->flag |= RX_FLAG_SHORTPRE;
                } else if (IS_OFDM(rspec)) {
                        rx_status->flag |= RX_FLAG_SHORTPRE;
                } else {
@@ -7079,10 +7078,8 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
        if (ieee80211_is_probe_req(h->frame_control))
                goto toss;
 
-       if (is_amsdu) {
-               WL_ERROR("%s: is_amsdu causing toss\n", __func__);
+       if (is_amsdu)
                goto toss;
-       }
 
        wlc_recvctl(wlc, rxh, p);
        return;
@@ -8295,7 +8292,7 @@ wlc_txflowcontrol_prio_isset(struct wlc_info *wlc, struct wlc_txq_info *q,
        return (q->stopped & prio_mask) == prio_mask;
 }
 
-/* propogate the flow control to all interfaces using the given tx queue */
+/* propagate the flow control to all interfaces using the given tx queue */
 void wlc_txflowcontrol(struct wlc_info *wlc, struct wlc_txq_info *qi,
                       bool on, int prio)
 {
@@ -8462,7 +8459,7 @@ static void wlc_txq_free(struct wlc_info *wlc, struct wlc_txq_info *qi)
 }
 
 /*
- * Flag 'scan in progress' to withold dynamic phy calibration
+ * Flag 'scan in progress' to withhold dynamic phy calibration
  */
 void wlc_scan_start(struct wlc_info *wlc)
 {
index 0cfa36023cf19099ecbf55f44de7bbb3da00ef27..d284f1ac49cc3a654813e8b74c6763e091a1e019 100644 (file)
@@ -332,7 +332,7 @@ wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs,
                return false;
 }
 
-/* caluclate the rate of a rx'd frame and return it as a ratespec */
+/* calculate the rate of a rx'd frame and return it as a ratespec */
 ratespec_t BCMFASTPATH wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp)
 {
        int phy_type;
index ae2bff8286076d7f9b2a8fbbf7f39c0d87f2f83d..4768968f910a025f2b74355bca71d32d86a8efb0 100644 (file)
 
 #define        SROM_CRCREV             63
 
-/* SROM Rev 4: Reallocate the software part of the srom to accomodate
+/* SROM Rev 4: Reallocate the software part of the srom to accommodate
  * MIMO features. It assumes up to two PCIE functions and 440 bytes
  * of useable srom i.e. the useable storage in chips with OTP that
  * implements hardware redundancy.
index 9747cc46ca9661d067d17ecd3efa2c40b7935530..6435686b329f4ee78cae130639c671047c81ebe9 100644 (file)
  * conventions for the use the flash space:
  */
 
-/* Minumum amount of flash we support */
+/* Minimum amount of flash we support */
 #define FLASH_MIN              0x00020000      /* Minimum flash size */
 
 /* A boot/binary may have an embedded block that describes its size  */
index ba71c108b3666520fe681167d22cbdda37c9de1b..17991212a22d7a6ed73ae1ad7e8368a4a6ceb1f0 100644 (file)
@@ -213,7 +213,7 @@ static u16 ipxotp_read_bit(void *oh, chipcregs_t *cc, uint off)
        return (int)st;
 }
 
-/* Calculate max HW/SW region byte size by substracting fuse region and checksum size,
+/* Calculate max HW/SW region byte size by subtracting fuse region and checksum size,
  * osizew is oi->wsize (OTP size - GU size) in words
  */
 static int ipxotp_max_rgnsz(si_t *sih, int osizew)
@@ -229,7 +229,7 @@ static int ipxotp_max_rgnsz(si_t *sih, int osizew)
                ret = osizew * 2 - OTP_SZ_FU_72 - OTP_SZ_CHECKSUM;
                break;
        default:
-               ASSERT(0);      /* Don't konw about this chip */
+               ASSERT(0);      /* Don't know about this chip */
        }
 
        return ret;
index eca35b94e96c961a694773f9d518255afe8a88d3..850bfa6593e05b27d9873a77c5c1720a8b4e6e2d 100644 (file)
@@ -1859,7 +1859,7 @@ static int initvars_srom_pci(si_t *sih, void *curmap, char **vars, uint *count)
 
        /*
         * Apply CRC over SROM content regardless SROM is present or not,
-        * and use variable <devpath>sromrev's existance in flash to decide
+        * and use variable <devpath>sromrev's existence in flash to decide
         * if we should return an error when CRC fails or read SROM variables
         * from flash.
         */
index 8a81eb997f995b64abdc8725e97f4b6ed4001757..be339feae77d916fa28494d78d62eab003ee48bb 100644 (file)
@@ -1179,7 +1179,7 @@ static void BCMFASTPATH dma64_txreclaim(dma_info_t *di, txd_range_t range)
                   (range == HNDDMA_RANGE_ALL) ? "all" :
                   ((range ==
                     HNDDMA_RANGE_TRANSMITTED) ? "transmitted" :
-                   "transfered")));
+                   "transferred")));
 
        if (di->txin == di->txout)
                return;
@@ -1549,7 +1549,7 @@ static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0,
  * If range is HNDDMA_RANGE_TRANSMITTED, reclaim descriptors that have be
  * transmitted as noted by the hardware "CurrDescr" pointer.
  * If range is HNDDMA_RANGE_TRANSFERED, reclaim descriptors that have be
- * transfered by the DMA as noted by the hardware "ActiveDescr" pointer.
+ * transferred by the DMA as noted by the hardware "ActiveDescr" pointer.
  * If range is HNDDMA_RANGE_ALL, reclaim all txd(s) posted to the ring and
  * return associated packet regardless of the value of hardware pointers.
  */
@@ -1563,7 +1563,7 @@ static void *BCMFASTPATH dma64_getnexttxp(dma_info_t *di, txd_range_t range)
                   (range == HNDDMA_RANGE_ALL) ? "all" :
                   ((range ==
                     HNDDMA_RANGE_TRANSMITTED) ? "transmitted" :
-                   "transfered")));
+                   "transferred")));
 
        if (di->ntxd == 0)
                return NULL;
index 6b9923f551a9e71abed95eb3f504bd3687221fd9..d4c156586e81df875ca02f1659a09dccb4fc01a1 100644 (file)
 #define        CISTPL_CFTABLE          0x1b    /* Config table entry */
 #define        CISTPL_END              0xff    /* End of the CIS tuple chain */
 
-/* Function identifier provides context for the function extentions tuple */
+/* Function identifier provides context for the function extensions tuple */
 #define CISTPL_FID_SDIO                0x0c    /* Extensions defined by SDIO spec */
 
 /* Function extensions for LANs (assumed for extensions other than SDIO) */
index ed168ceba5f08cf4fcf5ff3754f8684c17b0d372..6ebd7f58af8161baab08d59684d88691b21a0530 100644 (file)
@@ -1319,7 +1319,7 @@ int si_clkctl_xtal(si_t *sih, uint what, bool on)
 }
 
 /*
- *  clock control policy function throught chipcommon
+ *  clock control policy function through chipcommon
  *
  *    set dynamic clk control mode (forceslow, forcefast, dynamic)
  *    returns true if we are forcing fast clock
index a4ceb29c358e5a114344e6d46414ae5f3bc07748..e7e72b8d8cdece8504f0adebc7279c135830f1fb 100644 (file)
@@ -2064,7 +2064,7 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
                             COMEDI_CB_OVERFLOW)) {
                runflags_mask |= SRF_RUNNING;
        }
-       /* remember if an error event has occured, so an error
+       /* remember if an error event has occurred, so an error
         * can be returned the next time the user does a read() */
        if (s->async->events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW)) {
                runflags_mask |= SRF_ERROR;
index 644bda44556e5cc54e667375baccc64779ef612f..482a412aa6524aa6bad2b3838ccfdd9922456ae8 100644 (file)
@@ -124,9 +124,9 @@ You should also find the complete GPL in the COPYING file accompanying this sour
 |                     -5: The selected PCI input clock is wrong              |
 |                     -6: Timing unity selection is wrong                    |
 |                     -7: Base timing selection is wrong                     |
-|                     -8: You can not used the 40MHz clock selection wich    |
+|                     -8: You can not used the 40MHz clock selection with    |
 |                         this board                                         |
-|                     -9: You can not used the 40MHz clock selection wich    |
+|                     -9: You can not used the 40MHz clock selection with    |
 |                         this CHRONOS version                               |
 +----------------------------------------------------------------------------+
 */
@@ -721,10 +721,10 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device *dev, struct comedi_sub
                                                                }
                                                        } else {
                             /**************************************************************/
-                                                               /* You can not used the 40MHz clock selection wich this board */
+                                                               /* You can not use the 40MHz clock selection with this board */
                             /**************************************************************/
 
-                                                               DPRINTK("You can not used the 40MHz clock selection wich this board\n");
+                                                               DPRINTK("You can not used the 40MHz clock selection with this board\n");
                                                                i_ReturnValue =
                                                                        -8;
                                                        }
index 90e71e12784aec175e38323d0d312e1d24eceba2..b973095146f96be011b94dcf6810154aceb09719 100644 (file)
@@ -59,7 +59,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour
 /*+----------------------------------------------------------------------------+*/
 /*| Input Parameters  : int    i_NbOfWordsToRead : Nbr. of word to read        |*/
 /*|                     unsigned int dw_PCIBoardEepromAddress : Address of the eeprom |*/
-/*|                     unsigned short   w_EepromStartAddress : Eeprom strat address     |*/
+/*|                     unsigned short   w_EepromStartAddress : Eeprom start address     |*/
 /*+----------------------------------------------------------------------------+*/
 /*| Output Parameters : unsigned short * pw_DataRead : Read data                          |*/
 /*+----------------------------------------------------------------------------+*/
index 9dd857df93c85880c74983ba75af5036ddd84da5..002297dfe33f2fd76fa0fcb30ee3df8276d30c73 100644 (file)
@@ -498,7 +498,7 @@ void v_APCI2032_Interrupt(int irq, void *d)
        struct comedi_device *dev = d;
        unsigned int ui_DO;
 
-       ui_DO = inl(devpriv->iobase + APCI2032_DIGITAL_OP_IRQ) & 0x1;   /* Check if VCC OR CC interrupt has occured. */
+       ui_DO = inl(devpriv->iobase + APCI2032_DIGITAL_OP_IRQ) & 0x1;   /* Check if VCC OR CC interrupt has occurred. */
 
        if (ui_DO == 0) {
                printk("\nInterrupt from unKnown source\n");
index a813fdbbd96eb768a4962a208ebd0062e7d8a6f9..fc61214151b700a4feed81088e438d387a6fa14b 100644 (file)
@@ -148,7 +148,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd
        unsigned short us_ConvertTiming, us_TmpValue, i;
        unsigned char b_Tmp;
 
-       /*  fix convertion time to 10 us */
+       /*  fix conversion time to 10 us */
        if (!devpriv->ui_EocEosConversionTime) {
                printk("No timer0 Value using 10 us\n");
                us_ConvertTiming = 10;
@@ -251,7 +251,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd
                                APCI3120_SELECT_TIMER_0_WORD;
                        outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
 
-                       /* Set the convertion time */
+                       /* Set the conversion time */
                        outw(us_ConvertTiming,
                                devpriv->iobase + APCI3120_TIMER_VALUE);
 
@@ -311,7 +311,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd
                                APCI3120_SELECT_TIMER_0_WORD;
                        outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
 
-                       /* Set the convertion time */
+                       /* Set the conversion time */
                        outw(us_ConvertTiming,
                                devpriv->iobase + APCI3120_TIMER_VALUE);
 
@@ -354,9 +354,9 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd
                        /* Start conversion */
                        outw(0, devpriv->iobase + APCI3120_START_CONVERSION);
 
-                       /* Waiting of end of convertion if interrupt is not installed */
+                       /* Waiting of end of conversion if interrupt is not installed */
                        if (devpriv->b_EocEosInterrupt == APCI3120_DISABLE) {
-                               /* Waiting the end of convertion */
+                               /* Waiting the end of conversion */
                                do {
                                        us_TmpValue =
                                                inw(devpriv->iobase +
@@ -854,7 +854,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
                                b_DigitalOutputRegister) & 0xF0) |
                        APCI3120_SELECT_TIMER_0_WORD;
                outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0);
-               /* Set the convertion time */
+               /* Set the conversion time */
                outw(((unsigned short) ui_TimerValue0),
                        dev->iobase + APCI3120_TIMER_VALUE);
                break;
@@ -872,7 +872,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
                                b_DigitalOutputRegister) & 0xF0) |
                        APCI3120_SELECT_TIMER_1_WORD;
                outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0);
-               /* Set the convertion time */
+               /* Set the conversion time */
                outw(((unsigned short) ui_TimerValue1),
                        dev->iobase + APCI3120_TIMER_VALUE);
 
@@ -889,7 +889,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
                        APCI3120_SELECT_TIMER_0_WORD;
                outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0);
 
-               /* Set the convertion time */
+               /* Set the conversion time */
                outw(((unsigned short) ui_TimerValue0),
                        dev->iobase + APCI3120_TIMER_VALUE);
                break;
@@ -1104,7 +1104,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
 
 /*
  * 4
- * amount of bytes to be transfered set transfer count used ADDON
+ * amount of bytes to be transferred set transfer count used ADDON
  * MWTC register commented testing
  * outl(devpriv->ui_DmaBufferUsesize[0],
  * devpriv->i_IobaseAddon+AMCC_OP_REG_AMWTC);
index b3c81979f14d74c4820e4f27ec87fcfdd4d1c6b9..50eb0a0a0a05c081ccad5c5ea16cfbbf7da55986 100644 (file)
@@ -169,7 +169,7 @@ struct str_AnalogReadInformation {
 
        unsigned char b_Type;           /* EOC or EOS */
        unsigned char b_InterruptFlag;  /* Interrupt use or not                    */
-       unsigned int ui_ConvertTiming;  /* Selection of the convertion time        */
+       unsigned int ui_ConvertTiming;  /* Selection of the conversion time        */
        unsigned char b_NbrOfChannel;   /* Number of channel to read               */
        unsigned int ui_ChannelList[MAX_ANALOGINPUT_CHANNELS];  /* Number of the channel to be read        */
        unsigned int ui_RangeList[MAX_ANALOGINPUT_CHANNELS];    /* Gain of each channel                    */
index a93e2349ad3a3b14ce426191733814add3c0aaf9..c75a1a1fd7750c51b8c23fc7570d922c0ae3e22f 100644 (file)
@@ -103,7 +103,7 @@ struct str_BoardInfos s_BoardInfos[100];    /*  100 will be the max number of board
 /*+----------------------------------------------------------------------------+*/
 /*| Input Parameters  : int    i_NbOfWordsToRead : Nbr. of word to read        |*/
 /*|                     unsigned int dw_PCIBoardEepromAddress : Address of the eeprom |*/
-/*|                     unsigned short   w_EepromStartAddress : Eeprom strat address     |*/
+/*|                     unsigned short   w_EepromStartAddress : Eeprom start address     |*/
 /*+----------------------------------------------------------------------------+*/
 /*| Output Parameters : unsigned short * pw_DataRead : Read data                          |*/
 /*+----------------------------------------------------------------------------+*/
@@ -849,7 +849,7 @@ int i_APCI3200_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdev
   |                                             0:Single Read
   |                                             1:Read more channel
   2:Single scan
-  |                                             3:Continous Scan
+  |                                             3:Continuous Scan
   data[13]          :Number of channels to read
   |                          data[14]          :RTD connection type
   :0:RTD not used
index 766103c882ad552959030685bad3984eca35418b..632d5d0721cd495a458c3a80f611af427491799b 100644 (file)
@@ -23,7 +23,7 @@ For AI:
 - If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46).
 - If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44).
 - If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46).
-- It is not neccessary to have cmd.scan_end_arg=cmd.chanlist_len but
+- It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but
   cmd.scan_end_arg modulo cmd.chanlist_len must by 0.
 - If return value of cmdtest is 5 then you've bad channel list
   (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar
@@ -823,7 +823,7 @@ static void interrupt_pci9118_ai_dma(struct comedi_device *dev,
                move_block_from_dma(dev, s,
                                    devpriv->dmabuf_virt[devpriv->dma_actbuf],
                                    samplesinbuf);
-               m = m - sampls;         /* m= how many samples was transfered */
+               m = m - sampls;         /* m= how many samples was transferred */
        }
 /* DPRINTK("YYY\n"); */
 
@@ -1297,7 +1297,7 @@ static int Compute_and_setup_dma(struct comedi_device *dev)
        DPRINTK("3 dmalen0=%d dmalen1=%d\n", dmalen0, dmalen1);
        /* transfer without TRIG_WAKE_EOS */
        if (!(devpriv->ai_flags & TRIG_WAKE_EOS)) {
-               /* if it's possible then allign DMA buffers to length of scan */
+               /* if it's possible then align DMA buffers to length of scan */
                i = dmalen0;
                dmalen0 =
                    (dmalen0 / (devpriv->ai_n_realscanlen << 1)) *
index 4b470000b69c755eab0f03c2faa1fbd1d92e43fd..5361f318b010e52c9cb1e9acd35f3cfd52ec3c7a 100644 (file)
@@ -65,7 +65,7 @@ If you do not specify any options, they will default to
    written by jeremy theler <thelerg@ib.cnea.gov.ar>
 
    instituto balseiro
-   comision nacional de energia atomica
+   commission nacional de energia atomica
    universidad nacional de cuyo
    argentina
 
@@ -342,7 +342,7 @@ static int adq12b_ai_rinsn(struct comedi_device *dev,
        /* convert n samples */
        for (n = 0; n < insn->n; n++) {
 
-               /* wait for end of convertion */
+               /* wait for end of conversion */
                i = 0;
                do {
                        /* udelay(1); */
index 466e69f94ef2def8467b0c09fa6341656858851e..da2b75b15d4e2ca532c25f2f9acbe9e550be01e0 100644 (file)
@@ -98,7 +98,7 @@ Configuration options:
 #define        Status_FE       0x0100  /* 1=FIFO is empty */
 #define Status_FH      0x0200  /* 1=FIFO is half full */
 #define Status_FF      0x0400  /* 1=FIFO is full, fatal error */
-#define Status_IRQ     0x0800  /* 1=IRQ occured */
+#define Status_IRQ     0x0800  /* 1=IRQ occurred */
 /* bits from control register (PCI171x_CONTROL) */
 #define Control_CNT0   0x0040  /* 1=CNT0 have external source,
                                 * 0=have internal 100kHz source */
@@ -1161,7 +1161,7 @@ static int check_channel_list(struct comedi_device *dev,
        }
 
        if (n_chan > 1) {
-               chansegment[0] = chanlist[0];   /*  first channel is everytime ok */
+               chansegment[0] = chanlist[0];   /*  first channel is every time ok */
                for (i = 1, seglen = 1; i < n_chan; i++, seglen++) {    /*  build part of chanlist */
                        /*  printk("%d. %d %d\n",i,CR_CHAN(chanlist[i]),CR_RANGE(chanlist[i])); */
                        if (chanlist[0] == chanlist[i])
@@ -1176,9 +1176,9 @@ static int check_channel_list(struct comedi_device *dev,
                            (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan;
                        if (CR_AREF(chansegment[i - 1]) == AREF_DIFF)
                                nowmustbechan = (nowmustbechan + 1) % s->n_chan;
-                       if (nowmustbechan != CR_CHAN(chanlist[i])) {    /*  channel list isn't continous :-( */
+                       if (nowmustbechan != CR_CHAN(chanlist[i])) {    /*  channel list isn't continuous :-( */
                                printk
-                                   ("channel list must be continous! chanlist[%i]=%d but must be %d or %d!\n",
+                                   ("channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n",
                                     i, CR_CHAN(chanlist[i]), nowmustbechan,
                                     CR_CHAN(chanlist[0]));
                                return 0;
index 0941643b3869df3d3de1969a01a97264cd95d7f4..61968a505f24cca8560ac9e310aace70ca187774 100644 (file)
@@ -115,7 +115,7 @@ analog triggering on 1602 series
 #define   INT_MASK 0x3         /*  mask of interrupt select bits */
 #define   INTE 0x4             /*  interrupt enable */
 #define   DAHFIE 0x8           /*  dac half full interrupt enable */
-#define   EOAIE        0x10            /*  end of aquisition interrupt enable */
+#define   EOAIE        0x10            /*  end of acquisition interrupt enable */
 #define   DAHFI        0x20            /*  dac half full read status / write interrupt clear */
 #define   EOAI 0x40            /*  read end of acq. interrupt status / write clear */
 #define   INT 0x80             /*  read interrupt status / write clear */
@@ -440,7 +440,7 @@ struct cb_pcidas_private {
        unsigned int divisor1;
        unsigned int divisor2;
        volatile unsigned int count;    /*  number of analog input samples remaining */
-       volatile unsigned int adc_fifo_bits;    /*  bits to write to interupt/adcfifo register */
+       volatile unsigned int adc_fifo_bits;    /*  bits to write to interrupt/adcfifo register */
        volatile unsigned int s5933_intcsr_bits;        /*  bits to write to amcc s5933 interrupt control/status register */
        volatile unsigned int ao_control_bits;  /*  bits to write to ao control and status register */
        short ai_buffer[AI_BUFFER_SIZE];
@@ -1653,7 +1653,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
                spin_unlock_irqrestore(&dev->spinlock, flags);
        } else if (status & EOAI) {
                comedi_error(dev,
-                            "bug! encountered end of aquisition interrupt?");
+                            "bug! encountered end of acquisition interrupt?");
                /*  clear EOA interrupt latch */
                spin_lock_irqsave(&dev->spinlock, flags);
                outw(devpriv->adc_fifo_bits | EOAI,
index 2583e16cd02a3a202e9800739f4175f538c429e3..1e324198996cff1c57f22c34117e9497ac8ca689 100644 (file)
@@ -104,7 +104,7 @@ TODO:
 #endif
 
 #define TIMER_BASE 25          /*  40MHz master clock */
-#define PRESCALED_TIMER_BASE   10000   /*  100kHz 'prescaled' clock for slow aquisition, maybe I'll support this someday */
+#define PRESCALED_TIMER_BASE   10000   /*  100kHz 'prescaled' clock for slow acquisition, maybe I'll support this someday */
 #define DMA_BUFFER_SIZE 0x1000
 
 #define PCI_VENDOR_ID_COMPUTERBOARDS   0x1307
@@ -136,7 +136,7 @@ enum write_only_registers {
        ADC_DELAY_INTERVAL_UPPER_REG = 0x1c,    /*  upper 8 bits of delay interval counter */
        ADC_COUNT_LOWER_REG = 0x1e,     /*  lower 16 bits of hardware conversion/scan counter */
        ADC_COUNT_UPPER_REG = 0x20,     /*  upper 8 bits of hardware conversion/scan counter */
-       ADC_START_REG = 0x22,   /*  software trigger to start aquisition */
+       ADC_START_REG = 0x22,   /*  software trigger to start acquisition */
        ADC_CONVERT_REG = 0x24, /*  initiates single conversion */
        ADC_QUEUE_CLEAR_REG = 0x26,     /*  clears adc queue */
        ADC_QUEUE_LOAD_REG = 0x28,      /*  loads adc queue */
@@ -199,7 +199,7 @@ enum intr_enable_contents {
        ADC_INTR_EOSCAN_BITS = 0x2,     /*  interrupt end of scan */
        ADC_INTR_EOSEQ_BITS = 0x3,      /*  interrupt end of sequence (probably wont use this it's pretty fancy) */
        EN_ADC_INTR_SRC_BIT = 0x4,      /*  enable adc interrupt source */
-       EN_ADC_DONE_INTR_BIT = 0x8,     /*  enable adc aquisition done interrupt */
+       EN_ADC_DONE_INTR_BIT = 0x8,     /*  enable adc acquisition done interrupt */
        DAC_INTR_SRC_MASK = 0x30,
        DAC_INTR_QEMPTY_BITS = 0x0,
        DAC_INTR_HIGH_CHAN_BITS = 0x10,
@@ -2867,7 +2867,7 @@ static int ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 
        spin_unlock_irqrestore(&dev->spinlock, flags);
 
-       /*  start aquisition */
+       /*  start acquisition */
        if (cmd->start_src == TRIG_NOW) {
                writew(0, priv(dev)->main_iobase + ADC_START_REG);
                DEBUG_PRINT("soft trig\n");
@@ -2942,7 +2942,7 @@ static void pio_drain_ai_fifo_16(struct comedi_device *dev)
 /* Read from 32 bit wide ai fifo of 4020 - deal with insane grey coding of pointers.
  * The pci-4020 hardware only supports
  * dma transfers (it only supports the use of pio for draining the last remaining
- * points from the fifo when a data aquisition operation has completed).
+ * points from the fifo when a data acquisition operation has completed).
  */
 static void pio_drain_ai_fifo_32(struct comedi_device *dev)
 {
@@ -3046,7 +3046,7 @@ static void handle_ai_interrupt(struct comedi_device *dev,
                comedi_error(dev, "fifo overrun");
                async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
        }
-       /*  spin lock makes sure noone else changes plx dma control reg */
+       /*  spin lock makes sure no one else changes plx dma control reg */
        spin_lock_irqsave(&dev->spinlock, flags);
        dma1_status = readb(priv(dev)->plx9080_iobase + PLX_DMA1_CS_REG);
        if (plx_status & ICS_DMA1_A) {  /*  dma chan 1 interrupt */
@@ -3170,7 +3170,7 @@ static void handle_ao_interrupt(struct comedi_device *dev,
        async = s->async;
        cmd = &async->cmd;
 
-       /*  spin lock makes sure noone else changes plx dma control reg */
+       /*  spin lock makes sure no one else changes plx dma control reg */
        spin_lock_irqsave(&dev->spinlock, flags);
        dma0_status = readb(priv(dev)->plx9080_iobase + PLX_DMA0_CS_REG);
        if (plx_status & ICS_DMA0_A) {  /*  dma chan 0 interrupt */
index b220b30554120028c6e4f4500061e9ca9e7e618a..a804742b80227e13e939a2a834ebb664e2f96de6 100644 (file)
@@ -81,7 +81,7 @@ static const struct waveform_board waveform_boards[] = {
 /* Data unique to this driver */
 struct waveform_private {
        struct timer_list timer;
-       struct timeval last;    /* time at which last timer interrupt occured */
+       struct timeval last;    /* time at which last timer interrupt occurred */
        unsigned int uvolt_amplitude;   /* waveform amplitude in microvolts */
        unsigned long usec_period;      /* waveform period in microseconds */
        unsigned long usec_current;     /* current time (modulo waveform period) */
index 6ea93f9c0b483a4ff1042a1c26812fad869b507c..60c2b12d6ffb0f642dbe8c3c65724ff9d9bc736c 100644 (file)
@@ -1087,7 +1087,7 @@ static void das1800_flush_dma_channel(struct comedi_device *dev,
        return;
 }
 
-/* flushes remaining data from board when external trigger has stopped aquisition
+/* flushes remaining data from board when external trigger has stopped acquisition
  * and we are using dma transfers */
 static void das1800_flush_dma(struct comedi_device *dev,
                              struct comedi_subdevice *s)
index aecaedc5027e71e338abaac43ee4e455a8543dc8..96d41ad76956a959f53fd250ae3bed2636619c4d 100644 (file)
@@ -391,7 +391,7 @@ static irqreturn_t das800_interrupt(int irq, void *d)
        spin_lock_irqsave(&dev->spinlock, irq_flags);
        outb(CONTROL1, dev->iobase + DAS800_GAIN);      /* select base address + 7 to be STATUS2 register */
        status = inb(dev->iobase + DAS800_STATUS2) & STATUS2_HCEN;
-       /* don't release spinlock yet since we want to make sure noone else disables hardware conversions */
+       /* don't release spinlock yet since we want to make sure no one else disables hardware conversions */
        if (status == 0) {
                spin_unlock_irqrestore(&dev->spinlock, irq_flags);
                return IRQ_HANDLED;
index 693728e14bdb0145d469bc771df7095f11bf5a6b..2b4e6e6eb82506e13e217ba7556b7c2b7a0c8136 100644 (file)
@@ -532,7 +532,7 @@ static int dmm32at_ai_rinsn(struct comedi_device *dev,
                msb = dmm_inb(dev, DMM32AT_AIMSB);
 
                /* invert sign bit to make range unsigned, this is an
-                  idiosyncracy of the diamond board, it return
+                  idiosyncrasy of the diamond board, it return
                   conversions as a signed value, i.e. -32768 to
                   32767, flipping the bit and interpreting it as
                   signed gives you a range of 0 to 65535 which is
index a1664caa1d961fd89cf637f6c1a66efa0da093b3..0131d5225b5201617b348d385baa5061125b45f1 100644 (file)
@@ -560,7 +560,7 @@ int dt2811_adtrig(kdev_t minor, comedi_adtrig *adtrig)
        switch (dev->i_admode) {
        case COMEDI_MDEMAND:
                dev->ntrig = adtrig->n - 1;
-               /* not neccessary */
+               /* not necessary */
                /*printk("dt2811: AD soft trigger\n"); */
                /*outb(DT2811_CLRERROR|DT2811_INTENB,
                        dev->iobase+DT2811_ADCSR); */
index 06059850dae2e3d2b7a4d06e16a9337c2cfefab4..32d9c42e96593fb09c83003fada792e06cc2c4f3 100644 (file)
@@ -773,7 +773,7 @@ static int dt9812_probe(struct usb_interface *interface,
                        retval = dt9812_read_info(dev, 1, &fw, sizeof(fw));
                        if (retval == 0) {
                                dev_info(&interface->dev,
-                                        "usb_reset_configuration succeded "
+                                        "usb_reset_configuration succeeded "
                                         "after %d iterations\n", i);
                                break;
                        }
index 1661b57ca2adf90bef66ba0bc66af2d30cda530e..bc020dea141b283127edb720a0c1e80e42b6afc1 100644 (file)
@@ -1031,7 +1031,7 @@ static irqreturn_t handle_interrupt(int irq, void *d)
                writel(hpdi_intr_status,
                       priv(dev)->hpdi_iobase + INTERRUPT_STATUS_REG);
        }
-       /*  spin lock makes sure noone else changes plx dma control reg */
+       /*  spin lock makes sure no one else changes plx dma control reg */
        spin_lock_irqsave(&dev->spinlock, flags);
        dma0_status = readb(priv(dev)->plx9080_iobase + PLX_DMA0_CS_REG);
        if (plx_status & ICS_DMA0_A) {  /*  dma chan 0 interrupt */
@@ -1045,7 +1045,7 @@ static irqreturn_t handle_interrupt(int irq, void *d)
        }
        spin_unlock_irqrestore(&dev->spinlock, flags);
 
-       /*  spin lock makes sure noone else changes plx dma control reg */
+       /*  spin lock makes sure no one else changes plx dma control reg */
        spin_lock_irqsave(&dev->spinlock, flags);
        dma1_status = readb(priv(dev)->plx9080_iobase + PLX_DMA1_CS_REG);
        if (plx_status & ICS_DMA1_A) {  /*  XXX *//*  dma chan 1 interrupt */
index 0bab39b3409bc8e61ab5a9897963ee09044477cc..126550f3c02bf88e7ad1fe05a8bc4e50301e481d 100644 (file)
@@ -715,7 +715,7 @@ Description:
        is built correctly
 
 Parameters:
-       struct comedi_device *dev       Pointer to current sevice structure
+       struct comedi_device *dev       Pointer to current service structure
        struct comedi_subdevice *s      Pointer to current subdevice structure
        unsigned int *chanlist  Pointer to packed channel list
        unsigned int n_chan     Number of channels to scan
@@ -772,7 +772,7 @@ Description:
        Status register.
 
 Parameters:
-       struct comedi_device *dev       Pointer to current sevice structure
+       struct comedi_device *dev       Pointer to current service structure
        struct comedi_subdevice *s      Pointer to current subdevice structure
        unsigned int *chanlist  Pointer to packed channel list
        unsigned int n_chan     Number of channels to scan
@@ -848,7 +848,7 @@ Description:
        This function resets the icp multi device to a 'safe' state
 
 Parameters:
-       struct comedi_device *dev       Pointer to current sevice structure
+       struct comedi_device *dev       Pointer to current service structure
 
 Returns:int    0 = success
 
index 75511bae0191e1a5bc1c28e51fbef0cfc1bdd742..b692fea0d2b05d2457a29a5a2ab88e05e4ddf940 100644 (file)
@@ -1810,7 +1810,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
                       ai_context->irq_status_reg) &
            ME4000_IRQ_STATUS_BIT_AI_HF) {
                ISR_PDEBUG
-                   ("me4000_ai_isr(): Fifo half full interrupt occured\n");
+                   ("me4000_ai_isr(): Fifo half full interrupt occurred\n");
 
                /* Read status register to find out what happened */
                tmp = me4000_inl(dev, ai_context->ctrl_reg);
@@ -1903,7 +1903,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
        if (me4000_inl(dev,
                       ai_context->irq_status_reg) & ME4000_IRQ_STATUS_BIT_SC) {
                ISR_PDEBUG
-                   ("me4000_ai_isr(): Sample counter interrupt occured\n");
+                   ("me4000_ai_isr(): Sample counter interrupt occurred\n");
 
                s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOA;
 
index a89eebd23f654ad68c6141455a2790127a7011f7..dd09a6d46e5c23d4101139f3a6610bc315daea88 100644 (file)
@@ -39,8 +39,8 @@ Status: working
 
 Configuration Options:
   [0] - I/O base address
-  [1] - convertion rate
-       Convertion rate  RMS noise  Effective Number Of Bits
+  [1] - conversion rate
+       Conversion rate  RMS noise  Effective Number Of Bits
        0      3.52kHz        23uV                17
        1      1.76kHz       3.5uV                20
        2       880Hz         2uV                21.3
@@ -93,8 +93,8 @@ Configuration Options:
 #define MPC624_DMY_BIT          (1<<30)
 #define MPC624_SGN_BIT          (1<<29)
 
-/* Convertion speeds */
-/* OSR4 OSR3 OSR2 OSR1 OSR0  Convertion rate  RMS noise  ENOB^
+/* Conversion speeds */
+/* OSR4 OSR3 OSR2 OSR1 OSR0  Conversion rate  RMS noise  ENOB^
  *  X    0    0    0    1        3.52kHz        23uV      17
  *  X    0    0    1    0        1.76kHz       3.5uV      20
  *  X    0    0    1    1         880Hz         2uV      21.3
@@ -227,7 +227,7 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                break;
        default:
                printk
-                   (KERN_ERR "illegal convertion rate setting!"
+                   (KERN_ERR "illegal conversion rate setting!"
                        " Valid numbers are 0..9. Using 9 => 6.875 Hz, ");
                devpriv->ulConvertionRate = MPC624_SPEED_3_52_kHz;
        }
@@ -296,7 +296,7 @@ static int mpc624_ai_rinsn(struct comedi_device *dev,
        }
 
        for (n = 0; n < insn->n; n++) {
-               /*  Trigger the convertion */
+               /*  Trigger the conversion */
                outb(MPC624_ADSCK, dev->iobase + MPC624_ADC);
                udelay(1);
                outb(MPC624_ADCS | MPC624_ADSCK, dev->iobase + MPC624_ADC);
@@ -304,7 +304,7 @@ static int mpc624_ai_rinsn(struct comedi_device *dev,
                outb(0, dev->iobase + MPC624_ADC);
                udelay(1);
 
-               /*  Wait for the convertion to end */
+               /*  Wait for the conversion to end */
                for (i = 0; i < TIMEOUT; i++) {
                        ucPort = inb(dev->iobase + MPC624_ADC);
                        if (ucPort & MPC624_ADBUSY)
index 4d0053ea246532d7e72894fa19af9dc77ffad99b..c192b71ec04f06d68973e162d2c8fa38c350caa4 100644 (file)
@@ -104,10 +104,10 @@ TRIG_WAKE_EOS
 #define STATUS_REG             0x12    /*  read only */
 #define   FNE_BIT              0x1     /*  fifo not empty */
 #define   OVFL_BIT             0x8     /*  fifo overflow */
-#define   EDAQ_BIT             0x10    /*  end of aquisition interrupt */
+#define   EDAQ_BIT             0x10    /*  end of acquisition interrupt */
 #define   DCAL_BIT             0x20    /*  offset calibration in progress */
-#define   INTR_BIT             0x40    /*  interrupt has occured */
-#define   DMA_TC_BIT           0x80    /*  dma terminal count interrupt has occured */
+#define   INTR_BIT             0x40    /*  interrupt has occurred */
+#define   DMA_TC_BIT           0x80    /*  dma terminal count interrupt has occurred */
 #define   ID_BITS(x)   (((x) >> 8) & 0x3)
 #define IRQ_DMA_CNTRL_REG              0x12    /*  write only */
 #define   DMA_CHAN_BITS(x)             ((x) & 0x7)     /*  sets dma channel */
@@ -434,7 +434,7 @@ static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        s->cancel = a2150_cancel;
 
        /* need to do this for software counting of completed conversions, to
-        * prevent hardware count from stopping aquisition */
+        * prevent hardware count from stopping acquisition */
        outw(HW_COUNT_DISABLE, dev->iobase + I8253_MODE_REG);
 
        /*  set card's irq and dma levels */
@@ -729,7 +729,7 @@ static int a2150_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        /*  send trigger config bits */
        outw(trigger_bits, dev->iobase + TRIGGER_REG);
 
-       /*  start aquisition for soft trigger */
+       /*  start acquisition for soft trigger */
        if (cmd->start_src == TRIG_NOW) {
                outw(0, dev->iobase + FIFO_START_REG);
        }
@@ -768,7 +768,7 @@ static int a2150_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
        /*  setup start triggering */
        outw(0, dev->iobase + TRIGGER_REG);
 
-       /*  start aquisition for soft trigger */
+       /*  start acquisition for soft trigger */
        outw(0, dev->iobase + FIFO_START_REG);
 
        /* there is a 35.6 sample delay for data to get through the antialias filter */
index 241fe525abf074f78ac9dcaa60cd9bdd824f4d0b..ab8f37022a3c623d9bea7ec2cb117df35b7efcb3 100644 (file)
@@ -183,11 +183,11 @@ NI manuals:
 #define   OVERRUN_BIT  0x2
 /* fifo overflow */
 #define   OVERFLOW_BIT 0x4
-/* timer interrupt has occured */
+/* timer interrupt has occurred */
 #define   TIMER_BIT    0x8
-/* dma terminal count has occured */
+/* dma terminal count has occurred */
 #define   DMATC_BIT    0x10
-/* external trigger has occured */
+/* external trigger has occurred */
 #define   EXT_TRIG_BIT 0x40
 /* 1200 boards only */
 #define STATUS2_REG    0x1d
@@ -1149,7 +1149,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        range = CR_RANGE(cmd->chanlist[0]);
        aref = CR_AREF(cmd->chanlist[0]);
 
-       /* make sure board is disabled before setting up aquisition */
+       /* make sure board is disabled before setting up acquisition */
        spin_lock_irqsave(&dev->spinlock, flags);
        devpriv->command2_bits &= ~SWTRIG_BIT & ~HWTRIG_BIT & ~PRETRIG_BIT;
        devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG);
@@ -1349,7 +1349,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                devpriv->command3_bits &= ~ADC_FNE_INTR_EN_BIT;
        devpriv->write_byte(devpriv->command3_bits, dev->iobase + COMMAND3_REG);
 
-       /*  startup aquisition */
+       /*  startup acquisition */
 
        /*  command2 reg */
        /*  use 2 cascaded counters for pacing */
@@ -1571,8 +1571,8 @@ static void handle_isa_dma(struct comedi_device *dev)
        devpriv->write_byte(0x1, dev->iobase + DMATC_CLEAR_REG);
 }
 
-/* makes sure all data acquired by board is transfered to comedi (used
- * when aquisition is terminated by stop_src == TRIG_EXT). */
+/* makes sure all data acquired by board is transferred to comedi (used
+ * when acquisition is terminated by stop_src == TRIG_EXT). */
 static void labpc_drain_dregs(struct comedi_device *dev)
 {
        if (devpriv->current_transfer == isa_dma_transfer)
index 005d2fe86ee478a3c17d9f7828331a81df13bdad..8dd3a01d48ddd3ae113a0d037267a8643ce16338 100644 (file)
@@ -821,7 +821,7 @@ static int ni_pcidio_cmdtest(struct comedi_device *dev,
                        cmd->scan_begin_arg = MAX_SPEED;
                        err++;
                }
-               /* no minumum speed */
+               /* no minimum speed */
        } else {
                /* TRIG_EXT */
                /* should be level/edge, hi/lo specification here */
index c6dce4a1425e1d7ed7880429feb308b9ef0636b0..09ff4723b22503f709e59d435ea59989c181cd28 100644 (file)
@@ -34,7 +34,7 @@
  *            and I cann't test all features.)
  *
  * This driver supports insn and cmd interfaces. Some boards support only insn
- * becouse their hardware don't allow more (PCL-813/B, ACL-8113, ISO-813).
+ * because their hardware don't allow more (PCL-813/B, ACL-8113, ISO-813).
  * Data transfer over DMA is supported only when you measure only one
  * channel, this is too hardware limitation of these boards.
  *
index ef3cc4f3be6e3f1b2a8163d8c10b8cc19c826f6d..8f3fc6ee088b501764759f2e385fb7813bfbd003 100644 (file)
@@ -954,7 +954,7 @@ check_channel_list(struct comedi_device *dev,
        }
 
        if (chanlen > 1) {
-               /*  first channel is everytime ok */
+               /*  first channel is every time ok */
                chansegment[0] = chanlist[0];
                for (i = 1, seglen = 1; i < chanlen; i++, seglen++) {
                        /*  build part of chanlist */
@@ -968,10 +968,10 @@ check_channel_list(struct comedi_device *dev,
                        nowmustbechan =
                            (CR_CHAN(chansegment[i - 1]) + 1) % chanlen;
                        if (nowmustbechan != CR_CHAN(chanlist[i])) {
-                               /*  channel list isn't continous :-( */
+                               /*  channel list isn't continuous :-( */
                                printk(KERN_WARNING
                                       "comedi%d: pcl816: channel list must "
-                                      "be continous! chanlist[%i]=%d but "
+                                      "be continuous! chanlist[%i]=%d but "
                                       "must be %d or %d!\n", dev->minor,
                                       i, CR_CHAN(chanlist[i]), nowmustbechan,
                                       CR_CHAN(chanlist[0]));
index f58d75be729513f4e61c3cef36b52628e916da49..e3eea09ae1fb5cb865523a2a2c2058a73d093589 100644 (file)
@@ -1231,7 +1231,7 @@ static int check_channel_list(struct comedi_device *dev,
        }
 
        if (n_chan > 1) {
-               /*  first channel is everytime ok */
+               /*  first channel is every time ok */
                chansegment[0] = chanlist[0];
                /*  build part of chanlist */
                for (i = 1, seglen = 1; i < n_chan; i++, seglen++) {
@@ -1245,9 +1245,9 @@ static int check_channel_list(struct comedi_device *dev,
                                break;
                        nowmustbechan =
                            (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan;
-                       if (nowmustbechan != CR_CHAN(chanlist[i])) {    /*  channel list isn't continous :-( */
+                       if (nowmustbechan != CR_CHAN(chanlist[i])) {    /*  channel list isn't continuous :-( */
                                printk
-                                   ("comedi%d: pcl818: channel list must be continous! chanlist[%i]=%d but must be %d or %d!\n",
+                                   ("comedi%d: pcl818: channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n",
                                     dev->minor, i, CR_CHAN(chanlist[i]),
                                     nowmustbechan, CR_CHAN(chanlist[0]));
                                return 0;
index 5c832d7ed45dc3ead22d0aff528f53e5bd7d7f04..f2e88e57d5586e08299f2e23469b32ebe63c20f8 100644 (file)
@@ -733,7 +733,7 @@ static int pcmmio_dio_insn_config(struct comedi_device *dev,
                break;
 
        case INSN_CONFIG_DIO_QUERY:
-               /* retreive from shadow register */
+               /* retrieve from shadow register */
                data[1] =
                    (s->io_bits & (1 << chan)) ? COMEDI_OUTPUT : COMEDI_INPUT;
                return insn->n;
@@ -1279,7 +1279,7 @@ static int wait_dac_ready(unsigned long iobase)
           "no busy waiting" policy. The fact is that the hardware is
           normally so fast that we usually only need one time through the loop
           anyway. The longer timeout is for rare occasions and for detecting
-          non-existant hardware.  */
+          non-existent hardware.  */
 
        while (retry--) {
                if (inb(iobase + 3) & 0x80)
index 7a9287433b2e69c494b3a0f52a32a09db95a71aa..b2c2c8971a3215c2bbdb6c8d292755300a75f432 100644 (file)
@@ -605,7 +605,7 @@ static int pcmuio_dio_insn_config(struct comedi_device *dev,
                break;
 
        case INSN_CONFIG_DIO_QUERY:
-               /* retreive from shadow register */
+               /* retrieve from shadow register */
                data[1] =
                    (s->io_bits & (1 << chan)) ? COMEDI_OUTPUT : COMEDI_INPUT;
                return insn->n;
index ebba9bb47777cfba6edbe6856ee88840967589b7..82942e5728a50cae765ee071ca789fd7b41753c5 100644 (file)
@@ -390,7 +390,7 @@ static int daqp_ai_insn_read(struct comedi_device *dev,
 
        outb(v, dev->iobase + DAQP_CONTROL);
 
-       /* Reset any pending interrupts (my card has a tendancy to require
+       /* Reset any pending interrupts (my card has a tendency to require
         * require multiple reads on the status register to achieve this)
         */
 
@@ -752,7 +752,7 @@ static int daqp_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 
        outb(v, dev->iobase + DAQP_CONTROL);
 
-       /* Reset any pending interrupts (my card has a tendancy to require
+       /* Reset any pending interrupts (my card has a tendency to require
         * require multiple reads on the status register to achieve this)
         */
        counter = 100;
index 357858d27441c39aa04249df001c8e234bb2711b..7f09ed755fe665ad17f8987df4158b77800efa8b 100644 (file)
@@ -75,7 +75,7 @@ Configuration options:
     das1800, since they have the best documented code.  Driver
     cb_pcidas64.c uses the same DMA controller.
 
-    As far as I can tell, the About interrupt doesnt work if Sample is
+    As far as I can tell, the About interrupt doesn't work if Sample is
     also enabled.  It turns out that About really isn't needed, since
     we always count down samples read.
 
@@ -370,7 +370,7 @@ struct rtdPrivate {
        /* timer gate (when enabled) */
        u8 utcGate[4];          /* 1 extra allows simple range check */
 
-       /* shadow registers affect other registers, but cant be read back */
+       /* shadow registers affect other registers, but can't be read back */
        /* The macros below update these on writes */
        u16 intMask;            /* interrupt mask */
        u16 intClearMask;       /* interrupt clear mask */
@@ -485,7 +485,7 @@ struct rtdPrivate {
 #define RtdAdcFifoGet(dev) \
        readw(devpriv->las1+LAS1_ADC_FIFO)
 
-/* Read two ADC data values (DOESNT WORK) */
+/* Read two ADC data values (DOESN'T WORK) */
 #define RtdAdcFifoGet2(dev) \
        readl(devpriv->las1+LAS1_ADC_FIFO)
 
@@ -857,7 +857,7 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                        DPRINTK("rtd520: PCI latency = %d\n", pci_latency);
                }
 
-               /* Undocumented EPLD version (doesnt match RTD driver results) */
+               /* Undocumented EPLD version (doesn't match RTD driver results) */
                /*DPRINTK ("rtd520: Reading epld from %p\n",
                   devpriv->las0+0);
                   epld_version = readl (devpriv->las0+0);
@@ -1291,7 +1291,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev)
 /*
   "instructions" read/write data in "one-shot" or "software-triggered"
   mode (simplest case).
-  This doesnt use interrupts.
+  This doesn't use interrupts.
 
   Note, we don't do any settling delays.  Use a instruction list to
   select, delay, then read.
@@ -2120,7 +2120,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 }
 
 /*
-  Stop a running data aquisition.
+  Stop a running data acquisition.
 */
 static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
 {
index d5ba3ab357a3839540c01614fb47bd9843f70418..23fc64b9988eb3c588faf311476d10f8d68aeaed 100644 (file)
@@ -139,7 +139,7 @@ struct s626_private {
        int got_regions;
        short allocatedBuf;
        uint8_t ai_cmd_running; /*  ai_cmd is running */
-       uint8_t ai_continous;   /*  continous aquisition */
+       uint8_t ai_continous;   /*  continous acquisition */
        int ai_sample_count;    /*  number of samples to acquire */
        unsigned int ai_sample_timer;
        /*  time between samples in  units of the timer */
@@ -1048,7 +1048,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d)
        uint8_t group;
        uint16_t irqbit;
 
-       DEBUG("s626_irq_handler: interrupt request recieved!!!\n");
+       DEBUG("s626_irq_handler: interrupt request received!!!\n");
 
        if (dev->attached == 0)
                return IRQ_NONE;
@@ -1165,14 +1165,14 @@ static irqreturn_t s626_irq_handler(int irq, void *d)
                                                        (16 * group)))
                                            == 1 && cmd->start_src == TRIG_EXT) {
                                                DEBUG
-                                                   ("s626_irq_handler: Edge capture interrupt recieved from channel %d\n",
+                                                   ("s626_irq_handler: Edge capture interrupt received from channel %d\n",
                                                     cmd->start_arg);
 
                                                /*  Start executing the RPS program. */
                                                MC_ENABLE(P_MC1, MC1_ERPS1);
 
                                                DEBUG
-                                                   ("s626_irq_handler: aquisition start triggered!!!\n");
+                                                   ("s626_irq_handler: acquisition start triggered!!!\n");
 
                                                if (cmd->scan_begin_src ==
                                                    TRIG_EXT) {
@@ -1194,7 +1194,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d)
                                            && cmd->scan_begin_src ==
                                            TRIG_EXT) {
                                                DEBUG
-                                                   ("s626_irq_handler: Edge capture interrupt recieved from channel %d\n",
+                                                   ("s626_irq_handler: Edge capture interrupt received from channel %d\n",
                                                     cmd->scan_begin_arg);
 
                                                /*  Trigger ADC scan loop start by setting RPS Signal 0. */
@@ -1236,7 +1236,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d)
                                            == 1
                                            && cmd->convert_src == TRIG_EXT) {
                                                DEBUG
-                                                   ("s626_irq_handler: Edge capture interrupt recieved from channel %d\n",
+                                                   ("s626_irq_handler: Edge capture interrupt received from channel %d\n",
                                                     cmd->convert_arg);
 
                                                /*  Trigger ADC scan loop start by setting RPS Signal 0. */
@@ -1805,7 +1805,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                DEBUG("s626_ai_cmd: NULL command\n");
                return -EINVAL;
        } else {
-               DEBUG("s626_ai_cmd: command recieved!!!\n");
+               DEBUG("s626_ai_cmd: command received!!!\n");
        }
 
        if (dev->irq == 0) {
@@ -1880,7 +1880,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                devpriv->ai_continous = 0;
                break;
        case TRIG_NONE:
-               /*  continous aquisition */
+               /*  continous acquisition */
                devpriv->ai_continous = 1;
                devpriv->ai_sample_count = 0;
                break;
@@ -2570,7 +2570,7 @@ static uint32_t I2Chandshake(struct comedi_device *dev, uint32_t val)
        while ((RR7146(P_I2CCTRL) & (I2C_BUSY | I2C_ERR)) == I2C_BUSY)
                ;
 
-       /*  Return non-zero if I2C error occured. */
+       /*  Return non-zero if I2C error occurred. */
        return RR7146(P_I2CCTRL) & I2C_ERR;
 
 }
index be93c30e4b155f2a35fea56a156f48ab3b6bb5ea..e543e6c2b1bbee6381d8cd9b366fbddffdbaca49 100644 (file)
@@ -285,7 +285,7 @@ struct usbduxsub {
        short int ao_cmd_running;
        /* pwm is running */
        short int pwm_cmd_running;
-       /* continous aquisition */
+       /* continous acquisition */
        short int ai_continous;
        short int ao_continous;
        /* number of samples to acquire */
@@ -500,7 +500,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb)
 
        /* test, if we transmit only a fixed number of samples */
        if (!(this_usbduxsub->ai_continous)) {
-               /* not continous, fixed number of samples */
+               /* not continuous, fixed number of samples */
                this_usbduxsub->ai_sample_count--;
                /* all samples received? */
                if (this_usbduxsub->ai_sample_count < 0) {
@@ -653,7 +653,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb)
                /* timer zero */
                this_usbduxsub->ao_counter = this_usbduxsub->ao_timer;
 
-               /* handle non continous aquisition */
+               /* handle non continous acquisition */
                if (!(this_usbduxsub->ao_continous)) {
                        /* fixed number of samples */
                        this_usbduxsub->ao_sample_count--;
@@ -957,7 +957,7 @@ static int usbdux_ai_cmdtest(struct comedi_device *dev,
        if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src)
                err++;
 
-       /* scanning is continous */
+       /* scanning is continuous */
        tmp = cmd->convert_src;
        cmd->convert_src &= TRIG_NOW;
        if (!cmd->convert_src || tmp != cmd->convert_src)
@@ -1222,7 +1222,7 @@ static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                up(&this_usbduxsub->sem);
                return -EBUSY;
        }
-       /* set current channel of the running aquisition to zero */
+       /* set current channel of the running acquisition to zero */
        s->async->cur_chan = 0;
 
        this_usbduxsub->dux_commands[1] = cmd->chanlist_len;
@@ -1284,7 +1284,7 @@ static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                this_usbduxsub->ai_sample_count = cmd->stop_arg;
                this_usbduxsub->ai_continous = 0;
        } else {
-               /* continous aquisition */
+               /* continous acquisition */
                this_usbduxsub->ai_continous = 1;
                this_usbduxsub->ai_sample_count = 0;
        }
@@ -1515,7 +1515,7 @@ static int usbdux_ao_cmdtest(struct comedi_device *dev,
        /* just now we scan also in the high speed mode every frame */
        /* this is due to ehci driver limitations */
        if (0) {                /* (this_usbduxsub->high_speed) */
-               /* start immidiately a new scan */
+               /* start immediately a new scan */
                /* the sampling rate is set by the coversion rate */
                cmd->scan_begin_src &= TRIG_FOLLOW;
        } else {
@@ -1525,7 +1525,7 @@ static int usbdux_ao_cmdtest(struct comedi_device *dev,
        if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src)
                err++;
 
-       /* scanning is continous */
+       /* scanning is continuous */
        tmp = cmd->convert_src;
        /* we always output at 1kHz just now all channels at once */
        if (0) {                /* (this_usbduxsub->high_speed) */
@@ -1645,7 +1645,7 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        dev_dbg(&this_usbduxsub->interface->dev,
                "comedi%d: %s\n", dev->minor, __func__);
 
-       /* set current channel of the running aquisition to zero */
+       /* set current channel of the running acquisition to zero */
        s->async->cur_chan = 0;
        for (i = 0; i < cmd->chanlist_len; ++i) {
                chan = CR_CHAN(cmd->chanlist[i]);
@@ -1694,7 +1694,7 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        this_usbduxsub->ao_counter = this_usbduxsub->ao_timer;
 
        if (cmd->stop_src == TRIG_COUNT) {
-               /* not continous */
+               /* not continuous */
                /* counter */
                /* high speed also scans everything at once */
                if (0) {        /* (this_usbduxsub->high_speed) */
@@ -1708,7 +1708,7 @@ static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                }
                this_usbduxsub->ao_continous = 0;
        } else {
-               /* continous aquisition */
+               /* continous acquisition */
                this_usbduxsub->ao_continous = 1;
                this_usbduxsub->ao_sample_count = 0;
        }
index 5b15e6df54e653cb4f7e815979c0c7f645722a23..2a8e725b78592eeb141d154081f10097589a80c4 100644 (file)
@@ -180,7 +180,7 @@ struct usbduxfastsub_s {
        /* comedi device for the interrupt context */
        struct comedi_device *comedidev;
        short int ai_cmd_running;       /* asynchronous command is running */
-       short int ai_continous; /* continous aquisition */
+       short int ai_continous; /* continous acquisition */
        long int ai_sample_count;       /* number of samples to acquire */
        uint8_t *dux_commands;  /* commands */
        int ignore;             /* counter which ignores the first
@@ -392,7 +392,7 @@ static void usbduxfastsub_ai_Irq(struct urb *urb)
        p = urb->transfer_buffer;
        if (!udfs->ignore) {
                if (!udfs->ai_continous) {
-                       /* not continous, fixed number of samples */
+                       /* not continuous, fixed number of samples */
                        n = urb->actual_length / sizeof(uint16_t);
                        if (unlikely(udfs->ai_sample_count < n)) {
                                /*
@@ -775,7 +775,7 @@ static int usbduxfast_ai_cmd(struct comedi_device *dev,
                up(&udfs->sem);
                return -EBUSY;
        }
-       /* set current channel of the running aquisition to zero */
+       /* set current channel of the running acquisition to zero */
        s->async->cur_chan = 0;
 
        /*
@@ -1182,7 +1182,7 @@ static int usbduxfast_ai_cmd(struct comedi_device *dev,
                }
                udfs->ai_continous = 0;
        } else {
-               /* continous aquisition */
+               /* continous acquisition */
                udfs->ai_continous = 1;
                udfs->ai_sample_count = 0;
        }
index 76e4b782d2fb93fbf993652189fa8d255264ebb7..0fe713e72e9d4d620e346e214c8feaeebbef1003 100644 (file)
@@ -52,7 +52,7 @@
 #define TMA1217_DEV_STATUS             0x13    /* Device Status */
 #define TMA1217_INT_STATUS             0x14    /* Interrupt Status */
 
-/* Controller can detect upto 2 possible finger touches.
+/* Controller can detect up to 2 possible finger touches.
  * Each finger touch provides  12 bit X Y co-ordinates, the values are split
  * across 2 registers, and an 8 bit  Z value */
 #define TMA1217_FINGER_STATE           0x18 /* Finger State */
index 1429608544d61533a44af907ba14e720c6cbc60a..3735ed3da4c6362f1079dc6461b30ed9b487f567 100644 (file)
@@ -914,7 +914,7 @@ enum BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
  * Return:
  *     status
  *
- * Closer aplication handle and release app specific
+ * Closer application handle and release app specific
  * resources.
  */
 enum BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx, struct crystalhd_user *uc)
index 13a514dd0f7985f7bc5715f6ff93a07fc9b1f382..5acf39e7cdef730b7d55a4d19bb0c219759d7051 100644 (file)
@@ -302,7 +302,7 @@ static bool crystalhd_start_device(struct crystalhd_adp *adp)
        crystalhd_enable_interrupts(adp);
 
        /* Enable the option for getting the total no. of DWORDS
-        * that have been transfered by the RXDMA engine
+        * that have been transferred by the RXDMA engine
         */
        dbg_options = crystalhd_reg_rd(adp, MISC1_DMA_DEBUG_OPTIONS_REG);
        dbg_options |= 0x10;
@@ -1776,7 +1776,7 @@ enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw,
                return sts;
        }
 
-       /*Get the Responce Address*/
+       /*Get the Response Address*/
        cmd_res_addr = bc_dec_reg_rd(hw->adp, Cpu2HstMbx1);
 
        /*Read the Response*/
@@ -2367,7 +2367,7 @@ enum BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *hw)
        BCMLOG(BCMLOG_INFO, "clock is moving to %d with n %d with vco_mg %d\n",
               hw->core_clock_mhz, n, vco_mg);
 
-       /* Change the DRAM refresh rate to accomodate the new frequency */
+       /* Change the DRAM refresh rate to accommodate the new frequency */
        /* refresh reg = ((refresh_rate * clock_rate)/16) - 1; rounding up*/
        refresh_reg = (7 * hw->core_clock_mhz / 16);
        bc_dec_reg_wr(hw->adp, SDRAM_REF_PARAM, ((1 << 12) | refresh_reg));
index f274c77fb3fcdd4970ec2c04a144edf67c223d7a..5cc3423a6646dc7ac6bc4e115634fa5ea99e861d 100644 (file)
@@ -1455,7 +1455,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
             /*
              * If the descriptor has not recovered, then leaving the EMPTY
              * entry set will not signal to the MUSYCC that this descriptor
-             * has been serviced. The Interrupt Queue can then start loosing
+             * has been serviced. The Interrupt Queue can then start losing
              * available descriptors and MUSYCC eventually encounters and
              * reports the INTFULL condition.  Per manual, changing any bit
              * marks descriptor as available, thus the use of different
index d2c91ef686d1a3d69aadab6dd12ff75800c82735..68f3660f44774b5071bf07969405360d157c0664 100644 (file)
@@ -74,7 +74,7 @@ extern      "C"
 
 #define INT_QUEUE_SIZE    MUSYCC_NIQD
 
-/* RAM image of MUSYCC registers layed out as a C structure */
+/* RAM image of MUSYCC registers laid out as a C structure */
     struct musycc_groupr
     {
         VINT32      thp[32];    /* Transmit Head Pointer [5-29]           */
@@ -96,7 +96,7 @@ extern      "C"
         VINT32      pcd;        /* Port Configuration Descriptor [5-19]   */
     };
 
-/* hardware MUSYCC registers layed out as a C structure */
+/* hardware MUSYCC registers laid out as a C structure */
     struct musycc_globalr
     {
         VINT32      gbp;        /* Group Base Pointer                     */
index 186347b8d56560747ee82938b19357944216c297..a39505f45c29a10180713aba317b497477d728c5 100644 (file)
@@ -54,8 +54,8 @@
 #define MUSYCC_MTU          2048  /* default */
 #define MUSYCC_TXDESC_MIN   10    /* HDLC mode default */
 #define MUSYCC_RXDESC_MIN   18    /* HDLC mode default */
-#define MUSYCC_TXDESC_TRANS 4     /* Transparent mode minumum # of TX descriptors */
-#define MUSYCC_RXDESC_TRANS 12    /* Transparent mode minumum # of RX descriptors */
+#define MUSYCC_TXDESC_TRANS 4     /* Transparent mode minimum # of TX descriptors */
+#define MUSYCC_RXDESC_TRANS 12    /* Transparent mode minimum # of RX descriptors */
 
 #define MAX_DEFAULT_IFQLEN  32    /* network qlen */
 
index 51232948091f2d3f4aa31162146a996a60e5bcf3..3f3cd60ac3674fcaf1e2ac86a0e40c9e44591c99 100644 (file)
@@ -95,7 +95,7 @@ sbeCrc (u_int8_t *buffer,          /* data buffer to crc */
 
     /*
      * if table not yet created, do so. Don't care about "extra" time
-     * checking this everytime sbeCrc() is called, since CRC calculations are
+     * checking this every time sbeCrc() is called, since CRC calculations are
      * already time consuming
      */
     if (!crcTableInit)
index 70b9b33f3522fd21fe803f11c5b0db24a074a9e9..f42531c3d8da714c753e5532838aab37674a39bb 100644 (file)
@@ -239,7 +239,7 @@ sbecom_proc_get_sbe_info (char *buffer, char **start, off_t offset,
      */
 
 #if 1
-    /* #4 - intepretation of above = set EOF, return len */
+    /* #4 - interpretation of above = set EOF, return len */
     *eof = 1;
 #endif
 
index e6c8cb3828e9ccf82c0af84096e3ba903d8e4d2d..425e9274f28aa2bb353d0c420acd434c0089f922 100644 (file)
@@ -856,7 +856,7 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
  */
 
 /*
- * structure for space availiable reg in rxmac address map.
+ * structure for space available reg in rxmac address map.
  * located at address 0x4094
  *
  * 31-17: reserved
@@ -1031,7 +1031,7 @@ typedef struct _RXMAC_t {                         /* Location: */
  * 31: reset MII mgmt
  * 30-6: unused
  * 5: scan auto increment
- * 4: preamble supress
+ * 4: preamble suppress
  * 3: undefined
  * 2-0: mgmt clock reset
  */
index 78349adc7d8e7c85794ea4b547e0b089cd727edc..946c0c5474048673844882ef7eadfb74ebd98dd3 100644 (file)
@@ -468,7 +468,7 @@ typedef union _MI_ANAR_t {
 #define TRUEPHY_ANEG_COMPLETE           1
 #define TRUEPHY_ANEG_DISABLED           2
 
-/* Define duplex advertisment flags */
+/* Define duplex advertisement flags */
 #define TRUEPHY_ADV_DUPLEX_NONE         0x00
 #define TRUEPHY_ADV_DUPLEX_FULL         0x01
 #define TRUEPHY_ADV_DUPLEX_HALF         0x02
index 339136f64be10f0b62fb907b18033a0a21785e30..fc6bd438366d4b4d8a0f9ce555cda5916af4f4ae 100644 (file)
@@ -122,7 +122,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
         * number of entries in FBR1.
         *
         * FBR1 holds "large" frames, FBR0 holds "small" frames.  If FBR1
-        * entries are huge in order to accomodate a "jumbo" frame, then it
+        * entries are huge in order to accommodate a "jumbo" frame, then it
         * will have less entries.  Conversely, FBR1 will now be relied upon
         * to carry more "normal" frames, thus it's entry size also increases
         * and the number of entries goes up too (since it now carries
index ce4d930426795153df0d313fd94d436e95d87d37..f716e408712bcdae90c37f462213b448c905de38 100644 (file)
@@ -466,7 +466,7 @@ void et131x_isr_handler(struct work_struct *work)
                /* Handle SLV Timeout Interrupt */
                if (status & ET_INTR_SLV_TIMEOUT) {
                        /*
-                        * This means a timeout has occured on a read or
+                        * This means a timeout has occurred on a read or
                         * write request to one of the JAGCore registers. The
                         * Global Resources block has terminated the request
                         * and on a read request, returned a "fake" value.
index 0c298cae90d97192a047f5b12964f52f77af0d3c..b25bae29042e05ed59220c6e1cec6aaa9b518033 100644 (file)
@@ -415,7 +415,7 @@ void et131x_multicast(struct net_device *netdev)
         */
        PacketFilter = adapter->PacketFilter;
 
-       /* Clear the 'multicast' flag locally; becuase we only have a single
+       /* Clear the 'multicast' flag locally; because we only have a single
         * flag to check multicast, and multiple multicast addresses can be
         * set, this is the easiest way to determine if more than one
         * multicast address is being set.
index 4a89bd1bbf747734420d568683685c9ea1855ef3..0b63f051f27c6d3383a1afb154675f6ede4d6381 100644 (file)
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_read_reg
-// Descripton: This function will read the value of a given ASIC register.
+// Description: This function will read the value of a given ASIC register.
 // Input:
 //     dev    - device structure
 //     offset - ASIC register offset
@@ -49,7 +49,7 @@ static inline u16 ft1000_read_reg (struct net_device *dev, u16 offset) {
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_write_reg
-// Descripton: This function will set the value for a given ASIC register.
+// Description: This function will set the value for a given ASIC register.
 // Input:
 //     dev    - device structure
 //     offset - ASIC register offset
index b0729fc3c89a96cc8e7cfbb56590cc9171a7267b..fb375ea26dd20e06c27418b28bc4c284e4d5a4b5 100644 (file)
@@ -95,47 +95,47 @@ void put_request_value(struct net_device *dev, long lvalue);
 USHORT hdr_checksum(PPSEUDO_HDR pHdr);
 
 typedef struct _DSP_FILE_HDR {
-       long build_date;
-       long dsp_coff_date;
-       long loader_code_address;
-       long loader_code_size;
-       long loader_code_end;
-       long dsp_code_address;
-       long dsp_code_size;
-       long dsp_code_end;
-       long reserved[8];
+       u32  build_date;
+       u32  dsp_coff_date;
+       u32  loader_code_address;
+       u32  loader_code_size;
+       u32  loader_code_end;
+       u32  dsp_code_address;
+       u32  dsp_code_size;
+       u32  dsp_code_end;
+       u32  reserved[8];
 } __attribute__ ((packed)) DSP_FILE_HDR, *PDSP_FILE_HDR;
 
 typedef struct _DSP_FILE_HDR_5 {
-       long version_id;        // Version ID of this image format.
-       long package_id;        // Package ID of code release.
-       long build_date;        // Date/time stamp when file was built.
-       long commands_offset;   // Offset to attached commands in Pseudo Hdr format.
-       long loader_offset;     // Offset to bootloader code.
-       long loader_code_address;       // Start address of bootloader.
-       long loader_code_end;   // Where bootloader code ends.
-       long loader_code_size;
-       long version_data_offset;       // Offset were scrambled version data begins.
-       long version_data_size; // Size, in words, of scrambled version data.
-       long nDspImages;        // Number of DSP images in file.
+       u32  version_id;        // Version ID of this image format.
+       u32  package_id;        // Package ID of code release.
+       u32  build_date;        // Date/time stamp when file was built.
+       u32  commands_offset;   // Offset to attached commands in Pseudo Hdr format.
+       u32  loader_offset;     // Offset to bootloader code.
+       u32  loader_code_address;       // Start address of bootloader.
+       u32  loader_code_end;   // Where bootloader code ends.
+       u32  loader_code_size;
+       u32  version_data_offset;       // Offset were scrambled version data begins.
+       u32  version_data_size; // Size, in words, of scrambled version data.
+       u32  nDspImages;        // Number of DSP images in file.
 } __attribute__ ((packed)) DSP_FILE_HDR_5, *PDSP_FILE_HDR_5;
 
 typedef struct _DSP_IMAGE_INFO {
-       long coff_date;         // Date/time when DSP Coff image was built.
-       long begin_offset;      // Offset in file where image begins.
-       long end_offset;        // Offset in file where image begins.
-       long run_address;       // On chip Start address of DSP code.
-       long image_size;        // Size of image.
-       long version;           // Embedded version # of DSP code.
+       u32  coff_date;         // Date/time when DSP Coff image was built.
+       u32  begin_offset;      // Offset in file where image begins.
+       u32  end_offset;        // Offset in file where image begins.
+       u32  run_address;       // On chip Start address of DSP code.
+       u32  image_size;        // Size of image.
+       u32  version;           // Embedded version # of DSP code.
 } __attribute__ ((packed)) DSP_IMAGE_INFO, *PDSP_IMAGE_INFO;
 
 typedef struct _DSP_IMAGE_INFO_V6 {
-       long coff_date;         // Date/time when DSP Coff image was built.
-       long begin_offset;      // Offset in file where image begins.
-       long end_offset;        // Offset in file where image begins.
-       long run_address;       // On chip Start address of DSP code.
-       long image_size;        // Size of image.
-       long version;           // Embedded version # of DSP code.
+       u32  coff_date;         // Date/time when DSP Coff image was built.
+       u32  begin_offset;      // Offset in file where image begins.
+       u32  end_offset;        // Offset in file where image begins.
+       u32  run_address;       // On chip Start address of DSP code.
+       u32  image_size;        // Size of image.
+       u32  version;           // Embedded version # of DSP code.
        unsigned short checksum;        // Dsp File checksum
        unsigned short pad1;
 } __attribute__ ((packed)) DSP_IMAGE_INFO_V6, *PDSP_IMAGE_INFO_V6;
@@ -846,8 +846,8 @@ int card_download(struct net_device *dev, const u8 *pFileStart, UINT FileLength)
                        break;
 
                case STATE_DONE_DWNLD:
-                       if (((UINT) (pUcFile) - (UINT) pFileStart) >=
-                               (UINT) FileLength) {
+                       if (((unsigned long) (pUcFile) - (unsigned long) pFileStart) >=
+                               (unsigned long) FileLength) {
                                uiState = STATE_DONE_FILE;
                                break;
                        }
@@ -901,11 +901,11 @@ int card_download(struct net_device *dev, const u8 *pFileStart, UINT FileLength)
                                                                  &info->prov_list);
                                                // Move to next entry if available
                                                pUcFile =
-                                                       (UCHAR *) ((UINT) pUcFile +
-                                                                  (UINT) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR));
-                                               if ((UINT) (pUcFile) -
-                                                       (UINT) (pFileStart) >=
-                                                       (UINT) FileLength) {
+                                                       (UCHAR *) ((unsigned long) pUcFile +
+                                                                  (unsigned long) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR));
+                                               if ((unsigned long) (pUcFile) -
+                                                       (unsigned long) (pFileStart) >=
+                                                       (unsigned long) FileLength) {
                                                        uiState =
                                                                STATE_DONE_FILE;
                                                }
index ff691d9b984e34bffc8638f57124a7770f6f2874..eeb7dd43f9a8ef9128487fd977761d1fae8fbdf7 100644 (file)
@@ -90,7 +90,7 @@ MODULE_SUPPORTED_DEVICE("FT1000");
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_asic_read
-// Descripton: This function will retrieve the value of a specific ASIC
+// Description: This function will retrieve the value of a specific ASIC
 //             register.
 // Input:
 //    dev - network device structure
@@ -107,7 +107,7 @@ inline u16 ft1000_asic_read(struct net_device *dev, u16 offset)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_asic_write
-// Descripton: This function will set the value of a specific ASIC
+// Description: This function will set the value of a specific ASIC
 //             register.
 // Input:
 //    dev - network device structure
@@ -124,7 +124,7 @@ inline void ft1000_asic_write(struct net_device *dev, u16 offset, u16 value)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_read_fifo_len
-// Descripton: This function will read the ASIC Uplink FIFO status register
+// Description: This function will read the ASIC Uplink FIFO status register
 //             which will return the number of bytes remaining in the Uplink FIFO.
 //             Sixteen bytes are subtracted to make sure that the ASIC does not
 //             reach its threshold.
@@ -148,7 +148,7 @@ static inline u16 ft1000_read_fifo_len(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_read_dpram
-// Descripton: This function will read the specific area of dpram
+// Description: This function will read the specific area of dpram
 //             (Electrabuzz ASIC only)
 // Input:
 //     dev    - device structure
@@ -175,7 +175,7 @@ u16 ft1000_read_dpram(struct net_device * dev, int offset)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_write_dpram
-// Descripton: This function will write to a specific area of dpram
+// Description: This function will write to a specific area of dpram
 //             (Electrabuzz ASIC only)
 // Input:
 //     dev    - device structure
@@ -201,7 +201,7 @@ static inline void ft1000_write_dpram(struct net_device *dev,
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_read_dpram_mag_16
-// Descripton: This function will read the specific area of dpram
+// Description: This function will read the specific area of dpram
 //             (Magnemite ASIC only)
 // Input:
 //     dev    - device structure
@@ -233,7 +233,7 @@ u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, int Index)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_write_dpram_mag_16
-// Descripton: This function will write to a specific area of dpram
+// Description: This function will write to a specific area of dpram
 //             (Magnemite ASIC only)
 // Input:
 //     dev    - device structure
@@ -263,7 +263,7 @@ static inline void ft1000_write_dpram_mag_16(struct net_device *dev,
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_read_dpram_mag_32
-// Descripton: This function will read the specific area of dpram
+// Description: This function will read the specific area of dpram
 //             (Magnemite ASIC only)
 // Input:
 //     dev    - device structure
@@ -290,7 +290,7 @@ u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_write_dpram_mag_32
-// Descripton: This function will write to a specific area of dpram
+// Description: This function will write to a specific area of dpram
 //             (Magnemite ASIC only)
 // Input:
 //     dev    - device structure
@@ -315,7 +315,7 @@ void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_enable_interrupts
-// Descripton: This function will enable interrupts base on the current interrupt mask.
+// Description: This function will enable interrupts base on the current interrupt mask.
 // Input:
 //     dev    - device structure
 // Output:
@@ -340,7 +340,7 @@ static void ft1000_enable_interrupts(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_disable_interrupts
-// Descripton: This function will disable all interrupts.
+// Description: This function will disable all interrupts.
 // Input:
 //     dev    - device structure
 // Output:
@@ -364,7 +364,7 @@ static void ft1000_disable_interrupts(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_reset_asic
-// Descripton: This function will call the Card Service function to reset the
+// Description: This function will call the Card Service function to reset the
 //             ASIC.
 // Input:
 //     dev    - device structure
@@ -408,7 +408,7 @@ static void ft1000_reset_asic(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_reset_card
-// Descripton: This function will reset the card
+// Description: This function will reset the card
 // Input:
 //     dev    - device structure
 // Output:
@@ -571,7 +571,7 @@ static int ft1000_reset_card(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_chkcard
-// Descripton: This function will check if the device is presently available on
+// Description: This function will check if the device is presently available on
 //             the system.
 // Input:
 //     dev    - device structure
@@ -607,7 +607,7 @@ static int ft1000_chkcard(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_hbchk
-// Descripton: This function will perform the heart beat check of the DSP as
+// Description: This function will perform the heart beat check of the DSP as
 //             well as the ASIC.
 // Input:
 //     dev    - device structure
@@ -828,7 +828,7 @@ static void ft1000_hbchk(u_long data)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_send_cmd
-// Descripton:
+// Description:
 // Input:
 // Output:
 //
@@ -908,7 +908,7 @@ void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, u16 qt
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_receive_cmd
-// Descripton: This function will read a message from the dpram area.
+// Description: This function will read a message from the dpram area.
 // Input:
 //    dev - network device structure
 //    pbuffer - caller supply address to buffer
@@ -1003,7 +1003,7 @@ BOOLEAN ft1000_receive_cmd(struct net_device *dev, u16 * pbuffer, int maxsz, u16
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_proc_drvmsg
-// Descripton: This function will process the various driver messages.
+// Description: This function will process the various driver messages.
 // Input:
 //     dev    - device structure
 //     pnxtph - pointer to next pseudo header
@@ -1285,7 +1285,7 @@ void ft1000_proc_drvmsg(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_parse_dpram_msg
-// Descripton: This function will parse the message received from the DSP
+// Description: This function will parse the message received from the DSP
 //             via the DPRAM interface.
 // Input:
 //     dev    - device structure
@@ -1442,7 +1442,7 @@ int ft1000_parse_dpram_msg(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_flush_fifo
-// Descripton: This function will flush one packet from the downlink
+// Description: This function will flush one packet from the downlink
 //             FIFO.
 // Input:
 //     dev      - device structure
@@ -1587,7 +1587,7 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_copy_up_pkt
-// Descripton: This function will pull Flarion packets out of the Downlink
+// Description: This function will pull Flarion packets out of the Downlink
 //             FIFO and convert it to an ethernet packet.  The ethernet packet will
 //             then be deliver to the TCP/IP stack.
 // Input:
@@ -1773,7 +1773,7 @@ int ft1000_copy_up_pkt(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_copy_down_pkt
-// Descripton: This function will take an ethernet packet and convert it to
+// Description: This function will take an ethernet packet and convert it to
 //             a Flarion packet prior to sending it to the ASIC Downlink
 //             FIFO.
 // Input:
index 8e622425aa1371c78f72088163586bf3e1353ffe..1972b72450d4ad8da84e5c0c29ad6acbca1259b5 100644 (file)
@@ -488,7 +488,7 @@ static int check_buffers(u16 *buff_w, u16 *buff_r, int len, int offset)
 // Parameters:  struct ft1000_device  - device structure
 //              u16 **pUsFile - DSP image file pointer in u16
 //              u8  **pUcFile - DSP image file pointer in u8
-//              long   word_length - lenght of the buffer to be written
+//              long   word_length - length of the buffer to be written
 //                                   to DPRAM
 //
 // Returns:     STATUS_SUCCESS - success
@@ -628,7 +628,7 @@ static void usb_dnld_complete (struct urb *urb)
 // Parameters:  struct ft1000_device  - device structure
 //              u16 **pUsFile - DSP image file pointer in u16
 //              u8  **pUcFile - DSP image file pointer in u8
-//              long   word_length - lenght of the buffer to be written
+//              long   word_length - length of the buffer to be written
 //                                   to DPRAM
 //
 // Returns:     STATUS_SUCCESS - success
@@ -817,7 +817,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart,
                                                 * Error, beyond boot code range.
                                                 */
                                                DEBUG
-                                                   ("FT1000:download:Download error: Requested len=%d exceeds BOOT code boundry.\n",
+                                                   ("FT1000:download:Download error: Requested len=%d exceeds BOOT code boundary.\n",
                                                     (int)word_length);
                                                status = STATUS_FAILURE;
                                                break;
@@ -950,7 +950,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart,
                                                 * Error, beyond boot code range.
                                                 */
                                                DEBUG
-                                                   ("FT1000:download:Download error: Requested len=%d exceeds DSP code boundry.\n",
+                                                   ("FT1000:download:Download error: Requested len=%d exceeds DSP code boundary.\n",
                                                     (int)word_length);
                                                status = STATUS_FAILURE;
                                                break;
index 78dcd49bb985815b7fb94e68916f76469a3ed08c..684e69eacb71e58f823e2bf67c2f90d532ba0cf8 100644 (file)
@@ -585,7 +585,7 @@ int dsp_reload(struct ft1000_device *ft1000dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_reset_asic
-// Descripton: This function will call the Card Service function to reset the
+// Description: This function will call the Card Service function to reset the
 //             ASIC.
 // Input:
 //     dev    - device structure
@@ -626,7 +626,7 @@ static void ft1000_reset_asic(struct net_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_reset_card
-// Descripton: This function will reset the card
+// Description: This function will reset the card
 // Input:
 //     dev    - device structure
 // Output:
@@ -917,7 +917,7 @@ static void ft1000_usb_transmit_complete(struct urb *urb)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_copy_down_pkt
-// Descripton: This function will take an ethernet packet and convert it to
+// Description: This function will take an ethernet packet and convert it to
 //             a Flarion packet prior to sending it to the ASIC Downlink
 //             FIFO.
 // Input:
@@ -1075,10 +1075,10 @@ err:
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_copy_up_pkt
-// Descripton: This function will take a packet from the FIFO up link and
+// Description: This function will take a packet from the FIFO up link and
 //             convert it into an ethernet packet and deliver it to the IP stack
 // Input:
-//     urb - the receving usb urb
+//     urb - the receiving usb urb
 //
 // Output:
 //     status - FAILURE
@@ -1182,7 +1182,7 @@ static int ft1000_copy_up_pkt(struct urb *urb)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_submit_rx_urb
-// Descripton: the receiving function of the network driver
+// Description: the receiving function of the network driver
 //
 // Input:
 //     info - a private structure contains the device information
@@ -1316,7 +1316,7 @@ Jim
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_chkcard
-// Descripton: This function will check if the device is presently available on
+// Description: This function will check if the device is presently available on
 //             the system.
 // Input:
 //     dev    - device structure
@@ -1363,7 +1363,7 @@ static int ft1000_chkcard(struct ft1000_device *dev)
 //---------------------------------------------------------------------------
 //
 // Function:   ft1000_receive_cmd
-// Descripton: This function will read a message from the dpram area.
+// Description: This function will read a message from the dpram area.
 // Input:
 //    dev - network device structure
 //    pbuffer - caller supply address to buffer
index 3f72d5bb3f925b4beddbd6a1797c59d24675525a..6a8a1969f9e10b014c2b94d16f832cb9d0114fa6 100644 (file)
@@ -55,7 +55,7 @@ struct pseudo_hdr {
    unsigned char     seq_num;          //sequence number
    unsigned char     rsvd2;            //reserved
    unsigned short    qos_class;        //Quality of Service class (Not applicable on Mobile)
-   unsigned short    checksum;         //Psuedo header checksum
+   unsigned short    checksum;         //Pseudo header checksum
 } __attribute__ ((packed));
 
 typedef struct _IOCTL_GET_VER
index e047c03fbf3adcbf0db4d56820e5bf13877bcd50..f2ecb3eae9cdf5eb044330ecc1bce6388924e957 100644 (file)
@@ -364,7 +364,7 @@ struct prov_record {
 
 #define ISR_EMPTY                      (u8)0x00         // no bits set in ISR
 
-#define ISR_DOORBELL_ACK       (u8)0x01                 //  the doorbell i sent has been recieved.
+#define ISR_DOORBELL_ACK       (u8)0x01                 //  the doorbell i sent has been received.
 
 #define ISR_DOORBELL_PEND      (u8)0x02         //  doorbell for me
 
index 466988dbc37d116f08a537f1263238f9a38cdf6d..f29dda4e9f205e3ca9df28bbdf9a68d67f40bbea 100644 (file)
@@ -113,7 +113,7 @@ int gs_write(struct tty_struct * tty,
 
                c = count;
  
-               /* This is safe because we "OWN" the "head". Noone else can 
+               /* This is safe because we "OWN" the "head". No one else can 
                   change the "head": we own the port_write_mutex. */
                /* Don't overrun the end of the buffer */
                t = SERIAL_XMIT_SIZE - port->xmit_head;
index 8366978578c1222577ba0b531506685447b2e67d..28a66129293e47379b8bb5278cc0a5d3b65233eb 100644 (file)
@@ -87,7 +87,7 @@ struct Map {
 ** The Topology array contains the ID of the unit connected to each of the
 ** four links on this unit. The entry will be 0xFFFF if NOTHING is connected
 ** to the link, or will be 0xFF00 if an UNKNOWN unit is connected to the link.
-** The Name field is a null-terminated string, upto 31 characters, containing
+** The Name field is a null-terminated string, up to 31 characters, containing
 ** the 'cute' name that the sysadmin/users know the RTA by. It is permissible
 ** for this string to contain any character in the range \040 to \176 inclusive.
 ** In particular, ctrl sequences and DEL (0x7F, \177) are not allowed. The
index d956dd31600552a8eebf08e62c81ef557ad38e0c..ffa01c590216d97a2e43c1b5edd77af52a79ef25 100644 (file)
@@ -109,7 +109,7 @@ int RIOBootCodeRTA(struct rio_info *p, struct DownLoad * rbp)
        rio_dprintk(RIO_DEBUG_BOOT, "Data at user address %p\n", rbp->DataP);
 
        /*
-        ** Check that we have set asside enough memory for this
+        ** Check that we have set aside enough memory for this
         */
        if (rbp->Count > SIXTY_FOUR_K) {
                rio_dprintk(RIO_DEBUG_BOOT, "RTA Boot Code Too Large!\n");
@@ -293,7 +293,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
                /*
                 **                     S T O P !
                 **
-                ** Upto this point the code has been fairly rational, and possibly
+                ** Up to this point the code has been fairly rational, and possibly
                 ** even straight forward. What follows is a pile of crud that will
                 ** magically turn into six bytes of transputer assembler. Normally
                 ** you would expect an array or something, but, being me, I have
@@ -419,7 +419,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
                rio_dprintk(RIO_DEBUG_BOOT, "Set control port\n");
 
                /*
-                ** Now, wait for upto five seconds for the Tp to setup the parmmap
+                ** Now, wait for up to five seconds for the Tp to setup the parmmap
                 ** pointer:
                 */
                for (wait_count = 0; (wait_count < p->RIOConf.StartupTime) && (readw(&HostP->__ParmMapR) == OldParmMap); wait_count++) {
@@ -475,7 +475,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
 
                /*
                 ** now wait for the card to set all the parmmap->XXX stuff
-                ** this is a wait of upto two seconds....
+                ** this is a wait of up to two seconds....
                 */
                rio_dprintk(RIO_DEBUG_BOOT, "Looking for init_done - %d ticks\n", p->RIOConf.StartupTime);
                HostP->timeout_id = 0;
index f121357e5af093ee270e9332ce6267df807ea724..61efd538e850d8e4d321203ad710d2ac5c9057ac 100644 (file)
@@ -863,7 +863,7 @@ int RIOUnUse(unsigned long iPortP, struct CmdBlk *CmdBlkP)
         ** being transferred from the write queue into the transmit packets
         ** (add_transmit) and no furthur transmit interrupt will be sent for that
         ** data. The next interrupt will occur up to 500ms later (RIOIntr is called
-        ** twice a second as a saftey measure). This was the case when kermit was
+        ** twice a second as a safety measure). This was the case when kermit was
         ** used to send data into a RIO port. After each packet was sent, TCFLSH
         ** was called to flush the read queue preemptively. PortP->InUse was
         ** incremented, thereby blocking the 6 byte acknowledgement packet
index f9b936ac3394de7e6a4c07b109049ef639b2d546..8757378e832010c0e39b36e45d7108cb8a8e12b1 100644 (file)
@@ -450,7 +450,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
                 ** we reset the unit, because we didn't boot it.
                 ** However, if the table is full, it could be that we did boot
                 ** this unit, and so we won't reboot it, because it isn't really
-                ** all that disasterous to keep the old bins in most cases. This
+                ** all that disastrous to keep the old bins in most cases. This
                 ** is a rather tacky feature, but we are on the edge of reallity
                 ** here, because the implication is that someone has connected
                 ** 16+MAX_EXTRA_UNITS onto one host.
@@ -678,7 +678,7 @@ static int RIOCheck(struct Host *HostP, unsigned int UnitId)
 
        HostP->Mapping[UnitId].Flags &= ~BEEN_HERE;
 
-       /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d DOESNT KNOW THE HOST!\n", UnitId)); */
+       /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d DOESN'T KNOW THE HOST!\n", UnitId)); */
 
        return 0;
 }
index 8a90393faf3c652e1f8fcce37f4c6c99cf474cd2..e7e9911d7a7231333ab76762722f71c2b5a32bb5 100644 (file)
@@ -124,7 +124,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
        }
 
        /*
-        ** Grab pointer to the port stucture
+        ** Grab pointer to the port structure
         */
        PortP = p->RIOPortp[SysPort];   /* Get control struc */
        rio_dprintk(RIO_DEBUG_TTY, "PortP: %p\n", PortP);
@@ -161,7 +161,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
        }
 
        /*
-        ** If the RTA has not booted yet and the user has choosen to block
+        ** If the RTA has not booted yet and the user has chosen to block
         ** until the RTA is present then we must spin here waiting for
         ** the RTA to boot.
         */
index 1291462bcddb2a257808d47408fcd0c030353893..4f94aaffbe831f63435f1c992c4ab73fa7e48f00 100644 (file)
  * Readying for release on 2.0.x (sorry David, 1.01 becomes 1.1 for RCS). 
  *
  * Revision 0.12  1999/03/28 09:20:10  wolff
- * Fixed problem in 0.11, continueing cleanup.
+ * Fixed problem in 0.11, continuing cleanup.
  *
  * Revision 0.11  1999/03/28 08:46:44  wolff
  * cleanup. Not good.
  *
  * Revision 0.10  1999/03/28 08:09:43  wolff
- * Fixed loosing characters on close.
+ * Fixed losing characters on close.
  *
  * Revision 0.9  1999/03/21 22:52:01  wolff
  * Ported back to 2.2.... (minor things)
@@ -1588,7 +1588,7 @@ static void sx_close(void *ptr)
 #define R0             if (read_sx_byte(board, i) != 0x55) return 1
 #define R1             if (read_sx_byte(board, i) != 0xaa) return 1
 
-/* This memtest takes a human-noticable time. You normally only do it
+/* This memtest takes a human-noticeable time. You normally only do it
    once a boot, so I guess that it is worth it. */
 static int do_memtest(struct sx_board *board, int min, int max)
 {
@@ -1645,7 +1645,7 @@ static int do_memtest(struct sx_board *board, int min, int max)
 #define R1             if (read_sx_word(board, i) != 0xaa55) return 1
 
 #if 0
-/* This memtest takes a human-noticable time. You normally only do it
+/* This memtest takes a human-noticeable time. You normally only do it
    once a boot, so I guess that it is worth it. */
 static int do_memtest_w(struct sx_board *board, int min, int max)
 {
index fb9b4245bada36d695b926d8e725aae85cf46289..a339406052efc4da1242773bae04a136ab3a10e8 100644 (file)
@@ -131,7 +131,7 @@ struct drm_psb_reloc {
        u32 pre_add;    /* Destination format: */
        u32 background; /* Destination add */
        u32 dst_buffer; /* Destination buffer. Index into buffer_list */
-       u32 arg0;               /* Reloc-op dependant */
+       u32 arg0;               /* Reloc-op dependent */
        u32 arg1;
 };
 
index 44cd095d286222336ecae265d12ca5cca5935299..d01d45e7a14d427c8fbc5460c71c9747c81440f6 100644 (file)
@@ -561,7 +561,7 @@ static int psb_driver_unload(struct drm_device *dev)
                kfree(dev_priv);
                dev->dev_private = NULL;
 
-               /*destory VBT data*/
+               /*destroy VBT data*/
                psb_intel_destroy_bios(dev);
        }
 
index f5bcd119b87d02d0d5ed0fbfe88a4f0f48e5ddfa..48ac8ba7f40bc41d5e317ec14cf3f897073e0742 100644 (file)
@@ -271,7 +271,7 @@ bool psb_intel_init_bios(struct drm_device *dev)
 }
 
 /**
- * Destory and free VBT data
+ * Destroy and free VBT data
  */
 void psb_intel_destroy_bios(struct drm_device *dev)
 {
index 731a5a2261d327797f0d5e149b654ed03e571af2..1d2bb021c0a53649c4ae3823ec24354d1b7309e8 100644 (file)
@@ -573,7 +573,7 @@ static bool psb_sdvo_set_current_inoutmap(struct psb_intel_output *output,
        /* Make all fields of the  args/ret to zero */
        memset(byArgs, 0, sizeof(byArgs));
 
-       /* Fill up the arguement values; */
+       /* Fill up the argument values; */
        byArgs[0] = (u8) (in0outputmask & 0xFF);
        byArgs[1] = (u8) ((in0outputmask >> 8) & 0xFF);
        byArgs[2] = (u8) (in1outputmask & 0xFF);
index a1d1475a9315506108d9b86e0feb1645609f3a79..c7107a37e33d7fa5fc3968d2f8dbf3e46188a7d6 100644 (file)
@@ -217,7 +217,7 @@ struct psb_intel_sdvo_set_target_input_args {
 } __attribute__ ((packed));
 
 /**
- * Takes a struct psb_intel_sdvo_output_flags of which outputs are targetted by
+ * Takes a struct psb_intel_sdvo_output_flags of which outputs are targeted by
  * future output commands.
  *
  * Affected commands inclue SET_OUTPUT_TIMINGS_PART[12],
index fc13f89c6e12f0807743fd6bebdfe6334f73e737..762a05728632cbaa376462f2a9a63517e1b6c87f 100644 (file)
@@ -130,7 +130,7 @@ struct ttm_fence_unref_arg {
 };
 
 /*
- * Ioctl offsets frome extenstion start.
+ * Ioctl offsets from extenstion start.
  */
 
 #define TTM_FENCE_SIGNALED 0x01
index 06a76da32128ae34ce298386334f92f2e5cdd28f..9db1f3952fd222f9b4dcc7289da82e4ff629f0ba 100644 (file)
@@ -2,7 +2,7 @@ This is a driver for the WIS GO7007SB multi-format video encoder.
 
 Pete Eberlein <pete@sensoray.com>
 
-The driver was orignally released under the GPL and is currently hosted at:
+The driver was originally released under the GPL and is currently hosted at:
 http://nikosapi.org/wiki/index.php/WIS_Go7007_Linux_driver
 The go7007 firmware can be acquired from the package on the site above.
 
index af789937be4ed8fd48a5041739290c290122d7c2..68ad17d670980d4894f0835f88925a1f63d84662 100644 (file)
@@ -894,7 +894,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req,
 
 /*
  * We break the request into 1 or more blkvsc_requests and submit
- * them.  If we cant submit them all, we put them on the
+ * them.  If we can't submit them all, we put them on the
  * pending_list. The blkvsc_request() will work on the pending_list.
  */
 static int blkvsc_do_request(struct block_device_context *blkdev,
index 775a52a912225c2679877d0e8817e02e6f01be28..f7ce7d2494b38c7e7fbf80c489864e6d86f98a56 100644 (file)
@@ -81,14 +81,14 @@ static void vmbus_setevent(struct vmbus_channel *channel)
 
        if (channel->offermsg.monitor_allocated) {
                /* Each u32 represents 32 channels */
-               set_bit(channel->offermsg.child_relid & 31,
+               sync_set_bit(channel->offermsg.child_relid & 31,
                        (unsigned long *) vmbus_connection.send_int_page +
                        (channel->offermsg.child_relid >> 5));
 
                monitorpage = vmbus_connection.monitor_pages;
                monitorpage++; /* Get the child to parent monitor page */
 
-               set_bit(channel->monitor_bit,
+               sync_set_bit(channel->monitor_bit,
                        (unsigned long *)&monitorpage->trigger_group
                                        [channel->monitor_grp].pending);
 
@@ -104,7 +104,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
 
        if (Channel->offermsg.monitor_allocated) {
                /* Each u32 represents 32 channels */
-               clear_bit(Channel->offermsg.child_relid & 31,
+               sync_clear_bit(Channel->offermsg.child_relid & 31,
                          (unsigned long *)vmbus_connection.send_int_page +
                          (Channel->offermsg.child_relid >> 5));
 
@@ -112,7 +112,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
                        vmbus_connection.monitor_pages;
                monitorPage++; /* Get the child to parent monitor page */
 
-               clear_bit(Channel->monitor_bit,
+               sync_clear_bit(Channel->monitor_bit,
                          (unsigned long *)&monitorPage->trigger_group
                                        [Channel->monitor_grp].Pending);
        }
index bc0393a41d29bf8e230cebc073b72db6d2e7172e..06b573227e8dd9dfb72a28ff7bfdac3dd8ed0cfe 100644 (file)
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(prep_negotiate_resp);
  * from Hyper-V. This stub responds to the default negotiate messages
  * that come in for every non IDE/SCSI/Network request.
  * This behavior is normally overwritten in the hv_utils driver. That
- * driver handles requests like gracefull shutdown, heartbeats etc.
+ * driver handles requests like graceful shutdown, heartbeats etc.
  *
  * Mainly used by Hyper-V drivers.
  */
index 44b203b95a2290fe9f355e277a477222331eb8d0..afc8116e7aa490bfb5b9e68e0abc2b607e830568 100644 (file)
@@ -296,7 +296,7 @@ void vmbus_on_event(unsigned long data)
                for (dword = 0; dword < maxdword; dword++) {
                        if (recv_int_page[dword]) {
                                for (bit = 0; bit < 32; bit++) {
-                                       if (test_and_clear_bit(bit,
+                                       if (sync_test_and_clear_bit(bit,
                                                (unsigned long *)
                                                &recv_int_page[dword])) {
                                                relid = (dword << 5) + bit;
@@ -338,7 +338,7 @@ int vmbus_post_msg(void *buffer, size_t buflen)
 int vmbus_set_event(u32 child_relid)
 {
        /* Each u32 represents 32 channels */
-       set_bit(child_relid & 31,
+       sync_set_bit(child_relid & 31,
                (unsigned long *)vmbus_connection.send_int_page +
                (child_relid >> 5));
 
index 2d492adb95bb27442c65f1c9833f721b1c7ae764..0b06f4fe5838eaa549ec54207501e9e730751c16 100644 (file)
@@ -37,7 +37,7 @@ struct hv_context hv_context = {
 
 /*
  * query_hypervisor_presence
- * - Query the cpuid for presense of windows hypervisor
+ * - Query the cpuid for presence of windows hypervisor
  */
 static int query_hypervisor_presence(void)
 {
index 7114fceab21e70cdff372ab42889a3d92f97ee73..43a722888dc4f88247d561de2be90dceb6571f8c 100644 (file)
@@ -53,14 +53,14 @@ struct hv_guid {
 
 /*
  * HV_STATUS_INVALID_ALIGNMENT
- * The hypervisor could not perform the operation beacuse a parameter has an
+ * The hypervisor could not perform the operation because a parameter has an
  * invalid alignment.
  */
 #define HV_STATUS_INVALID_ALIGNMENT                    ((u16)0x0004)
 
 /*
  * HV_STATUS_INVALID_PARAMETER
- * The hypervisor could not perform the operation beacuse an invalid parameter
+ * The hypervisor could not perform the operation because an invalid parameter
  * was specified.
  */
 #define HV_STATUS_INVALID_PARAMETER                    ((u16)0x0005)
index e069f59b5135130ec866ad353b465eb008f99fab..8c402f357d37ee676ea28e51aecafcfd02763e2b 100644 (file)
@@ -36,7 +36,7 @@
  * registry.
  *
  * Note:  This value is used in defining the KVP exchange message - this value
- * cannot be modified without affecting the message size and compatability.
+ * cannot be modified without affecting the message size and compatibility.
  */
 
 /*
index 50147f84741cbef6f23a3828711a2c2a8116a073..118c7be22562437e44a61b49d0fee98116af47a6 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/workqueue.h>
 #include <linux/sched.h>
@@ -23,6 +24,7 @@
 #include <linux/hiddev.h>
 #include <linux/pci.h>
 #include <linux/dmi.h>
+#include <linux/delay.h>
 
 #include "hv_api.h"
 #include "logging.h"
@@ -374,7 +376,7 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct
               desc->desc[0].wDescriptorLength);
 
        /* Send the ack */
-       memset(&ack, sizeof(struct mousevsc_prt_msg), 0);
+       memset(&ack, 0, sizeof(struct mousevsc_prt_msg));
 
        ack.type = PipeMessageData;
        ack.size = sizeof(struct synthhid_device_info_ack);
@@ -595,7 +597,7 @@ static int MousevscConnectToVsp(struct hv_device *Device)
        /*
         * Now, initiate the vsc/vsp initialization protocol on the open channel
         */
-       memset(request, sizeof(struct mousevsc_prt_msg), 0);
+       memset(request, 0, sizeof(struct mousevsc_prt_msg));
 
        request->type = PipeMessageData;
        request->size = sizeof(struct synthhid_protocol_request);
index 4792f2c402b269a1b23693b5c114e6dd25502deb..2df15683f8fafa674afb653bc23bcaf4ce1be2d4 100644 (file)
@@ -80,7 +80,7 @@ static void shutdown_onchannelcallback(void *context)
                                execute_shutdown = true;
 
                                DPRINT_INFO(VMBUS, "Shutdown request received -"
-                                           " gracefull shutdown initiated");
+                                           " graceful shutdown initiated");
                                break;
                        default:
                                icmsghdrp->status = HV_E_FAIL;
index 2d40f5f86b241964536e2dbc4d79259510817997..33973568214fdb44c2547a09f7db2b09970c90e9 100644 (file)
@@ -46,6 +46,7 @@ struct net_device_context {
        /* point back to our device context */
        struct hv_device *device_ctx;
        unsigned long avail;
+       struct work_struct work;
 };
 
 
@@ -219,6 +220,7 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
                                       unsigned int status)
 {
        struct net_device *net = dev_get_drvdata(&device_obj->device);
+       struct net_device_context *ndev_ctx;
 
        if (!net) {
                DPRINT_ERR(NETVSC_DRV, "got link status but net device "
@@ -230,6 +232,8 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
                netif_carrier_on(net);
                netif_wake_queue(net);
                netif_notify_peers(net);
+               ndev_ctx = netdev_priv(net);
+               schedule_work(&ndev_ctx->work);
        } else {
                netif_carrier_off(net);
                netif_stop_queue(net);
@@ -328,6 +332,25 @@ static const struct net_device_ops device_ops = {
        .ndo_set_mac_address =          eth_mac_addr,
 };
 
+/*
+ * Send GARP packet to network peers after migrations.
+ * After Quick Migration, the network is not immediately operational in the
+ * current context when receiving RNDIS_STATUS_MEDIA_CONNECT event. So, add
+ * another netif_notify_peers() into a scheduled work, otherwise GARP packet
+ * will not be sent after quick migration, and cause network disconnection.
+ */
+static void netvsc_send_garp(struct work_struct *w)
+{
+       struct net_device_context *ndev_ctx;
+       struct net_device *net;
+
+       msleep(20);
+       ndev_ctx = container_of(w, struct net_device_context, work);
+       net = dev_get_drvdata(&ndev_ctx->device_ctx->device);
+       netif_notify_peers(net);
+}
+
+
 static int netvsc_probe(struct device *device)
 {
        struct hv_driver *drv =
@@ -353,6 +376,7 @@ static int netvsc_probe(struct device *device)
        net_device_ctx->device_ctx = device_obj;
        net_device_ctx->avail = ring_size;
        dev_set_drvdata(device, net);
+       INIT_WORK(&net_device_ctx->work, netvsc_send_garp);
 
        /* Notify the netvsc driver of the new device */
        ret = net_drv_obj->base.dev_add(device_obj, &device_info);
index e7189cd324ca5bf402f3469244084037b7cd5113..048376b2b676bb2479417c4e6db7e0034b99e2ab 100644 (file)
@@ -585,7 +585,7 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev,
                ret = -1;
                DPRINT_ERR(NETVSC, "timeout before we got a set response...");
                /*
-                * We cant deallocate the request since we may still receive a
+                * We can't deallocate the request since we may still receive a
                 * send completion for it.
                 */
                goto Exit;
index f5a2dd6946117d0dfbcf7d13cb6eb4b484f3d2dc..33f0f1c8ad736e8487c1e549a8efde7d5af01ed7 100644 (file)
@@ -102,22 +102,22 @@ static char kvp_send_buffer[4096];
 static char kvp_recv_buffer[4096];
 static struct sockaddr_nl addr;
 
-static char os_name[100];
-static char os_major[50];
-static char os_minor[50];
-static char processor_arch[50];
-static char os_build[100];
+static char *os_name = "";
+static char *os_major = "";
+static char *os_minor = "";
+static char *processor_arch;
+static char *os_build;
 static char *lic_version;
+static struct utsname uts_buf;
 
 void kvp_get_os_info(void)
 {
        FILE    *file;
-       char    *eol;
-       struct utsname buf;
+       char    *p, buf[512];
 
-       uname(&buf);
-       strcpy(os_build, buf.release);
-       strcpy(processor_arch, buf.machine);
+       uname(&uts_buf);
+       os_build = uts_buf.release;
+       processor_arch= uts_buf.machine;
 
        file = fopen("/etc/SuSE-release", "r");
        if (file != NULL)
@@ -132,21 +132,46 @@ void kvp_get_os_info(void)
        /*
         * We don't have information about the os.
         */
-       strcpy(os_name, "Linux");
-       strcpy(os_major, "0");
-       strcpy(os_minor, "0");
+       os_name = uts_buf.sysname;
        return;
 
 kvp_osinfo_found:
-       fgets(os_name, 99, file);
-       eol = index(os_name, '\n');
-       *eol = '\0';
-       fgets(os_major, 49, file);
-       eol = index(os_major, '\n');
-       *eol = '\0';
-       fgets(os_minor, 49, file);
-       eol = index(os_minor, '\n');
-       *eol = '\0';
+       /* up to three lines */
+       p = fgets(buf, sizeof(buf), file);
+       if (p) {
+               p = strchr(buf, '\n');
+               if (p)
+                       *p = '\0';
+               p = strdup(buf);
+               if (!p)
+                       goto done;
+               os_name = p;
+
+               /* second line */
+               p = fgets(buf, sizeof(buf), file);
+               if (p) {
+                       p = strchr(buf, '\n');
+                       if (p)
+                               *p = '\0';
+                       p = strdup(buf);
+                       if (!p)
+                               goto done;
+                       os_major = p;
+
+                       /* third line */
+                       p = fgets(buf, sizeof(buf), file);
+                       if (p)  {
+                               p = strchr(buf, '\n');
+                               if (p)
+                                       *p = '\0';
+                               p = strdup(buf);
+                               if (p)
+                                       os_minor = p;
+                       }
+               }
+       }
+
+done:
        fclose(file);
        return;
 }
@@ -202,7 +227,7 @@ kvp_get_ip_address(int family, char *buffer, int length)
 
                        /*
                         * We only support AF_INET and AF_INET6
-                        * and the list of addresses is seperated by a ";".
+                        * and the list of addresses is separated by a ";".
                         */
                                struct sockaddr_in6 *addr =
                                (struct sockaddr_in6 *) curp->ifa_addr;
@@ -293,7 +318,7 @@ netlink_send(int fd, struct cn_msg *msg)
        return sendmsg(fd, &message, 0);
 }
 
-main(void)
+int main(void)
 {
        int fd, len, sock_opt;
        int error;
@@ -301,9 +326,10 @@ main(void)
        struct pollfd pfd;
        struct nlmsghdr *incoming_msg;
        struct cn_msg   *incoming_cn_msg;
+       struct hv_ku_msg *hv_msg;
+       char    *p;
        char    *key_value;
        char    *key_name;
-       int      key_index;
 
        daemon(1, 0);
        openlog("KVP", 0, LOG_USER);
@@ -373,9 +399,10 @@ main(void)
                         * Driver is registering with us; stash away the version
                         * information.
                         */
-                       lic_version = malloc(strlen(incoming_cn_msg->data) + 1);
+                       p = (char *)incoming_cn_msg->data;
+                       lic_version = malloc(strlen(p) + 1);
                        if (lic_version) {
-                               strcpy(lic_version, incoming_cn_msg->data);
+                               strcpy(lic_version, p);
                                syslog(LOG_INFO, "KVP LIC Version: %s",
                                        lic_version);
                        } else {
@@ -389,14 +416,11 @@ main(void)
                        continue;
                }
 
-               key_index =
-               ((struct hv_ku_msg *)incoming_cn_msg->data)->kvp_index;
-               key_name =
-               ((struct hv_ku_msg *)incoming_cn_msg->data)->kvp_key;
-               key_value =
-               ((struct hv_ku_msg *)incoming_cn_msg->data)->kvp_value;
+               hv_msg = (struct hv_ku_msg *)incoming_cn_msg->data;
+               key_name = (char *)hv_msg->kvp_key;
+               key_value = (char *)hv_msg->kvp_value;
 
-               switch (key_index) {
+               switch (hv_msg->kvp_index) {
                case FullyQualifiedDomainName:
                        kvp_get_domain_name(key_value,
                                        HV_KVP_EXCHANGE_MAX_VALUE_SIZE);
index b473f468dd83afefcb5a95e663bc4fb1ce0d0b36..79089f85d903a1ca4caa170346b00ac607eacdea 100644 (file)
@@ -254,7 +254,7 @@ static int vmbus_on_isr(void)
        event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT;
 
        /* Since we are a child, we only need to check bit 0 */
-       if (test_and_clear_bit(0, (unsigned long *) &event->flags32[0])) {
+       if (sync_test_and_clear_bit(0, (unsigned long *) &event->flags32[0])) {
                DPRINT_DBG(VMBUS, "received event %d", event->flags32[0]);
                ret |= 0x2;
        }
index ca050a499b990f73af45a14a32d8051d3f75342c..6f0d8df5e1788a2b96923c1e4ddc16ca02b9ac98 100644 (file)
@@ -31,6 +31,7 @@
 #include "channel_mgmt.h"
 #include "ring_buffer.h"
 #include <linux/list.h>
+#include <asm/sync_bitops.h>
 
 
 /*
index 8095727b396646817fe825cd410525a32f34d8c0..fd78e4ff99ae36abcc6fd476441304eba45b528d 100644 (file)
@@ -556,7 +556,7 @@ int _write_sysfs_string(char *filename, char *basedir, char *val, int verify)
                if (strcmp(temp, val) != 0) {
                        printf("Possible failure in string write of %s "
                                "Should be %s "
-                               "writen to %s\%s\n",
+                               "written to %s\%s\n",
                                temp,
                                val,
                                basedir,
index c9bf22c13428ffa5971756aee35f9e0d82a8c235..23fe54d09d1250b8702c1b7ddadb2e6596874cc2 100644 (file)
@@ -70,7 +70,7 @@
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16201_state {
index b39323eac9e3df055282697e6f22d94322385df8..b88688128d61a79e9c83fd85442886061da752ac 100644 (file)
@@ -65,7 +65,7 @@
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16203_state {
index e9ed7cb048cf32cbc0e3649af6da517120405db1..e61844684f9905b7f0f27d829aeefdaa6616ad26 100644 (file)
@@ -73,7 +73,7 @@
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16204_state {
index 4e97596620ef0ddf71091a3630a032729448956b..8b0da1349555c9db611632a30307587341890a08 100644 (file)
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16209_state {
index 7013314a9d7775c45a45c371e31c59b8683aab10..4d5758c2c04722ff82656220b2fdbbaa5779e874 100644 (file)
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16220_state {
index 51a807dde27ce6041663aacd7a452751e5bb3a51..76a45797b9dd375fb45e01a97229d4391e6895c7 100644 (file)
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16240_state {
index 579b3a26e5d79be940263eccc3e0729fa69bc8f1..11402187f9ae6288de4a07b323f543a896dc0616 100644 (file)
@@ -57,7 +57,7 @@
 /* Reboot memory content */
 #define LIS3L02DQ_REG_CTRL_2_REBOOT_MEMORY     0x10
 
-/* Interupt Enable - applies data ready to the RDY pad */
+/* Interrupt Enable - applies data ready to the RDY pad */
 #define LIS3L02DQ_REG_CTRL_2_ENABLE_INTERRUPT  0x08
 
 /* Enable Data Ready Generation - relationship with previous unclear in docs */
  * - option for 16 bit left justified */
 #define LIS3L02DQ_REG_CTRL_2_DATA_ALIGNMENT_16_BIT_LEFT_JUSTIFIED      0x01
 
-/* Interupt related stuff */
+/* Interrupt related stuff */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_ADDR                 0x23
 
 /* Switch from or combination fo conditions to and */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_BOOLEAN_AND          0x80
 
-/* Latch interupt request,
+/* Latch interrupt request,
  * if on ack must be given by reading the ack register */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_LATCH_SRC            0x40
 
-/* Z Interupt on High (above threshold)*/
+/* Z Interrupt on High (above threshold)*/
 #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Z_HIGH     0x20
-/* Z Interupt on Low */
+/* Z Interrupt on Low */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Z_LOW      0x10
-/* Y Interupt on High */
+/* Y Interrupt on High */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Y_HIGH     0x08
-/* Y Interupt on Low */
+/* Y Interrupt on Low */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_Y_LOW      0x04
-/* X Interupt on High */
+/* X Interrupt on High */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_X_HIGH     0x02
-/* X Interupt on Low */
+/* X Interrupt on Low */
 #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_X_LOW 0x01
 
-/* Register that gives description of what caused interupt
+/* Register that gives description of what caused interrupt
  * - latched if set in CFG_ADDRES */
 #define LIS3L02DQ_REG_WAKE_UP_SRC_ADDR                 0x24
 /* top bit ignored */
-/* Interupt Active */
+/* Interrupt Active */
 #define LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_ACTIVATED  0x40
 /* Interupts that have been triggered */
 #define LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_HIGH     0x20
 #define LIS3L02DQ_REG_STATUS_X_NEW_DATA                        0x01
 
 /* The accelerometer readings - low and high bytes.
-Form of high byte dependant on justification set in ctrl reg */
+Form of high byte dependent on justification set in ctrl reg */
 #define LIS3L02DQ_REG_OUT_X_L_ADDR                     0x28
 #define LIS3L02DQ_REG_OUT_X_H_ADDR                     0x29
 #define LIS3L02DQ_REG_OUT_Y_L_ADDR                     0x2A
@@ -155,7 +155,7 @@ Form of high byte dependant on justification set in ctrl reg */
  * @inter:             used to check if new interrupt has been triggered
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct lis3l02dq_state {
index c4b4ab7e6423cb007ddaf07d5d6af7e2f39a0868..3067f9662d20e98908a31424697a108afaea98eb 100644 (file)
@@ -77,7 +77,7 @@ int lis3l02dq_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val)
 /**
  * lis3l02dq_spi_write_reg_8() - write single byte to a register
  * @dev: device associated with child of actual device (iio_dev or iio_trig)
- * @reg_address: the address of the register to be writen
+ * @reg_address: the address of the register to be written
  * @val: the value to write
  **/
 int lis3l02dq_spi_write_reg_8(struct device *dev,
index 2c461a31f129385a17fd06050bb0c44759647afc..529a3cc6d0c748bcd902ff897a380f24b82a3595 100644 (file)
@@ -217,7 +217,7 @@ static const u8 read_all_tx_array[] = {
 /**
  * lis3l02dq_read_all() Reads all channels currently selected
  * @st:                device specific state
- * @rx_array:  (dma capable) recieve array, must be at least
+ * @rx_array:  (dma capable) receive array, must be at least
  *             4*number of channels
  **/
 static int lis3l02dq_read_all(struct lis3l02dq_state *st, u8 *rx_array)
@@ -409,7 +409,7 @@ static const struct attribute_group lis3l02dq_trigger_attr_group = {
  *
  * As the trigger may occur on any data element being updated it is
  * really rather likely to occur during the read from the previous
- * trigger event.  The only way to discover if this has occured on
+ * trigger event.  The only way to discover if this has occurred on
  * boards not supporting level interrupts is to take a look at the line.
  * If it is indicating another interrupt and we don't seem to have a
  * handler looking at it, then we need to notify the core that we need
index 23892848f5ae94692fd96b41ff25a5495c131452..db710334b99b5787cbcddc6df258c60c41aaa856 100644 (file)
@@ -185,7 +185,7 @@ struct sca3000_state {
 };
 
 /**
- * struct sca3000_chip_info - model dependant parameters
+ * struct sca3000_chip_info - model dependent parameters
  * @name:                      model identification
  * @scale:                     string containing floating point scale factor
  * @temp_output:               some devices have temperature sensors.
@@ -213,7 +213,7 @@ struct sca3000_chip_info {
  * sca3000_read_data() read a series of values from the device
  * @dev:               device
  * @reg_address_high:  start address (decremented read)
- * @rx:                        pointer where recieved data is placed. Callee
+ * @rx:                        pointer where received data is placed. Callee
  *                     responsible for freeing this.
  * @len:               number of bytes to read
  *
index c872fddfb2bf755c9755844cbb0663e9adc38e62..a730a7638de18de9e669f7bc7783291db190419c 100644 (file)
@@ -43,7 +43,7 @@
  *                     leading byte used in bus comms.
  *
  * Currently does not provide timestamps.  As the hardware doesn't add them they
- * can only be inferred aproximately from ring buffer events such as 50% full
+ * can only be inferred approximately from ring buffer events such as 50% full
  * and knowledge of when buffer was last emptied.  This is left to userspace.
  **/
 static int sca3000_rip_hw_rb(struct iio_ring_buffer *r,
index 19d1aced1e6cb0f419f03c582ebee19cfa4d94c3..9068d7f54d155625d48d4d7fcb1c251bfc509087 100644 (file)
@@ -157,7 +157,7 @@ static int ad7298_ring_preenable(struct iio_dev *indio_dev)
 /**
  * ad7298_poll_func_th() th of trigger launched polling to ring buffer
  *
- * As sampling only occurs on spi comms occuring, leave timestamping until
+ * As sampling only occurs on spi comms occurring, leave timestamping until
  * then.  Some triggers will generate their own time stamp.  Currently
  * there is no way of notifying them when no one cares.
  **/
index 1d654c86099de44cc4ae73906abdb0519d6d8289..92d93787d5b829f0f51aa70c1280723bead45bf2 100644 (file)
@@ -112,7 +112,7 @@ static int ad7476_ring_preenable(struct iio_dev *indio_dev)
 /**
  * ad7476_poll_func_th() th of trigger launched polling to ring buffer
  *
- * As sampling only occurs on i2c comms occuring, leave timestamping until
+ * As sampling only occurs on i2c comms occurring, leave timestamping until
  * then.  Some triggers will generate their own time stamp.  Currently
  * there is no way of notifying them when no one cares.
  **/
index 2d7fe65049dd6cc25dcfaac2f31e9cf22850af51..da77f266c16b8051f513a89d5aa02005701ea0fc 100644 (file)
@@ -165,7 +165,7 @@ static int ad7887_ring_postdisable(struct iio_dev *indio_dev)
 /**
  * ad7887_poll_func_th() th of trigger launched polling to ring buffer
  *
- * As sampling only occurs on spi comms occuring, leave timestamping until
+ * As sampling only occurs on spi comms occurring, leave timestamping until
  * then.  Some triggers will generate their own time stamp.  Currently
  * there is no way of notifying them when no one cares.
  **/
index e50841b3ac6919132c6d5d1fa670d58ff58643b5..f04e642e72723329803bb109bdc4731fbdff6643 100644 (file)
@@ -184,7 +184,7 @@ static ssize_t ad799x_read_single_channel(struct device *dev,
 
        mutex_lock(&dev_info->mlock);
        mask = 1 << this_attr->address;
-       /* If ring buffer capture is occuring, query the buffer */
+       /* If ring buffer capture is occurring, query the buffer */
        if (iio_ring_enabled(dev_info)) {
                data = ret = ad799x_single_channel_from_ring(st, mask);
                if (ret < 0)
index 56abc395f177f7feea014e869ccd182c09e0a87d..0875a7ef67a54374c5fcd5a3754d9b35f1c234c1 100644 (file)
@@ -101,7 +101,7 @@ static int ad799x_ring_preenable(struct iio_dev *indio_dev)
 /**
  * ad799x_poll_func_th() th of trigger launched polling to ring buffer
  *
- * As sampling only occurs on i2c comms occuring, leave timestamping until
+ * As sampling only occurs on i2c comms occurring, leave timestamping until
  * then.  Some triggers will generate their own time stamp.  Currently
  * there is no way of notifying them when no one cares.
  **/
index dde097afb430d69be2d93e83bc34e5d908768d92..de83c3b37a2d39001fe844ce5d63033c4724888e 100644 (file)
@@ -255,7 +255,7 @@ static ssize_t max1363_read_single_channel(struct device *dev,
                goto error_ret;
        }
 
-       /* If ring buffer capture is occuring, query the buffer */
+       /* If ring buffer capture is occurring, query the buffer */
        if (iio_ring_enabled(dev_info)) {
                mask = max1363_mode_table[this_attr->address].modemask;
                data = max1363_single_channel_from_ring(mask, st);
@@ -1425,7 +1425,7 @@ error_ret:
 }
 
 /*
- * To keep this managable we always use one of 3 scan modes.
+ * To keep this manageable we always use one of 3 scan modes.
  * Scan 0...3, 0-1,2-3 and 1-0,3-2
  */
 static inline int __max1363_check_event_mask(int thismask, int checkmask)
index 5532f3e466bcb035d9eaa03cfd153bf20b49562b..d36fcc62e976dff43560ad7bbb7585e7919fa2d3 100644 (file)
@@ -108,7 +108,7 @@ static int max1363_ring_preenable(struct iio_dev *indio_dev)
 /**
  * max1363_poll_func_th() - th of trigger launched polling to ring buffer
  *
- * As sampling only occurs on i2c comms occuring, leave timestamping until
+ * As sampling only occurs on i2c comms occurring, leave timestamping until
  * then.  Some triggers will generate their own time stamp.  Currently
  * there is no way of notifying them when no one cares.
  **/
index 98d1a2c12df2f539f6a0c103e04b6004ade033e3..4fcb99c816f91d618f18a6b331c7b2d6a91757b6 100644 (file)
@@ -33,7 +33,7 @@ struct iio_handler {
 /**
  * struct iio_event_data - The actual event being pushed to userspace
  * @id:                event identifier
- * @timestamp: best estimate of time of event occurance (often from
+ * @timestamp: best estimate of time of event occurrence (often from
  *             the interrupt handler)
  */
 struct iio_event_data {
@@ -42,7 +42,7 @@ struct iio_event_data {
 };
 
 /**
- * struct iio_detected_event_list - list element for events that have occured
+ * struct iio_detected_event_list - list element for events that have occurred
  * @list:              linked list header
  * @ev:                        the event itself
  * @shared_pointer:    used when the event is shared - i.e. can be escallated
@@ -98,7 +98,7 @@ struct iio_event_interface {
  * @list:              list header
  * @refcount:          as the handler may be shared between multiple device
  *                     side events, reference counting ensures clean removal
- * @exist_lock:                prevents race conditions related to refcount useage.
+ * @exist_lock:                prevents race conditions related to refcount usage.
  * @handler:           event handler function - called on event if this
  *                     event_handler is enabled.
  *
index 700eb3980f9e5430b6bfde9022020dbf58e03d85..ae53e71d1c2f3c35b31a6d5b2779f69b96195750 100644 (file)
@@ -30,7 +30,7 @@
  * @us_w:              actual spi_device to write config
  * @us_r:              actual spi_device to read back data
  * @indio_dev:         industrial I/O device structure
- * @buf:               transmit or recieve buffer
+ * @buf:               transmit or receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16060_state {
index fb4336c7d2a632b889006bcc876541f10d4824ca..ef9e304a226d582ce554003811f373fbf2302ea8 100644 (file)
@@ -35,7 +35,7 @@
  * struct adis16080_state - device instance specific data
  * @us:                        actual spi_device to write data
  * @indio_dev:         industrial I/O device structure
- * @buf:               transmit or recieve buffer
+ * @buf:               transmit or receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16080_state {
index c1fd4364287fbd067d8974cdd45589b0391e9934..1369501b40960ce0311370003dc669fbf807a644 100644 (file)
@@ -91,7 +91,7 @@
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  * @negate:            negate the scale parameter
  **/
index 248bdd2846fdfafec6e0223aa225d13d215fca03..7127f26f8d267dc816d2ae717d98826aa8378d38 100644 (file)
@@ -92,7 +92,7 @@ void iio_remove_event_from_list(struct iio_event_handler_list *el,
  *                     changes
  * @available_scan_masks: [DRIVER] optional array of allowed bitmasks
  * @trig:              [INTERN] current device trigger (ring buffer modes)
- * @pollfunc:          [DRIVER] function run on trigger being recieved
+ * @pollfunc:          [DRIVER] function run on trigger being received
  **/
 struct iio_dev {
        int                             id;
index 1f25d68064a027105bc262e0433cceec473819bf..c0957591aed702001de86bc933340d5d2fffa9e9 100644 (file)
@@ -99,7 +99,7 @@
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16300_state {
index b00001e3edd0ba660610bc505eaaad1fd96fcce9..b1ad48662a2c6191c40163c783f1cf286429a0cc 100644 (file)
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16350_state {
index 6ff33e1ad8c19b871dd2897851ee5d3aa22c49f5..e328bcc5922ffd4d6a6219589a3100c24bec161f 100644 (file)
@@ -17,7 +17,8 @@
 #ifndef SPI_ADIS16400_H_
 #define SPI_ADIS16400_H_
 
-#define ADIS16400_STARTUP_DELAY        220 /* ms */
+#define ADIS16400_STARTUP_DELAY        290 /* ms */
+#define ADIS16400_MTEST_DELAY 90 /* ms */
 
 #define ADIS16400_READ_REG(a)    a
 #define ADIS16400_WRITE_REG(a) ((a) | 0x80)
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct adis16400_state {
index cfb108a1545b38dbd8b699db08a33ba7f5fb3955..540bde69cc3b8451c4a4805541542025e5b2759c 100644 (file)
@@ -6,6 +6,7 @@
  *
  * Copyright (c) 2009 Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
  * Copyright (c) 2007 Jonathan Cameron <jic23@cam.ac.uk>
+ * Copyright (c) 2011 Analog Devices Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -93,7 +94,6 @@ static int adis16400_spi_write_reg_16(struct device *dev,
                        .tx_buf = st->tx + 2,
                        .bits_per_word = 8,
                        .len = 2,
-                       .cs_change = 1,
                },
        };
 
@@ -137,7 +137,6 @@ static int adis16400_spi_read_reg_16(struct device *dev,
                        .rx_buf = st->rx,
                        .bits_per_word = 8,
                        .len = 2,
-                       .cs_change = 1,
                },
        };
 
@@ -375,7 +374,7 @@ static int adis16400_self_test(struct device *dev)
                dev_err(dev, "problem starting self test");
                goto err_ret;
        }
-
+       msleep(ADIS16400_MTEST_DELAY);
        adis16400_check_status(dev);
 
 err_ret:
@@ -471,10 +470,11 @@ static int adis16400_initial_setup(struct adis16400_state *st)
        if (ret)
                goto err_ret;
 
-       if (prod_id != ADIS16400_PRODUCT_ID_DEFAULT)
+       if ((prod_id & 0xF000) != ADIS16400_PRODUCT_ID_DEFAULT)
                dev_warn(dev, "unknown product id");
 
-       printk(KERN_INFO DRIVER_NAME ": prod_id 0x%04x at CS%d (irq %d)\n",
+
+       dev_info(dev, ": prod_id 0x%04x at CS%d (irq %d)\n",
                        prod_id, st->us->chip_select, st->us->irq);
 
        /* use high spi speed if possible */
@@ -497,12 +497,12 @@ err_ret:
                        _reg)
 
 static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_X, ADIS16400_XGYRO_OFF);
-static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Y, ADIS16400_XGYRO_OFF);
-static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Z, ADIS16400_XGYRO_OFF);
+static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Y, ADIS16400_YGYRO_OFF);
+static ADIS16400_DEV_ATTR_CALIBBIAS(GYRO_Z, ADIS16400_ZGYRO_OFF);
 
 static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_X, ADIS16400_XACCL_OFF);
-static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Y, ADIS16400_XACCL_OFF);
-static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Z, ADIS16400_XACCL_OFF);
+static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Y, ADIS16400_YACCL_OFF);
+static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Z, ADIS16400_ZACCL_OFF);
 
 
 static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16400_read_14bit_signed,
@@ -647,7 +647,7 @@ static int __devinit adis16400_probe(struct spi_device *spi)
 
        ret = iio_ring_buffer_register(st->indio_dev->ring, 0);
        if (ret) {
-               printk(KERN_ERR "failed to initialize the ring\n");
+               dev_err(&spi->dev, "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
        }
 
index 33293fba9bccd062632742826275a8e1f59700ef..da28cb4288af3f104a51a791d6ab031d02244bc1 100644 (file)
@@ -122,12 +122,10 @@ static int adis16400_spi_read_burst(struct device *dev, u8 *rx)
                        .tx_buf = st->tx,
                        .bits_per_word = 8,
                        .len = 2,
-                       .cs_change = 0,
                }, {
                        .rx_buf = rx,
                        .bits_per_word = 8,
                        .len = 24,
-                       .cs_change = 1,
                },
        };
 
@@ -162,9 +160,10 @@ static void adis16400_trigger_bh_to_ring(struct work_struct *work_s)
                               work_trigger_to_ring);
        struct iio_ring_buffer *ring = st->indio_dev->ring;
 
-       int i = 0;
+       int i = 0, j;
        s16 *data;
        size_t datasize = ring->access.get_bytes_per_datum(ring);
+       unsigned long mask = ring->scan_mask;
 
        data = kmalloc(datasize , GFP_KERNEL);
        if (data == NULL) {
@@ -174,9 +173,12 @@ static void adis16400_trigger_bh_to_ring(struct work_struct *work_s)
 
        if (ring->scan_count)
                if (adis16400_spi_read_burst(&st->indio_dev->dev, st->rx) >= 0)
-                       for (; i < ring->scan_count; i++)
+                       for (; i < ring->scan_count; i++) {
+                               j = __ffs(mask);
+                               mask &= ~(1 << j);
                                data[i] = be16_to_cpup(
-                                       (__be16 *)&(st->rx[i*2]));
+                                       (__be16 *)&(st->rx[j*2]));
+                       }
 
        /* Guaranteed to be aligned with 8 byte boundary */
        if (ring->scan_timestamp)
index f3bf111f354f592ce3592865bb2a85692a0a2d18..1795ee1e8207377a9c987b4b4a6fc83ce0a66af1 100644 (file)
@@ -258,7 +258,7 @@ static ssize_t iio_event_chrdev_read(struct file *filep,
                                                           ->det_events.list));
                if (ret)
                        goto error_ret;
-               /* Single access device so noone else can get the data */
+               /* Single access device so no one else can get the data */
                mutex_lock(&ev_int->event_list_lock);
        }
 
index 70dabae6efe900a77964f31fd541ecadd455560d..3b9c7f6a50e7a9ce5e6d41f66d795b4ac7b82f28 100644 (file)
@@ -62,7 +62,7 @@
  * @us:                        actual spi_device
  * @indio_dev:         industrial I/O device structure
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct ade7753_state {
index 8faa9b3b48b647ba1b23901314277379ec8e3350..0aa0522a33a37fd3b76398979c1f44b5472f18a2 100644 (file)
@@ -80,7 +80,7 @@
  * @us:                        actual spi_device
  * @indio_dev:         industrial I/O device structure
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct ade7754_state {
index df5bb7ba5a0fe77d0cff3079269af8a4877f7d9f..c6fd94f3b3eefdd74675827f398ec827830c5d02 100644 (file)
@@ -98,7 +98,7 @@
  * @indio_dev:         industrial I/O device structure
  * @trig:              data ready trigger registered with iio
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct ade7758_state {
index e9d1c43336feafa94a8e9dd02f35be851ce09581..cc76c2c4c039d3ec808fa9f8ee6e13a6205b6b4a 100644 (file)
@@ -43,7 +43,7 @@
  * @us:                        actual spi_device
  * @indio_dev:         industrial I/O device structure
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct ade7759_state {
index 4ad84a3bb4626fe91aaac9fa73c2dcc6217e8556..79a21109f4e26f1dfe999d2b0b70eaa712efc0b8 100644 (file)
  * @spi:                       actual spi_device
  * @indio_dev:         industrial I/O device structure
  * @tx:                        transmit buffer
- * @rx:                        recieve buffer
+ * @rx:                        receive buffer
  * @buf_lock:          mutex to protect tx and rx
  **/
 struct ade7854_state {
index f21ac09373cfdbd2f9bf3ade0e4cfc9156140556..32948e55dc81c6ae10ff1dc51f84c1b305e5aaf9 100644 (file)
@@ -30,7 +30,7 @@ int iio_push_ring_event(struct iio_ring_buffer *ring_buf,
  * @event_code:                event indentification code
  * @timestamp:         time of event
  *
- * Typical usecase is to escalate a 50% ring full to 75% full if noone has yet
+ * Typical usecase is to escalate a 50% ring full to 75% full if no one has yet
  * read the first event. Clearly the 50% full is no longer of interest in
  * typical use case.
  **/
index a24e5ed5689c85692ac8bb541cbe32a492b798da..c733d70110915e418ddb262855e1e8cac55d89f2 100644 (file)
@@ -1,7 +1,7 @@
 TODO
 ----
 
-Get the memrar driver cleaned up and upstream (dependancy blocking SST)
+Get the memrar driver cleaned up and upstream (dependency blocking SST)
 Replace long/short press with two virtual buttons
 Review the printks and kill off any left over ST_ERR: messages
 Review the misc device ioctls for 32/64bit safety and sanity
index ce4a9f79ccd2fa0868fde591a77bd371dd49e855..81c24d19eb9edf01ff4fbef3070c8e371dcc0dcd 100644 (file)
@@ -263,7 +263,7 @@ static int __devinit intel_sst_probe(struct pci_dev *pci,
        /* Init the device */
        ret = pci_enable_device(pci);
        if (ret) {
-               pr_err("device cant be enabled\n");
+               pr_err("device can't be enabled\n");
                goto do_free_mem;
        }
        sst_drv_ctx->pci = pci_dev_get(pci);
@@ -453,7 +453,7 @@ int intel_sst_resume(struct pci_dev *pci)
        pci_restore_state(pci);
        ret = pci_enable_device(pci);
        if (ret)
-               pr_err("device cant be enabled\n");
+               pr_err("device can't be enabled\n");
 
        mutex_lock(&sst_drv_ctx->sst_lock);
        sst_drv_ctx->sst_state = SST_UN_INIT;
index a367991d56008e79a0fa2cbca20dcd5594ab1544..1d0621260ea89a594ff840b7d45630c3c1840f6a 100644 (file)
@@ -236,7 +236,7 @@ int intel_sst_mmap(struct file *file_ptr, struct vm_area_struct *vma)
        if (!sst_drv_ctx->mmap_mem)
                return -EIO;
 
-       /* round it up to the page bondary  */
+       /* round it up to the page boundary  */
        /*mem_area = (void *)((((unsigned long)sst_drv_ctx->mmap_mem)
                                + PAGE_SIZE - 1) & PAGE_MASK);*/
        mem_area = (void *) PAGE_ALIGN((unsigned int) sst_drv_ctx->mmap_mem);
@@ -871,7 +871,7 @@ int sst_send_algo_ipc(struct ipc_post **msg)
 }
 
 /**
- * intel_sst_ioctl_dsp - recieves the device ioctl's
+ * intel_sst_ioctl_dsp - receives the device ioctl's
  *
  * @cmd:Ioctl cmd
  * @arg:data
@@ -1067,7 +1067,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
                        retval = -EFAULT;
                        break;
                }
-               pr_debug("SET_VOLUME recieved for %d!\n",
+               pr_debug("SET_VOLUME received for %d!\n",
                                set_vol.stream_id);
                if (minor == STREAM_MODULE && set_vol.stream_id == 0) {
                        pr_debug("invalid operation!\n");
@@ -1085,7 +1085,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
                        retval = -EFAULT;
                        break;
                }
-               pr_debug("IOCTL_GET_VOLUME recieved for stream = %d!\n",
+               pr_debug("IOCTL_GET_VOLUME received for stream = %d!\n",
                                get_vol.stream_id);
                if (minor == STREAM_MODULE && get_vol.stream_id == 0) {
                        pr_debug("invalid operation!\n");
@@ -1117,7 +1117,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
                        retval = -EFAULT;
                        break;
                }
-               pr_debug("SNDRV_SST_SET_VOLUME recieved for %d!\n",
+               pr_debug("SNDRV_SST_SET_VOLUME received for %d!\n",
                        set_mute.stream_id);
                if (minor == STREAM_MODULE && set_mute.stream_id == 0) {
                        retval = -EPERM;
@@ -1153,7 +1153,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
        case _IOC_NR(SNDRV_SST_MMAP_CAPTURE): {
                struct snd_sst_mmap_buffs mmap_buf;
 
-               pr_debug("SNDRV_SST_MMAP_PLAY/CAPTURE recieved!\n");
+               pr_debug("SNDRV_SST_MMAP_PLAY/CAPTURE received!\n");
                if (minor != STREAM_MODULE) {
                        retval = -EBADRQC;
                        break;
@@ -1239,7 +1239,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
        case _IOC_NR(SNDRV_SST_SET_TARGET_DEVICE): {
                struct snd_sst_target_device target_device;
 
-               pr_debug("SET_TARGET_DEVICE recieved!\n");
+               pr_debug("SET_TARGET_DEVICE received!\n");
                if (copy_from_user(&target_device, (void __user *)arg,
                                sizeof(target_device))) {
                        retval = -EFAULT;
@@ -1256,7 +1256,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int cmd, unsigned long arg)
        case _IOC_NR(SNDRV_SST_DRIVER_INFO): {
                struct snd_sst_driver_info info;
 
-               pr_debug("SNDRV_SST_DRIVER_INFO recived\n");
+               pr_debug("SNDRV_SST_DRIVER_INFO received\n");
                info.version = SST_VERSION_NUM;
                /* hard coding, shud get sumhow later */
                info.active_pcm_streams = sst_drv_ctx->stream_cnt -
index ea8e251b5099fd4307572a0d77aef1519ca92f9f..e9c182108243316bca5bc2fdf3b50d3733cdc971 100644 (file)
@@ -315,7 +315,7 @@ int sst_open_pcm_stream(struct snd_sst_params *str_param)
        pm_runtime_get_sync(&sst_drv_ctx->pci->dev);
 
        if (sst_drv_ctx->sst_state == SST_SUSPENDED) {
-               /* LPE is suspended, resume it before proceding*/
+               /* LPE is suspended, resume it before proceeding*/
                pr_debug("Resuming from Suspended state\n");
                retval = intel_sst_resume(sst_drv_ctx->pci);
                if (retval) {
index 6e5c9152da9f6e9a48a47ca755a4700105c66ed2..bffe4c6e2928065a1822b401279e8fb5746d2b36 100644 (file)
@@ -350,7 +350,7 @@ static int sst_download_library(const struct firmware *fw_lib,
 
 }
 
-/* This function is called befoer downloading the codec/postprocessing
+/* This function is called before downloading the codec/postprocessing
 library is set for download to SST DSP*/
 static int sst_validate_library(const struct firmware *fw_lib,
                struct lib_slot_info *slot,
@@ -405,7 +405,7 @@ exit:
 
 }
 
-/* This function is called when FW requests for a particular libary download
+/* This function is called when FW requests for a particular library download
 This function prepares the library to download*/
 int sst_load_library(struct snd_sst_lib_download *lib, u8 ops)
 {
index 8df313d10d2a4934a6acf7fe5de3400955c36210..0f0c5bbc5f4bed14066ad0d49b9fbf001271f183 100644 (file)
 #define IPC_SST_PERIOD_ELAPSED 0x97 /* period elapsed */
 #define IPC_IA_TARGET_DEV_CHNGD 0x98 /* error in processing a stream */
 
-#define IPC_SST_ERROR_EVENT 0x99 /* Buffer over run occured */
+#define IPC_SST_ERROR_EVENT 0x99 /* Buffer over run occurred */
 /* L2S messages */
 #define IPC_SC_DDR_LINK_UP 0xC0
 #define IPC_SC_DDR_LINK_DOWN 0xC1
index 795e42ab7360bc68c3b4189925939092e424b5a0..dd58be5b197524dd8ff0d521f963b193393e18f9 100644 (file)
@@ -98,7 +98,7 @@ static unsigned int get_mrst_stream_id(void)
                if (sst_drv_ctx->streams[i].status == STREAM_UN_INIT)
                        return i;
        }
-       pr_debug("Didnt find empty stream for mrst\n");
+       pr_debug("Didn't find empty stream for mrst\n");
        return -EBUSY;
 }
 
index 29753c7519a7bf756cab09eca94e0de679268c7a..d5f07b878828196560d8808f7e8a1b51213875ea 100644 (file)
@@ -914,7 +914,7 @@ static int sst_prepare_input_buffers_rar(struct stream_info *str_info,
                (void *) ((unsigned long) rar_buffers.bus_address);
                pr_debug("RAR buf addr in DnR (input buffer function)0x%lu",
                                 (unsigned long) str_info->decode_ibuf);
-               pr_debug("rar in DnR decode funtion/output b_add rar =0x%lu",
+               pr_debug("rar in DnR decode function/output b_add rar =0x%lu",
                                (unsigned long) rar_buffers.bus_address);
                *input_index = i + 1;
                str_info->decode_isize = dbufs->ibufs->buff_entry[i].size;
index fb2292186703d68852033a3f47a166dbf5d0d473..d207636a7b6d9ffb28dfb22f5745df8ee4235bb5 100644 (file)
@@ -773,7 +773,7 @@ static int __devinit snd_intelmad_sst_register(
                if (ret_val)
                        return ret_val;
                sst_card_vendor_id = (vendor_addr.value & (MASK2|MASK1|MASK0));
-               pr_debug("orginal n extrated vendor id = 0x%x %d\n",
+               pr_debug("original n extrated vendor id = 0x%x %d\n",
                                vendor_addr.value, sst_card_vendor_id);
                if (sst_card_vendor_id < 0 || sst_card_vendor_id > 2) {
                        pr_err("vendor card not supported!!\n");
index ca881b790cb26323be9f65e0a4270af019ea08b9..e77da87e1df0f52e08ec8f880b072c455f870196 100644 (file)
@@ -90,7 +90,7 @@ struct mad_jack_msg_wq {
  * @card_index: sound card index
  * @card_id: sound card id detected
  * @sstdrv_ops: ptr to sst driver ops
- * @pdev: ptr to platfrom device
+ * @pdev: ptr to platform device
  * @irq: interrupt number detected
  * @pmic_status: Device status of sound card
  * @int_base: ptr to MMIO interrupt region
index 5c01f28f0734eb7d48cb2a370bc58ed1fdc45ea6..8af7c84daee28d7645f6adb99ef8a1c2c0009964 100644 (file)
@@ -90,7 +90,7 @@ int ENE_MSInit(struct us_data *us)
 
        result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0);
        if (result != USB_STOR_XFER_GOOD) {
-               printk(KERN_ERR "Exection MS Init Code Fail !!\n");
+               printk(KERN_ERR "Execution MS Init Code Fail !!\n");
                return USB_STOR_TRANSPORT_ERROR;
        }
 
@@ -145,7 +145,7 @@ int ENE_SMInit(struct us_data *us)
        result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0);
        if (result != USB_STOR_XFER_GOOD) {
                printk(KERN_ERR
-                      "Exection SM Init Code Fail !! result = %x\n", result);
+                      "Execution SM Init Code Fail !! result = %x\n", result);
                return USB_STOR_TRANSPORT_ERROR;
        }
 
index 2cbe9f897eefad43bd7930384a87b01c99398f1c..95c688a5c95adfa685c6823b92367122a6291e9c 100644 (file)
@@ -64,7 +64,7 @@ extern struct SSFDCTYPE  Ssfdc;
 extern struct ADDRESS    Media;
 extern struct CIS_AREA   CisArea;
 
-//BIT Controll Macro
+//BIT Control Macro
 BYTE BitData[] = { 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80 } ;
 #define Set_D_Bit(a,b)    (a[(BYTE)((b)/8)]|= BitData[(b)%8])
 #define Clr_D_Bit(a,b)    (a[(BYTE)((b)/8)]&=~BitData[(b)%8])
@@ -76,7 +76,7 @@ extern BYTE     IsXDCompliance;
 
 
 //
-////Power Controll & Media Exist Check Function
+////Power Control & Media Exist Check Function
 ////----- Init_D_SmartMedia() --------------------------------------------
 //int Init_D_SmartMedia(void)
 //{
@@ -575,7 +575,7 @@ int Media_D_OneSectWriteFlush(PFDO_DEVICE_EXTENSION fdoExt)
 //    return(SUCCESS);
 //}
 //
-////Power Controll & Media Exist Check Subroutine
+////Power Control & Media Exist Check Subroutine
 ////----- Initialize_D_Media() -------------------------------------------
 //void Initialize_D_Media(void)
 //{
@@ -738,7 +738,7 @@ int Check_D_MediaFmt(struct us_data *us)
 //    return(SUCCESS);
 //}
 */
-//SmartMedia Physical Address Controll Subroutine
+//SmartMedia Physical Address Control Subroutine
 //----- Conv_D_MediaAddr() ---------------------------------------------
 int Conv_D_MediaAddr(struct us_data *us, DWORD addr)
 {
index 80da61c37bfff5f9e5282858787ecaae8fa01082..4fe47422eb7940865e1a5ce293c3fccfc5771edb 100644 (file)
@@ -57,7 +57,7 @@ extern WORD  WriteBlock;
 #define ODD                     1             // Odd Page for 256byte/page
 
 
-//SmartMedia Redundant buffer data Controll Subroutine
+//SmartMedia Redundant buffer data Control Subroutine
 //----- Check_D_DataBlank() --------------------------------------------
 int Check_D_DataBlank(BYTE *redundant)
 {
@@ -1367,7 +1367,7 @@ BYTE _Check_D_DevCode(BYTE dcode)
     }
 }
 /*
-////SmartMedia Power Controll Subroutine
+////SmartMedia Power Control Subroutine
 ////----- Cnt_D_Reset() ----------------------------------------------
 //void Cnt_D_Reset(void)
 //{
@@ -1478,7 +1478,7 @@ BYTE _Check_D_DevCode(BYTE dcode)
 //}
 //
 */
-//SmartMedia ECC Controll Subroutine
+//SmartMedia ECC Control Subroutine
 //----- Check_D_ReadError() ----------------------------------------------
 int Check_D_ReadError(BYTE *redundant)
 {
index 776b693bb30711aed4510552ad69dd97a4028b47..06bebd6acc46f1a692ace4849c816b530c4c9b2e 100644 (file)
@@ -81,7 +81,7 @@
 
 /* CIR block settings */
 #define ENE_CIR_CONF1          0xFEC0
-#define ENE_CIR_CONF1_ADC_ON   0x7      /* reciever on gpio40 enabled */
+#define ENE_CIR_CONF1_ADC_ON   0x7      /* receiver on gpio40 enabled */
 #define ENE_CIR_CONF1_LEARN1   (1 << 3) /* enabled on learning mode */
 #define ENE_CIR_CONF1_TX_ON    0x30     /* enabled on transmit */
 #define ENE_CIR_CONF1_TX_CARR  (1 << 7) /* send TX carrier or not */
@@ -96,7 +96,7 @@
 
 /* transmitter - not implemented yet */
 /* KB3926C and higher */
-/* transmission is very similiar to recieving, a byte is written to */
+/* transmission is very similar to receiving, a byte is written to */
 /* ENE_TX_INPUT, in same manner as it is read from sample buffer */
 /* sample period is fixed*/
 
diff --git a/drivers/staging/memrar/Kconfig b/drivers/staging/memrar/Kconfig
deleted file mode 100644 (file)
index cbeebc5..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-config MRST_RAR_HANDLER
-       tristate "RAR handler driver for Intel Moorestown platform"
-       depends on RAR_REGISTER
-       ---help---
-         This driver provides a memory management interface to
-         restricted access regions (RAR) available on the Intel
-         Moorestown platform.
-
-         Once locked down, restricted access regions are only
-         accessible by specific hardware on the platform.  The x86
-         CPU is typically not one of those platforms.  As such this
-         driver does not access RAR, and only provides a buffer
-         allocation/bookkeeping mechanism.
-
-         If unsure, say N.
diff --git a/drivers/staging/memrar/Makefile b/drivers/staging/memrar/Makefile
deleted file mode 100644 (file)
index a3336c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-obj-$(CONFIG_MRST_RAR_HANDLER) += memrar.o
-memrar-y                       := memrar_allocator.o memrar_handler.o
diff --git a/drivers/staging/memrar/TODO b/drivers/staging/memrar/TODO
deleted file mode 100644 (file)
index 435e09b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-RAR Handler (memrar) Driver TODO Items
-======================================
-
-Maintainer: Eugene Epshteyn <eugene.epshteyn@intel.com>
-
-memrar.h
---------
-1. This header exposes the driver's user space and kernel space
-   interfaces.  It should be moved to <linux/rar/memrar.h>, or
-   something along those lines, when this memrar driver is moved out
-   of `staging'.
-     a. It would be ideal if staging/rar_register/rar_register.h was
-        moved to the same directory.
-
-memrar_allocator.[ch]
----------------------
-1. Address potential fragmentation issues with the memrar_allocator.
-
-2. Hide struct memrar_allocator details/fields.  They need not be
-   exposed to the user.
-     a. Forward declare struct memrar_allocator.
-     b. Move all three struct definitions to `memrar_allocator.c'
-        source file.
-     c. Add a memrar_allocator_largest_free_area() function, or
-        something like that to get access to the value of the struct
-        memrar_allocator "largest_free_area" field.  This allows the
-        struct memrar_allocator fields to be completely hidden from
-        the user.  The memrar_handler code really only needs this for
-        statistic gathering on-demand.
-     d. Do the same for the "capacity" field as the
-        "largest_free_area" field.
-
-3. Move memrar_allocator.* to kernel `lib' directory since it is HW
-   neutral.
-     a. Alternatively, use lib/genalloc.c instead.
-     b. A kernel port of Doug Lea's malloc() implementation may also
-        be an option.
-
-memrar_handler.c
-----------------
-1. Split user space interface (ioctl code) from core/kernel code,
-   e.g.:
-     memrar_handler.c -> memrar_core.c, memrar_user.c
diff --git a/drivers/staging/memrar/memrar-abi b/drivers/staging/memrar/memrar-abi
deleted file mode 100644 (file)
index c23fc99..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-What:          /dev/memrar
-Date:          March 2010
-KernelVersion: 2.6.34
-Contact:       Eugene Epshteyn <eugene.epshteyn@intel.com>
-Description:   The Intel Moorestown Restricted Access Region (RAR)
-               Handler driver exposes an ioctl() based interface that
-               allows a user to reserve and release blocks of RAR
-               memory.
-
-               Note:  A sysfs based one was not appropriate for the
-               RAR handler's usage model.
-
-               =========================================================
-                               ioctl() Requests
-               =========================================================
-               RAR_HANDLER_RESERVE
-               -------------------
-               Description:    Reserve RAR block.
-               Type:           struct RAR_block_info
-               Direction:      in/out
-               Errors:         EINVAL (invalid RAR type or size)
-                               ENOMEM (not enough RAR memory)
-
-               RAR_HANDLER_STAT
-               ----------------
-               Description:    Get RAR statistics.
-               Type:           struct RAR_stat
-               Direction:      in/out
-               Errors:         EINVAL (invalid RAR type)
-
-               RAR_HANDLER_RELEASE
-               -------------------
-               Description:    Release previously reserved RAR block.
-               Type:           32 bit unsigned integer
-                               (e.g. uint32_t), i.e the RAR "handle".
-               Direction:      in
-               Errors:         EINVAL (invalid RAR handle)
-
-
-               =========================================================
-                       ioctl() Request Parameter Types
-               =========================================================
-               The structures referred to above are defined as
-               follows:
-
-               /**
-                * struct RAR_block_info - user space struct that
-                *                         describes RAR buffer
-                * @type:       Type of RAR memory (e.g.,
-                *              RAR_TYPE_VIDEO or RAR_TYPE_AUDIO) [in]
-                * @size:       Requested size of a block in bytes to
-                *              be reserved in RAR. [in]
-                * @handle:     Handle that can be used to refer to
-                *              reserved block. [out]
-                *
-                * This is the basic structure exposed to the user
-                * space that describes a given RAR buffer.  It used
-                * as the parameter for the RAR_HANDLER_RESERVE ioctl.
-                * The buffer's underlying bus address is not exposed
-                * to the user.  User space code refers to the buffer
-                * entirely by "handle".
-                */
-               struct RAR_block_info {
-                       __u32 type;
-                       __u32 size;
-                       __u32 handle;
-               };
-
-               /**
-                * struct RAR_stat - RAR statistics structure
-                * @type:               Type of RAR memory (e.g.,
-                *                      RAR_TYPE_VIDEO or
-                *                      RAR_TYPE_AUDIO) [in]
-                * @capacity:           Total size of RAR memory
-                *                      region. [out]
-                * @largest_block_size: Size of the largest reservable
-                *                      block. [out]
-                *
-                * This structure is used for RAR_HANDLER_STAT ioctl.
-                */
-               struct RAR_stat {
-                       __u32 type;
-                       __u32 capacity;
-                       __u32 largest_block_size;
-               };
-
-               Lastly, the RAR_HANDLER_RELEASE ioctl expects a
-               "handle" to the RAR block of memory.  It is a 32 bit
-               unsigned integer.
diff --git a/drivers/staging/memrar/memrar.h b/drivers/staging/memrar/memrar.h
deleted file mode 100644 (file)
index 0feb73b..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *      RAR Handler (/dev/memrar) internal driver API.
- *      Copyright (C) 2010 Intel Corporation. All rights reserved.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of version 2 of the GNU General
- *      Public License as published by the Free Software Foundation.
- *
- *      This program is distributed in the hope that it will be
- *      useful, but WITHOUT ANY WARRANTY; without even the implied
- *      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- *      PURPOSE.  See the GNU General Public License for more details.
- *      You should have received a copy of the GNU General Public
- *      License along with this program; if not, write to the Free
- *      Software Foundation, Inc., 59 Temple Place - Suite 330,
- *      Boston, MA  02111-1307, USA.
- *      The full GNU General Public License is included in this
- *      distribution in the file called COPYING.
- */
-
-
-#ifndef _MEMRAR_H
-#define _MEMRAR_H
-
-#include <linux/ioctl.h>
-#include <linux/types.h>
-
-
-/**
- * struct RAR_stat - RAR statistics structure
- * @type:              Type of RAR memory (e.g., audio vs. video)
- * @capacity:          Total size of RAR memory region.
- * @largest_block_size:        Size of the largest reservable block.
- *
- * This structure is used for RAR_HANDLER_STAT ioctl and for the
- * RAR_get_stat() user space wrapper function.
- */
-struct RAR_stat {
-       __u32 type;
-       __u32 capacity;
-       __u32 largest_block_size;
-};
-
-
-/**
- * struct RAR_block_info - user space struct that describes RAR buffer
- * @type:      Type of RAR memory (e.g., audio vs. video)
- * @size:      Requested size of a block to be reserved in RAR.
- * @handle:    Handle that can be used to refer to reserved block.
- *
- * This is the basic structure exposed to the user space that
- * describes a given RAR buffer.  The buffer's underlying bus address
- * is not exposed to the user.  User space code refers to the buffer
- * entirely by "handle".
- */
-struct RAR_block_info {
-       __u32 type;
-       __u32 size;
-       __u32 handle;
-};
-
-
-#define RAR_IOCTL_BASE 0xE0
-
-/* Reserve RAR block. */
-#define RAR_HANDLER_RESERVE _IOWR(RAR_IOCTL_BASE, 0x00, struct RAR_block_info)
-
-/* Release previously reserved RAR block. */
-#define RAR_HANDLER_RELEASE _IOW(RAR_IOCTL_BASE, 0x01, __u32)
-
-/* Get RAR stats. */
-#define RAR_HANDLER_STAT    _IOWR(RAR_IOCTL_BASE, 0x02, struct RAR_stat)
-
-
-#ifdef __KERNEL__
-
-/* -------------------------------------------------------------- */
-/*               Kernel Side RAR Handler Interface                */
-/* -------------------------------------------------------------- */
-
-/**
- * struct RAR_buffer - kernel space struct that describes RAR buffer
- * @info:              structure containing base RAR buffer information
- * @bus_address:       buffer bus address
- *
- * Structure that contains all information related to a given block of
- * memory in RAR.  It is generally only used when retrieving RAR
- * related bus addresses.
- *
- * Note: This structure is used only by RAR-enabled drivers, and is
- *       not intended to be exposed to the user space.
- */
-struct RAR_buffer {
-       struct RAR_block_info info;
-       dma_addr_t bus_address;
-};
-
-#if defined(CONFIG_MRST_RAR_HANDLER)
-/**
- * rar_reserve() - reserve RAR buffers
- * @buffers:   array of RAR_buffers where type and size of buffers to
- *             reserve are passed in, handle and bus address are
- *             passed out
- * @count:     number of RAR_buffers in the "buffers" array
- *
- * This function will reserve buffers in the restricted access regions
- * of given types.
- *
- * It returns the number of successfully reserved buffers.  Successful
- * buffer reservations will have the corresponding bus_address field
- * set to a non-zero value in the given buffers vector.
- */
-extern size_t rar_reserve(struct RAR_buffer *buffers,
-                         size_t count);
-
-/**
- * rar_release() - release RAR buffers
- * @buffers:   array of RAR_buffers where handles to buffers to be
- *             released are passed in
- * @count:     number of RAR_buffers in the "buffers" array
- *
- * This function will release RAR buffers that were retrieved through
- * a call to rar_reserve() or rar_handle_to_bus() by decrementing the
- * reference count.  The RAR buffer will be reclaimed when the
- * reference count drops to zero.
- *
- * It returns the number of successfully released buffers.  Successful
- * releases will have their handle field set to zero in the given
- * buffers vector.
- */
-extern size_t rar_release(struct RAR_buffer *buffers,
-                         size_t count);
-
-/**
- * rar_handle_to_bus() - convert a vector of RAR handles to bus addresses
- * @buffers:   array of RAR_buffers containing handles to be
- *             converted to bus_addresses
- * @count:     number of RAR_buffers in the "buffers" array
-
- * This function will retrieve the RAR buffer bus addresses, type and
- * size corresponding to the RAR handles provided in the buffers
- * vector.
- *
- * It returns the number of successfully converted buffers.  The bus
- * address will be set to 0 for unrecognized handles.
- *
- * The reference count for each corresponding buffer in RAR will be
- * incremented.  Call rar_release() when done with the buffers.
- */
-extern size_t rar_handle_to_bus(struct RAR_buffer *buffers,
-                               size_t count);
-
-#else
-
-extern inline size_t rar_reserve(struct RAR_buffer *buffers, size_t count)
-{
-       return 0;
-}
-
-extern inline size_t rar_release(struct RAR_buffer *buffers, size_t count)
-{
-       return 0;
-}
-
-extern inline size_t rar_handle_to_bus(struct RAR_buffer *buffers,
-                               size_t count)
-{
-       return 0;
-}
-
-#endif  /* MRST_RAR_HANDLER */
-#endif  /* __KERNEL__ */
-
-#endif  /* _MEMRAR_H */
diff --git a/drivers/staging/memrar/memrar_allocator.c b/drivers/staging/memrar/memrar_allocator.c
deleted file mode 100644 (file)
index a4f8c58..0000000
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- *      memrar_allocator 1.0:  An allocator for Intel RAR.
- *
- *      Copyright (C) 2010 Intel Corporation. All rights reserved.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of version 2 of the GNU General
- *      Public License as published by the Free Software Foundation.
- *
- *      This program is distributed in the hope that it will be
- *      useful, but WITHOUT ANY WARRANTY; without even the implied
- *      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- *      PURPOSE.  See the GNU General Public License for more details.
- *      You should have received a copy of the GNU General Public
- *      License along with this program; if not, write to the Free
- *      Software Foundation, Inc., 59 Temple Place - Suite 330,
- *      Boston, MA  02111-1307, USA.
- *      The full GNU General Public License is included in this
- *      distribution in the file called COPYING.
- *
- *
- *  ------------------------------------------------------------------
- *
- *      This simple allocator implementation provides a
- *      malloc()/free()-like interface for reserving space within a
- *      previously reserved block of memory.  It is not specific to
- *      any hardware, nor is it coupled with the lower level paging
- *      mechanism.
- *
- *      The primary goal of this implementation is to provide a means
- *      to partition an arbitrary block of memory without actually
- *      accessing the memory or incurring any hardware side-effects
- *      (e.g. paging).  It is, in effect, a bookkeeping mechanism for
- *      buffers.
- */
-
-
-#include "memrar_allocator.h"
-#include <linux/slab.h>
-#include <linux/bug.h>
-#include <linux/kernel.h>
-
-
-struct memrar_allocator *memrar_create_allocator(unsigned long base,
-                                                size_t capacity,
-                                                size_t block_size)
-{
-       struct memrar_allocator *allocator  = NULL;
-       struct memrar_address_ranges *first_node = NULL;
-
-       /*
-        * Make sure the base address is aligned on a block_size
-        * boundary.
-        *
-        * @todo Is this necessary?
-        */
-       /* base = ALIGN(base, block_size); */
-
-       /* Validate parameters.
-        *
-        * Make sure we can allocate the entire memory space.  Zero
-        * capacity or block size are obviously invalid.
-        */
-       if (base == 0
-           || capacity == 0
-           || block_size == 0
-           || ULONG_MAX - capacity < base
-           || capacity < block_size)
-               return allocator;
-
-       /*
-        * There isn't much point in creating a memory allocator that
-        * is only capable of holding one block but we'll allow it,
-        * and issue a diagnostic.
-        */
-       WARN(capacity < block_size * 2,
-            "memrar: Only one block available to allocator.\n");
-
-       allocator = kmalloc(sizeof(*allocator), GFP_KERNEL);
-
-       if (allocator == NULL)
-               return allocator;
-
-       mutex_init(&allocator->lock);
-       allocator->base = base;
-
-       /* Round the capacity down to a multiple of block_size. */
-       allocator->capacity = (capacity / block_size) * block_size;
-
-       allocator->block_size = block_size;
-
-       allocator->largest_free_area = allocator->capacity;
-
-       /* Initialize the handle and free lists. */
-       INIT_LIST_HEAD(&allocator->allocated_list.list);
-       INIT_LIST_HEAD(&allocator->free_list.list);
-
-       first_node = kmalloc(sizeof(*first_node), GFP_KERNEL);
-       if (first_node == NULL) {
-               kfree(allocator);
-               allocator = NULL;
-       } else {
-               /* Full range of blocks is available. */
-               first_node->range.begin = base;
-               first_node->range.end   = base + allocator->capacity;
-               list_add(&first_node->list,
-                        &allocator->free_list.list);
-       }
-
-       return allocator;
-}
-
-void memrar_destroy_allocator(struct memrar_allocator *allocator)
-{
-       /*
-        * Assume that the memory allocator lock isn't held at this
-        * point in time.  Caller must ensure that.
-        */
-
-       struct memrar_address_ranges *pos = NULL;
-       struct memrar_address_ranges *n   = NULL;
-
-       if (allocator == NULL)
-               return;
-
-       mutex_lock(&allocator->lock);
-
-       /* Reclaim free list resources. */
-       list_for_each_entry_safe(pos,
-                                n,
-                                &allocator->free_list.list,
-                                list) {
-               list_del(&pos->list);
-               kfree(pos);
-       }
-
-       mutex_unlock(&allocator->lock);
-
-       kfree(allocator);
-}
-
-unsigned long memrar_allocator_alloc(struct memrar_allocator *allocator,
-                                    size_t size)
-{
-       struct memrar_address_ranges *pos = NULL;
-
-       size_t num_blocks;
-       unsigned long reserved_bytes;
-
-       /*
-        * Address of allocated buffer.  We assume that zero is not a
-        * valid address.
-        */
-       unsigned long addr = 0;
-
-       if (allocator == NULL || size == 0)
-               return addr;
-
-       /* Reserve enough blocks to hold the amount of bytes requested. */
-       num_blocks = DIV_ROUND_UP(size, allocator->block_size);
-
-       reserved_bytes = num_blocks * allocator->block_size;
-
-       mutex_lock(&allocator->lock);
-
-       if (reserved_bytes > allocator->largest_free_area) {
-               mutex_unlock(&allocator->lock);
-               return addr;
-       }
-
-       /*
-        * Iterate through the free list to find a suitably sized
-        * range of free contiguous memory blocks.
-        *
-        * We also take the opportunity to reset the size of the
-        * largest free area size statistic.
-        */
-       list_for_each_entry(pos, &allocator->free_list.list, list) {
-               struct memrar_address_range * const fr = &pos->range;
-               size_t const curr_size = fr->end - fr->begin;
-
-               if (curr_size >= reserved_bytes && addr == 0) {
-                       struct memrar_address_range *range = NULL;
-                       struct memrar_address_ranges * const new_node =
-                               kmalloc(sizeof(*new_node), GFP_KERNEL);
-
-                       if (new_node == NULL)
-                               break;
-
-                       list_add(&new_node->list,
-                                &allocator->allocated_list.list);
-
-                       /*
-                        * Carve out area of memory from end of free
-                        * range.
-                        */
-                       range        = &new_node->range;
-                       range->end   = fr->end;
-                       fr->end     -= reserved_bytes;
-                       range->begin = fr->end;
-                       addr         = range->begin;
-
-                       /*
-                        * Check if largest area has decreased in
-                        * size.  We'll need to continue scanning for
-                        * the next largest area if it has.
-                        */
-                       if (curr_size == allocator->largest_free_area)
-                               allocator->largest_free_area -=
-                                       reserved_bytes;
-                       else
-                               break;
-               }
-
-               /*
-                * Reset largest free area size statistic as needed,
-                * but only if we've actually allocated memory.
-                */
-               if (addr != 0
-                   && curr_size > allocator->largest_free_area) {
-                       allocator->largest_free_area = curr_size;
-                       break;
-               }
-       }
-
-       mutex_unlock(&allocator->lock);
-
-       return addr;
-}
-
-long memrar_allocator_free(struct memrar_allocator *allocator,
-                          unsigned long addr)
-{
-       struct list_head *pos = NULL;
-       struct list_head *tmp = NULL;
-       struct list_head *dst = NULL;
-
-       struct memrar_address_ranges      *allocated = NULL;
-       struct memrar_address_range const *handle    = NULL;
-
-       unsigned long old_end        = 0;
-       unsigned long new_chunk_size = 0;
-
-       if (allocator == NULL)
-               return -EINVAL;
-
-       if (addr == 0)
-               return 0;  /* Ignore "free(0)". */
-
-       mutex_lock(&allocator->lock);
-
-       /* Find the corresponding handle. */
-       list_for_each_entry(allocated,
-                           &allocator->allocated_list.list,
-                           list) {
-               if (allocated->range.begin == addr) {
-                       handle = &allocated->range;
-                       break;
-               }
-       }
-
-       /* No such buffer created by this allocator. */
-       if (handle == NULL) {
-               mutex_unlock(&allocator->lock);
-               return -EFAULT;
-       }
-
-       /*
-        * Coalesce adjacent chunks of memory if possible.
-        *
-        * @note This isn't full blown coalescing since we're only
-        *       coalescing at most three chunks of memory.
-        */
-       list_for_each_safe(pos, tmp, &allocator->free_list.list) {
-               /* @todo O(n) performance.  Optimize. */
-
-               struct memrar_address_range * const chunk =
-                       &list_entry(pos,
-                                   struct memrar_address_ranges,
-                                   list)->range;
-
-               /* Extend size of existing free adjacent chunk. */
-               if (chunk->end == handle->begin) {
-                       /*
-                        * Chunk "less than" than the one we're
-                        * freeing is adjacent.
-                        *
-                        * Before:
-                        *
-                        *   +-----+------+
-                        *   |chunk|handle|
-                        *   +-----+------+
-                        *
-                        * After:
-                        *
-                        *   +------------+
-                        *   |   chunk    |
-                        *   +------------+
-                        */
-
-                       struct memrar_address_ranges const * const next =
-                               list_entry(pos->next,
-                                          struct memrar_address_ranges,
-                                          list);
-
-                       chunk->end = handle->end;
-
-                       /*
-                        * Now check if next free chunk is adjacent to
-                        * the current extended free chunk.
-                        *
-                        * Before:
-                        *
-                        *   +------------+----+
-                        *   |   chunk    |next|
-                        *   +------------+----+
-                        *
-                        * After:
-                        *
-                        *   +-----------------+
-                        *   |      chunk      |
-                        *   +-----------------+
-                        */
-                       if (!list_is_singular(pos)
-                           && chunk->end == next->range.begin) {
-                               chunk->end = next->range.end;
-                               list_del(pos->next);
-                               kfree(next);
-                       }
-
-                       list_del(&allocated->list);
-
-                       new_chunk_size = chunk->end - chunk->begin;
-
-                       goto exit_memrar_free;
-
-               } else if (handle->end == chunk->begin) {
-                       /*
-                        * Chunk "greater than" than the one we're
-                        * freeing is adjacent.
-                        *
-                        *   +------+-----+
-                        *   |handle|chunk|
-                        *   +------+-----+
-                        *
-                        * After:
-                        *
-                        *   +------------+
-                        *   |   chunk    |
-                        *   +------------+
-                        */
-
-                       struct memrar_address_ranges const * const prev =
-                               list_entry(pos->prev,
-                                          struct memrar_address_ranges,
-                                          list);
-
-                       chunk->begin = handle->begin;
-
-                       /*
-                        * Now check if previous free chunk is
-                        * adjacent to the current extended free
-                        * chunk.
-                        *
-                        *
-                        * Before:
-                        *
-                        *   +----+------------+
-                        *   |prev|   chunk    |
-                        *   +----+------------+
-                        *
-                        * After:
-                        *
-                        *   +-----------------+
-                        *   |      chunk      |
-                        *   +-----------------+
-                        */
-                       if (!list_is_singular(pos)
-                           && prev->range.end == chunk->begin) {
-                               chunk->begin = prev->range.begin;
-                               list_del(pos->prev);
-                               kfree(prev);
-                       }
-
-                       list_del(&allocated->list);
-
-                       new_chunk_size = chunk->end - chunk->begin;
-
-                       goto exit_memrar_free;
-
-               } else if (chunk->end < handle->begin
-                          && chunk->end > old_end) {
-                       /* Keep track of where the entry could be
-                        * potentially moved from the "allocated" list
-                        * to the "free" list if coalescing doesn't
-                        * occur, making sure the "free" list remains
-                        * sorted.
-                        */
-                       old_end = chunk->end;
-                       dst = pos;
-               }
-       }
-
-       /*
-        * Nothing to coalesce.
-        *
-        * Move the entry from the "allocated" list to the "free"
-        * list.
-        */
-       list_move(&allocated->list, dst);
-       new_chunk_size = handle->end - handle->begin;
-       allocated = NULL;
-
-exit_memrar_free:
-
-       if (new_chunk_size > allocator->largest_free_area)
-               allocator->largest_free_area = new_chunk_size;
-
-       mutex_unlock(&allocator->lock);
-
-       kfree(allocated);
-
-       return 0;
-}
-
-
-
-/*
-  Local Variables:
-    c-file-style: "linux"
-  End:
-*/
diff --git a/drivers/staging/memrar/memrar_allocator.h b/drivers/staging/memrar/memrar_allocator.h
deleted file mode 100644 (file)
index 0b80dea..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *      Copyright (C) 2010 Intel Corporation. All rights reserved.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of version 2 of the GNU General
- *      Public License as published by the Free Software Foundation.
- *
- *      This program is distributed in the hope that it will be
- *      useful, but WITHOUT ANY WARRANTY; without even the implied
- *      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- *      PURPOSE.  See the GNU General Public License for more details.
- *      You should have received a copy of the GNU General Public
- *      License along with this program; if not, write to the Free
- *      Software Foundation, Inc., 59 Temple Place - Suite 330,
- *      Boston, MA  02111-1307, USA.
- *      The full GNU General Public License is included in this
- *      distribution in the file called COPYING.
- */
-
-#ifndef MEMRAR_ALLOCATOR_H
-#define MEMRAR_ALLOCATOR_H
-
-
-#include <linux/mutex.h>
-#include <linux/list.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-
-
-/**
- * struct memrar_address_range - struct that describes a memory range
- * @begin:     Beginning of available address range.
- * @end:       End of available address range, one past the end,
- *             i.e. [begin, end).
- */
-struct memrar_address_range {
-/* private: internal use only */
-       unsigned long begin;
-       unsigned long end;
-};
-
-/**
- * struct memrar_address_ranges - list of areas of memory.
- * @list:      Linked list of address ranges.
- * @range:     Memory address range corresponding to given list node.
- */
-struct memrar_address_ranges {
-/* private: internal use only */
-       struct list_head list;
-       struct memrar_address_range range;
-};
-
-/**
- * struct memrar_allocator - encapsulation of the memory allocator state
- * @lock:              Lock used to synchronize access to the memory
- *                     allocator state.
- * @base:              Base (start) address of the allocator memory
- *                     space.
- * @capacity:          Size of the allocator memory space in bytes.
- * @block_size:                The size in bytes of individual blocks within
- *                     the allocator memory space.
- * @largest_free_area: Largest free area of memory in the allocator
- *                     in bytes.
- * @allocated_list:    List of allocated memory block address
- *                     ranges.
- * @free_list:         List of free address ranges.
- *
- * This structure contains all memory allocator state, including the
- * base address, capacity, free list, lock, etc.
- */
-struct memrar_allocator {
-/* private: internal use only */
-       struct mutex lock;
-       unsigned long base;
-       size_t capacity;
-       size_t block_size;
-       size_t largest_free_area;
-       struct memrar_address_ranges allocated_list;
-       struct memrar_address_ranges free_list;
-};
-
-/**
- * memrar_create_allocator() - create a memory allocator
- * @base:      Address at which the memory allocator begins.
- * @capacity:  Desired size of the memory allocator.  This value must
- *             be larger than the block_size, ideally more than twice
- *             as large since there wouldn't be much point in using a
- *             memory allocator otherwise.
- * @block_size:        The size of individual blocks within the memory
- *             allocator.  This value must smaller than the
- *             capacity.
- *
- * Create a memory allocator with the given capacity and block size.
- * The capacity will be reduced to be a multiple of the block size, if
- * necessary.
- *
- * Returns an instance of the memory allocator, if creation succeeds,
- * otherwise zero if creation fails.  Failure may occur if not enough
- * kernel memory exists to create the memrar_allocator instance
- * itself, or if the capacity and block_size arguments are not
- * compatible or make sense.
- */
-struct memrar_allocator *memrar_create_allocator(unsigned long base,
-                                                size_t capacity,
-                                                size_t block_size);
-
-/**
- * memrar_destroy_allocator() - destroy allocator
- * @allocator: The allocator being destroyed.
- *
- * Reclaim resources held by the memory allocator.  The caller must
- * explicitly free all memory reserved by memrar_allocator_alloc()
- * prior to calling this function.  Otherwise leaks will occur.
- */
-void memrar_destroy_allocator(struct memrar_allocator *allocator);
-
-/**
- * memrar_allocator_alloc() - reserve an area of memory of given size
- * @allocator: The allocator instance being used to reserve buffer.
- * @size:      The size in bytes of the buffer to allocate.
- *
- * This functions reserves an area of memory managed by the given
- * allocator.  It returns zero if allocation was not possible.
- * Failure may occur if the allocator no longer has space available.
- */
-unsigned long memrar_allocator_alloc(struct memrar_allocator *allocator,
-                                    size_t size);
-
-/**
- * memrar_allocator_free() - release buffer starting at given address
- * @allocator: The allocator instance being used to release the buffer.
- * @address:   The address of the buffer being released.
- *
- * Release an area of memory starting at the given address.  Failure
- * could occur if the given address is not in the address space
- * managed by the allocator.  Returns zero on success or an errno
- * (negative value) on failure.
- */
-long memrar_allocator_free(struct memrar_allocator *allocator,
-                          unsigned long address);
-
-#endif  /* MEMRAR_ALLOCATOR_H */
-
-
-/*
-  Local Variables:
-    c-file-style: "linux"
-  End:
-*/
diff --git a/drivers/staging/memrar/memrar_handler.c b/drivers/staging/memrar/memrar_handler.c
deleted file mode 100644 (file)
index cfcaa8e..0000000
+++ /dev/null
@@ -1,1007 +0,0 @@
-/*
- *      memrar_handler 1.0:  An Intel restricted access region handler device
- *
- *      Copyright (C) 2010 Intel Corporation. All rights reserved.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of version 2 of the GNU General
- *      Public License as published by the Free Software Foundation.
- *
- *      This program is distributed in the hope that it will be
- *      useful, but WITHOUT ANY WARRANTY; without even the implied
- *      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- *      PURPOSE.  See the GNU General Public License for more details.
- *      You should have received a copy of the GNU General Public
- *      License along with this program; if not, write to the Free
- *      Software Foundation, Inc., 59 Temple Place - Suite 330,
- *      Boston, MA  02111-1307, USA.
- *      The full GNU General Public License is included in this
- *      distribution in the file called COPYING.
- *
- * -------------------------------------------------------------------
- *
- *      Moorestown restricted access regions (RAR) provide isolated
- *      areas of main memory that are only acceessible by authorized
- *      devices.
- *
- *      The Intel Moorestown RAR handler module exposes a kernel space
- *      RAR memory management mechanism.  It is essentially a
- *      RAR-specific allocator.
- *
- *      Besides providing RAR buffer management, the RAR handler also
- *      behaves in many ways like an OS virtual memory manager.  For
- *      example, the RAR "handles" created by the RAR handler are
- *      analogous to user space virtual addresses.
- *
- *      RAR memory itself is never accessed directly by the RAR
- *      handler.
- */
-
-#include <linux/miscdevice.h>
-#include <linux/fs.h>
-#include <linux/slab.h>
-#include <linux/kref.h>
-#include <linux/mutex.h>
-#include <linux/kernel.h>
-#include <linux/uaccess.h>
-#include <linux/mm.h>
-#include <linux/ioport.h>
-#include <linux/io.h>
-#include <linux/rar_register.h>
-
-#include "memrar.h"
-#include "memrar_allocator.h"
-
-
-#define MEMRAR_VER "1.0"
-
-/*
- * Moorestown supports three restricted access regions.
- *
- * We only care about the first two, video and audio.  The third,
- * reserved for Chaabi and the P-unit, will be handled by their
- * respective drivers.
- */
-#define MRST_NUM_RAR 2
-
-/* ---------------- -------------------- ------------------- */
-
-/**
- * struct memrar_buffer_info - struct that keeps track of all RAR buffers
- * @list:      Linked list of memrar_buffer_info objects.
- * @buffer:    Core RAR buffer information.
- * @refcount:  Reference count.
- * @owner:     File handle corresponding to process that reserved the
- *             block of memory in RAR.  This will be zero for buffers
- *             allocated by other drivers instead of by a user space
- *             process.
- *
- * This structure encapsulates a link list of RAR buffers, as well as
- * other characteristics specific to a given list node, such as the
- * reference count on the corresponding RAR buffer.
- */
-struct memrar_buffer_info {
-       struct list_head list;
-       struct RAR_buffer buffer;
-       struct kref refcount;
-       struct file *owner;
-};
-
-/**
- * struct memrar_rar_info - characteristics of a given RAR
- * @base:      Base bus address of the RAR.
- * @length:    Length of the RAR.
- * @iobase:    Virtual address of RAR mapped into kernel.
- * @allocator: Allocator associated with the RAR.  Note the allocator
- *             "capacity" may be smaller than the RAR length if the
- *             length is not a multiple of the configured allocator
- *             block size.
- * @buffers:   Table that keeps track of all reserved RAR buffers.
- * @lock:      Lock used to synchronize access to RAR-specific data
- *             structures.
- *
- * Each RAR has an associated memrar_rar_info structure that describes
- * where in memory the RAR is located, how large it is, and a list of
- * reserved RAR buffers inside that RAR.  Each RAR also has a mutex
- * associated with it to reduce lock contention when operations on
- * multiple RARs are performed in parallel.
- */
-struct memrar_rar_info {
-       dma_addr_t base;
-       unsigned long length;
-       void __iomem *iobase;
-       struct memrar_allocator *allocator;
-       struct memrar_buffer_info buffers;
-       struct mutex lock;
-       int allocated;  /* True if we own this RAR */
-};
-
-/*
- * Array of RAR characteristics.
- */
-static struct memrar_rar_info memrars[MRST_NUM_RAR];
-
-/* ---------------- -------------------- ------------------- */
-
-/* Validate RAR type. */
-static inline int memrar_is_valid_rar_type(u32 type)
-{
-       return type == RAR_TYPE_VIDEO || type == RAR_TYPE_AUDIO;
-}
-
-/* Check if an address/handle falls with the given RAR memory range. */
-static inline int memrar_handle_in_range(struct memrar_rar_info *rar,
-                                        u32 vaddr)
-{
-       unsigned long const iobase = (unsigned long) (rar->iobase);
-       return (vaddr >= iobase && vaddr < iobase + rar->length);
-}
-
-/* Retrieve RAR information associated with the given handle. */
-static struct memrar_rar_info *memrar_get_rar_info(u32 vaddr)
-{
-       int i;
-       for (i = 0; i < MRST_NUM_RAR; ++i) {
-               struct memrar_rar_info * const rar = &memrars[i];
-               if (memrar_handle_in_range(rar, vaddr))
-                       return rar;
-       }
-
-       return NULL;
-}
-
-/**
- *     memrar_get_bus address          -       handle to bus address
- *
- *     Retrieve bus address from given handle.
- *
- *     Returns address corresponding to given handle.  Zero if handle is
- *     invalid.
- */
-static dma_addr_t memrar_get_bus_address(
-       struct memrar_rar_info *rar,
-       u32 vaddr)
-{
-       unsigned long const iobase = (unsigned long) (rar->iobase);
-
-       if (!memrar_handle_in_range(rar, vaddr))
-               return 0;
-
-       /*
-        * An assumption is made that the virtual address offset is
-        * the same as the bus address offset, at least based on the
-        * way this driver is implemented.  For example, vaddr + 2 ==
-        * baddr + 2.
-        *
-        * @todo Is that a valid assumption?
-        */
-       return rar->base + (vaddr - iobase);
-}
-
-/**
- *     memrar_get_physical_address     -       handle to physical address
- *
- *     Retrieve physical address from given handle.
- *
- *     Returns address corresponding to given handle.  Zero if handle is
- *     invalid.
- */
-static dma_addr_t memrar_get_physical_address(
-       struct memrar_rar_info *rar,
-       u32 vaddr)
-{
-       /*
-        * @todo This assumes that the bus address and physical
-        *       address are the same.  That is true for Moorestown
-        *       but not necessarily on other platforms.  This
-        *       deficiency should be addressed at some point.
-        */
-       return memrar_get_bus_address(rar, vaddr);
-}
-
-/**
- *     memrar_release_block    -       release a block to the pool
- *     @kref: kref of block
- *
- *     Core block release code. A node has hit zero references so can
- *     be released and the lists must be updated.
- *
- *     Note: This code removes the node from a list.  Make sure any list
- *     iteration is performed using list_for_each_safe().
- */
-static void memrar_release_block_i(struct kref *ref)
-{
-       /*
-        * Last reference is being released.  Remove from the table,
-        * and reclaim resources.
-        */
-
-       struct memrar_buffer_info * const node =
-               container_of(ref, struct memrar_buffer_info, refcount);
-
-       struct RAR_block_info * const user_info =
-               &node->buffer.info;
-
-       struct memrar_allocator * const allocator =
-               memrars[user_info->type].allocator;
-
-       list_del(&node->list);
-
-       memrar_allocator_free(allocator, user_info->handle);
-
-       kfree(node);
-}
-
-/**
- *     memrar_init_rar_resources       -       configure a RAR
- *     @rarnum: rar that has been allocated
- *     @devname: name of our device
- *
- *     Initialize RAR parameters, such as bus addresses, etc and make
- *     the resource accessible.
- */
-static int memrar_init_rar_resources(int rarnum, char const *devname)
-{
-       /* ---- Sanity Checks ----
-        * 1. RAR bus addresses in both Lincroft and Langwell RAR
-        *    registers should be the same.
-        *    a. There's no way we can do this through IA.
-        *
-        * 2. Secure device ID in Langwell RAR registers should be set
-        *    appropriately, e.g. only LPE DMA for the audio RAR, and
-        *    security for the other Langwell based RAR registers.
-        *    a. There's no way we can do this through IA.
-        *
-        * 3. Audio and video RAR registers and RAR access should be
-        *    locked down.  If not, enable RAR access control.  Except
-        *    for debugging purposes, there is no reason for them to
-        *    be unlocked.
-        *    a.  We can only do this for the Lincroft (IA) side.
-        *
-        * @todo Should the RAR handler driver even be aware of audio
-        *       and video RAR settings?
-        */
-
-       /*
-        * RAR buffer block size.
-        *
-        * We choose it to be the size of a page to simplify the
-        * /dev/memrar mmap() implementation and usage.  Otherwise
-        * paging is not involved once an RAR is locked down.
-        */
-       static size_t const RAR_BLOCK_SIZE = PAGE_SIZE;
-
-       dma_addr_t low, high;
-       struct memrar_rar_info * const rar = &memrars[rarnum];
-
-       BUG_ON(MRST_NUM_RAR != ARRAY_SIZE(memrars));
-       BUG_ON(!memrar_is_valid_rar_type(rarnum));
-       BUG_ON(rar->allocated);
-
-       if (rar_get_address(rarnum, &low, &high) != 0)
-               /* No RAR is available. */
-               return -ENODEV;
-
-       if (low == 0 || high == 0) {
-               rar->base      = 0;
-               rar->length    = 0;
-               rar->iobase    = NULL;
-               rar->allocator = NULL;
-               return -ENOSPC;
-       }
-
-       /*
-        * @todo Verify that LNC and LNW RAR register contents
-        *       addresses, security, etc are compatible and
-        *       consistent).
-        */
-
-       rar->length = high - low + 1;
-
-       /* Claim RAR memory as our own. */
-       if (request_mem_region(low, rar->length, devname) == NULL) {
-               rar->length = 0;
-               pr_err("%s: Unable to claim RAR[%d] memory.\n",
-                      devname, rarnum);
-               pr_err("%s: RAR[%d] disabled.\n", devname, rarnum);
-               return -EBUSY;
-       }
-
-       rar->base = low;
-
-       /*
-        * Now map it into the kernel address space.
-        *
-        * Note that the RAR memory may only be accessed by IA
-        * when debugging.  Otherwise attempts to access the
-        * RAR memory when it is locked down will result in
-        * behavior similar to writing to /dev/null and
-        * reading from /dev/zero.  This behavior is enforced
-        * by the hardware.  Even if we don't access the
-        * memory, mapping it into the kernel provides us with
-        * a convenient RAR handle to bus address mapping.
-        */
-       rar->iobase = ioremap_nocache(rar->base, rar->length);
-       if (rar->iobase == NULL) {
-               pr_err("%s: Unable to map RAR memory.\n", devname);
-               release_mem_region(low, rar->length);
-               return -ENOMEM;
-       }
-
-       /* Initialize corresponding memory allocator. */
-       rar->allocator = memrar_create_allocator((unsigned long) rar->iobase,
-                                               rar->length, RAR_BLOCK_SIZE);
-       if (rar->allocator == NULL) {
-               iounmap(rar->iobase);
-               release_mem_region(low, rar->length);
-               return -ENOMEM;
-       }
-
-       pr_info("%s: BRAR[%d] bus address range = [0x%lx, 0x%lx]\n",
-               devname, rarnum, (unsigned long) low, (unsigned long) high);
-
-       pr_info("%s: BRAR[%d] size = %zu KiB\n",
-                       devname, rarnum, rar->allocator->capacity / 1024);
-
-       rar->allocated = 1;
-       return 0;
-}
-
-/**
- *     memrar_fini_rar_resources       -       free up RAR resources
- *
- *     Finalize RAR resources. Free up the resource tables, hand the memory
- *     back to the kernel, unmap the device and release the address space.
- */
-static void memrar_fini_rar_resources(void)
-{
-       int z;
-       struct memrar_buffer_info *pos;
-       struct memrar_buffer_info *tmp;
-
-       /*
-        * @todo Do we need to hold a lock at this point in time?
-        *       (module initialization failure or exit?)
-        */
-
-       for (z = MRST_NUM_RAR; z-- != 0; ) {
-               struct memrar_rar_info * const rar = &memrars[z];
-
-               if (!rar->allocated)
-                       continue;
-
-               /* Clean up remaining resources. */
-
-               list_for_each_entry_safe(pos,
-                                        tmp,
-                                        &rar->buffers.list,
-                                        list) {
-                       kref_put(&pos->refcount, memrar_release_block_i);
-               }
-
-               memrar_destroy_allocator(rar->allocator);
-               rar->allocator = NULL;
-
-               iounmap(rar->iobase);
-               release_mem_region(rar->base, rar->length);
-
-               rar->iobase = NULL;
-               rar->base = 0;
-               rar->length = 0;
-
-               unregister_rar(z);
-       }
-}
-
-/**
- *     memrar_reserve_block    -       handle an allocation request
- *     @request: block being requested
- *     @filp: owner it is tied to
- *
- *     Allocate a block of the requested RAR. If successful return the
- *     request object filled in and zero, if not report an error code
- */
-
-static long memrar_reserve_block(struct RAR_buffer *request,
-                                struct file *filp)
-{
-       struct RAR_block_info * const rinfo = &request->info;
-       struct RAR_buffer *buffer;
-       struct memrar_buffer_info *buffer_info;
-       u32 handle;
-       struct memrar_rar_info *rar = NULL;
-
-       /* Prevent array overflow. */
-       if (!memrar_is_valid_rar_type(rinfo->type))
-               return -EINVAL;
-
-       rar = &memrars[rinfo->type];
-       if (!rar->allocated)
-               return -ENODEV;
-
-       /* Reserve memory in RAR. */
-       handle = memrar_allocator_alloc(rar->allocator, rinfo->size);
-       if (handle == 0)
-               return -ENOMEM;
-
-       buffer_info = kmalloc(sizeof(*buffer_info), GFP_KERNEL);
-
-       if (buffer_info == NULL) {
-               memrar_allocator_free(rar->allocator, handle);
-               return -ENOMEM;
-       }
-
-       buffer = &buffer_info->buffer;
-       buffer->info.type = rinfo->type;
-       buffer->info.size = rinfo->size;
-
-       /* Memory handle corresponding to the bus address. */
-       buffer->info.handle = handle;
-       buffer->bus_address = memrar_get_bus_address(rar, handle);
-
-       /*
-        * Keep track of owner so that we can later cleanup if
-        * necessary.
-        */
-       buffer_info->owner = filp;
-
-       kref_init(&buffer_info->refcount);
-
-       mutex_lock(&rar->lock);
-       list_add(&buffer_info->list, &rar->buffers.list);
-       mutex_unlock(&rar->lock);
-
-       rinfo->handle = buffer->info.handle;
-       request->bus_address = buffer->bus_address;
-
-       return 0;
-}
-
-/**
- *     memrar_release_block            -       release a RAR block
- *     @addr: address in RAR space
- *
- *     Release a previously allocated block. Releases act on complete
- *     blocks, partially freeing a block is not supported
- */
-
-static long memrar_release_block(u32 addr)
-{
-       struct memrar_buffer_info *pos;
-       struct memrar_buffer_info *tmp;
-       struct memrar_rar_info * const rar = memrar_get_rar_info(addr);
-       long result = -EINVAL;
-
-       if (rar == NULL)
-               return -ENOENT;
-
-       mutex_lock(&rar->lock);
-
-       /*
-        * Iterate through the buffer list to find the corresponding
-        * buffer to be released.
-        */
-       list_for_each_entry_safe(pos,
-                                tmp,
-                                &rar->buffers.list,
-                                list) {
-               struct RAR_block_info * const info =
-                       &pos->buffer.info;
-
-               /*
-                * Take into account handle offsets that may have been
-                * added to the base handle, such as in the following
-                * scenario:
-                *
-                *     u32 handle = base + offset;
-                *     rar_handle_to_bus(handle);
-                *     rar_release(handle);
-                */
-               if (addr >= info->handle
-                   && addr < (info->handle + info->size)
-                   && memrar_is_valid_rar_type(info->type)) {
-                       kref_put(&pos->refcount, memrar_release_block_i);
-                       result = 0;
-                       break;
-               }
-       }
-
-       mutex_unlock(&rar->lock);
-
-       return result;
-}
-
-/**
- *     memrar_get_stats        -       read statistics for a RAR
- *     @r: statistics to be filled in
- *
- *     Returns the statistics data for the RAR, or an error code if
- *     the request cannot be completed
- */
-static long memrar_get_stat(struct RAR_stat *r)
-{
-       struct memrar_allocator *allocator;
-
-       if (!memrar_is_valid_rar_type(r->type))
-               return -EINVAL;
-
-       if (!memrars[r->type].allocated)
-               return -ENODEV;
-
-       allocator = memrars[r->type].allocator;
-
-       BUG_ON(allocator == NULL);
-
-       /*
-        * Allocator capacity doesn't change over time.  No
-        * need to synchronize.
-        */
-       r->capacity = allocator->capacity;
-
-       mutex_lock(&allocator->lock);
-       r->largest_block_size = allocator->largest_free_area;
-       mutex_unlock(&allocator->lock);
-       return 0;
-}
-
-/**
- *     memrar_ioctl            -       ioctl callback
- *     @filp: file issuing the request
- *     @cmd: command
- *     @arg: pointer to control information
- *
- *     Perform one of the ioctls supported by the memrar device
- */
-
-static long memrar_ioctl(struct file *filp,
-                        unsigned int cmd,
-                        unsigned long arg)
-{
-       void __user *argp = (void __user *)arg;
-       long result = 0;
-
-       struct RAR_buffer buffer;
-       struct RAR_block_info * const request = &buffer.info;
-       struct RAR_stat rar_info;
-       u32 rar_handle;
-
-       switch (cmd) {
-       case RAR_HANDLER_RESERVE:
-               if (copy_from_user(request,
-                                  argp,
-                                  sizeof(*request)))
-                       return -EFAULT;
-
-               result = memrar_reserve_block(&buffer, filp);
-               if (result != 0)
-                       return result;
-
-               return copy_to_user(argp, request, sizeof(*request));
-
-       case RAR_HANDLER_RELEASE:
-               if (copy_from_user(&rar_handle,
-                                  argp,
-                                  sizeof(rar_handle)))
-                       return -EFAULT;
-
-               return memrar_release_block(rar_handle);
-
-       case RAR_HANDLER_STAT:
-               if (copy_from_user(&rar_info,
-                                  argp,
-                                  sizeof(rar_info)))
-                       return -EFAULT;
-
-               /*
-                * Populate the RAR_stat structure based on the RAR
-                * type given by the user
-                */
-               if (memrar_get_stat(&rar_info) != 0)
-                       return -EINVAL;
-
-               /*
-                * @todo Do we need to verify destination pointer
-                *       "argp" is non-zero?  Is that already done by
-                *       copy_to_user()?
-                */
-               return copy_to_user(argp,
-                                   &rar_info,
-                                   sizeof(rar_info)) ? -EFAULT : 0;
-
-       default:
-               return -ENOTTY;
-       }
-
-       return 0;
-}
-
-/**
- *     memrar_mmap             -       mmap helper for deubgging
- *     @filp: handle doing the mapping
- *     @vma: memory area
- *
- *     Support the mmap operation on the RAR space for debugging systems
- *     when the memory is not locked down.
- */
-
-static int memrar_mmap(struct file *filp, struct vm_area_struct *vma)
-{
-       /*
-        * This mmap() implementation is predominantly useful for
-        * debugging since the CPU will be prevented from accessing
-        * RAR memory by the hardware when RAR is properly locked
-        * down.
-        *
-        * In order for this implementation to be useful RAR memory
-        * must be not be locked down.  However, we only want to do
-        * that when debugging.  DO NOT leave RAR memory unlocked in a
-        * deployed device that utilizes RAR.
-        */
-
-       size_t const size = vma->vm_end - vma->vm_start;
-
-       /* Users pass the RAR handle as the mmap() offset parameter. */
-       unsigned long const handle = vma->vm_pgoff << PAGE_SHIFT;
-
-       struct memrar_rar_info * const rar = memrar_get_rar_info(handle);
-       unsigned long pfn;
-
-       /* Only allow priviledged apps to go poking around this way */
-       if (!capable(CAP_SYS_RAWIO))
-               return -EPERM;
-
-       /* Invalid RAR handle or size passed to mmap(). */
-       if (rar == NULL
-           || handle == 0
-           || size > (handle - (unsigned long) rar->iobase))
-               return -EINVAL;
-
-       /*
-        * Retrieve physical address corresponding to the RAR handle,
-        * and convert it to a page frame.
-        */
-       pfn = memrar_get_physical_address(rar, handle) >> PAGE_SHIFT;
-
-
-       pr_debug("memrar: mapping RAR range [0x%lx, 0x%lx) into user space.\n",
-                handle,
-                handle + size);
-
-       /*
-        * Map RAR memory into user space.  This is really only useful
-        * for debugging purposes since the memory won't be
-        * accessible, i.e. reads return zero and writes are ignored,
-        * when RAR access control is enabled.
-        */
-       if (remap_pfn_range(vma,
-                           vma->vm_start,
-                           pfn,
-                           size,
-                           vma->vm_page_prot))
-               return -EAGAIN;
-
-       /* vma->vm_ops = &memrar_mem_ops; */
-
-       return 0;
-}
-
-/**
- *     memrar_open             -       device open method
- *     @inode: inode to open
- *     @filp: file handle
- *
- *     As we support multiple arbitary opens there is no work to be done
- *     really.
- */
-
-static int memrar_open(struct inode *inode, struct file *filp)
-{
-       nonseekable_open(inode, filp);
-       return 0;
-}
-
-/**
- *     memrar_release          -       close method for miscev
- *     @inode: inode of device
- *     @filp: handle that is going away
- *
- *     Free up all the regions that belong to this file handle. We use
- *     the handle as a natural Linux style 'lifetime' indicator and to
- *     ensure resources are not leaked when their owner explodes in an
- *     unplanned fashion.
- */
-
-static int memrar_release(struct inode *inode, struct file *filp)
-{
-       /* Free all regions associated with the given file handle. */
-
-       struct memrar_buffer_info *pos;
-       struct memrar_buffer_info *tmp;
-       int z;
-
-       for (z = 0; z != MRST_NUM_RAR; ++z) {
-               struct memrar_rar_info * const rar = &memrars[z];
-
-               mutex_lock(&rar->lock);
-
-               list_for_each_entry_safe(pos,
-                                        tmp,
-                                        &rar->buffers.list,
-                                        list) {
-                       if (filp == pos->owner)
-                               kref_put(&pos->refcount,
-                                        memrar_release_block_i);
-               }
-
-               mutex_unlock(&rar->lock);
-       }
-
-       return 0;
-}
-
-/**
- *     rar_reserve             -       reserve RAR memory
- *     @buffers: buffers to reserve
- *     @count: number wanted
- *
- *     Reserve a series of buffers in the RAR space. Returns the number of
- *     buffers successfully allocated
- */
-
-size_t rar_reserve(struct RAR_buffer *buffers, size_t count)
-{
-       struct RAR_buffer * const end =
-               (buffers == NULL ? buffers : buffers + count);
-       struct RAR_buffer *i;
-
-       size_t reserve_count = 0;
-
-       for (i = buffers; i != end; ++i) {
-               if (memrar_reserve_block(i, NULL) == 0)
-                       ++reserve_count;
-               else
-                       i->bus_address = 0;
-       }
-
-       return reserve_count;
-}
-EXPORT_SYMBOL(rar_reserve);
-
-/**
- *     rar_release             -       return RAR buffers
- *     @buffers: buffers to release
- *     @size: size of released block
- *
- *     Return a set of buffers to the RAR pool
- */
-
-size_t rar_release(struct RAR_buffer *buffers, size_t count)
-{
-       struct RAR_buffer * const end =
-               (buffers == NULL ? buffers : buffers + count);
-       struct RAR_buffer *i;
-
-       size_t release_count = 0;
-
-       for (i = buffers; i != end; ++i) {
-               u32 * const handle = &i->info.handle;
-               if (memrar_release_block(*handle) == 0) {
-                       /*
-                        * @todo We assume we should do this each time
-                        *       the ref count is decremented.  Should
-                        *       we instead only do this when the ref
-                        *       count has dropped to zero, and the
-                        *       buffer has been completely
-                        *       released/unmapped?
-                        */
-                       *handle = 0;
-                       ++release_count;
-               }
-       }
-
-       return release_count;
-}
-EXPORT_SYMBOL(rar_release);
-
-/**
- *     rar_handle_to_bus       -       RAR to bus address
- *     @buffers: RAR buffer structure
- *     @count: number of buffers to convert
- *
- *     Turn a list of RAR handle mappings into actual bus addresses. Note
- *     that when the device is locked down the bus addresses in question
- *     are not CPU accessible.
- */
-
-size_t rar_handle_to_bus(struct RAR_buffer *buffers, size_t count)
-{
-       struct RAR_buffer * const end =
-               (buffers == NULL ? buffers : buffers + count);
-       struct RAR_buffer *i;
-       struct memrar_buffer_info *pos;
-
-       size_t conversion_count = 0;
-
-       /*
-        * Find all bus addresses corresponding to the given handles.
-        *
-        * @todo Not liking this nested loop.  Optimize.
-        */
-       for (i = buffers; i != end; ++i) {
-               struct memrar_rar_info * const rar =
-                       memrar_get_rar_info(i->info.handle);
-
-               /*
-                * Check if we have a bogus handle, and then continue
-                * with remaining buffers.
-                */
-               if (rar == NULL) {
-                       i->bus_address = 0;
-                       continue;
-               }
-
-               mutex_lock(&rar->lock);
-
-               list_for_each_entry(pos, &rar->buffers.list, list) {
-                       struct RAR_block_info * const user_info =
-                               &pos->buffer.info;
-
-                       /*
-                        * Take into account handle offsets that may
-                        * have been added to the base handle, such as
-                        * in the following scenario:
-                        *
-                        *     u32 handle = base + offset;
-                        *     rar_handle_to_bus(handle);
-                        */
-
-                       if (i->info.handle >= user_info->handle
-                           && i->info.handle < (user_info->handle
-                                                + user_info->size)) {
-                               u32 const offset =
-                                       i->info.handle - user_info->handle;
-
-                               i->info.type = user_info->type;
-                               i->info.size = user_info->size - offset;
-                               i->bus_address =
-                                       pos->buffer.bus_address
-                                       + offset;
-
-                               /* Increment the reference count. */
-                               kref_get(&pos->refcount);
-
-                               ++conversion_count;
-                               break;
-                       } else {
-                               i->bus_address = 0;
-                       }
-               }
-
-               mutex_unlock(&rar->lock);
-       }
-
-       return conversion_count;
-}
-EXPORT_SYMBOL(rar_handle_to_bus);
-
-static const struct file_operations memrar_fops = {
-       .owner = THIS_MODULE,
-       .unlocked_ioctl = memrar_ioctl,
-       .mmap           = memrar_mmap,
-       .open           = memrar_open,
-       .release        = memrar_release,
-       .llseek         = no_llseek,
-};
-
-static struct miscdevice memrar_miscdev = {
-       .minor = MISC_DYNAMIC_MINOR,    /* dynamic allocation */
-       .name = "memrar",               /* /dev/memrar */
-       .fops = &memrar_fops
-};
-
-static char const banner[] __initdata =
-       KERN_INFO
-       "Intel RAR Handler: " MEMRAR_VER " initialized.\n";
-
-/**
- *     memrar_registration_callback    -       RAR obtained
- *     @rar: RAR number
- *
- *     We have been granted ownership of the RAR. Add it to our memory
- *     management tables
- */
-
-static int memrar_registration_callback(unsigned long rar)
-{
-       /*
-        * We initialize the RAR parameters early on so that we can
-        * discontinue memrar device initialization and registration
-        * if suitably configured RARs are not available.
-        */
-       return memrar_init_rar_resources(rar, memrar_miscdev.name);
-}
-
-/**
- *     memrar_init     -       initialise RAR support
- *
- *     Initialise support for RAR handlers. This may get loaded before
- *     the RAR support is activated, but the callbacks on the registration
- *     will handle that situation for us anyway.
- */
-
-static int __init memrar_init(void)
-{
-       int err;
-       int i;
-
-       printk(banner);
-
-       /*
-        * Some delayed initialization is performed in this driver.
-        * Make sure resources that are used during driver clean-up
-        * (e.g. during driver's release() function) are fully
-        * initialized before first use.  This is particularly
-        * important for the case when the delayed initialization
-        * isn't completed, leaving behind a partially initialized
-        * driver.
-        *
-        * Such a scenario can occur when RAR is not available on the
-        * platform, and the driver is release()d.
-        */
-       for (i = 0; i != ARRAY_SIZE(memrars); ++i) {
-               struct memrar_rar_info * const rar = &memrars[i];
-               mutex_init(&rar->lock);
-               INIT_LIST_HEAD(&rar->buffers.list);
-       }
-
-       err = misc_register(&memrar_miscdev);
-       if (err)
-               return err;
-
-       /* Now claim the two RARs we want */
-       err = register_rar(0, memrar_registration_callback, 0);
-       if (err)
-               goto fail;
-
-       err = register_rar(1, memrar_registration_callback, 1);
-       if (err == 0)
-               return 0;
-
-       /* It is possible rar 0 registered and allocated resources then rar 1
-          failed so do a full resource free */
-       memrar_fini_rar_resources();
-fail:
-       misc_deregister(&memrar_miscdev);
-       return err;
-}
-
-/**
- *     memrar_exit     -       unregister and unload
- *
- *     Unregister the device and then unload any mappings and release
- *     the RAR resources
- */
-
-static void __exit memrar_exit(void)
-{
-       misc_deregister(&memrar_miscdev);
-       memrar_fini_rar_resources();
-}
-
-
-module_init(memrar_init);
-module_exit(memrar_exit);
-
-
-MODULE_AUTHOR("Ossama Othman <ossama.othman@intel.com>");
-MODULE_DESCRIPTION("Intel Restricted Access Region Handler");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(MEMRAR_VER);
-
-
-
-/*
-  Local Variables:
-    c-file-style: "linux"
-  End:
-*/
index de284c28faa123ad4fa749e94105d45490c2038e..b9acf5299297788348069d11eec4a9d6e85b1d11 100644 (file)
@@ -696,7 +696,7 @@ void mdp4_mixer_stage_down(struct mdp4_overlay_pipe *pipe)
        stage = pipe->mixer_stage;
        mixer = pipe->mixer_num;
 
-       if (pipe != ctrl->stage[mixer][stage])  /* not runing */
+       if (pipe != ctrl->stage[mixer][stage])  /* not running */
                return;
 
        /* MDP_LAYERMIXER_IN_CFG, shard by both mixer 0 and 1  */
index 3dc1c0cc61f9c43c1147b33b79837fe6d168a258..3a687c7a5695b79e5b45851ace78202f95c77267 100644 (file)
@@ -200,7 +200,7 @@ static void mdp_ppp_flush_dirty_djobs(void *cond)
                msm_fb_ensure_mem_coherency_after_dma(job->info, &job->req, 1);
 
                /* Schedule jobs for cleanup
-                * A seperate worker thread does this */
+                * A separate worker thread does this */
                queue_delayed_work(mdp_ppp_djob_clnr, &job->cleaner,
                        mdp_timer_duration);
        }
index a2f29d464051a53b86bb43158bd4c7716b01d63c..e7ef836eb8de62476c5e710bd88a726d933df490 100644 (file)
@@ -859,7 +859,7 @@ static int msm_fb_register(struct msm_fb_data_type *mfd)
                break;
 
        default:
-               MSM_FB_ERR("msm_fb_init: fb %d unkown image type!\n",
+               MSM_FB_ERR("msm_fb_init: fb %d unknown image type!\n",
                           mfd->index);
                return ret;
        }
@@ -1793,9 +1793,9 @@ static int msmfb_async_blit(struct fb_info *info, void __user *p)
 /*
  * NOTE: The userspace issues blit operations in a sequence, the sequence
  * start with a operation marked START and ends in an operation marked
- * END. It is guranteed by the userspace that all the blit operations
+ * END. It is guaranteed by the userspace that all the blit operations
  * between START and END are only within the regions of areas designated
- * by the START and END operations and that the userspace doesnt modify
+ * by the START and END operations and that the userspace doesn't modify
  * those areas. Hence it would be enough to perform barrier/cache operations
  * only on the START and END operations.
  */
index 59d2214222939dc9f245260f82dbd7ec1aa1a54e..614653b686a0f29e87315ee04233d20a569793f4 100644 (file)
@@ -214,7 +214,7 @@ static inline int __cvmx_cmd_queue_get_index(cvmx_cmd_queue_id_t queue_id)
        /*
         * Warning: This code currently only works with devices that
         * have 256 queues or less. Devices with more than 16 queues
-        * are layed out in memory to allow cores quick access to
+        * are laid out in memory to allow cores quick access to
         * every 16th queue. This reduces cache thrashing when you are
         * running 16 queues per port to support lockless operation.
         */
index 50a8c91778fa76e99a20d30915c6f93079c64506..1f04f965873688674402976d1a2c73d183567c8d 100644 (file)
@@ -195,7 +195,7 @@ static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool)
        cvmx_fpa_iobdma_data_t data;
 
        /*
-        * Hardware only uses 64 bit alligned locations, so convert
+        * Hardware only uses 64 bit aligned locations, so convert
         * from byte address to 64-bit index
         */
        data.s.scraddr = scr_addr >> 3;
index 611a8e03c216d549062c8f0ffbb49e4ce7a053eb..b465bec4355329ade772797cedef1322f3e53138 100644 (file)
@@ -81,7 +81,7 @@ extern int cvmx_helper_board_get_mii_address(int ipd_port);
  * @phy_addr:  The address of the PHY to program
  * @link_flags:
  *                  Flags to control autonegotiation.  Bit 0 is autonegotiation
- *                  enable/disable to maintain backware compatability.
+ *                  enable/disable to maintain backware compatibility.
  * @link_info: Link speed to program. If the speed is zero and autonegotiation
  *                  is enabled, all possible negotiation speeds are advertised.
  *
index 41ef8a40bb03c5e1aaf91d2566fa9646efe663f4..131182bf5abb699d5966a4f92e0f65934e1d0bb6 100644 (file)
@@ -362,7 +362,7 @@ int __cvmx_helper_setup_gmx(int interface, int num_ports)
 }
 
 /**
- * Returns the IPD/PKO port number for a port on teh given
+ * Returns the IPD/PKO port number for a port on the given
  * interface.
  *
  * @interface: Interface to use
index 591506643d02dd5be7f56028e91e13e6d14261b2..e9c5c836ceffdfab287ecb7233b233fa93f55ef2 100644 (file)
@@ -691,7 +691,7 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void)
 
                if (!retry_cnt)
                        cvmx_dprintf("WARNING: FIX_IPD_PTR_ALIGNMENT "
-                                    "get_work() timeout occured.\n");
+                                    "get_work() timeout occurred.\n");
 
                /* Free packet */
                if (work)
index f45dc49512f2ea04ddd4383a4cbb16c9500f1691..d88ab8d8e37d2cf05b7c567302b519b3fc2f4c53 100644 (file)
@@ -254,7 +254,7 @@ typedef union {
 #define MDIO_CLAUSE_45_READ_INC 2
 #define MDIO_CLAUSE_45_READ     3
 
-/* MMD identifiers, mostly for accessing devices withing XENPAK modules. */
+/* MMD identifiers, mostly for accessing devices within XENPAK modules. */
 #define CVMX_MMD_DEVICE_PMA_PMD      1
 #define CVMX_MMD_DEVICE_WIS          2
 #define CVMX_MMD_DEVICE_PCS          3
index f068c1982497cb67a1624ad73fbd21cf13981fd3..de3412aada5d8c2ad09928660922150af9627fca 100644 (file)
@@ -98,7 +98,7 @@ typedef enum {
        /*
         * PKO doesn't do any locking. It is the responsibility of the
         * application to make sure that no other core is accessing
-        * the same queue at the smae time
+        * the same queue at the same time
         */
        CVMX_PKO_LOCK_NONE = 0,
        /*
@@ -324,7 +324,7 @@ static inline void cvmx_pko_doorbell(uint64_t port, uint64_t queue,
  * - CVMX_PKO_LOCK_NONE
  *      - PKO doesn't do any locking. It is the responsibility
  *          of the application to make sure that no other core
- *          is accessing the same queue at the smae time.
+ *          is accessing the same queue at the same time.
  * - CVMX_PKO_LOCK_ATOMIC_TAG
  *      - PKO performs an atomic tagswitch to insure exclusive
  *          access to the output queue. This will maintain
index bf9e069a898ca84aeaee5c9536d69fb1b08107c7..999aefe3274c5ef07f463e1edde19161d911623c 100644 (file)
@@ -1492,8 +1492,8 @@ static inline void cvmx_pow_tag_sw_full(cvmx_wqe_t *wqp, uint32_t tag,
 /**
  * Switch to a NULL tag, which ends any ordering or
  * synchronization provided by the POW for the current
- * work queue entry.  This operation completes immediatly,
- * so completetion should not be waited for.
+ * work queue entry.  This operation completes immediately,
+ * so completion should not be waited for.
  * This function does NOT wait for previous tag switches to complete,
  * so the caller must ensure that any previous tag switches have completed.
  */
@@ -1532,8 +1532,8 @@ static inline void cvmx_pow_tag_sw_null_nocheck(void)
 /**
  * Switch to a NULL tag, which ends any ordering or
  * synchronization provided by the POW for the current
- * work queue entry.  This operation completes immediatly,
- * so completetion should not be waited for.
+ * work queue entry.  This operation completes immediately,
+ * so completion should not be waited for.
  * This function waits for any pending tag switches to complete
  * before requesting the switch to NULL.
  */
@@ -1672,7 +1672,7 @@ static inline void cvmx_pow_set_priority(uint64_t core_num,
 
 /**
  * Performs a tag switch and then an immediate deschedule. This completes
- * immediatly, so completion must not be waited for.  This function does NOT
+ * immediately, so completion must not be waited for.  This function does NOT
  * update the wqe in DRAM to match arguments.
  *
  * This function does NOT wait for any prior tag switches to complete, so the
@@ -1758,7 +1758,7 @@ static inline void cvmx_pow_tag_sw_desched_nocheck(
 
 /**
  * Performs a tag switch and then an immediate deschedule. This completes
- * immediatly, so completion must not be waited for.  This function does NOT
+ * immediately, so completion must not be waited for.  This function does NOT
  * update the wqe in DRAM to match arguments.
  *
  * This function waits for any prior tag switches to complete, so the
index 23467563fe572509b2d3c67fb16129469b6c8802..c745a72a05940e9c4d3d6c4e90af03e0df20ffcc 100644 (file)
@@ -55,7 +55,7 @@ static inline int INTERFACE(int ipd_port)
                return 2;
        else if (ipd_port < 40) /* Interface 3 for loopback */
                return 3;
-       else if (ipd_port == 40)        /* Non existant interface for POW0 */
+       else if (ipd_port == 40)        /* Non existent interface for POW0 */
                return 4;
        else
                panic("Illegal ipd_port %d passed to INTERFACE\n", ipd_port);
index f1082f50fdcebcf64a1a70f8a69cb9c6c45f967b..b05306766870d4f0f8410e5189eba2ace54f9185 100644 (file)
@@ -9,7 +9,7 @@ config FB_OLPC_DCON
 
 config FB_OLPC_DCON_1
        bool "OLPC XO-1 DCON support"
-       depends on FB_OLPC_DCON
+       depends on FB_OLPC_DCON && GPIO_CS5535
        default y
        ---help---
          Enable support for the DCON in XO-1 model laptops.  The kernel
index b154be7a2fe64dc513df57de2dc7379086e88d97..b5d21f6497f9ef14aa4176550615a6203c6a11c8 100644 (file)
@@ -80,7 +80,7 @@ static int dcon_init_xo_1(struct dcon_priv *dcon)
        lob &= ~(1 << DCON_IRQ);
        outb(lob, 0x4d0);
 
-       /* Register the interupt handler */
+       /* Register the interrupt handler */
        if (request_irq(DCON_IRQ, &dcon_interrupt, 0, "DCON", dcon)) {
                printk(KERN_ERR "olpc-dcon: failed to request DCON's irq\n");
                goto err_req_irq;
index e213b63f8116751ff00e46a83c60a02c930af2d8..7aa9b1a45bd6e7bd24e40cf36c95b9a68fafef57 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <linux/acpi.h>
+#include <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/gpio.h>
 #include <asm/olpc.h>
index 6540864216c8fd1914544f5d988aef8082742250..5cca24fcf6caee8396f63e190c6f242252cb29cf 100644 (file)
@@ -745,7 +745,7 @@ static int pohmelfs_crypto_init_handshake(struct pohmelfs_sb *psb)
 
        /*
         * At this point NETFS_CAPABILITIES response command
-        * should setup superblock in a way, which is acceptible
+        * should setup superblock in a way, which is acceptable
         * for both client and server, so if server refuses connection,
         * it will send error in transaction response.
         */
index c45b09ed0d35b6a779d10a45dedc6307576ec84b..ca098cabc2bc8141b68aee51f3f210fbfb8a7c7a 100644 (file)
@@ -148,7 +148,7 @@ static struct usb_driver quausb2_usb_driver = {
  * value of the line status flags from the port
  * @shadowMSR: Last received state of the modem status register, holds
  * the value of the modem status received from the port
- * @rcv_flush: Flag indicating that a receive flush has occured on
+ * @rcv_flush: Flag indicating that a receive flush has occurred on
  * the hardware.
  * @xmit_flush: Flag indicating that a transmit flush has been processed by
  * the hardware.
@@ -156,7 +156,7 @@ static struct usb_driver quausb2_usb_driver = {
  * includes the size (excluding header) of URBs that have been submitted but
  * have not yet been sent to to the device, and bytes that have been sent out
  * of the port but not yet reported sent by the "xmit_empty" messages (which
- * indicate the number of bytes sent each time they are recieved, despite the
+ * indicate the number of bytes sent each time they are received, despite the
  * misleading name).
  * - Starts at zero when port is initialised.
  * - is incremented by the size of the data to be written (no headers)
@@ -649,7 +649,7 @@ static void qt2_close(struct usb_serial_port *port)
        /* although the USB side is now empty, the UART itself may
         * still be pushing characters out over the line, so we have to
         * wait testing the actual line status until the lines change
-        * indicating that the data is done transfering. */
+        * indicating that the data is done transferring. */
        /* FIXME: slow this polling down so it doesn't run the USB bus flat out
         * if it actually has to spend any time in this loop (which it normally
         * doesn't because the buffer is nearly empty) */
@@ -726,7 +726,7 @@ static int qt2_write(struct tty_struct *tty, struct usb_serial_port *port,
                return 0;
        } else if (port_extra->tx_pending_bytes >= QT2_FIFO_DEPTH) {
                /* buffer is full (==). > should not occur, but would indicate
-                * that an overflow had occured */
+                * that an overflow had occurred */
                dbg("%s(): port transmit buffer is full!", __func__);
                /* schedule_work(&port->work); commented in vendor driver */
                return 0;
@@ -823,7 +823,7 @@ static int qt2_write_room(struct tty_struct *tty)
         * reduce the free space count by the size of the dispatched write.
         * When a "transmit empty" message comes back up the USB read stream,
         * we decrement the count by the number of bytes reported sent, thus
-        * keeping track of the difference between sent and recieved bytes.
+        * keeping track of the difference between sent and received bytes.
         */
 
        room = (QT2_FIFO_DEPTH - port_extra->tx_pending_bytes);
@@ -1795,7 +1795,7 @@ static void qt2_process_rx_char(struct usb_serial_port *port,
        }
 }
 
-/** @brief Retreive the value of a register from the device
+/** @brief Retrieve the value of a register from the device
  *
  * Issues a GET_REGISTER vendor-spcific request over the USB control
  * pipe to obtain a value back from a specific register on a specific
index 98454df30a221b8bc6e8069917e2a456497ce516..a52221f1294e7c2bfeda0c41d998d1766da2f39c 100644 (file)
                        DBGPRINT_ERR("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff);   \
                }                                                                                                                                       \
        } else {                                                        \
-               DBGPRINT_ERR("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n");    \
+               DBGPRINT_ERR("****** BBP_Write_Latch Buffer exceeds max boundary ****** \n");   \
        }                                                                                                                                               \
 }
 #endif /* RTMP_MAC_PCI // */
index 62f6f6be4acb84d20e3a8bda0c459491f21b438a..133bc1b87d2cf38fce13dd36009ce952a7036d0b 100644 (file)
@@ -28,7 +28,7 @@
 #include "../rt_config.h"
 #include <linux/kernel.h>
 
-#define BA_ORI_INIT_SEQ                (pEntry->TxSeq[TID])    /*1                        // inital sequence number of BA session */
+#define BA_ORI_INIT_SEQ                (pEntry->TxSeq[TID])    /*1                        // initial sequence number of BA session */
 
 #define ORI_SESSION_MAX_RETRY  8
 #define ORI_BA_SESSION_TIMEOUT (2000)  /* ms */
@@ -1487,7 +1487,7 @@ static void ba_enqueue_reordering_packet(struct rt_rtmp_adapter *pAd,
 
                /*
                 * flush all pending reordering mpdus
-                * and receving mpdu to upper layer
+                * and receiving mpdu to upper layer
                 * make tcp/ip to take care reordering mechanism
                 */
                /*ba_refresh_reordering_mpdus(pAd, pBAEntry); */
index a99879bada4279a5843ff3d3409b908f6c8f8a0b..d70d229a6e53f2e66dc7ef3749c62c4278bb3eee 100644 (file)
@@ -858,7 +858,7 @@ static uint32 KT1[256];
 static uint32 KT2[256];
 static uint32 KT3[256];
 
-/* platform-independant        32-bit integer manipulation     macros */
+/* platform-independent        32-bit integer manipulation     macros */
 
 #define        GET_UINT32(n,b,i)                                               \
 {                                                                                              \
index 24f439378439a8bed39a5e9b566a5688bbe48ad7..727f79929258db751dbb66153177453b93e60b85 100644 (file)
@@ -223,7 +223,7 @@ int RT_CfgSetWepKey(struct rt_rtmp_adapter *pAd,
         pAdapter       Pointer to our adapter
         keyString      WPA pre-shared key string
         pHashStr       String used for password hash function
-        hashStrLen     Lenght of the hash string
+        hashStrLen     Length of the hash string
         pPMKBuf                Output buffer of WPAPSK key
 
     Return:
index f6c193cb84ee6a946f66373978aa9179d82e3f39..33799e1449aed5ddbf0c9eb5baf7764e0749ad8d 100644 (file)
@@ -337,7 +337,7 @@ int MlmeHardTransmitMgmtRing(struct rt_rtmp_adapter *pAd,
 
        /* */
        /* In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame */
-       /* Data-Null packets alse pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */
+       /* Data-Null packets also pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */
 /*      if ((pHeader_802_11->FC.Type != BTYPE_DATA) && (pHeader_802_11->FC.Type != BTYPE_CNTL)) */
        {
                if ((pHeader_802_11->FC.SubType == SUBTYPE_ACTION) ||
@@ -1933,7 +1933,7 @@ BOOLEAN RTMPCheckEtherType(struct rt_rtmp_adapter *pAd, void *pPacket)
 
        if (TypeLen <= 1500) {  /* 802.3, 802.3 LLC */
                /*
-                  DestMAC(6) + SrcMAC(6) + Lenght(2) +
+                  DestMAC(6) + SrcMAC(6) + Length(2) +
                   DSAP(1) + SSAP(1) + Control(1) +
                   if the DSAP = 0xAA, SSAP=0xAA, Contorl = 0x03, it has a 5-bytes SNAP header.
                   => + SNAP (5, OriginationID(3) + etherType(2))
index 7af59ff9e2208f1a478a588ef2a8a8b9ada93a5d..f01a51c381f1d9e218b65ff79724bfb966250050 100644 (file)
@@ -438,13 +438,13 @@ int RTMPCheckRxError(struct rt_rtmp_adapter *pAd,
        /* Add Rx size to channel load counter, we should ignore error counts */
        pAd->StaCfg.CLBusyBytes += (pRxD->SDL0 + 14);
 
-       /* Drop ToDs promiscous frame, it is opened due to CCX 2 channel load statistics */
+       /* Drop ToDs promiscuous frame, it is opened due to CCX 2 channel load statistics */
        if (pHeader != NULL) {
                if (pHeader->FC.ToDs) {
                        return (NDIS_STATUS_FAILURE);
                }
        }
-       /* Drop not U2M frames, cant's drop here because we will drop beacon in this case */
+       /* Drop not U2M frames, can't drop here because we will drop beacon in this case */
        /* I am kind of doubting the U2M bit operation */
        /* if (pRxD->U2M == 0) */
        /*      return(NDIS_STATUS_FAILURE); */
@@ -939,7 +939,7 @@ int MlmeHardTransmitTxRing(struct rt_rtmp_adapter *pAd,
        /* */
        /* */
        /* In WMM-UAPSD, mlme frame should be set psm as power saving but probe request frame */
-       /* Data-Null packets alse pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */
+       /* Data-Null packets also pass through MMRequest in RT2860, however, we hope control the psm bit to pass APSD */
        if (pHeader_802_11->FC.Type != BTYPE_DATA) {
                if ((pHeader_802_11->FC.SubType == SUBTYPE_PROBE_REQ)
                    || !(pAd->CommonCfg.bAPSDCapable
index 7c56c2f519876dfe226a0c034e6346fb41af5564..83a62faa7e5731255f793bbe873b52f2f95d54fc 100644 (file)
@@ -702,7 +702,7 @@ Arguments:
        *pRxPending                     pending received packet flag
 
 Return Value:
-    the recieved packet
+    the received packet
 
 Note:
 ========================================================================
@@ -850,7 +850,7 @@ int RTMPCheckRxError(struct rt_rtmp_adapter *pAd,
        /* Add Rx size to channel load counter, we should ignore error counts */
        pAd->StaCfg.CLBusyBytes += (pRxWI->MPDUtotalByteCount + 14);
 
-       /* Drop ToDs promiscous frame, it is opened due to CCX 2 channel load statistics */
+       /* Drop ToDs promiscuous frame, it is opened due to CCX 2 channel load statistics */
        if (pHeader->FC.ToDs) {
                DBGPRINT_RAW(RT_DEBUG_ERROR, ("Err;FC.ToDs\n"));
                return NDIS_STATUS_FAILURE;
@@ -860,7 +860,7 @@ int RTMPCheckRxError(struct rt_rtmp_adapter *pAd,
                DBGPRINT_RAW(RT_DEBUG_ERROR, ("received packet too long\n"));
                return NDIS_STATUS_FAILURE;
        }
-       /* Drop not U2M frames, cant's drop here because we will drop beacon in this case */
+       /* Drop not U2M frames, can't drop here because we will drop beacon in this case */
        /* I am kind of doubting the U2M bit operation */
        /* if (pRxD->U2M == 0) */
        /*      return(NDIS_STATUS_FAILURE); */
index 21eed2507e1c8e29f2675b1f0591bcada4289d00..d06f0a6dc3793fcbcbb2fc757308ed0b2ff01fe5 100644 (file)
@@ -1446,7 +1446,7 @@ BOOLEAN RT28xxPciAsicRadioOff(struct rt_rtmp_adapter *pAd,
           pAd->CheckDmaBusyCount = 0;
           }
         */
-/*KH Debug:My original codes have the follwoing codes, but currecnt codes do not have it. */
+/*KH Debug:My original codes have the following codes, but currecnt codes do not have it. */
 /* Disable for stability. If PCIE Link Control is modified for advance power save, re-covery this code segment. */
        RTMP_IO_WRITE32(pAd, PBF_SYS_CTRL, 0x1280);
 /*OPSTATUS_SET_FLAG(pAd, fOP_STATUS_CLKSELECT_40MHZ); */
index 6b003c9034449b2c5c0346dab7a7e97adf41c17b..3bfb4ad00c1ab2c0663998c9f25646fe89847fc2 100644 (file)
@@ -67,7 +67,7 @@ BOOLEAN MlmeAddBAReqSanity(struct rt_rtmp_adapter *pAd,
 
        if ((MsgLen != sizeof(struct rt_mlme_addba_req))) {
                DBGPRINT(RT_DEBUG_TRACE,
-                        ("MlmeAddBAReqSanity fail - message lenght not correct.\n"));
+                        ("MlmeAddBAReqSanity fail - message length not correct.\n"));
                return FALSE;
        }
 
@@ -104,7 +104,7 @@ BOOLEAN MlmeDelBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned lon
 
        if ((MsgLen != sizeof(struct rt_mlme_delba_req))) {
                DBGPRINT(RT_DEBUG_ERROR,
-                        ("MlmeDelBAReqSanity fail - message lenght not correct.\n"));
+                        ("MlmeDelBAReqSanity fail - message length not correct.\n"));
                return FALSE;
        }
 
index f84194da47bce9e5b93f58c4deb7050c0fff73b8..aefe1b774650ef66b131cf88e3b7ac7107b56702 100644 (file)
@@ -694,7 +694,7 @@ void ScanNextChannel(struct rt_rtmp_adapter *pAd)
                        MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
                        MlmeFreeMemory(pAd, pOutBuffer);
                }
-               /* For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe reponse */
+               /* For SCAN_CISCO_PASSIVE, do nothing and silently wait for beacon or other probe response */
 
                pAd->Mlme.SyncMachine.CurrState = SCAN_LISTEN;
        }
index 0040f45b629bae30e2446145b90a4c09dfa8243e..616ebec50c61e2062b784950c652e92b4c7fca7e 100644 (file)
@@ -1222,7 +1222,7 @@ void PeerGroupMsg2Action(struct rt_rtmp_adapter *pAd,
 
        Note:
                All these constants are defined in wpa.h
-               For supplicant, there is only EAPOL Key message avaliable
+               For supplicant, there is only EAPOL Key message available
 
        ========================================================================
 */
@@ -1267,7 +1267,7 @@ BOOLEAN WpaMsgTypeSubst(u8 EAPType, int * MsgType)
                int             prefix_len      -       the length of the label
                u8      *data           -       a specific data with variable length
                int             data_len        -       the length of a specific data
-               int             len                     -       the output lenght
+               int             len                     -       the output length
 
        Return Value:
                u8      *output         -       the calculated result
index d9c3fd5c2166c4df407265308ef6ac6faba065f5..e48eac0f3a291650208a35e9eb69883badf7a0de 100644 (file)
@@ -632,7 +632,7 @@ void MlmeHalt(struct rt_rtmp_adapter *pAd)
                        pChipOps->AsicHaltAction(pAd);
        }
 
-       RTMPusecDelay(5000);    /*  5 msec to gurantee Ant Diversity timer canceled */
+       RTMPusecDelay(5000);    /*  5 msec to guarantee Ant Diversity timer canceled */
 
        MlmeQueueDestroy(&pAd->Mlme.Queue);
        NdisFreeSpinLock(&pAd->Mlme.TaskLock);
@@ -1107,14 +1107,14 @@ void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd,
                                        *pInitTxRateIdx =
                                            RateSwitchTable11N1S[1];
                                        DBGPRINT_RAW(RT_DEBUG_ERROR,
-                                                    ("DRS: unkown mode,default use 11N 1S AP \n"));
+                                                    ("DRS: unknown mode,default use 11N 1S AP \n"));
                                } else {
                                        *ppTable = RateSwitchTable11N2S;
                                        *pTableSize = RateSwitchTable11N2S[0];
                                        *pInitTxRateIdx =
                                            RateSwitchTable11N2S[1];
                                        DBGPRINT_RAW(RT_DEBUG_ERROR,
-                                                    ("DRS: unkown mode,default use 11N 2S AP \n"));
+                                                    ("DRS: unknown mode,default use 11N 2S AP \n"));
                                }
                        } else {
                                if (pAd->CommonCfg.TxStream == 1) {
@@ -1123,7 +1123,7 @@ void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd,
                                        *pInitTxRateIdx =
                                            RateSwitchTable11N1S[1];
                                        DBGPRINT_RAW(RT_DEBUG_ERROR,
-                                                    ("DRS: unkown mode,default use 11N 1S AP \n"));
+                                                    ("DRS: unknown mode,default use 11N 1S AP \n"));
                                } else {
                                        *ppTable = RateSwitchTable11N2SForABand;
                                        *pTableSize =
@@ -1131,11 +1131,11 @@ void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd,
                                        *pInitTxRateIdx =
                                            RateSwitchTable11N2SForABand[1];
                                        DBGPRINT_RAW(RT_DEBUG_ERROR,
-                                                    ("DRS: unkown mode,default use 11N 2S AP \n"));
+                                                    ("DRS: unknown mode,default use 11N 2S AP \n"));
                                }
                        }
                        DBGPRINT_RAW(RT_DEBUG_ERROR,
-                                    ("DRS: unkown mode (SupRateLen=%d, ExtRateLen=%d, MCSSet[0]=0x%x, MCSSet[1]=0x%x)\n",
+                                    ("DRS: unknown mode (SupRateLen=%d, ExtRateLen=%d, MCSSet[0]=0x%x, MCSSet[1]=0x%x)\n",
                                      pAd->StaActive.SupRateLen,
                                      pAd->StaActive.ExtRateLen,
                                      pAd->StaActive.SupportedPhyInfo.MCSSet[0],
@@ -1368,7 +1368,7 @@ void STAMlmePeriodicExec(struct rt_rtmp_adapter *pAd)
                                        if ((pAd->StaCfg.LastScanTime +
                                             10 * OS_HZ) < pAd->Mlme.Now32) {
                                                DBGPRINT(RT_DEBUG_TRACE,
-                                                        ("MMCHK - Roaming, No eligable entry, try new scan!\n"));
+                                                        ("MMCHK - Roaming, No eligible entry, try new scan!\n"));
                                                pAd->StaCfg.ScanCnt = 2;
                                                pAd->StaCfg.LastScanTime =
                                                    pAd->Mlme.Now32;
@@ -2828,7 +2828,7 @@ void UpdateBasicRateBitmap(struct rt_rtmp_adapter *pAdapter)
 
 /* IRQL = PASSIVE_LEVEL */
 /* IRQL = DISPATCH_LEVEL */
-/* bLinkUp is to identify the inital link speed. */
+/* bLinkUp is to identify the initial link speed. */
 /* TRUE indicates the rate update at linkup, we should not try to set the rate at 54Mbps. */
 void MlmeUpdateTxRates(struct rt_rtmp_adapter *pAd, IN BOOLEAN bLinkUp, u8 apidx)
 {
index d359a14f5d4d792a5681ee8d97e8959d7af1a089..5fa193eac0d33427bd5ecdd08012a86b3b1c5e7b 100644 (file)
@@ -2037,7 +2037,7 @@ void NICUpdateFifoStaCounters(struct rt_rtmp_adapter *pAd)
 
                        pEntry->FIFOCount = 0;
                        pEntry->OneSecTxNoRetryOkCount++;
-                       /* update NoDataIdleCount when sucessful send packet to STA. */
+                       /* update NoDataIdleCount when successful send packet to STA. */
                        pEntry->NoDataIdleCount = 0;
                        pEntry->ContinueTxFailCnt = 0;
                }
@@ -2516,7 +2516,7 @@ void UserCfgInit(struct rt_rtmp_adapter *pAd)
        /*pAd->TurnAggrBulkInCount = 0; */
        pAd->bUsbTxBulkAggre = 0;
 
-       /* init as unsed value to ensure driver will set to MCU once. */
+       /* init as unused value to ensure driver will set to MCU once. */
        pAd->LedIndicatorStrength = 0xFF;
 
        pAd->CommonCfg.MaxPktOneTxBulk = 2;
@@ -3076,11 +3076,11 @@ void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status)
        ========================================================================
 
        Routine Description:
-               Set LED Signal Stregth
+               Set LED Signal Strength
 
        Arguments:
                pAd                                             Pointer to our adapter
-               Dbm                                             Signal Stregth
+               Dbm                                             Signal Strength
 
        Return Value:
                None
@@ -3090,7 +3090,7 @@ void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status)
        Note:
                Can be run on any IRQL level.
 
-               According to Microsoft Zero Config Wireless Signal Stregth definition as belows.
+               According to Microsoft Zero Config Wireless Signal Strength definition as belows.
                <= -90  No Signal
                <= -81  Very Low
                <= -71  Low
@@ -3118,7 +3118,7 @@ void RTMPSetSignalLED(struct rt_rtmp_adapter *pAd, IN NDIS_802_11_RSSI Dbm)
                        nLed = 31;
 
                /* */
-               /* Update Signal Stregth to firmware if changed. */
+               /* Update Signal Strength to firmware if changed. */
                /* */
                if (pAd->LedIndicatorStrength != nLed) {
                        AsicSendCommandToMcu(pAd, 0x51, 0xff, nLed,
@@ -3166,7 +3166,7 @@ void RTMPEnableRxTx(struct rt_rtmp_adapter *pAd)
                if (pAd->CommonCfg.PSPXlink)
                        rx_filter_flag = PSPXLINK;
                else
-                       rx_filter_flag = STANORMAL;     /* Staion not drop control frame will fail WiFi Certification. */
+                       rx_filter_flag = STANORMAL;     /* Station not drop control frame will fail WiFi Certification. */
                RTMP_IO_WRITE32(pAd, RX_FILTR_CFG, rx_filter_flag);
        }
 
index c0d2f428069c171420903092cb205b82d3a44435..ceb622df12d7a1faf4fb4157fbbd8d4773a8d0d9 100644 (file)
@@ -1058,8 +1058,8 @@ static void InsertMeasureReqIE(struct rt_rtmp_adapter *pAd,
                3. Measure Token.
                4. Measure Request Mode.
                5. Measure Request Type.
-               6. Length of Report Infomation
-               7. Pointer of Report Infomation Buffer.
+               6. Length of Report Information
+               7. Pointer of Report Information Buffer.
 
        Return  : None.
        ==========================================================================
@@ -1400,7 +1400,7 @@ static void StartDFSProcedure(struct rt_rtmp_adapter *pAd,
        Parametrs:
                1. MLME message containing the received frame
                2. message length.
-               3. Channel switch announcement infomation buffer.
+               3. Channel switch announcement information buffer.
 
        Return  : None.
        ==========================================================================
@@ -1465,7 +1465,7 @@ static BOOLEAN PeerChSwAnnSanity(struct rt_rtmp_adapter *pAd,
        Parametrs:
                1. MLME message containing the received frame
                2. message length.
-               3. Measurement request infomation buffer.
+               3. Measurement request information buffer.
 
        Return  : None.
        ==========================================================================
@@ -1538,8 +1538,8 @@ static BOOLEAN PeerMeasureReqSanity(struct rt_rtmp_adapter *pAd,
        Parametrs:
                1. MLME message containing the received frame
                2. message length.
-               3. Measurement report infomation buffer.
-               4. basic report infomation buffer.
+               3. Measurement report information buffer.
+               4. basic report information buffer.
 
        Return  : None.
        ==========================================================================
index cd1ee3d7a91d0b01c81b737c246c858b10a542b8..a285851692ee8dd6cb439b29f317d1add9764bdb 100644 (file)
@@ -374,7 +374,7 @@ struct PACKED rt_sec_cha_offset_ie {
 struct rt_ht_phy_info {
        BOOLEAN bHtEnable;      /* If we should use ht rate. */
        BOOLEAN bPreNHt;        /* If we should use ht rate. */
-       /*Substract from HT Capability IE */
+       /*Subtract from HT Capability IE */
        u8 MCSSet[16];
 };
 
@@ -392,7 +392,7 @@ struct rt_ht_capability {
        u16 AmsduSize:1;        /* Max receiving A-MSDU size */
        u16 rsv:5;
 
-       /*Substract from Addiont HT INFO IE */
+       /*Subtract from Addiont HT INFO IE */
        u8 MaxRAmpduFactor:2;
        u8 MpduDensity:3;
        u8 ExtChanOffset:2;     /* Please note the difference with following     u8   NewExtChannelOffset; from 802.11n */
@@ -410,7 +410,7 @@ struct rt_ht_capability {
        u8 BSSCoexist2040;
 };
 
-/*   field in Addtional HT Information IE . */
+/*   field in Additional HT Information IE . */
 struct PACKED rt_add_htinfo {
        u8 ExtChanOffset:2;
        u8 RecomWidth:1;
@@ -857,7 +857,7 @@ struct rt_state_machine {
 };
 
 /* MLME AUX data structure that holds temporarliy settings during a connection attempt. */
-/* Once this attemp succeeds, all settings will be copy to pAd->StaActive. */
+/* Once this attempt succeeds, all settings will be copy to pAd->StaActive. */
 /* A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of */
 /* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */
 /* separate this under-trial settings away from pAd->StaActive so that once */
index e5b0427124301643b9b9bdfeb76863995ab88138..1583347fcd523d39b919e3a6456e770fedc89655 100644 (file)
@@ -283,7 +283,7 @@ BOOLEAN OS_Need_Clone_Packet(void)
        Arguments:
                pAd     Pointer to our adapter
                pInsAMSDUHdr    EWC A-MSDU format has extra 14-bytes header. if TRUE, insert this 14-byte hdr in front of MSDU.
-               *pSrcTotalLen                   return total packet length. This lenght is calculated with 802.3 format packet.
+               *pSrcTotalLen                   return total packet length. This length is calculated with 802.3 format packet.
 
        Return Value:
                NDIS_STATUS_SUCCESS
index e5fb67cd9a688e10a56c1605234e61dde8d419e5..f80ab4e6a0ac7df2ab83255c5ba329856215fef2 100644 (file)
@@ -619,7 +619,7 @@ IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance)
           Or kernel will panic after ifconfig ra0 down sometimes */
 
        /* */
-       /* Inital the Interrupt source. */
+       /* Initial the Interrupt source. */
        /* */
        IntSource.word = 0x00000000L;
 /*      McuIntSource.word = 0x00000000L; */
index d16b06a6e2ac711de11117cb6c872aa8ebc81f16..3c31340c946a7fe6ae0cf67aa4470924f845714d 100644 (file)
@@ -756,7 +756,7 @@ struct rt_tkip_key_info {
 /* */
 struct rt_private {
        u32 SystemResetCnt;     /* System reset counter */
-       u32 TxRingFullCnt;      /* Tx ring full occurrance number */
+       u32 TxRingFullCnt;      /* Tx ring full occurrence number */
        u32 PhyRxErrCnt;        /* PHY Rx error count, for debug purpose, might move to global counter */
        /* Variables for WEP encryption / decryption in rtmp_wep.c */
        u32 FCSCRC32;
@@ -925,7 +925,7 @@ struct rt_mlme {
   **************************************************************************/
 struct reordering_mpdu {
        struct reordering_mpdu *next;
-       void *pPacket;  /* coverted to 802.3 frame */
+       void *pPacket;  /* converted to 802.3 frame */
        int Sequence;           /* sequence number of MPDU */
        BOOLEAN bAMSDU;
 };
index 5717e12a954451612fe9fdeee7f5fe018841085c..49b1013e7a03081dc864c0a8a4574264ce995802 100644 (file)
@@ -2460,7 +2460,7 @@ int rt28xx_sta_ioctl(IN struct net_device *net_dev,
                }
        }
 
-       {                       /* determine this ioctl command is comming from which interface. */
+       {                       /* determine this ioctl command is coming from which interface. */
                pObj->ioctl_if_type = INT_MAIN;
                pObj->ioctl_if = MAIN_MBSSID;
        }
index d2746f8732e6884e72ec21ca21f1a10e77272f84..679b802d2169ce18658577708ab0cc783774bf4a 100644 (file)
@@ -298,7 +298,7 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
                                /*|| ( (ThisBulkSize != 0)  && (pTxWI->AMPDU == 0)) */
                                ) {
                                /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */
-                               /* For performence in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */
+                               /* For performance in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */
                                pHTTXContext->ENextBulkOutPosition =
                                    TmpBulkEndPos;
                                break;
@@ -311,7 +311,7 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd,
                                    TmpBulkEndPos;
                                break;
                        } else if (((pAd->BulkOutMaxPacketSize < 512) && ((ThisBulkSize & 0xfffff800) != 0)) /*|| ( (ThisBulkSize != 0)  && (pTxWI->AMPDU == 0)) */) {  /* For USB 1.1 or peer which didn't support AMPDU, limit the BulkOut size. */
-                               /* For performence in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */
+                               /* For performance in b/g mode, now just check for USB 1.1 and didn't care about the APMDU or not! 2008/06/04. */
                                pHTTXContext->ENextBulkOutPosition =
                                    TmpBulkEndPos;
                                break;
@@ -1016,7 +1016,7 @@ void RTUSBKickBulkOut(struct rt_rtmp_adapter *pAd)
                                RTUSBBulkOutNullFrame(pAd);
                        }
                }
-               /* 8. No data avaliable */
+               /* 8. No data available */
                else
                        ;
        }
index 69368862217c38162d88e3f5d53824c0685e0932..5b72bcdaa78f507101656f7d94beda8110375685 100644 (file)
@@ -71,7 +71,7 @@ void REPORT_AMSDU_FRAMES_TO_LLC(struct rt_rtmp_adapter *pAd,
 
        Routine Description:
                This subroutine will scan through releative ring descriptor to find
-               out avaliable free ring descriptor and compare with request size.
+               out available free ring descriptor and compare with request size.
 
        Arguments:
                pAd     Pointer to our adapter
index 1b3103fbf29c4c8fce6b7ab6ee80090afc322de6..3162aabbeb07811faaceb2cf5ccaaec7a1c29950 100644 (file)
@@ -1,6 +1,7 @@
 config R8187SE
        tristate "RealTek RTL8187SE Wireless LAN NIC driver"
        depends on PCI && WLAN
+       depends on m
        select WIRELESS_EXT
        select WEXT_PRIV
        select EEPROM_93CX6
index dc608c70deb1193125cbc642318c0205fdb41cf0..16aa6a8952fd35e136eb058a8f15e5752e80368a 100644 (file)
@@ -1099,7 +1099,7 @@ struct ieee80211_device {
         * not set. As some cards may have different HW queues that
         * one might want to use for data and management frames
         * the option to have two callbacks might be useful.
-        * This fucntion can't sleep.
+        * This function can't sleep.
         */
        int (*softmac_hard_start_xmit)(struct sk_buff *skb,
                               struct net_device *dev);
@@ -1138,9 +1138,9 @@ struct ieee80211_device {
         * it is called in a work_queue when swithcing to ad-hoc mode
         * or in behalf of iwlist scan when the card is associated
         * and root user ask for a scan.
-        * the fucntion stop_scan should stop both the syncro and
+        * the function stop_scan should stop both the syncro and
         * background scanning and can sleep.
-        * The fucntion start_scan should initiate the background
+        * The function start_scan should initiate the background
         * scanning and can't sleep.
         */
        void (*scan_syncro)(struct net_device *dev);
index 771e0196842e7f4b0af7d1c5d1910e8b52fecb07..736a1404f2872ea72f1a1dd995c14a4a39de16bf 100644 (file)
@@ -1954,7 +1954,7 @@ associate_complete:
 
 
 
-/* following are for a simplier TX queue management.
+/* following are for a simpler TX queue management.
  * Instead of using netif_[stop/wake]_queue the driver
  * will uses these two function (plus a reset one), that
  * will internally uses the kernel netif_* and takes
index 70ab0084e5f58ff61b82baf54b6fca561e3b6db8..2155a771c3397ead5f5566807ffccfa632872a80 100644 (file)
@@ -1591,7 +1591,7 @@ void rtl8180_rx(struct net_device *dev)
                priv->RSSI = RSSI;
                /* SQ translation formula is provided by SD3 DZ. 2006.06.27 */
                if (quality >= 127)
-                       quality = 1; /*0; */ /* 0 will cause epc to show signal zero , walk aroud now; */
+                       quality = 1; /*0; */ /* 0 will cause epc to show signal zero , walk around now; */
                else if (quality < 27)
                        quality = 100;
                else
@@ -3883,7 +3883,7 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
         * If the packet previous of the nic pointer has been
         * processed this doesn't matter: it will be checked
         * here at the next round. Anyway if no more packet are
-        * TXed no memory leak occour at all.
+        * TXed no memory leak occur at all.
         */
 
        switch (pri) {
index fc4907839c58956f78dfebb300c6859c2d0a6a78..261085d4b74aad6fa272d909cb20d3fc314040b3 100644 (file)
@@ -123,7 +123,7 @@ DoTxHighPower(
 //
 //     Description:
 //             Callback function of UpdateTxPowerWorkItem.
-//             Because of some event happend, e.g. CCX TPC, High Power Mechanism,
+//             Because of some event happened, e.g. CCX TPC, High Power Mechanism,
 //             We update Tx power of current channel again.
 //
 void rtl8180_tx_pw_wq (struct work_struct *work)
@@ -984,7 +984,7 @@ StaRateAdaptive87SE(
                {
                        priv->TryupingCount = 0;
                        //
-                       // When transfering from CCK to OFDM, DIG is an important issue.
+                       // When transferring from CCK to OFDM, DIG is an important issue.
                        //
                        if(priv->CurrentOperaRate == 22)
                                bUpdateInitialGain = true;
index 2a2afd51cf42a7a5413c7f367c27e9f903b4b586..3f09f76080afc6fa3ca997f747479aaf538c02bf 100644 (file)
@@ -378,7 +378,7 @@ static u32 read_rtl8225(struct net_device *dev, u8 adr)
        mask = (low2high) ? 0x01 : (((u32)0x01) << (12-1));
 
        /*
-        * We must set data pin to HW controled, otherwise RF can't driver it
+        * We must set data pin to HW controlled, otherwise RF can't driver it
         * and value RF register won't be able to read back properly.
         */
        write_nic_word(dev, RFPinsEnable, (oval2 & (~0x01)));
index 3bdf9b31cc4e2f4565d85a2e530effd56c0154ee..4b0b830f9ab6d9aad8dbaec0fb4c0636c1e896c3 100644 (file)
@@ -1273,7 +1273,7 @@ MgntDisconnectIBSS(
        /*
                Stop Beacon.
 
-               Vista add a Adhoc profile, HW radio off untill OID_DOT11_RESET_REQUEST
+               Vista add a Adhoc profile, HW radio off until OID_DOT11_RESET_REQUEST
                Driver would set MSR=NO_LINK, then HW Radio ON, MgntQueue Stuck.
                Because Bcn DMA isn't complete, mgnt queue would stuck until Bcn packet send.
 
index 2e64b239e24197c26dd16ba9eb4bb1e44cb7a008..750c347bfbe1fff91eff3ef34ba6b22dcca76912 100644 (file)
@@ -1,6 +1,7 @@
 config RTL8192E
        tristate "RealTek RTL8192E Wireless LAN NIC driver"
        depends on PCI && WLAN
+       depends on m
        select WIRELESS_EXT
        select WEXT_PRIV
        select CRYPTO
index 3ca388152616a3ac27a628a5787bb9cfae09621f..dbe21ab0dbf769bbd9afa0dc69c07dd36470a96e 100644 (file)
@@ -1967,7 +1967,7 @@ struct ieee80211_device {
         u16 prev_seq_ctl;       /* used to drop duplicate frames */
 
        /* map of allowed channels. 0 is dummy */
-       // FIXME: remeber to default to a basic channel plan depending of the PHY type
+       // FIXME: remember to default to a basic channel plan depending of the PHY type
 #ifdef ENABLE_DOT11D
        void* pDot11dInfo;
        bool bGlobalDomain;
@@ -2121,7 +2121,7 @@ struct ieee80211_device {
         * not set. As some cards may have different HW queues that
         * one might want to use for data and management frames
         * the option to have two callbacks might be useful.
-        * This fucntion can't sleep.
+        * This function can't sleep.
         */
        int (*softmac_hard_start_xmit)(struct sk_buff *skb,
                               struct ieee80211_device *ieee80211);
@@ -2160,9 +2160,9 @@ struct ieee80211_device {
         * it is called in a work_queue when swithcing to ad-hoc mode
         * or in behalf of iwlist scan when the card is associated
         * and root user ask for a scan.
-        * the fucntion stop_scan should stop both the syncro and
+        * the function stop_scan should stop both the syncro and
         * background scanning and can sleep.
-        * The fucntion start_scan should initiate the background
+        * The function start_scan should initiate the background
         * scanning and can't sleep.
         */
        void (*scan_syncro)(struct ieee80211_device *ieee80211);
index add015ebba1cabf19c890b83000b96fcd4c63453..ed5a380230943e37f92dc773965f9eed45aa3f1b 100644 (file)
@@ -1426,7 +1426,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
 
 /*
-* Make ther structure we read from the beacon packet has
+* Make the structure we read from the beacon packet to have
 * the right values
 */
 static int ieee80211_verify_qos_info(struct ieee80211_qos_information_element
index f6922d40a88a1778ba8062f1bc3619aaae036e09..7d4cba3a7c1219096ebc65b8073b1a5e070a27c6 100644 (file)
@@ -2023,7 +2023,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
                                                        return 1;
                                                }
                                                else
-                                               {       //filling the PeerHTCap. //maybe not neccesary as we can get its info from current_network.
+                                               {       //filling the PeerHTCap. //maybe not necessary as we can get its info from current_network.
                                                        memcpy(ieee->pHTInfo->PeerHTCapBuf, network->bssht.bdHTCapBuf, network->bssht.bdHTCapLen);
                                                        memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen);
                                                }
@@ -2163,7 +2163,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
        return 0;
 }
 
-/* following are for a simplier TX queue management.
+/* following are for a simpler TX queue management.
  * Instead of using netif_[stop/wake]_queue the driver
  * will uses these two function (plus a reset one), that
  * will internally uses the kernel netif_* and takes
index f968817d073c07abbec21dbfaecbb845c8cfd063..56a120cf629160d826790978c0aa8f77b06d6b51 100644 (file)
@@ -64,7 +64,7 @@ typedef enum _HT_CHANNEL_WIDTH{
 }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH;
 
 //
-// Represent Extention Channel Offset in HT Capabilities
+// Represent Extension Channel Offset in HT Capabilities
 // This is available only in 40Mhz mode.
 //
 typedef enum _HT_EXTCHNL_OFFSET{
index a2a4fe9dd9da385024354d96541effb0c29637b9..f7a9da3ec829c32691de6353ff5dfcf79987d32b 100644 (file)
@@ -459,7 +459,7 @@ u8 HTIOTActIsForcedCTS2Self(struct ieee80211_device *ieee, struct ieee80211_netw
 /**
 * Function:    HTIOTActIsDisableMCS15
 *
-* Overview:    Check whether driver should declare capability of receving MCS15
+* Overview:    Check whether driver should declare capability of receiving MCS15
 *
 * Input:
 *                      PADAPTER                Adapter,
@@ -496,7 +496,7 @@ bool HTIOTActIsDisableMCS15(struct ieee80211_device* ieee)
 /**
 * Function:    HTIOTActIsDisableMCSTwoSpatialStream
 *
-* Overview:    Check whether driver should declare capability of receving All 2 ss packets
+* Overview:    Check whether driver should declare capability of receiving All 2 ss packets
 *
 * Input:
 *                      PADAPTER                Adapter,
@@ -1681,7 +1681,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH   Bandwidt
        //if in half N mode, set to 20M bandwidth please 09.08.2008 WB.
        if (Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler(ieee)))
         {
-                       // Handle Illegal extention channel offset!!
+                       // Handle Illegal extension channel offset!!
                if(ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER)
                        Offset = HT_EXTCHNL_OFFSET_NO_EXT;
                if(Offset==HT_EXTCHNL_OFFSET_UPPER || Offset==HT_EXTCHNL_OFFSET_LOWER) {
@@ -1698,7 +1698,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH   Bandwidt
 
        pHTInfo->bSwBwInProgress = true;
 
-       // TODO: 2007.7.13 by Emily Wait 2000ms  in order to garantee that switching
+       // TODO: 2007.7.13 by Emily Wait 2000ms  in order to guarantee that switching
        //   bandwidth is executed after scan is finished. It is a temporal solution
        //   because software should ganrantee the last operation of switching bandwidth
        //   is executed properlly.
index baaac2149de1fb129660c42d8639c5535ba7e9b0..e7e26fd96395559e447e03b82465f3f2a64c6fa1 100644 (file)
@@ -44,7 +44,7 @@ typedef struct _RX_TS_RECORD {
        u16                             RxTimeoutIndicateSeq;
        struct list_head                RxPendingPktList;
        struct timer_list               RxPktPendingTimer;
-       BA_RECORD                       RxAdmittedBARecord;      // For BA Recepient
+       BA_RECORD                       RxAdmittedBARecord;      // For BA Recipient
        u16                             RxLastSeqNum;
        u8                              RxLastFragNum;
        u8                              num;
index 29eecf0ab769ceb2e6f9445ecc20df8e7b9208bc..ad6872dcf1c2883c5d8f2feda6e0b93f95779aec 100644 (file)
@@ -135,7 +135,7 @@ void ResetRxTsEntry(PRX_TS_RECORD pTS)
        ResetTsCommonInfo(&pTS->TsCommonInfo);
        pTS->RxIndicateSeq = 0xffff; // This indicate the RxIndicateSeq is not used now!!
        pTS->RxTimeoutIndicateSeq = 0xffff; // This indicate the RxTimeoutIndicateSeq is not used now!!
-       ResetBaEntry(&pTS->RxAdmittedBARecord);   // For BA Recepient
+       ResetBaEntry(&pTS->RxAdmittedBARecord);   // For BA Recipient
 }
 
 void TSInitialize(struct ieee80211_device *ieee)
index dfa4e112ef4604c347a958fd2dc11f8c1b490034..9e7828ef1cbe3f1636fa97d67a01f54f30e429b0 100644 (file)
@@ -2032,13 +2032,13 @@ void rtl8192_SetBWModeWorkItem(struct r8192_priv *priv)
        {
                case HT_CHANNEL_WIDTH_20:
                        regBwOpMode |= BW_OPMODE_20MHZ;
-                      // 2007/02/07 Mark by Emily becasue we have not verify whether this register works
+                      // 2007/02/07 Mark by Emily because we have not verify whether this register works
                        write_nic_byte(priv, BW_OPMODE, regBwOpMode);
                        break;
 
                case HT_CHANNEL_WIDTH_20_40:
                        regBwOpMode &= ~BW_OPMODE_20MHZ;
-                       // 2007/02/07 Mark by Emily becasue we have not verify whether this register works
+                       // 2007/02/07 Mark by Emily because we have not verify whether this register works
                        write_nic_byte(priv, BW_OPMODE, regBwOpMode);
                        break;
 
@@ -2116,7 +2116,7 @@ void rtl8192_SetBWModeWorkItem(struct r8192_priv *priv)
 }
 
 /******************************************************************************
- *function:  This function schedules bandwith switch work.
+ *function:  This function schedules bandwidth switch work.
  *   input:  struct net_device *dev
  *          HT_CHANNEL_WIDTH   Bandwidth  //20M or 40M
  *          HT_EXTCHNL_OFFSET Offset      //Upper, Lower, or Don't care
index 28969198e7e2c22c5ad6c963cced4c69cfb1b23d..3f055091b35f6aaa6e8619f131d3af18ff335c37 100644 (file)
@@ -1,6 +1,7 @@
 config RTL8192U
        tristate "RealTek RTL8192U Wireless LAN NIC driver"
        depends on PCI && WLAN && USB
+       depends on m
        select WIRELESS_EXT
        select WEXT_PRIV
        select CRYPTO
index c0b844d75c0d59be92a6bb1e2c1fa2fd4fb5f998..e716f7b1144f4a50415337a07b6884b266102352 100644 (file)
@@ -1965,7 +1965,7 @@ struct ieee80211_device {
        u16 prev_seq_ctl;       /* used to drop duplicate frames */
 
        /* map of allowed channels. 0 is dummy */
-       // FIXME: remeber to default to a basic channel plan depending of the PHY type
+       // FIXME: remember to default to a basic channel plan depending of the PHY type
        void* pDot11dInfo;
        bool bGlobalDomain;
        int rate;       /* current rate */
@@ -2119,7 +2119,7 @@ struct ieee80211_device {
         * not set. As some cards may have different HW queues that
         * one might want to use for data and management frames
         * the option to have two callbacks might be useful.
-        * This fucntion can't sleep.
+        * This function can't sleep.
         */
        int (*softmac_hard_start_xmit)(struct sk_buff *skb,
                               struct net_device *dev);
@@ -2158,9 +2158,9 @@ struct ieee80211_device {
         * it is called in a work_queue when swithcing to ad-hoc mode
         * or in behalf of iwlist scan when the card is associated
         * and root user ask for a scan.
-        * the fucntion stop_scan should stop both the syncro and
+        * the function stop_scan should stop both the syncro and
         * background scanning and can sleep.
-        * The fucntion start_scan should initiate the background
+        * The function start_scan should initiate the background
         * scanning and can't sleep.
         */
        void (*scan_syncro)(struct net_device *dev);
index 498b520efcf447f0b25bb4346fda5656ee1e9efe..a414303aef54f773de470180da725282e5b3dae8 100644 (file)
@@ -1399,7 +1399,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
 
 /*
-* Make ther structure we read from the beacon packet has
+* Make the structure we read from the beacon packet to have
 * the right values
 */
 static int ieee80211_verify_qos_info(struct ieee80211_qos_information_element
index 4992d630f984b4509a13062fceac7d84d1aec1ff..4ec0a6520ddcf2bb7b69373ad5a36232aa99670f 100644 (file)
@@ -1973,7 +1973,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
                                                        return 1;
                                                }
                                                else
-                                               {       //filling the PeerHTCap. //maybe not neccesary as we can get its info from current_network.
+                                               {       //filling the PeerHTCap. //maybe not necessary as we can get its info from current_network.
                                                        memcpy(ieee->pHTInfo->PeerHTCapBuf, network->bssht.bdHTCapBuf, network->bssht.bdHTCapLen);
                                                        memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen);
                                                }
@@ -2113,7 +2113,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
        return 0;
 }
 
-/* following are for a simplier TX queue management.
+/* following are for a simpler TX queue management.
  * Instead of using netif_[stop/wake]_queue the driver
  * will uses these two function (plus a reset one), that
  * will internally uses the kernel netif_* and takes
index cde603f67f43494c6c4ca78fa614582be0453bdb..0b1a1fc093918c9368d287fd0150ecef230c0b03 100644 (file)
@@ -64,7 +64,7 @@ typedef enum _HT_CHANNEL_WIDTH{
 }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH;
 
 //
-// Represent Extention Channel Offset in HT Capabilities
+// Represent Extension Channel Offset in HT Capabilities
 // This is available only in 40Mhz mode.
 //
 typedef enum _HT_EXTCHNL_OFFSET{
index 50f4f5943e754a2ad39fc49d549292f334203704..e88a839b2a91753af3ead5b78b5608e4dd0b2752 100644 (file)
@@ -423,7 +423,7 @@ u8 HTIOTActIsDisableMCS14(struct ieee80211_device* ieee, u8* PeerMacAddr)
 /**
 * Function:    HTIOTActIsDisableMCS15
 *
-* Overview:    Check whether driver should declare capability of receving MCS15
+* Overview:    Check whether driver should declare capability of receiving MCS15
 *
 * Input:
 *                      PADAPTER                Adapter,
@@ -460,7 +460,7 @@ bool HTIOTActIsDisableMCS15(struct ieee80211_device* ieee)
 /**
 * Function:    HTIOTActIsDisableMCSTwoSpatialStream
 *
-* Overview:    Check whether driver should declare capability of receving All 2 ss packets
+* Overview:    Check whether driver should declare capability of receiving All 2 ss packets
 *
 * Input:
 *                      PADAPTER                Adapter,
@@ -1409,7 +1409,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH   Bandwidt
        //if in half N mode, set to 20M bandwidth please 09.08.2008 WB.
        if(Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)))
         {
-                       // Handle Illegal extention channel offset!!
+                       // Handle Illegal extension channel offset!!
                if(ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER)
                        Offset = HT_EXTCHNL_OFFSET_NO_EXT;
                if(Offset==HT_EXTCHNL_OFFSET_UPPER || Offset==HT_EXTCHNL_OFFSET_LOWER) {
@@ -1426,7 +1426,7 @@ void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH   Bandwidt
 
        pHTInfo->bSwBwInProgress = true;
 
-       // TODO: 2007.7.13 by Emily Wait 2000ms  in order to garantee that switching
+       // TODO: 2007.7.13 by Emily Wait 2000ms  in order to guarantee that switching
        //   bandwidth is executed after scan is finished. It is a temporal solution
        //   because software should ganrantee the last operation of switching bandwidth
        //   is executed properlly.
index baaac2149de1fb129660c42d8639c5535ba7e9b0..e7e26fd96395559e447e03b82465f3f2a64c6fa1 100644 (file)
@@ -44,7 +44,7 @@ typedef struct _RX_TS_RECORD {
        u16                             RxTimeoutIndicateSeq;
        struct list_head                RxPendingPktList;
        struct timer_list               RxPktPendingTimer;
-       BA_RECORD                       RxAdmittedBARecord;      // For BA Recepient
+       BA_RECORD                       RxAdmittedBARecord;      // For BA Recipient
        u16                             RxLastSeqNum;
        u8                              RxLastFragNum;
        u8                              num;
index c3fcaae0750df6dacacd23afe4466e991cd505e6..957ce4ef48b52a0ea5567940a7c2df3e6b2d04f5 100644 (file)
@@ -135,7 +135,7 @@ void ResetRxTsEntry(PRX_TS_RECORD pTS)
        ResetTsCommonInfo(&pTS->TsCommonInfo);
        pTS->RxIndicateSeq = 0xffff; // This indicate the RxIndicateSeq is not used now!!
        pTS->RxTimeoutIndicateSeq = 0xffff; // This indicate the RxTimeoutIndicateSeq is not used now!!
-       ResetBaEntry(&pTS->RxAdmittedBARecord);   // For BA Recepient
+       ResetBaEntry(&pTS->RxAdmittedBARecord);   // For BA Recipient
 }
 
 void TSInitialize(struct ieee80211_device *ieee)
index 49f401fbce888f0e099042f4d997ff0972b31333..3543a6145046ed0d93c3c97c81c7c0bb6372c7e9 100644 (file)
@@ -71,7 +71,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
                                 unsigned int more)
 {
        /* walk->data may be pointing the first byte of the next page;
-          however, we know we transfered at least one byte.  So,
+          however, we know we transferred at least one byte.  So,
           walk->data - 1 will be a virtual address in the mapped page. */
 
        if (out)
index da612e6d994e34ad20f556209372f29023e57fdd..e81b8ab6aa9d160c6a8c30327a751d9d6b82ef48 100644 (file)
@@ -460,7 +460,7 @@ u32 read_nic_dword(struct net_device *dev, int indx)
 /* u8 read_phy_cck(struct net_device *dev, u8 adr); */
 /* u8 read_phy_ofdm(struct net_device *dev, u8 adr); */
 /* this might still called in what was the PHY rtl8185/rtl8192 common code
- * plans are to possibilty turn it again in one common code...
+ * plans are to possibility turn it again in one common code...
  */
 inline void force_pci_posting(struct net_device *dev)
 {
@@ -1378,7 +1378,7 @@ struct sk_buff *DrvAggr_Aggregation(struct net_device *dev, struct ieee80211_drv
                //tx_agg_desc->LINIP = 0;
                //tx_agg_desc->CmdInit = 1;
                tx_agg_desc->Offset =  sizeof(tx_fwinfo_819x_usb) + 8;
-               /* already raw data, need not to substract header length */
+               /* already raw data, need not to subtract header length */
                tx_agg_desc->PktSize = skb->len & 0xffff;
 
                /*DWORD 1*/
@@ -2888,7 +2888,7 @@ static void rtl8192_get_eeprom_size(struct net_device* dev)
        RT_TRACE(COMP_EPROM, "<===========%s(), epromtype:%d\n", __FUNCTION__, priv->epromtype);
 }
 
-//used to swap endian. as ntohl & htonl are not neccessary to swap endian, so use this instead.
+//used to swap endian. as ntohl & htonl are not necessary to swap endian, so use this instead.
 static inline u16 endian_swap(u16* data)
 {
        u16 tmp = *data;
index 01f58b902028b1e216e118c5eb02771f214b684c..2ac421626e7cc403df5323061714768af3be2e9a 100644 (file)
@@ -65,7 +65,7 @@ typedef enum _HT_CHANNEL_WIDTH{
 }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH;
 
 //
-// Represent Extention Channel Offset in HT Capabilities
+// Represent Extension Channel Offset in HT Capabilities
 // This is available only in 40Mhz mode.
 //
 typedef enum _HT_EXTCHNL_OFFSET{
index 41684e8fcf4ca3889eb612d14f162a3445ecb2bf..c4586b0817d1bb1e08a29e032f6f369150663d8c 100644 (file)
@@ -1531,13 +1531,13 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
        {
                case HT_CHANNEL_WIDTH_20:
                        regBwOpMode |= BW_OPMODE_20MHZ;
-                      // 2007/02/07 Mark by Emily becasue we have not verify whether this register works
+                      // 2007/02/07 Mark by Emily because we have not verify whether this register works
                        write_nic_byte(dev, BW_OPMODE, regBwOpMode);
                        break;
 
                case HT_CHANNEL_WIDTH_20_40:
                        regBwOpMode &= ~BW_OPMODE_20MHZ;
-                       // 2007/02/07 Mark by Emily becasue we have not verify whether this register works
+                       // 2007/02/07 Mark by Emily because we have not verify whether this register works
                        write_nic_byte(dev, BW_OPMODE, regBwOpMode);
                        break;
 
@@ -1647,7 +1647,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
 }
 
 /******************************************************************************
- *function:  This function schedules bandwith switch work.
+ *function:  This function schedules bandwidth switch work.
  *   input:  struct net_device *dev
  *          HT_CHANNEL_WIDTH   Bandwidth  //20M or 40M
  *          HT_EXTCHNL_OFFSET Offset      //Upper, Lower, or Don't care
index 3a945b5f0e01bb27a3f8583caa69cd5120716273..2dc78476b7d35db903b06dfb1763faf882a417ca 100644 (file)
@@ -656,7 +656,7 @@ struct PT_param {
 /*
  * Result:
  * 0x00: success
- * 0x01: sucess, and check Response.
+ * 0x01: success, and check Response.
  * 0x02: cmd ignored due to duplicated sequcne number
  * 0x03: cmd dropped due to invalid cmd code
  * 0x04: reserved.
index 994ef82141ab3bb9efc8f0c070bf5fd1b4937ba0..8085e5eb82b1bc18bb12a7901660c835cc76bf90 100644 (file)
@@ -78,14 +78,14 @@ struct LED_871x {
 };
 
 struct led_priv {
-       /* add for led controll */
+       /* add for led control */
        struct LED_871x         SwLed0;
        struct LED_871x         SwLed1;
        enum LED_STRATEGY_871x  LedStrategy;
        u8                      bRegUseLed;
        void (*LedControlHandler)(struct _adapter *padapter,
                                  enum LED_CTL_MODE LedAction);
-       /* add for led controll */
+       /* add for led control */
 };
 
 /*===========================================================================
index 98ba7602e25035f6f131d4d5d9bf6d5f17ee991c..866554d48d86b57005c4ffaadf6cfb01da856e2e 100644 (file)
@@ -1663,7 +1663,7 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter)
                              (struct ndis_wlan_bssid_ex *)pdev_network);
 }
 
-/*the fucntion is at passive_level*/
+/*the function is at passive_level*/
 void r8712_joinbss_reset(struct _adapter *padapter)
 {
        int i;
@@ -1726,7 +1726,7 @@ unsigned int r8712_restructure_ht_ie(struct _adapter *padapter, u8 *in_ie,
        return phtpriv->ht_option;
 }
 
-/* the fucntion is > passive_level (in critical_section) */
+/* the function is > passive_level (in critical_section) */
 static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len)
 {
        u8 *p, max_ampdu_sz;
@@ -1803,7 +1803,7 @@ void r8712_issue_addbareq_cmd(struct _adapter *padapter, int priority)
        }
 }
 
-/*the fucntion is >= passive_level*/
+/*the function is >= passive_level*/
 unsigned int r8712_add_ht_addt_info(struct _adapter *padapter,
                              u8 *in_ie, u8 *out_ie,
                              uint in_len, uint *pout_len)
index 2b35b740ab8905f9b80d35f38f339d0aab06b21e..2794804d0822752346381e1b0fc60d72d41bdf27 100644 (file)
@@ -29,7 +29,7 @@
                                                 *  single-tone*/
 #define        WIFI_MP_CTX_BACKGROUND_PENDING  0x00080000 /* pending in cont, tx
                                        * background due to out of skb*/
-#define        WIFI_MP_CTX_CCK_HW      0x00100000      /* in continous tx*/
+#define        WIFI_MP_CTX_CCK_HW      0x00100000      /* in continuous tx*/
 #define        WIFI_MP_CTX_CCK_CS      0x00200000      /* in cont, tx with carrier
                                                 * suppression*/
 #define   WIFI_MP_LPBK_STATE   0x00400000
index e386fb0aac3e7fdac3c6365f327da5510b975083..23532a79385938cfcff1203f7ace1185e3c7c932 100644 (file)
@@ -38,7 +38,7 @@
  * 2. 0x800/0x900/0xA00/0xC00/0xD00/0xE00
  * 3. RF register 0x00-2E
  * 4. Bit Mask for BB/RF register
- * 5. Other defintion for BB/RF R/W
+ * 5. Other definition for BB/RF R/W
  *
  * 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF
  * 1. Page1(0x100)
index 0e9483bbabe17fb7cab00fc6e2c757a68190c814..46287c17a417223b255598546f79360653303ec2 100644 (file)
@@ -112,7 +112,7 @@ u8 r8712_usb_hal_bus_init(struct _adapter *padapter)
                /* Initialization for power on sequence, */
                r8712_write8(padapter, SPS0_CTRL + 1, 0x53);
                r8712_write8(padapter, SPS0_CTRL, 0x57);
-               /* Enable AFE Macro Block's Bandgap adn Enable AFE Macro
+               /* Enable AFE Macro Block's Bandgap and Enable AFE Macro
                 * Block's Mbias
                 */
                val8 = r8712_read8(padapter, AFE_MISC);
index 4514419a5fb88e56f9083023bb603867d0b27bbf..02525d57ba83c8bb5278200baaed59b267bc6a0b 100644 (file)
@@ -824,13 +824,13 @@ static void rtsx_init_options(struct rtsx_chip *chip)
        chip->fpga_ms_hg_clk = CLK_80;
        chip->fpga_ms_4bit_clk = CLK_80;
        chip->fpga_ms_1bit_clk = CLK_40;
-       chip->asic_sd_sdr104_clk = 207;
-       chip->asic_sd_sdr50_clk = 99;
-       chip->asic_sd_ddr50_clk = 99;
-       chip->asic_sd_hs_clk = 99;
-       chip->asic_mmc_52m_clk = 99;
-       chip->asic_ms_hg_clk = 119;
-       chip->asic_ms_4bit_clk = 79;
+       chip->asic_sd_sdr104_clk = 203;
+       chip->asic_sd_sdr50_clk = 98;
+       chip->asic_sd_ddr50_clk = 98;
+       chip->asic_sd_hs_clk = 98;
+       chip->asic_mmc_52m_clk = 98;
+       chip->asic_ms_hg_clk = 117;
+       chip->asic_ms_4bit_clk = 78;
        chip->asic_ms_1bit_clk = 39;
        chip->ssc_depth_sd_sdr104 = SSC_DEPTH_2M;
        chip->ssc_depth_sd_sdr50 = SSC_DEPTH_2M;
index f443d97a56f83dac9f3da32f2fd28f778bcf30c5..d2f1c715a684201eae59e646ead22096bb154033 100644 (file)
@@ -684,6 +684,11 @@ static int rts5209_init(struct rtsx_chip *chip)
        RTSX_DEBUGP("dw in 0x724: 0x%x\n", lval);
        val = (u8)lval;
        if (!(val & 0x80)) {
+               if (val & 0x08)
+                       chip->lun_mode = DEFAULT_SINGLE;
+               else
+                       chip->lun_mode = SD_MS_2LUN;
+
                if (val & 0x04) {
                        SET_SDIO_EXIST(chip);
                } else {
@@ -705,12 +710,6 @@ static int rts5209_init(struct rtsx_chip *chip)
 
                chip->aspm_l0s_l1_en = (val >> 5) & 0x03;
 
-               if (val & 0x08) {
-                       chip->lun_mode = DEFAULT_SINGLE;
-               } else {
-                       chip->lun_mode = SD_MS_2LUN;
-               }
-
                val = (u8)(lval >> 8);
 
                clk = (val >> 5) & 0x07;
index 713c5eaadacdcae51716af912fcb8b224cecb0ed..9f7cd82a1541302460ee863ef8f796dcb9a45095 100644 (file)
 #define CUR_ERR                 0x70    /* current error                    */
 #define DEF_ERR                 0x71    /* specific command error           */
 
-/*---- sense key Infomation ----*/
-#define SNSKEYINFO_LEN          3       /* length of sense key infomation   */
+/*---- sense key Information ----*/
+#define SNSKEYINFO_LEN          3       /* length of sense key information   */
 
 #define SKSV                    0x80
 #define CDB_ILLEGAL             0x40
@@ -235,13 +235,13 @@ struct sense_data_t {
     unsigned char   seg_no;            /* segment No.                      */
     unsigned char   sense_key;         /* byte5 : ILI                      */
                                                /* bit3-0 : sense key              */
-    unsigned char   info[4];           /* infomation                       */
+    unsigned char   info[4];           /* information                       */
     unsigned char   ad_sense_len;      /* additional sense data length     */
-    unsigned char   cmd_info[4];       /* command specific infomation      */
+    unsigned char   cmd_info[4];       /* command specific information      */
     unsigned char   asc;               /* ASC                              */
     unsigned char   ascq;              /* ASCQ                             */
     unsigned char   rfu;               /* FRU                              */
-    unsigned char   sns_key_info[3];   /* sense key specific infomation    */
+    unsigned char   sns_key_info[3];   /* sense key specific information    */
 };
 
 /* PCI Operation Register Address */
index fac122c1eabd3f72c34da24a8415da4f334b155d..64b84992fdb30702f371999720ca0889e615dc27 100644 (file)
@@ -85,7 +85,7 @@
 #define CHIP_NORMALMODE                0x00
 #define CHIP_DEBUGMODE         0x01
 
-/* SD Pass Through Command Extention */
+/* SD Pass Through Command Extension */
 #define SD_PASS_THRU_MODE      0xD0
 #define SD_EXECUTE_NO_DATA     0xD1
 #define SD_EXECUTE_READ                0xD2
index 21bfa5755bece74ecb83508b7aaaadf34ff19999..8d066bd428c4ad94e4785a974c2b98c2acceddb0 100644 (file)
@@ -1719,7 +1719,7 @@ static u8 sd_search_final_phase(struct rtsx_chip *chip, u32 phase_map, u8 tune_d
        }
 
 Search_Finish:
-       RTSX_DEBUGP("Final choosen phase: %d\n", final_phase);
+       RTSX_DEBUGP("Final chosen phase: %d\n", final_phase);
        return final_phase;
 }
 
diff --git a/drivers/staging/samsung-laptop/Kconfig b/drivers/staging/samsung-laptop/Kconfig
deleted file mode 100644 (file)
index f27c608..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-config SAMSUNG_LAPTOP
-       tristate "Samsung Laptop driver"
-       default n
-       depends on RFKILL && BACKLIGHT_CLASS_DEVICE && X86
-       help
-         This module implements a driver for the N128 Samsung Laptop
-         providing control over the Wireless LED and the LCD backlight
-
-         To compile this driver as a module, choose
-         M here: the module will be called samsung-laptop.
diff --git a/drivers/staging/samsung-laptop/Makefile b/drivers/staging/samsung-laptop/Makefile
deleted file mode 100644 (file)
index 3c6f420..0000000
+++ /dev/null
@@ -1 +0,0 @@
-obj-$(CONFIG_SAMSUNG_LAPTOP)   += samsung-laptop.o
diff --git a/drivers/staging/samsung-laptop/TODO b/drivers/staging/samsung-laptop/TODO
deleted file mode 100644 (file)
index f7a6d58..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-TODO:
-       - review from other developers
-       - figure out ACPI video issues
-
-Please send patches to Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/staging/samsung-laptop/samsung-laptop.c b/drivers/staging/samsung-laptop/samsung-laptop.c
deleted file mode 100644 (file)
index 2529446..0000000
+++ /dev/null
@@ -1,843 +0,0 @@
-/*
- * Samsung Laptop driver
- *
- * Copyright (C) 2009,2011 Greg Kroah-Hartman (gregkh@suse.de)
- * Copyright (C) 2009,2011 Novell Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- */
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/pci.h>
-#include <linux/backlight.h>
-#include <linux/fb.h>
-#include <linux/dmi.h>
-#include <linux/platform_device.h>
-#include <linux/rfkill.h>
-
-/*
- * This driver is needed because a number of Samsung laptops do not hook
- * their control settings through ACPI.  So we have to poke around in the
- * BIOS to do things like brightness values, and "special" key controls.
- */
-
-/*
- * We have 0 - 8 as valid brightness levels.  The specs say that level 0 should
- * be reserved by the BIOS (which really doesn't make much sense), we tell
- * userspace that the value is 0 - 7 and then just tell the hardware 1 - 8
- */
-#define MAX_BRIGHT     0x07
-
-
-#define SABI_IFACE_MAIN                        0x00
-#define SABI_IFACE_SUB                 0x02
-#define SABI_IFACE_COMPLETE            0x04
-#define SABI_IFACE_DATA                        0x05
-
-/* Structure to get data back to the calling function */
-struct sabi_retval {
-       u8 retval[20];
-};
-
-struct sabi_header_offsets {
-       u8 port;
-       u8 re_mem;
-       u8 iface_func;
-       u8 en_mem;
-       u8 data_offset;
-       u8 data_segment;
-};
-
-struct sabi_commands {
-       /*
-        * Brightness is 0 - 8, as described above.
-        * Value 0 is for the BIOS to use
-        */
-       u8 get_brightness;
-       u8 set_brightness;
-
-       /*
-        * first byte:
-        * 0x00 - wireless is off
-        * 0x01 - wireless is on
-        * second byte:
-        * 0x02 - 3G is off
-        * 0x03 - 3G is on
-        * TODO, verify 3G is correct, that doesn't seem right...
-        */
-       u8 get_wireless_button;
-       u8 set_wireless_button;
-
-       /* 0 is off, 1 is on */
-       u8 get_backlight;
-       u8 set_backlight;
-
-       /*
-        * 0x80 or 0x00 - no action
-        * 0x81 - recovery key pressed
-        */
-       u8 get_recovery_mode;
-       u8 set_recovery_mode;
-
-       /*
-        * on seclinux: 0 is low, 1 is high,
-        * on swsmi: 0 is normal, 1 is silent, 2 is turbo
-        */
-       u8 get_performance_level;
-       u8 set_performance_level;
-
-       /*
-        * Tell the BIOS that Linux is running on this machine.
-        * 81 is on, 80 is off
-        */
-       u8 set_linux;
-};
-
-struct sabi_performance_level {
-       const char *name;
-       u8 value;
-};
-
-struct sabi_config {
-       const char *test_string;
-       u16 main_function;
-       const struct sabi_header_offsets header_offsets;
-       const struct sabi_commands commands;
-       const struct sabi_performance_level performance_levels[4];
-       u8 min_brightness;
-       u8 max_brightness;
-};
-
-static const struct sabi_config sabi_configs[] = {
-       {
-               .test_string = "SECLINUX",
-
-               .main_function = 0x4c49,
-
-               .header_offsets = {
-                       .port = 0x00,
-                       .re_mem = 0x02,
-                       .iface_func = 0x03,
-                       .en_mem = 0x04,
-                       .data_offset = 0x05,
-                       .data_segment = 0x07,
-               },
-
-               .commands = {
-                       .get_brightness = 0x00,
-                       .set_brightness = 0x01,
-
-                       .get_wireless_button = 0x02,
-                       .set_wireless_button = 0x03,
-
-                       .get_backlight = 0x04,
-                       .set_backlight = 0x05,
-
-                       .get_recovery_mode = 0x06,
-                       .set_recovery_mode = 0x07,
-
-                       .get_performance_level = 0x08,
-                       .set_performance_level = 0x09,
-
-                       .set_linux = 0x0a,
-               },
-
-               .performance_levels = {
-                       {
-                               .name = "silent",
-                               .value = 0,
-                       },
-                       {
-                               .name = "normal",
-                               .value = 1,
-                       },
-                       { },
-               },
-               .min_brightness = 1,
-               .max_brightness = 8,
-       },
-       {
-               .test_string = "SwSmi@",
-
-               .main_function = 0x5843,
-
-               .header_offsets = {
-                       .port = 0x00,
-                       .re_mem = 0x04,
-                       .iface_func = 0x02,
-                       .en_mem = 0x03,
-                       .data_offset = 0x05,
-                       .data_segment = 0x07,
-               },
-
-               .commands = {
-                       .get_brightness = 0x10,
-                       .set_brightness = 0x11,
-
-                       .get_wireless_button = 0x12,
-                       .set_wireless_button = 0x13,
-
-                       .get_backlight = 0x2d,
-                       .set_backlight = 0x2e,
-
-                       .get_recovery_mode = 0xff,
-                       .set_recovery_mode = 0xff,
-
-                       .get_performance_level = 0x31,
-                       .set_performance_level = 0x32,
-
-                       .set_linux = 0xff,
-               },
-
-               .performance_levels = {
-                       {
-                               .name = "normal",
-                               .value = 0,
-                       },
-                       {
-                               .name = "silent",
-                               .value = 1,
-                       },
-                       {
-                               .name = "overclock",
-                               .value = 2,
-                       },
-                       { },
-               },
-               .min_brightness = 0,
-               .max_brightness = 8,
-       },
-       { },
-};
-
-static const struct sabi_config *sabi_config;
-
-static void __iomem *sabi;
-static void __iomem *sabi_iface;
-static void __iomem *f0000_segment;
-static struct backlight_device *backlight_device;
-static struct mutex sabi_mutex;
-static struct platform_device *sdev;
-static struct rfkill *rfk;
-
-static int force;
-module_param(force, bool, 0);
-MODULE_PARM_DESC(force,
-               "Disable the DMI check and forces the driver to be loaded");
-
-static int debug;
-module_param(debug, bool, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(debug, "Debug enabled or not");
-
-static int sabi_get_command(u8 command, struct sabi_retval *sretval)
-{
-       int retval = 0;
-       u16 port = readw(sabi + sabi_config->header_offsets.port);
-       u8 complete, iface_data;
-
-       mutex_lock(&sabi_mutex);
-
-       /* enable memory to be able to write to it */
-       outb(readb(sabi + sabi_config->header_offsets.en_mem), port);
-
-       /* write out the command */
-       writew(sabi_config->main_function, sabi_iface + SABI_IFACE_MAIN);
-       writew(command, sabi_iface + SABI_IFACE_SUB);
-       writeb(0, sabi_iface + SABI_IFACE_COMPLETE);
-       outb(readb(sabi + sabi_config->header_offsets.iface_func), port);
-
-       /* write protect memory to make it safe */
-       outb(readb(sabi + sabi_config->header_offsets.re_mem), port);
-
-       /* see if the command actually succeeded */
-       complete = readb(sabi_iface + SABI_IFACE_COMPLETE);
-       iface_data = readb(sabi_iface + SABI_IFACE_DATA);
-       if (complete != 0xaa || iface_data == 0xff) {
-               pr_warn("SABI get command 0x%02x failed with completion flag 0x%02x and data 0x%02x\n",
-                       command, complete, iface_data);
-               retval = -EINVAL;
-               goto exit;
-       }
-       /*
-        * Save off the data into a structure so the caller use it.
-        * Right now we only want the first 4 bytes,
-        * There are commands that need more, but not for the ones we
-        * currently care about.
-        */
-       sretval->retval[0] = readb(sabi_iface + SABI_IFACE_DATA);
-       sretval->retval[1] = readb(sabi_iface + SABI_IFACE_DATA + 1);
-       sretval->retval[2] = readb(sabi_iface + SABI_IFACE_DATA + 2);
-       sretval->retval[3] = readb(sabi_iface + SABI_IFACE_DATA + 3);
-
-exit:
-       mutex_unlock(&sabi_mutex);
-       return retval;
-
-}
-
-static int sabi_set_command(u8 command, u8 data)
-{
-       int retval = 0;
-       u16 port = readw(sabi + sabi_config->header_offsets.port);
-       u8 complete, iface_data;
-
-       mutex_lock(&sabi_mutex);
-
-       /* enable memory to be able to write to it */
-       outb(readb(sabi + sabi_config->header_offsets.en_mem), port);
-
-       /* write out the command */
-       writew(sabi_config->main_function, sabi_iface + SABI_IFACE_MAIN);
-       writew(command, sabi_iface + SABI_IFACE_SUB);
-       writeb(0, sabi_iface + SABI_IFACE_COMPLETE);
-       writeb(data, sabi_iface + SABI_IFACE_DATA);
-       outb(readb(sabi + sabi_config->header_offsets.iface_func), port);
-
-       /* write protect memory to make it safe */
-       outb(readb(sabi + sabi_config->header_offsets.re_mem), port);
-
-       /* see if the command actually succeeded */
-       complete = readb(sabi_iface + SABI_IFACE_COMPLETE);
-       iface_data = readb(sabi_iface + SABI_IFACE_DATA);
-       if (complete != 0xaa || iface_data == 0xff) {
-               pr_warn("SABI set command 0x%02x failed with completion flag 0x%02x and data 0x%02x\n",
-                      command, complete, iface_data);
-               retval = -EINVAL;
-       }
-
-       mutex_unlock(&sabi_mutex);
-       return retval;
-}
-
-static void test_backlight(void)
-{
-       struct sabi_retval sretval;
-
-       sabi_get_command(sabi_config->commands.get_backlight, &sretval);
-       printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]);
-
-       sabi_set_command(sabi_config->commands.set_backlight, 0);
-       printk(KERN_DEBUG "backlight should be off\n");
-
-       sabi_get_command(sabi_config->commands.get_backlight, &sretval);
-       printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]);
-
-       msleep(1000);
-
-       sabi_set_command(sabi_config->commands.set_backlight, 1);
-       printk(KERN_DEBUG "backlight should be on\n");
-
-       sabi_get_command(sabi_config->commands.get_backlight, &sretval);
-       printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]);
-}
-
-static void test_wireless(void)
-{
-       struct sabi_retval sretval;
-
-       sabi_get_command(sabi_config->commands.get_wireless_button, &sretval);
-       printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]);
-
-       sabi_set_command(sabi_config->commands.set_wireless_button, 0);
-       printk(KERN_DEBUG "wireless led should be off\n");
-
-       sabi_get_command(sabi_config->commands.get_wireless_button, &sretval);
-       printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]);
-
-       msleep(1000);
-
-       sabi_set_command(sabi_config->commands.set_wireless_button, 1);
-       printk(KERN_DEBUG "wireless led should be on\n");
-
-       sabi_get_command(sabi_config->commands.get_wireless_button, &sretval);
-       printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]);
-}
-
-static u8 read_brightness(void)
-{
-       struct sabi_retval sretval;
-       int user_brightness = 0;
-       int retval;
-
-       retval = sabi_get_command(sabi_config->commands.get_brightness,
-                                 &sretval);
-       if (!retval) {
-               user_brightness = sretval.retval[0];
-               if (user_brightness != 0)
-                       user_brightness -= sabi_config->min_brightness;
-       }
-       return user_brightness;
-}
-
-static void set_brightness(u8 user_brightness)
-{
-       u8 user_level = user_brightness - sabi_config->min_brightness;
-
-       sabi_set_command(sabi_config->commands.set_brightness, user_level);
-}
-
-static int get_brightness(struct backlight_device *bd)
-{
-       return (int)read_brightness();
-}
-
-static int update_status(struct backlight_device *bd)
-{
-       set_brightness(bd->props.brightness);
-
-       if (bd->props.power == FB_BLANK_UNBLANK)
-               sabi_set_command(sabi_config->commands.set_backlight, 1);
-       else
-               sabi_set_command(sabi_config->commands.set_backlight, 0);
-       return 0;
-}
-
-static const struct backlight_ops backlight_ops = {
-       .get_brightness = get_brightness,
-       .update_status  = update_status,
-};
-
-static int rfkill_set(void *data, bool blocked)
-{
-       /* Do something with blocked...*/
-       /*
-        * blocked == false is on
-        * blocked == true is off
-        */
-       if (blocked)
-               sabi_set_command(sabi_config->commands.set_wireless_button, 0);
-       else
-               sabi_set_command(sabi_config->commands.set_wireless_button, 1);
-
-       return 0;
-}
-
-static struct rfkill_ops rfkill_ops = {
-       .set_block = rfkill_set,
-};
-
-static int init_wireless(struct platform_device *sdev)
-{
-       int retval;
-
-       rfk = rfkill_alloc("samsung-wifi", &sdev->dev, RFKILL_TYPE_WLAN,
-                          &rfkill_ops, NULL);
-       if (!rfk)
-               return -ENOMEM;
-
-       retval = rfkill_register(rfk);
-       if (retval) {
-               rfkill_destroy(rfk);
-               return -ENODEV;
-       }
-
-       return 0;
-}
-
-static void destroy_wireless(void)
-{
-       rfkill_unregister(rfk);
-       rfkill_destroy(rfk);
-}
-
-static ssize_t get_performance_level(struct device *dev,
-                                    struct device_attribute *attr, char *buf)
-{
-       struct sabi_retval sretval;
-       int retval;
-       int i;
-
-       /* Read the state */
-       retval = sabi_get_command(sabi_config->commands.get_performance_level,
-                                 &sretval);
-       if (retval)
-               return retval;
-
-       /* The logic is backwards, yeah, lots of fun... */
-       for (i = 0; sabi_config->performance_levels[i].name; ++i) {
-               if (sretval.retval[0] == sabi_config->performance_levels[i].value)
-                       return sprintf(buf, "%s\n", sabi_config->performance_levels[i].name);
-       }
-       return sprintf(buf, "%s\n", "unknown");
-}
-
-static ssize_t set_performance_level(struct device *dev,
-                               struct device_attribute *attr, const char *buf,
-                               size_t count)
-{
-       if (count >= 1) {
-               int i;
-               for (i = 0; sabi_config->performance_levels[i].name; ++i) {
-                       const struct sabi_performance_level *level =
-                               &sabi_config->performance_levels[i];
-                       if (!strncasecmp(level->name, buf, strlen(level->name))) {
-                               sabi_set_command(sabi_config->commands.set_performance_level,
-                                                level->value);
-                               break;
-                       }
-               }
-               if (!sabi_config->performance_levels[i].name)
-                       return -EINVAL;
-       }
-       return count;
-}
-static DEVICE_ATTR(performance_level, S_IWUSR | S_IRUGO,
-                  get_performance_level, set_performance_level);
-
-
-static int __init dmi_check_cb(const struct dmi_system_id *id)
-{
-       pr_info("found laptop model '%s'\n",
-               id->ident);
-       return 0;
-}
-
-static struct dmi_system_id __initdata samsung_dmi_table[] = {
-       {
-               .ident = "N128",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "N128"),
-                       DMI_MATCH(DMI_BOARD_NAME, "N128"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "N130",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "N130"),
-                       DMI_MATCH(DMI_BOARD_NAME, "N130"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "X125",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "X125"),
-                       DMI_MATCH(DMI_BOARD_NAME, "X125"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "X120/X170",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "X120/X170"),
-                       DMI_MATCH(DMI_BOARD_NAME, "X120/X170"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "NC10",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "NC10"),
-                       DMI_MATCH(DMI_BOARD_NAME, "NC10"),
-               },
-               .callback = dmi_check_cb,
-       },
-               {
-               .ident = "NP-Q45",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "SQ45S70S"),
-                       DMI_MATCH(DMI_BOARD_NAME, "SQ45S70S"),
-               },
-               .callback = dmi_check_cb,
-               },
-       {
-               .ident = "X360",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "X360"),
-                       DMI_MATCH(DMI_BOARD_NAME, "X360"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "R410 Plus",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "R410P"),
-                       DMI_MATCH(DMI_BOARD_NAME, "R460"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "R518",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "R518"),
-                       DMI_MATCH(DMI_BOARD_NAME, "R518"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "R519/R719",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "R519/R719"),
-                       DMI_MATCH(DMI_BOARD_NAME, "R519/R719"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "N150/N210/N220/N230",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220/N230"),
-                       DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220/N230"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "N150P/N210P/N220P",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "N150P/N210P/N220P"),
-                       DMI_MATCH(DMI_BOARD_NAME, "N150P/N210P/N220P"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "R530/R730",
-               .matches = {
-                     DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
-                     DMI_MATCH(DMI_PRODUCT_NAME, "R530/R730"),
-                     DMI_MATCH(DMI_BOARD_NAME, "R530/R730"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "NF110/NF210/NF310",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "NF110/NF210/NF310"),
-                       DMI_MATCH(DMI_BOARD_NAME, "NF110/NF210/NF310"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "N145P/N250P/N260P",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "N145P/N250P/N260P"),
-                       DMI_MATCH(DMI_BOARD_NAME, "N145P/N250P/N260P"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "R70/R71",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR,
-                                       "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "R70/R71"),
-                       DMI_MATCH(DMI_BOARD_NAME, "R70/R71"),
-               },
-               .callback = dmi_check_cb,
-       },
-       {
-               .ident = "P460",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "P460"),
-                       DMI_MATCH(DMI_BOARD_NAME, "P460"),
-               },
-               .callback = dmi_check_cb,
-       },
-       { },
-};
-MODULE_DEVICE_TABLE(dmi, samsung_dmi_table);
-
-static int find_signature(void __iomem *memcheck, const char *testStr)
-{
-       int i = 0;
-       int loca;
-
-       for (loca = 0; loca < 0xffff; loca++) {
-               char temp = readb(memcheck + loca);
-
-               if (temp == testStr[i]) {
-                       if (i == strlen(testStr)-1)
-                               break;
-                       ++i;
-               } else {
-                       i = 0;
-               }
-       }
-       return loca;
-}
-
-static int __init samsung_init(void)
-{
-       struct backlight_properties props;
-       struct sabi_retval sretval;
-       unsigned int ifaceP;
-       int i;
-       int loca;
-       int retval;
-
-       mutex_init(&sabi_mutex);
-
-       if (!force && !dmi_check_system(samsung_dmi_table))
-               return -ENODEV;
-
-       f0000_segment = ioremap_nocache(0xf0000, 0xffff);
-       if (!f0000_segment) {
-               pr_err("Can't map the segment at 0xf0000\n");
-               return -EINVAL;
-       }
-
-       /* Try to find one of the signatures in memory to find the header */
-       for (i = 0; sabi_configs[i].test_string != 0; ++i) {
-               sabi_config = &sabi_configs[i];
-               loca = find_signature(f0000_segment, sabi_config->test_string);
-               if (loca != 0xffff)
-                       break;
-       }
-
-       if (loca == 0xffff) {
-               pr_err("This computer does not support SABI\n");
-               goto error_no_signature;
-       }
-
-       /* point to the SMI port Number */
-       loca += 1;
-       sabi = (f0000_segment + loca);
-
-       if (debug) {
-               printk(KERN_DEBUG "This computer supports SABI==%x\n",
-                       loca + 0xf0000 - 6);
-               printk(KERN_DEBUG "SABI header:\n");
-               printk(KERN_DEBUG " SMI Port Number = 0x%04x\n",
-                       readw(sabi + sabi_config->header_offsets.port));
-               printk(KERN_DEBUG " SMI Interface Function = 0x%02x\n",
-                       readb(sabi + sabi_config->header_offsets.iface_func));
-               printk(KERN_DEBUG " SMI enable memory buffer = 0x%02x\n",
-                       readb(sabi + sabi_config->header_offsets.en_mem));
-               printk(KERN_DEBUG " SMI restore memory buffer = 0x%02x\n",
-                       readb(sabi + sabi_config->header_offsets.re_mem));
-               printk(KERN_DEBUG " SABI data offset = 0x%04x\n",
-                       readw(sabi + sabi_config->header_offsets.data_offset));
-               printk(KERN_DEBUG " SABI data segment = 0x%04x\n",
-                       readw(sabi + sabi_config->header_offsets.data_segment));
-       }
-
-       /* Get a pointer to the SABI Interface */
-       ifaceP = (readw(sabi + sabi_config->header_offsets.data_segment) & 0x0ffff) << 4;
-       ifaceP += readw(sabi + sabi_config->header_offsets.data_offset) & 0x0ffff;
-       sabi_iface = ioremap_nocache(ifaceP, 16);
-       if (!sabi_iface) {
-               pr_err("Can't remap %x\n", ifaceP);
-               goto exit;
-       }
-       if (debug) {
-               printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP);
-               printk(KERN_DEBUG "sabi_iface = %p\n", sabi_iface);
-
-               test_backlight();
-               test_wireless();
-
-               retval = sabi_get_command(sabi_config->commands.get_brightness,
-                                         &sretval);
-               printk(KERN_DEBUG "brightness = 0x%02x\n", sretval.retval[0]);
-       }
-
-       /* Turn on "Linux" mode in the BIOS */
-       if (sabi_config->commands.set_linux != 0xff) {
-               retval = sabi_set_command(sabi_config->commands.set_linux,
-                                         0x81);
-               if (retval) {
-                       pr_warn("Linux mode was not set!\n");
-                       goto error_no_platform;
-               }
-       }
-
-       /* knock up a platform device to hang stuff off of */
-       sdev = platform_device_register_simple("samsung", -1, NULL, 0);
-       if (IS_ERR(sdev))
-               goto error_no_platform;
-
-       /* create a backlight device to talk to this one */
-       memset(&props, 0, sizeof(struct backlight_properties));
-       props.type = BACKLIGHT_PLATFORM;
-       props.max_brightness = sabi_config->max_brightness;
-       backlight_device = backlight_device_register("samsung", &sdev->dev,
-                                                    NULL, &backlight_ops,
-                                                    &props);
-       if (IS_ERR(backlight_device))
-               goto error_no_backlight;
-
-       backlight_device->props.brightness = read_brightness();
-       backlight_device->props.power = FB_BLANK_UNBLANK;
-       backlight_update_status(backlight_device);
-
-       retval = init_wireless(sdev);
-       if (retval)
-               goto error_no_rfk;
-
-       retval = device_create_file(&sdev->dev, &dev_attr_performance_level);
-       if (retval)
-               goto error_file_create;
-
-exit:
-       return 0;
-
-error_file_create:
-       destroy_wireless();
-
-error_no_rfk:
-       backlight_device_unregister(backlight_device);
-
-error_no_backlight:
-       platform_device_unregister(sdev);
-
-error_no_platform:
-       iounmap(sabi_iface);
-
-error_no_signature:
-       iounmap(f0000_segment);
-       return -EINVAL;
-}
-
-static void __exit samsung_exit(void)
-{
-       /* Turn off "Linux" mode in the BIOS */
-       if (sabi_config->commands.set_linux != 0xff)
-               sabi_set_command(sabi_config->commands.set_linux, 0x80);
-
-       device_remove_file(&sdev->dev, &dev_attr_performance_level);
-       backlight_device_unregister(backlight_device);
-       destroy_wireless();
-       iounmap(sabi_iface);
-       iounmap(f0000_segment);
-       platform_device_unregister(sdev);
-}
-
-module_init(samsung_init);
-module_exit(samsung_exit);
-
-MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@suse.de>");
-MODULE_DESCRIPTION("Samsung Backlight driver");
-MODULE_LICENSE("GPL");
index 71a5fbc041e4673eeefb1c18b198dc1c45ded808..890eede5e3f916cd24752898a1620d50c8173c00 100644 (file)
@@ -55,8 +55,6 @@
 #include <linux/jiffies.h>
 #include <linux/rar_register.h>
 
-#include "../memrar/memrar.h"
-
 #include "sep_driver_hw_defs.h"
 #include "sep_driver_config.h"
 #include "sep_driver_api.h"
@@ -586,7 +584,7 @@ static unsigned int sep_poll(struct file *filp, poll_table *wait)
        dev_dbg(&sep->pdev->dev, "poll: send_ct is %lx reply ct is %lx\n",
                sep->send_ct, sep->reply_ct);
 
-       /* Check if error occured during poll */
+       /* Check if error occurred during poll */
        retval2 = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR3_REG_ADDR);
        if (retval2 != 0x0) {
                dev_warn(&sep->pdev->dev, "poll; poll error %x\n", retval2);
@@ -1106,7 +1104,7 @@ static int sep_lock_user_pages(struct sep_device *sep,
                        lli_array[count].block_size);
        }
 
-       /* Set output params acording to the in_out flag */
+       /* Set output params according to the in_out flag */
        if (in_out_flag == SEP_DRIVER_IN_FLAG) {
                *lli_array_ptr = lli_array;
                sep->dma_res_arr[sep->nr_dcb_creat].in_num_pages = num_pages;
@@ -1577,7 +1575,7 @@ static int sep_prepare_input_dma_table(struct sep_device *sep,
 
                /*
                 * If this is not the last table -
-                * then allign it to the block size
+                * then align it to the block size
                 */
                if (!last_table_flag)
                        table_data_size =
@@ -1974,7 +1972,7 @@ static int sep_prepare_input_output_dma_table(struct sep_device *sep,
        dev_dbg(&sep->pdev->dev, "SEP_DRIVER_ENTRIES_PER_TABLE_IN_SEP is %x\n",
                SEP_DRIVER_ENTRIES_PER_TABLE_IN_SEP);
 
-       /* Call the fucntion that creates table from the lli arrays */
+       /* Call the function that creates table from the lli arrays */
        error = sep_construct_dma_tables_from_lli(sep, lli_in_array,
                sep->dma_res_arr[sep->nr_dcb_creat].in_num_pages,
                lli_out_array,
@@ -2372,7 +2370,6 @@ static int sep_rar_prepare_output_msg_handler(struct sep_device *sep,
        int error = 0;
        /* Command args */
        struct rar_hndl_to_bus_struct command_args;
-       struct RAR_buffer rar_buf;
        /* Bus address */
        dma_addr_t  rar_bus = 0;
        /* Holds the RAR address in the system memory offset */
@@ -2386,16 +2383,8 @@ static int sep_rar_prepare_output_msg_handler(struct sep_device *sep,
        }
 
        /* Call to translation function only if user handle is not NULL */
-       if (command_args.rar_handle) {
-               memset(&rar_buf, 0, sizeof(rar_buf));
-               rar_buf.info.handle = (u32)command_args.rar_handle;
-
-               if (rar_handle_to_bus(&rar_buf, 1) != 1) {
-                       error = -EFAULT;
-                       goto end_function;
-               }
-               rar_bus = rar_buf.bus_address;
-       }
+       if (command_args.rar_handle)
+               return -EOPNOTSUPP;
        dev_dbg(&sep->pdev->dev, "rar msg; rar_addr_bus = %x\n", (u32)rar_bus);
 
        /* Set value in the SYSTEM MEMORY offset */
@@ -2416,7 +2405,7 @@ end_function:
  *     @cmd: command
  *     @arg: pointer to argument structure
  *
- *     Implement the ioctl methods availble on the SEP device.
+ *     Implement the ioctl methods available on the SEP device.
  */
 static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
index d3b9220f396333eaabfa7bc6cfac5177c12e420f..1033425c9c30915a7a51fbdb11f489b8ca90705b 100644 (file)
 #define SEP_DRIVER_MIN_DATA_SIZE_PER_TABLE             16
 
 /* flag that signifies tah the lock is
-currently held by the proccess (struct file) */
+currently held by the process (struct file) */
 #define SEP_DRIVER_OWN_LOCK_FLAG                        1
 
 /* flag that signifies tah the lock is currently NOT
-held by the proccess (struct file) */
+held by the process (struct file) */
 #define SEP_DRIVER_DISOWN_LOCK_FLAG                     0
 
 /* indicates whether driver has mapped/unmapped shared area */
index 70f49099c065ca01bb4284e3290fcea95a9b2f53..b83bba19b7f09add86ce7c8138bf7da352c9e5c4 100644 (file)
@@ -33,7 +33,7 @@ TODO:
        - NAPI?
        - wasted overhead of extra stats
        - state variables for things that are
-         easily availble and shouldn't be kept in card structure, cardnum, ...
+         easily available and shouldn't be kept in card structure, cardnum, ...
          slotnumber, events, ...
        - get rid of slic_spinlock wrapper
        - volatile == bad design => bad code
index d007e4a12c14b8bd93370c4bb38a1aef5ca42cd5..3e2230f0879a327ebc1b1064fcc7c34f2bf813ae 100644 (file)
  *     Boyod.yang <boyod.yang@siliconmotion.com.cn>
  */
 
-#ifndef __KERNEL__
-#define __KERNEL__
-#endif
-
 #include <linux/io.h>
 #include <linux/fb.h>
 #include <linux/pci.h>
@@ -965,7 +961,7 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
                goto failed;
 
        smtcfb_setmode(sfb);
-       /* Primary display starting from 0 postion */
+       /* Primary display starting from 0 position */
        hw.BaseAddressInVRAM = 0;
        sfb->fb.par = &hw;
 
@@ -1019,6 +1015,7 @@ static void __devexit smtcfb_pci_remove(struct pci_dev *pdev)
        smtc_free_fb_info(sfb);
 }
 
+#ifdef CONFIG_PM
 /* Jason (08/14/2009)
  * suspend function, called when the suspend event is triggered
  */
@@ -1055,7 +1052,7 @@ static int __maybe_unused smtcfb_suspend(struct pci_dev *pdev, pm_message_t msg)
 
        pdev->dev.power.power_state = msg;
 
-       /* additionaly turn off all function blocks including internal PLLs */
+       /* additionally turn off all function blocks including internal PLLs */
        smtc_seqw(0x21, 0xff);
 
        return 0;
@@ -1111,6 +1108,7 @@ static int __maybe_unused smtcfb_resume(struct pci_dev *pdev)
 
        return 0;
 }
+#endif
 
 /* Jason (08/13/2009)
  * pci_driver struct used to wrap the original driver
index 23cf7f44f4502735a6ca80348842a89876a6ec40..170f38815ffd777d60a3b4ebe552891c53b1b9ee 100644 (file)
@@ -69,7 +69,7 @@ static void build_key_data(void)
        memset(key_offsets, 0, sizeof(key_offsets));
        kp = state_tbl + nstates + 1;
        while (*kp++) {
-               /* count occurrances of each function */
+               /* count occurrences of each function */
                for (i = 0; i < nstates; i++, kp++) {
                        if (!*kp)
                                continue;
index 24362eb7b8f13be8663b70852706b164eeac932e..f3210571e396a31076719a62d4413da9dea4a8d2 100644 (file)
@@ -1091,7 +1091,7 @@ screen that is constantly changing, such as a clock or status line.
 
 There is no way to save these window settings, and you can only have one
 window defined for each virtual console.  There is also no way to have
-windows automaticly defined for specific applications.
+windows automatically defined for specific applications.
 
 In order to define a window, use the review keys to move your reading
 cursor to the beginning of the area you want to define.  Then press
index 007b24b54e2559e64fbec419fc61e5107c8f81eb..506547b603e1fb0724e703a943193bfb559b9a8c 100644 (file)
@@ -38,7 +38,7 @@
 * Outputs:      Number of Used Bits
 *               0, if the argument is 0
 * Description:  Calculate the number of bits used by a given power of 2 number
-*               Number can be upto 32 bit
+*               Number can be up to 32 bit
 *&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
 int GLOB_Calc_Used_Bits(u32 n)
 {
@@ -653,7 +653,7 @@ static int SBD_setup_device(struct spectra_nand_dev *dev, int which)
        }
        dev->queue->queuedata = dev;
 
-       /* As Linux block layer doens't support >4KB hardware sector,  */
+       /* As Linux block layer doesn't support >4KB hardware sector,  */
        /* Here we force report 512 byte hardware sector size to Kernel */
        blk_queue_logical_block_size(dev->queue, 512);
 
index a2f820025ae402600cb7639b8cc01b61d598113f..aead358e5c2a57034e5a233e3779b869eb93be47 100644 (file)
@@ -965,7 +965,7 @@ static void process_cmd_fail_abort(int *first_failed_cmd,
        if (0 == *first_failed_cmd)
                *first_failed_cmd = PendingCMD[idx].SBDCmdIndex;
 
-       nand_dbg_print(NAND_DBG_DEBUG, "Uncorrectable error has occured "
+       nand_dbg_print(NAND_DBG_DEBUG, "Uncorrectable error has occurred "
                "while executing %u Command %u accesing Block %u\n",
                (unsigned int)p_BTableChangesDelta->ftl_cmd_cnt,
                PendingCMD[idx].CMD,
@@ -1879,7 +1879,7 @@ static int write_back_to_l2_cache(u8 *buf, u64 logical_addr)
 }
 
 /*
- * Seach in the Level2 Cache table to find the cache item.
+ * Search in the Level2 Cache table to find the cache item.
  * If find, read the data from the NAND page of L2 Cache,
  * Otherwise, return FAIL.
  */
@@ -3989,7 +3989,7 @@ int GLOB_FTL_Block_Erase(u64 blk_addr)
 * Inputs:       index to block that was just incremented and is at the max
 * Outputs:      PASS=0 / FAIL=1
 * Description:  If any erase counts at MAX, adjusts erase count of every
-*               block by substracting least worn
+*               block by subtracting least worn
 *               counter from counter value of every entry in wear table
 *&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
 static int FTL_Adjust_Relative_Erase_Count(u32 Index_of_MAX)
index d55a8e40318b3ae34004f836389ca1ffc0ee1003..3e68d58fdffdbd48474084f7e9c89db6d01c695c 100644 (file)
@@ -71,7 +71,7 @@
 #define SYNAPTICS_RMI4_DEVICE_CONTROL_FUNC_NUM (0x01)
 
 /**
- * struct synaptics_rmi4_fn_desc - contains the funtion descriptor information
+ * struct synaptics_rmi4_fn_desc - contains the function descriptor information
  * @query_base_addr: base address for query
  * @cmd_base_addr: base address for command
  * @ctrl_base_addr: base address for control
@@ -92,7 +92,7 @@ struct synaptics_rmi4_fn_desc {
 };
 
 /**
- * struct synaptics_rmi4_fn - contains the funtion information
+ * struct synaptics_rmi4_fn - contains the function information
  * @fn_number: function number
  * @num_of_data_sources: number of data sources
  * @num_of_data_points: number of fingers touched
@@ -151,7 +151,7 @@ struct synaptics_rmi4_device_info {
  * @input_dev: pointer for input device
  * @i2c_client: pointer for i2c client
  * @board: constant pointer for touch platform data
- * @fn_list_mutex: mutex for funtion list
+ * @fn_list_mutex: mutex for function list
  * @rmi4_page_mutex: mutex for rmi4 page
  * @current_page: variable for integer
  * @number_of_interrupt_register: interrupt registers count
@@ -278,7 +278,7 @@ static int synaptics_rmi4_i2c_byte_write(struct synaptics_rmi4_data *pdata,
        txbuf[0]        = address & MASK_8BIT;
        txbuf[1]        = data;
        retval          = i2c_master_send(pdata->i2c_client, txbuf, 2);
-       /* Add in retry on writes only in certian error return values */
+       /* Add in retry on writes only in certain error return values */
        if (retval != 2) {
                dev_err(&i2c->dev, "%s:failed:%d\n", __func__, retval);
                retval = -EIO;
@@ -561,7 +561,7 @@ static int synpatics_rmi4_touchpad_detect(struct synaptics_rmi4_data *pdata,
        }
        /*
         * 2D data sources have only 3 bits for the number of fingers
-        * supported - so the encoding is a bit wierd.
+        * supported - so the encoding is a bit weird.
         */
        if ((queries[1] & MASK_3BIT) <= 4)
                /* add 1 since zero based */
@@ -1027,7 +1027,7 @@ err_input:
  * synaptics_rmi4_remove() - Removes the i2c-client touchscreen driver
  * @client: i2c client structure pointer
  *
- * This funtion uses to remove the i2c-client
+ * This function uses to remove the i2c-client
  * touchscreen driver and returns integer.
  */
 static int __devexit synaptics_rmi4_remove(struct i2c_client *client)
@@ -1053,7 +1053,7 @@ static int __devexit synaptics_rmi4_remove(struct i2c_client *client)
  * synaptics_rmi4_suspend() - suspend the touch screen controller
  * @dev: pointer to device structure
  *
- * This funtion is used to suspend the
+ * This function is used to suspend the
  * touch panel controller and returns integer
  */
 static int synaptics_rmi4_suspend(struct device *dev)
@@ -1089,7 +1089,7 @@ static int synaptics_rmi4_suspend(struct device *dev)
  * synaptics_rmi4_resume() - resume the touch screen controller
  * @dev: pointer to device structure
  *
- * This funtion is used to resume the touch panel
+ * This function is used to resume the touch panel
  * controller and returns integer.
  */
 static int synaptics_rmi4_resume(struct device *dev)
@@ -1148,7 +1148,7 @@ static struct i2c_driver synaptics_rmi4_driver = {
 /**
  * synaptics_rmi4_init() - Initialize the touchscreen driver
  *
- * This funtion uses to initializes the synaptics
+ * This function uses to initializes the synaptics
  * touchscreen driver and returns integer.
  */
 static int __init synaptics_rmi4_init(void)
@@ -1158,7 +1158,7 @@ static int __init synaptics_rmi4_init(void)
 /**
  * synaptics_rmi4_exit() - De-initialize the touchscreen driver
  *
- * This funtion uses to de-initialize the synaptics
+ * This function uses to de-initialize the synaptics
  * touchscreen driver and returns none.
  */
 static void __exit synaptics_rmi4_exit(void)
index 1e0273e50d2b4485327b5e7f6a98f50a6b8514a0..7cb58710397578be0009da4325d38a36a2f690eb 100644 (file)
@@ -366,7 +366,7 @@ extern s32 dsp_debug;
  *  ======== sm_interrupt_dsp ========
  *  Purpose:
  *      Set interrupt value & send an interrupt to the DSP processor(s).
- *      This is typicaly used when mailbox interrupt mechanisms allow data
+ *      This is typically used when mailbox interrupt mechanisms allow data
  *      to be associated with interrupt such as for OMAP's CMD/DATA regs.
  *  Parameters:
  *      dev_context:    Handle to Bridge driver defined device info.
index 8381130e1460130277011a51320dd27b3fe9348b..6d66e7d0fba86442f3149129c924bb6c5b9e8a2e 100644 (file)
@@ -578,7 +578,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
                } else if (stat_sync == -EPERM) {
                        /* This can occur when the user mode thread is
                         * aborted (^C), or when _VWIN32_WaitSingleObject()
-                        * fails due to unkown causes. */
+                        * fails due to unknown causes. */
                        /* Even though Wait failed, there may be something in
                         * the Q: */
                        if (list_empty(&pchnl->io_completions)) {
index 390040984e0396b03674536ad37b1988c2d14985..fe1ef0addb09e4da2cf73f7fe36fac818b2bb436 100644 (file)
@@ -718,7 +718,7 @@ static void dload_symbols(struct dload_state *dlthis)
         * as a temporary for .dllview record construction.
         * Allocate storage for the whole table.  Add 1 to the section count
         * in case a trampoline section is auto-generated as well as the
-        * size of the trampoline section name so DLLView doens't get lost.
+        * size of the trampoline section name so DLLView doesn't get lost.
         */
 
        siz = sym_count * sizeof(struct local_symbol);
index 014f5d5293ae95d17a915c1534c575b6914e46c0..c214df9b205eb2fae88dae8222962c11cc685bdb 100644 (file)
@@ -59,7 +59,7 @@ enum hw_mmu_page_size_t {
  * RETURNS:
  *
  *       Type          : hw_status
- *       Description     : 0            -- No errors occured
+ *       Description     : 0            -- No errors occurred
  *                      RET_BAD_NULL_PARAM     -- A Pointer
  *                                             Paramater was set to NULL
  *
@@ -102,7 +102,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address);
  * RETURNS:
  *
  *       Type          : hw_status
- *       Description     : 0            -- No errors occured
+ *       Description     : 0            -- No errors occurred
  *                      RET_BAD_NULL_PARAM     -- A Pointer Paramater
  *                                                was set to NULL
  *                      RET_PARAM_OUT_OF_RANGE -- Input Parameter out
@@ -147,7 +147,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address,
  * RETURNS:
  *
  *       Type          : hw_status
- *       Description     : 0            -- No errors occured
+ *       Description     : 0            -- No errors occurred
  *                      RET_BAD_NULL_PARAM     -- A Pointer Paramater
  *                                                     was set to NULL
  *                      RET_PARAM_OUT_OF_RANGE -- Input Parameter
index d60e25258020c0d2bfdced8c75535ab8407763e3..6e7ab4fd8c39fbcb6983c0eeffc626cb7b7d1765 100644 (file)
@@ -144,7 +144,7 @@ struct chnl_object {
        s8 chnl_mode;           /* Chnl mode and attributes */
        /* Chnl I/O completion event (user mode) */
        void *user_event;
-       /* Abstract syncronization object */
+       /* Abstract synchronization object */
        struct sync_object *sync_event;
        u32 process;            /* Process which created this channel */
        u32 cb_arg;             /* Argument to use with callback */
@@ -156,7 +156,7 @@ struct chnl_object {
        struct list_head io_completions;
        struct list_head free_packets_list;     /* List of free Irps */
        struct ntfy_object *ntfy_obj;
-       u32 bytes_moved;        /* Total number of bytes transfered */
+       u32 bytes_moved;        /* Total number of bytes transferred */
 
        /* For DSP-DMA */
 
index b239503234215abccb8f0ea4e12e7b249922c002..685341c5069384a7e677286b8a71d245a38bb173 100644 (file)
@@ -55,7 +55,7 @@ extern void dsp_clk_exit(void);
  *      Initializes private state of CLK module.
  *  Parameters:
  *  Returns:
- *      TRUE if initialized; FALSE if error occured.
+ *      TRUE if initialized; FALSE if error occurred.
  *  Requires:
  *  Ensures:
  *      CLK initialized.
@@ -71,7 +71,7 @@ void dsp_gpt_wait_overflow(short int clk_id, unsigned int load);
  *  Parameters:
  *  Returns:
  *      0:     Success.
- *     -EPERM: Error occured while enabling the clock.
+ *     -EPERM: Error occurred while enabling the clock.
  *  Requires:
  *  Ensures:
  */
@@ -86,7 +86,7 @@ u32 dsp_clock_enable_all(u32 dsp_per_clocks);
  *  Parameters:
  *  Returns:
  *      0:        Success.
- *      -EPERM:      Error occured while disabling the clock.
+ *      -EPERM:      Error occurred while disabling the clock.
  *  Requires:
  *  Ensures:
  */
index 27a21b5f3ff0ec9ca148ef26888923f3c867df1b..aff22051cf57ed8a9ff2bbba39fdfc466c13b3db 100644 (file)
@@ -190,7 +190,7 @@ extern int cmm_get_info(struct cmm_object *hcmm_mgr,
  *      Initializes private state of CMM module.
  *  Parameters:
  *  Returns:
- *      TRUE if initialized; FALSE if error occured.
+ *      TRUE if initialized; FALSE if error occurred.
  *  Requires:
  *  Ensures:
  *      CMM initialized.
index 53bd4bb8b0bbda4abed48eb920ee1dad08644cbd..cb684c11b30262d4baebf929888c5064fa835c52 100644 (file)
@@ -249,7 +249,7 @@ extern int cod_get_sym_value(struct cod_manager *cod_mgr_obj,
  *  Parameters:
  *      None.
  *  Returns:
- *      TRUE if initialized; FALSE if error occured.
+ *      TRUE if initialized; FALSE if error occurred.
  *  Requires:
  *  Ensures:
  *      A requirement for each of the other public COD functions.
index f41e4783157f51a174448e538c8c114c09c08317..f92b4be0b413da1ae056a689398b00980ede3a77 100644 (file)
@@ -497,7 +497,7 @@ extern void dev_exit(void);
  *      Initialize DEV's private state, keeping a reference count on each call.
  *  Parameters:
  *  Returns:
- *      TRUE if initialized; FALSE if error occured.
+ *      TRUE if initialized; FALSE if error occurred.
  *  Requires:
  *  Ensures:
  *      TRUE: A requirement for the other public DEV functions.
index 25ef1a2c58eb8f2bef92e659ab452922bce6d179..9cdbd955dce9962ff252eda29e83353841e5d348 100644 (file)
@@ -154,7 +154,7 @@ struct process_context {
  *  Parameters:
  *      drv_obj:        Location to store created DRV Object handle.
  *  Returns:
- *      0:        Sucess
+ *      0:        Success
  *      -ENOMEM:    Failed in Memory allocation
  *      -EPERM:      General Failure
  *  Requires:
@@ -170,7 +170,7 @@ struct process_context {
  *      There is one Driver Object for the Driver representing
  *      the driver itself. It contains the list of device
  *      Objects and the list of Device Extensions in the system.
- *      Also it can hold other neccessary
+ *      Also it can hold other necessary
  *      information in its storage area.
  */
 extern int drv_create(struct drv_object **drv_obj);
@@ -180,7 +180,7 @@ extern int drv_create(struct drv_object **drv_obj);
  *  Purpose:
  *      destroys the Dev Object list, DrvExt list
  *      and destroy the DRV object
- *      Called upon driver unLoading.or unsuccesful loading of the driver.
+ *      Called upon driver unLoading.or unsuccessful loading of the driver.
  *  Parameters:
  *      driver_obj:     Handle to Driver object .
  *  Returns:
index c2ba26c09308f74ea14222153de47c645f039f79..ed32bf3831329e45b9207df26566481a51b08a62 100644 (file)
@@ -52,7 +52,7 @@ struct bridge_dev_context;
  *      dev_ctxt:    Handle to Bridge driver defined device context.
  *  Returns:
  *      0:        Success.
- *      -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
+ *      -ETIMEDOUT:  Timeout occurred waiting for a response from hardware.
  *      -EPERM:      Other, unspecified error.
  *  Requires:
  *      dev_ctxt != NULL
@@ -91,7 +91,7 @@ typedef int(*fxn_brd_setstate) (struct bridge_dev_context
  *      dsp_addr:       DSP address at which to start execution.
  *  Returns:
  *      0:        Success.
- *      -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
+ *      -ETIMEDOUT:  Timeout occurred waiting for a response from hardware.
  *      -EPERM:      Other, unspecified error.
  *  Requires:
  *      dev_ctxt != NULL
@@ -142,7 +142,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
  *      mem_type:       Memory space on DSP to which to transfer.
  *  Returns:
  *      0:        Success.
- *      -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
+ *      -ETIMEDOUT:  Timeout occurred waiting for a response from hardware.
  *      -EPERM:      Other, unspecified error.
  *  Requires:
  *      dev_ctxt != NULL;
@@ -205,7 +205,7 @@ typedef int(*fxn_brd_memunmap) (struct bridge_dev_context
  *      dev_ctxt:    Handle to Bridge driver defined device context.
  *  Returns:
  *      0:        Success.
- *      -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
+ *      -ETIMEDOUT:  Timeout occurred waiting for a response from hardware.
  *      -EPERM:      Other, unspecified error.
  *  Requires:
  *      dev_ctxt != NULL
@@ -248,7 +248,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
  *      mem_type:       Memory space on DSP from which to transfer.
  *  Returns:
  *      0:        Success.
- *      -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
+ *      -ETIMEDOUT:  Timeout occurred waiting for a response from hardware.
  *      -EPERM:      Other, unspecified error.
  *  Requires:
  *      dev_ctxt != NULL;
@@ -274,7 +274,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
  *      mem_type:       Memory space on DSP to which to transfer.
  *  Returns:
  *      0:        Success.
- *      -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
+ *      -ETIMEDOUT:  Timeout occurred waiting for a response from hardware.
  *      -EPERM:      Other, unspecified error.
  *  Requires:
  *      dev_ctxt != NULL;
@@ -601,7 +601,7 @@ typedef int(*fxn_chnl_getmgrinfo) (struct chnl_mgr
  *  Returns:
  *      0:            Success;
  *      -EFAULT:        Invalid chnl_obj.
- *      -ETIMEDOUT: Timeout occured before channel could be idled.
+ *      -ETIMEDOUT: Timeout occurred before channel could be idled.
  *  Requires:
  *  Ensures:
  */
index e506c4d494725505880a596b02e70c657a889209..47b0318430e1d2a75968c9f0af7c9e39040e7cd6 100644 (file)
@@ -176,7 +176,7 @@ extern void mgr_exit(void);
  *      mgr_handle:     Handle to the Manager Object
  *      dcd_handle:     Ptr to receive the DCD Handle.
  *  Returns:
- *      0:        Sucess
+ *      0:        Success
  *      -EPERM:      Failure to get the Handle
  *  Requires:
  *      MGR is initialized.
@@ -195,7 +195,7 @@ extern int mgr_get_dcd_handle(struct mgr_object
  *      call. Initializes the DCD.
  *  Parameters:
  *  Returns:
- *      TRUE if initialized; FALSE if error occured.
+ *      TRUE if initialized; FALSE if error occurred.
  *  Requires:
  *  Ensures:
  *      TRUE: A requirement for the other public MGR functions.
index 53da0ef483c836bcdb88986bc3010ae3bab60a57..16371d818e3d28ea8a2edf156a9ffdf9c170ce90 100644 (file)
@@ -44,7 +44,7 @@
  *      -ESPIPE:        iAlg functions not found for a DAIS node.
  *      -EDOM:         attr_in != NULL and attr_in->prio out of
  *                          range.
- *      -EPERM:          A failure occured, unable to allocate node.
+ *      -EPERM:          A failure occurred, unable to allocate node.
  *      -EBADR:    Proccessor is not in the running state.
  *  Requires:
  *      node_init(void) called.
index 5e09fd165d9d4c9294aaf76333ca290cde8e6f26..f00dffd51989b5d5b27bfd57d5c0c4e24b4b6e44 100644 (file)
@@ -89,7 +89,7 @@ extern int proc_auto_start(struct cfg_devnode *dev_node_obj,
  *  Returns:
  *      0     :       SUCCESS
  *      -EFAULT :       Invalid processor handle.
- *      -ETIME:       A Timeout Occured before the Control information
+ *      -ETIME:       A Timeout Occurred before the Control information
  *                       could be sent.
  *      -EPERM   :       General Failure.
  *  Requires:
@@ -169,7 +169,7 @@ extern int proc_enum_nodes(void *hprocessor,
  *      0     :       Success.
  *      -EFAULT :       Invalid processor handle.
  *      -EBADR:    The processor is not in the PROC_RUNNING state.
- *      -ETIME:       A timeout occured before the DSP responded to the
+ *      -ETIME:       A timeout occurred before the DSP responded to the
  *                       querry.
  *      -EPERM   :       Unable to get Resource Information
  *  Requires:
@@ -229,7 +229,7 @@ extern int proc_get_dev_object(void *hprocessor,
  *      call.
  *  Parameters:
  *  Returns:
- *      TRUE if initialized; FALSE if error occured.
+ *      TRUE if initialized; FALSE if error occurred.
  *  Requires:
  *  Ensures:
  *      TRUE: A requirement for the other public PROC functions.
index 5e3ab2123aaa3909b36b5b17dd544987f4b8f528..0fb066488da9239757c26a96ea5c841666589f5e 100644 (file)
@@ -46,7 +46,7 @@
  *      0:            Success.
  *      0: Success, but the DSP was already asleep.
  *      -EINVAL:    The specified sleep_code is not supported.
- *      -ETIME:       A timeout occured while waiting for DSP sleep
+ *      -ETIME:       A timeout occurred while waiting for DSP sleep
  *                          confirmation.
  *      -EPERM:          General failure, unable to send sleep command to
  *                          the DSP.
@@ -67,7 +67,7 @@ extern int pwr_sleep_dsp(const u32 sleep_code, const u32 timeout);
  *  Returns:
  *      0:            Success.
  *      0:  Success, but the DSP was already awake.
- *      -ETIME:       A timeout occured while waiting for wake
+ *      -ETIME:       A timeout occurred while waiting for wake
  *                          confirmation.
  *      -EPERM:          General failure, unable to send wake command to
  *                          the DSP.
@@ -85,7 +85,7 @@ extern int pwr_wake_dsp(const u32 timeout);
  *  Returns:
  *      0:            Success.
  *      0:  Success, but the DSP was already awake.
- *      -ETIME:       A timeout occured while waiting for wake
+ *      -ETIME:       A timeout occurred while waiting for wake
  *                          confirmation.
  *      -EPERM:          General failure, unable to send wake command to
  *                          the DSP.
@@ -103,7 +103,7 @@ extern int pwr_pm_pre_scale(u16 voltage_domain, u32 level);
  *  Returns:
  *      0:            Success.
  *      0:  Success, but the DSP was already awake.
- *      -ETIME:       A timeout occured while waiting for wake
+ *      -ETIME:       A timeout occurred while waiting for wake
  *                          confirmation.
  *      -EPERM:          General failure, unable to send wake command to
  *                          the DSP.
index 9a38d86a84a05c55ef329cb9b5f2e8443e407e58..522810bc742738c35b12faea00f027d13ab96769 100644 (file)
@@ -787,7 +787,7 @@ int dev_notify_clients(struct dev_object *dev_obj, u32 ret)
 
        /*
         * FIXME: this code needs struct proc_object to have a list_head
-        * at the begining. If not, this can go horribly wrong.
+        * at the beginning. If not, this can go horribly wrong.
         */
        list_for_each(curr, &dev_obj->proc_list)
                proc_notify_clients((void *)curr, ret);
@@ -810,7 +810,7 @@ int dev_remove_device(struct cfg_devnode *dev_node_obj)
        if (!dev_node_obj)
                status = -EFAULT;
 
-       /* Retrieve the device object handle originaly stored with
+       /* Retrieve the device object handle originally stored with
         * the dev_node: */
        if (!status) {
                /* check the device string and then store dev object */
@@ -986,7 +986,7 @@ int dev_insert_proc_object(struct dev_object *hdev_obj,
        /* Add DevObject to tail. */
        /*
         * FIXME: this code needs struct proc_object to have a list_head
-        * at the begining. If not, this can go horribly wrong.
+        * at the beginning. If not, this can go horribly wrong.
         */
        list_add_tail((struct list_head *)proc_obj, &dev_obj->proc_list);
 
index 8c88583364eba8ead4ab38e524a59978fa1b8515..db8215f540d8fb4ca390d43926d5e05197fd1628 100644 (file)
@@ -609,7 +609,7 @@ int drv_request_resources(u32 dw_context, u32 *dev_node_strg)
        DBC_REQUIRE(dev_node_strg != NULL);
 
        /*
-        *  Allocate memory to hold the string. This will live untill
+        *  Allocate memory to hold the string. This will live until
         *  it is freed in the Release resources. Update the driver object
         *  list.
         */
index fb5c2ba01d47279faacbb9a8e123b4477a3ae03c..0e70cba15ebcbe7ac3af7a92da6455b2dca635ad 100644 (file)
@@ -57,9 +57,9 @@
  *   uuuuuuuu|fueeeeee|fudddddd|fucccccc|
  *  where
  *      u = unused
- *      cccccc = prefered/required dynamic mem segid for create phase data/code
- *      dddddd = prefered/required dynamic mem segid for delete phase data/code
- *      eeeeee = prefered/req. dynamic mem segid for execute phase data/code
+ *      cccccc = preferred/required dynamic mem segid for create phase data/code
+ *      dddddd = preferred/required dynamic mem segid for delete phase data/code
+ *      eeeeee = preferred/req. dynamic mem segid for execute phase data/code
  *      f = flag indicating if memory is preferred or required:
  *       f = 1 if required, f = 0 if preferred.
  *
index c4e5c4e0d71c9e543eb21d5b6990a5eefed8232e..242dd139999674a900057a8ba5182d215149d351 100644 (file)
@@ -1670,7 +1670,7 @@ int proc_stop(void *hprocessor)
        if (!status) {
                dev_dbg(bridge, "%s: processor in standby mode\n", __func__);
                p_proc_object->proc_state = PROC_STOPPED;
-               /* Destory the Node Manager, msg_ctrl Manager */
+               /* Destroy the Node Manager, msg_ctrl Manager */
                if (!(dev_destroy2(p_proc_object->dev_obj))) {
                        /* Destroy the msg_ctrl by calling msg_delete */
                        dev_get_msg_mgr(p_proc_object->dev_obj, &hmsg_mgr);
@@ -1827,7 +1827,7 @@ static int proc_monitor(struct proc_object *proc_obj)
 
        /* This is needed only when Device is loaded when it is
         * already 'ACTIVE' */
-       /* Destory the Node Manager, msg_ctrl Manager */
+       /* Destroy the Node Manager, msg_ctrl Manager */
        if (!dev_destroy2(proc_obj->dev_obj)) {
                /* Destroy the msg_ctrl by calling msg_delete */
                dev_get_msg_mgr(proc_obj->dev_obj, &hmsg_mgr);
index c80a316d9d8f79d5d635c0c9198bec7532a5866f..17db6684abbed34be3729b6fdecc5c9c38ec33aa 100644 (file)
@@ -182,7 +182,7 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q,
        if (!buf)
                return;
 
-       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       /* Cleans up buffer - Useful for testing for frame/URB loss */
        outp = videobuf_to_vmalloc(&(*buf)->vb);
 
        return;
index 9940966e7a1d7cd098c2cf7168483022b87c2441..8c2ad654b79d3418d7ce2de977d70085f53a9a5d 100644 (file)
@@ -9,7 +9,7 @@
  *      Please DO contact io8-linux@specialix.co.uk if you require
  *      support.
  *
- *      This driver was developped in the BitWizard linux device
+ *      This driver was developed in the BitWizard linux device
  *      driver service. If you require a linux device driver for your
  *      product, please contact devices@BitWizard.nl for a quote.
  *
index 7ad3638967aeb1519c6fc09d9bd5b00958660fdc..7f1369e5b418924b77e9d2e0ac8b6f36c304a307 100644 (file)
@@ -7,7 +7,7 @@
        ** This driver is no longer supported by Digi **
 
        Much of this design and code came from epca.c which was
-       copyright (C) 1994, 1995 Troy De Jongh, and subsquently
+       copyright (C) 1994, 1995 Troy De Jongh, and subsequently
        modified by David Nugent, Christoph Lameter, Mike McLagan.
 
        This program is free software; you can redistribute it and/or modify
@@ -471,7 +471,7 @@ static void shutdown(struct channel *ch, struct tty_struct *tty)
        memoff(ch);
 
        /*
-        * The channel has officialy been closed. The next time it is opened it
+        * The channel has officially been closed. The next time it is opened it
         * will have to reinitialized. Set a flag to indicate this.
         */
        /* Prevent future Digi programmed interrupts from coming active */
@@ -975,7 +975,7 @@ static int __init pc_init(void)
 
        /*
         * Note : If lilo was used to configure the driver and the ignore
-        * epcaconfig option was choosen (digiepca=2) then nbdevs and num_cards
+        * epcaconfig option was chosen (digiepca=2) then nbdevs and num_cards
         * will equal 0 at this point. This is okay; PCI cards will still be
         * picked up if detected.
         */
@@ -1230,14 +1230,14 @@ static void post_fep_init(unsigned int crd)
        memaddr = bd->re_map_membase;
 
        /*
-        * The below assignment will set bc to point at the BEGINING of the
+        * The below assignment will set bc to point at the BEGINNING of the
         * cards channel structures. For 1 card there will be between 8 and 64
         * of these structures.
         */
        bc = memaddr + CHANSTRUCT;
 
        /*
-        * The below assignment will set gd to point at the BEGINING of global
+        * The below assignment will set gd to point at the BEGINNING of global
         * memory address 0xc00. The first data in that global memory actually
         * starts at address 0xc1a. The command in pointer begins at 0xd10.
         */
@@ -1492,7 +1492,7 @@ static void doevent(int crd)
                /*
                 * The two assignments below get the current modem status
                 * (mstat) and the previous modem status (lstat). These are
-                * useful becuase an event could signal a change in modem
+                * useful because an event could signal a change in modem
                 * signals itself.
                 */
                mstat = readb(eventbuf + 2);
@@ -1897,7 +1897,7 @@ static void receive_data(struct channel *ch, struct tty_struct *tty)
                /*
                 * Even if head has wrapped around only report the amount of
                 * data to be equal to the size - tail. Remember memcpy can't
-                * automaticly wrap around the receive buffer.
+                * automatically wrap around the receive buffer.
                 */
                dataToRead = (wrapgap < bytesAvailable) ? wrapgap
                                                        : bytesAvailable;
@@ -2543,7 +2543,7 @@ static void __init epca_setup(char *str, int *ints)
                                        break;
                        /*
                         * If the index incremented above refers to a
-                        * legitamate board type set it here.
+                        * legitimate board type set it here.
                         */
                        if (index < EPCA_NUM_TYPES)
                                board.type = loop;
index c0ba6c05f0cd6cd51d4c971caf3140e859e5fced..8df2f487217a19b154e289c4b980cf592b2eb393 100644 (file)
@@ -335,7 +335,7 @@ be off by a factor of five. The important point is that the first command reset
 in fact generates a reset pulse on the board. This pulse is guaranteed to last
 less than 10 milliseconds. The additional delay ensures the 1400 has had the
 chance to respond sufficiently to the first reset. Why not a longer delay? Much
-more than 50 milliseconds gets to be noticable, but the board would still work.
+more than 50 milliseconds gets to be noticeable, but the board would still work.
 
 Once all 16 bytes of the Power-on Reset Message have been read, the bootstrap
 firmware is ready to receive loadware.
@@ -399,7 +399,7 @@ typedef union _porStr               // "por" stands for Power On Reset
                // expandable products must report a MAP of available channels. Since 
                // each UART supports four ports, we represent each UART found by a
                // single bit. Using two bytes to supply the mapping information we
-               // report the presense or absense of up to 16 UARTS, or 64 ports in
+               // report the presence or absence of up to 16 UARTS, or 64 ports in
                // steps of 4 ports. For -IIEX products, the ports are numbered
                // starting at the box closest to the controller in the "chain".
 
index 0d10b89218ed1da1818f47c643705f99d9dd3b55..13a3caba85f2fce32f7e669b5e0f751113f78b14 100644 (file)
@@ -821,7 +821,7 @@ i2GetStatus(i2ChanStrPtr pCh, int resetBits)
 //
 // Description:
 // Strips data from the input buffer and writes it to pDest. If there is a
-// collosal blunder, (invalid structure pointers or the like), returns -1.
+// colossal blunder, (invalid structure pointers or the like), returns -1.
 // Otherwise, returns the number of bytes read.
 //******************************************************************************
 static int
@@ -909,7 +909,7 @@ i2Input_exit:
 // Returns:    Number of bytes stripped, or -1 for error
 //
 // Description:
-// Strips any data from the input buffer. If there is a collosal blunder,
+// Strips any data from the input buffer. If there is a colossal blunder,
 // (invalid structure pointers or the like), returns -1. Otherwise, returns the
 // number of bytes stripped.
 //******************************************************************************
@@ -963,7 +963,7 @@ i2InputFlush(i2ChanStrPtr pCh)
 // Returns:    Number of bytes available, or -1 for error
 //
 // Description:
-// If there is a collosal blunder, (invalid structure pointers or the like),
+// If there is a colossal blunder, (invalid structure pointers or the like),
 // returns -1. Otherwise, returns the number of bytes stripped. Otherwise,
 // returns the number of bytes available in the buffer.
 //******************************************************************************
@@ -1001,7 +1001,7 @@ i2InputAvailable(i2ChanStrPtr pCh)
 //
 // Description:
 // Queues the data at pSource to be sent as data packets to the board. If there
-// is a collosal blunder, (invalid structure pointers or the like), returns -1.
+// is a colossal blunder, (invalid structure pointers or the like), returns -1.
 // Otherwise, returns the number of bytes written. What if there is not enough
 // room for all the data? If pCh->channelOptions & CO_NBLOCK_WRITE is set, then
 // we transfer as many characters as we can now, then return. If this bit is
index ea7a8fb082832c903e5a3f8475d7f9afe7d69a6f..ba074fbb4ce28af0bc2c30d649e97f2611342f20 100644 (file)
@@ -1824,7 +1824,7 @@ ip2_flush_chars( PTTY tty )
 //             ip2trace (CHANN, ITRC_PUTC, 10, 1, strip );
 
                //
-               // We may need to restart i2Output if it does not fullfill this request
+               // We may need to restart i2Output if it does not fulfill this request
                //
                strip = i2Output( pCh, pCh->Pbuf, pCh->Pbuf_stuff);
                if ( strip != pCh->Pbuf_stuff ) {
index 17a1be536a46beefad72d15a1737881d4df28fa0..5c3598ec74560c56ce1a33115b1e95e14220a81b 100644 (file)
@@ -9,7 +9,7 @@
  *      support. But please read the documentation (specialix.txt)
  *      first.
  *
- *      This driver was developped in the BitWizard linux device
+ *      This driver was developed in the BitWizard linux device
  *      driver service. If you require a linux device driver for your
  *      product, please contact devices@BitWizard.nl for a quote.
  *
@@ -978,7 +978,7 @@ static void sx_change_speed(struct specialix_board *bp,
        spin_lock_irqsave(&bp->lock, flags);
        sx_out(bp, CD186x_CAR, port_No(port));
 
-       /* The Specialix board doens't implement the RTS lines.
+       /* The Specialix board doesn't implement the RTS lines.
           They are used to set the IRQ level. Don't touch them. */
        if (sx_crtscts(tty))
                port->MSVR = MSVR_DTR | (sx_in(bp, CD186x_MSVR) & MSVR_RTS);
index c63005274d9b89afbded4f810c1d7272e7cf33cc..1215d7e2cb37a67ee20d34b9164115bf2d4001e2 100644 (file)
@@ -10,7 +10,7 @@
  *      Please DO contact io8-linux@specialix.co.uk if you require
  *      support.
  *
- *      This driver was developped in the BitWizard linux device
+ *      This driver was developed in the BitWizard linux device
  *      driver service. If you require a linux device driver for your
  *      product, please contact devices@BitWizard.nl for a quote.
  *
@@ -79,7 +79,7 @@ more than a few  PCI versions of the card. */
 
 #define SPECIALIX_MAGIC                0x0907
 
-#define SX_CCR_TIMEOUT 10000   /* CCR timeout. You may need to wait upto
+#define SX_CCR_TIMEOUT 10000   /* CCR timeout. You may need to wait up to
                                   10 milliseconds before the internal
                                   processor is available again after
                                   you give it a command */
index 8214c353d9f5224921c9d6d6962c4b31f2a979ff..bce7d039346c264cadfbee4d8d917678ed957f75 100644 (file)
@@ -220,8 +220,10 @@ static void stub_shutdown_connection(struct usbip_device *ud)
        }
 
        /* 1. stop threads */
-       kthread_stop(ud->tcp_rx);
-       kthread_stop(ud->tcp_tx);
+       if (ud->tcp_rx && !task_is_dead(ud->tcp_rx))
+               kthread_stop(ud->tcp_rx);
+       if (ud->tcp_tx && !task_is_dead(ud->tcp_tx))
+               kthread_stop(ud->tcp_tx);
 
        /* 2. close the socket */
        /*
index 6445f12cb4fd40cefacf77252fcfbf22eb7b3ff2..51fbd09864751cc3de95b091dda6e822c0f9660a 100644 (file)
@@ -171,33 +171,23 @@ static int tweak_set_configuration_cmd(struct urb *urb)
 
 static int tweak_reset_device_cmd(struct urb *urb)
 {
-       struct usb_ctrlrequest *req;
-       __u16 value;
-       __u16 index;
-       int ret;
-
-       req = (struct usb_ctrlrequest *) urb->setup_packet;
-       value = le16_to_cpu(req->wValue);
-       index = le16_to_cpu(req->wIndex);
-
-       usbip_uinfo("reset_device (port %d) to %s\n", index,
-                                               dev_name(&urb->dev->dev));
+       struct stub_priv *priv = (struct stub_priv *) urb->context;
+       struct stub_device *sdev = priv->sdev;
 
-       /* all interfaces should be owned by usbip driver, so just reset it.  */
-       ret = usb_lock_device_for_reset(urb->dev, NULL);
-       if (ret < 0) {
-               dev_err(&urb->dev->dev, "lock for reset\n");
-               return ret;
-       }
-
-       /* try to reset the device */
-       ret = usb_reset_device(urb->dev);
-       if (ret < 0)
-               dev_err(&urb->dev->dev, "device reset\n");
+       usbip_uinfo("reset_device %s\n", dev_name(&urb->dev->dev));
 
-       usb_unlock_device(urb->dev);
-
-       return ret;
+       /*
+        * usb_lock_device_for_reset caused a deadlock: it causes the driver
+        * to unbind. In the shutdown the rx thread is signalled to shut down
+        * but this thread is pending in the usb_lock_device_for_reset.
+        *
+        * Instead queue the reset.
+        *
+        * Unfortunatly an existing usbip connection will be dropped due to
+        * driver unbinding.
+        */
+       usb_queue_reset_device(sdev->interface);
+       return 0;
 }
 
 /*
index 5523f25998e6fcbae42de8490a7cee68f47506ca..64a52b26dcf6d7fe9d185372393a11f8af0e0149 100644 (file)
@@ -170,7 +170,6 @@ static int stub_send_ret_submit(struct stub_device *sdev)
        struct stub_priv *priv, *tmp;
 
        struct msghdr msg;
-       struct kvec iov[3];
        size_t txsize;
 
        size_t total_size = 0;
@@ -180,28 +179,73 @@ static int stub_send_ret_submit(struct stub_device *sdev)
                struct urb *urb = priv->urb;
                struct usbip_header pdu_header;
                void *iso_buffer = NULL;
+               struct kvec *iov = NULL;
+               int iovnum = 0;
 
                txsize = 0;
                memset(&pdu_header, 0, sizeof(pdu_header));
                memset(&msg, 0, sizeof(msg));
-               memset(&iov, 0, sizeof(iov));
 
-               usbip_dbg_stub_tx("setup txdata urb %p\n", urb);
+               if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS)
+                       iovnum = 2 + urb->number_of_packets;
+               else
+                       iovnum = 2;
+
+               iov = kzalloc(iovnum * sizeof(struct kvec), GFP_KERNEL);
 
+               if (!iov) {
+                       usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_MALLOC);
+                       return -1;
+               }
+
+               iovnum = 0;
 
                /* 1. setup usbip_header */
                setup_ret_submit_pdu(&pdu_header, urb);
+               usbip_dbg_stub_tx("setup txdata seqnum: %d urb: %p\n",
+                                               pdu_header.base.seqnum, urb);
+               /*usbip_dump_header(pdu_header);*/
                usbip_header_correct_endian(&pdu_header, 1);
 
-               iov[0].iov_base = &pdu_header;
-               iov[0].iov_len  = sizeof(pdu_header);
+               iov[iovnum].iov_base = &pdu_header;
+               iov[iovnum].iov_len  = sizeof(pdu_header);
+               iovnum++;
                txsize += sizeof(pdu_header);
 
                /* 2. setup transfer buffer */
-               if (usb_pipein(urb->pipe) && urb->actual_length > 0) {
-                       iov[1].iov_base = urb->transfer_buffer;
-                       iov[1].iov_len  = urb->actual_length;
+               if (usb_pipein(urb->pipe) &&
+                               usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS &&
+                                       urb->actual_length > 0) {
+                       iov[iovnum].iov_base = urb->transfer_buffer;
+                       iov[iovnum].iov_len  = urb->actual_length;
+                       iovnum++;
                        txsize += urb->actual_length;
+               } else if (usb_pipein(urb->pipe) &&
+                               usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+                       /*
+                        * For isochronous packets: actual length is the sum of
+                        * the actual length of the individual, packets, but as
+                        * the packet offsets are not changed there will be
+                        * padding between the packets. To optimally use the
+                        * bandwidth the padding is not transmitted.
+                        */
+
+                       int i;
+                       for (i = 0; i < urb->number_of_packets; i++) {
+                               iov[iovnum].iov_base = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
+                               iov[iovnum].iov_len = urb->iso_frame_desc[i].actual_length;
+                               iovnum++;
+                               txsize += urb->iso_frame_desc[i].actual_length;
+                       }
+
+                       if (txsize != sizeof(pdu_header) + urb->actual_length) {
+                               dev_err(&sdev->interface->dev,
+                                       "actual length of urb (%d) does not match iso packet sizes (%d)\n",
+                                       urb->actual_length, txsize-sizeof(pdu_header));
+                               kfree(iov);
+                               usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_TCP);
+                          return -1;
+                       }
                }
 
                /* 3. setup iso_packet_descriptor */
@@ -212,32 +256,34 @@ static int stub_send_ret_submit(struct stub_device *sdev)
                        if (!iso_buffer) {
                                usbip_event_add(&sdev->ud,
                                                SDEV_EVENT_ERROR_MALLOC);
+                               kfree(iov);
                                return -1;
                        }
 
-                       iov[2].iov_base = iso_buffer;
-                       iov[2].iov_len  = len;
+                       iov[iovnum].iov_base = iso_buffer;
+                       iov[iovnum].iov_len  = len;
                        txsize += len;
+                       iovnum++;
                }
 
-               ret = kernel_sendmsg(sdev->ud.tcp_socket, &msg, iov,
-                                    3, txsize);
+               ret = kernel_sendmsg(sdev->ud.tcp_socket, &msg,
+                                               iov,  iovnum, txsize);
                if (ret != txsize) {
                        dev_err(&sdev->interface->dev,
                                "sendmsg failed!, retval %d for %zd\n",
                                ret, txsize);
+                       kfree(iov);
                        kfree(iso_buffer);
                        usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_TCP);
                        return -1;
                }
 
+               kfree(iov);
                kfree(iso_buffer);
-               usbip_dbg_stub_tx("send txdata\n");
 
                total_size += txsize;
        }
 
-
        spin_lock_irqsave(&sdev->priv_lock, flags);
 
        list_for_each_entry_safe(priv, tmp, &sdev->priv_free, list) {
index 337abc48f714d11786402288258af4d38ca5636b..7b1fe45bf7ddf71c733c9853ed30c5fe26c5d98a 100644 (file)
@@ -333,10 +333,11 @@ void usbip_dump_header(struct usbip_header *pdu)
                usbip_udbg("CMD_UNLINK: seq %u\n", pdu->u.cmd_unlink.seqnum);
                break;
        case USBIP_RET_SUBMIT:
-               usbip_udbg("RET_SUBMIT: st %d al %u sf %d ec %d\n",
+               usbip_udbg("RET_SUBMIT: st %d al %u sf %d #p %d ec %d\n",
                                pdu->u.ret_submit.status,
                                pdu->u.ret_submit.actual_length,
                                pdu->u.ret_submit.start_frame,
+                               pdu->u.ret_submit.number_of_packets,
                                pdu->u.ret_submit.error_count);
        case USBIP_RET_UNLINK:
                usbip_udbg("RET_UNLINK: status %d\n", pdu->u.ret_unlink.status);
@@ -520,6 +521,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb,
                rpdu->status            = urb->status;
                rpdu->actual_length     = urb->actual_length;
                rpdu->start_frame       = urb->start_frame;
+               rpdu->number_of_packets = urb->number_of_packets;
                rpdu->error_count       = urb->error_count;
        } else {
                /* vhci_rx.c */
@@ -527,6 +529,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb,
                urb->status             = rpdu->status;
                urb->actual_length      = rpdu->actual_length;
                urb->start_frame        = rpdu->start_frame;
+               urb->number_of_packets = rpdu->number_of_packets;
                urb->error_count        = rpdu->error_count;
        }
 }
@@ -595,11 +598,13 @@ static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu,
                cpu_to_be32s(&pdu->status);
                cpu_to_be32s(&pdu->actual_length);
                cpu_to_be32s(&pdu->start_frame);
+               cpu_to_be32s(&pdu->number_of_packets);
                cpu_to_be32s(&pdu->error_count);
        } else {
                be32_to_cpus(&pdu->status);
                be32_to_cpus(&pdu->actual_length);
                be32_to_cpus(&pdu->start_frame);
+               cpu_to_be32s(&pdu->number_of_packets);
                be32_to_cpus(&pdu->error_count);
        }
 }
@@ -725,6 +730,7 @@ int usbip_recv_iso(struct usbip_device *ud, struct urb *urb)
        int size = np * sizeof(*iso);
        int i;
        int ret;
+       int total_length = 0;
 
        if (!usb_pipeisoc(urb->pipe))
                return 0;
@@ -754,19 +760,75 @@ int usbip_recv_iso(struct usbip_device *ud, struct urb *urb)
                return -EPIPE;
        }
 
+
        for (i = 0; i < np; i++) {
                iso = buff + (i * sizeof(*iso));
 
                usbip_iso_pakcet_correct_endian(iso, 0);
                usbip_pack_iso(iso, &urb->iso_frame_desc[i], 0);
+               total_length += urb->iso_frame_desc[i].actual_length;
        }
 
        kfree(buff);
 
+       if (total_length != urb->actual_length) {
+               dev_err(&urb->dev->dev,
+                 "total length of iso packets (%d) not equal to actual length of buffer (%d)\n",
+                 total_length, urb->actual_length);
+
+               if (ud->side == USBIP_STUB)
+                       usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
+               else
+                       usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
+
+               return -EPIPE;
+       }
+
        return ret;
 }
 EXPORT_SYMBOL_GPL(usbip_recv_iso);
 
+/*
+ * This functions restores the padding which was removed for optimizing
+ * the bandwidth during transfer over tcp/ip
+ *
+ * buffer and iso packets need to be stored and be in propeper endian in urb
+ * before calling this function
+ */
+int usbip_pad_iso(struct usbip_device *ud, struct urb *urb)
+{
+       int np = urb->number_of_packets;
+       int i;
+       int ret;
+       int actualoffset = urb->actual_length;
+
+       if (!usb_pipeisoc(urb->pipe))
+               return 0;
+
+       /* if no packets or length of data is 0, then nothing to unpack */
+       if (np == 0 || urb->actual_length == 0)
+               return 0;
+
+       /*
+        * if actual_length is transfer_buffer_length then no padding is
+        * present.
+       */
+       if (urb->actual_length == urb->transfer_buffer_length)
+               return 0;
+
+       /*
+        * loop over all packets from last to first (to prevent overwritting
+        * memory when padding) and move them into the proper place
+        */
+       for (i = np-1; i > 0; i--) {
+               actualoffset -= urb->iso_frame_desc[i].actual_length;
+               memmove(urb->transfer_buffer + urb->iso_frame_desc[i].offset,
+                                 urb->transfer_buffer + actualoffset,
+                                 urb->iso_frame_desc[i].actual_length);
+       }
+       return ret;
+}
+EXPORT_SYMBOL_GPL(usbip_pad_iso);
 
 /* some members of urb must be substituted before. */
 int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
index 9f809c315d92fc15f62ac94e2b63f07c74147bfa..c767f52be5fb1499d341a574cfc33de052ae34bd 100644 (file)
@@ -379,6 +379,8 @@ void usbip_header_correct_endian(struct usbip_header *pdu, int send);
 int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb);
 /* some members of urb must be substituted before. */
 int usbip_recv_iso(struct usbip_device *ud, struct urb *urb);
+/* some members of urb must be substituted before. */
+int usbip_pad_iso(struct usbip_device *ud, struct urb *urb);
 void *usbip_alloc_iso_desc_pdu(struct urb *urb, ssize_t *bufflen);
 
 
index e2348499859844b5f74cb6537f382eb3059b80b0..0f02a4b12ae4a29b05b68710d178686251acd713 100644 (file)
@@ -194,7 +194,7 @@ void rh_port_disconnect(int rhport)
  *
  * So, the maximum number of ports is 31 ( port 0 to port 30) ?
  *
- * The return value is the actual transfered length in byte. If nothing has
+ * The return value is the actual transferred length in byte. If nothing has
  * been changed, return 0. In the case that the number of ports is less than or
  * equal to 6 (VHCI_NPORTS==7), return 1.
  *
index 09bf2355934bb6834e67641ab679faec43e88818..2ffc96a4c0d4e3c11a6e0836d51f9b41af350770 100644 (file)
@@ -100,6 +100,9 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
        if (usbip_recv_iso(ud, urb) < 0)
                return;
 
+       /* restore the padding in iso packets */
+       if (usbip_pad_iso(ud, urb) < 0)
+               return;
 
        if (usbip_dbg_flag_vhci_rx)
                usbip_dump_urb(urb);
index d4a48c4e59c22d4fa6a4e677ccc335ede0e03648..a4007287ef4707e9fc431c13443951b8066937b7 100644 (file)
@@ -621,7 +621,7 @@ static int ca91cx42_master_set(struct vme_master_resource *image, int enabled,
 
        /*
         * Let's allocate the resource here rather than further up the stack as
-        * it avoids pushing loads of bus dependant stuff up the stack
+        * it avoids pushing loads of bus dependent stuff up the stack
         */
        retval = ca91cx42_alloc_resource(image, size);
        if (retval) {
@@ -1052,7 +1052,7 @@ static int ca91cx42_dma_list_add(struct vme_dma_list *list,
                pci_attr = dest->private;
        }
 
-       /* Check we can do fullfill required attributes */
+       /* Check we can do fulfill required attributes */
        if ((vme_attr->aspace & ~(VME_A16 | VME_A24 | VME_A32 | VME_USER1 |
                VME_USER2)) != 0) {
 
@@ -1069,7 +1069,7 @@ static int ca91cx42_dma_list_add(struct vme_dma_list *list,
                goto err_cycle;
        }
 
-       /* Check to see if we can fullfill source and destination */
+       /* Check to see if we can fulfill source and destination */
        if (!(((src->type == VME_DMA_PCI) && (dest->type == VME_DMA_VME)) ||
                ((src->type == VME_DMA_VME) && (dest->type == VME_DMA_PCI)))) {
 
index b00a53e793e7ad4cc6dcd68c4d003850a5982068..106aa9daff483ecc546a33e01ddc3cddd4dd193b 100644 (file)
@@ -928,7 +928,7 @@ static int tsi148_master_set(struct vme_master_resource *image, int enabled,
        spin_lock(&image->lock);
 
        /* Let's allocate the resource here rather than further up the stack as
-        * it avoids pushing loads of bus dependant stuff up the stack. If size
+        * it avoids pushing loads of bus dependent stuff up the stack. If size
         * is zero, any existing resource will be freed.
         */
        retval = tsi148_alloc_resource(image, size);
@@ -1320,7 +1320,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf,
 
        /*
         * Writes are posted. We need to do a read on the VME bus to flush out
-        * all of the writes before we check for errors. We can't guarentee
+        * all of the writes before we check for errors. We can't guarantee
         * that reading the data we have just written is safe. It is believed
         * that there isn't any read, write re-ordering, so we can read any
         * location in VME space, so lets read the Device ID from the tsi148's
index 9f97fa8084e806cf97bc0ee8c3d5a91f7a96d91e..a3ac2fe988168d6d0e21ebf0f6992c57c6dcb34f 100644 (file)
@@ -212,7 +212,7 @@ static const int TSI148_LCSR_OT[8] = { TSI148_LCSR_OT0, TSI148_LCSR_OT1,
 #define TSI148_LCSR_OFFSET_OTAT                0x1C
 
 /*
- * VMEbus interupt ack
+ * VMEbus interrupt ack
  * offset  200
  */
 #define TSI148_LCSR_VIACK1     0x204
@@ -613,7 +613,7 @@ static const int TSI148_GCSR_MBOX[4] = { TSI148_GCSR_MBOX0,
 /*
  *  PCI-X Status Register (CRG +$054)
  */
-#define TSI148_PCFS_PCIXSTAT_RSCEM     (1<<29) /* Recieved Split Comp Error */
+#define TSI148_PCFS_PCIXSTAT_RSCEM     (1<<29) /* Received Split Comp Error */
 #define TSI148_PCFS_PCIXSTAT_DMCRS_M   (7<<26) /* max Cumulative Read Size */
 #define TSI148_PCFS_PCIXSTAT_DMOST_M   (7<<23) /* max outstanding Split Trans
                                                 */
@@ -982,8 +982,8 @@ static const int TSI148_GCSR_MBOX[4] = { TSI148_GCSR_MBOX0,
 #define TSI148_LCSR_VICR_CNTS_IRQ1     (2<<22) /* IRQ1 to Cntr */
 #define TSI148_LCSR_VICR_CNTS_IRQ2     (3<<22) /* IRQ2 to Cntr */
 
-#define TSI148_LCSR_VICR_EDGIS_M       (3<<20) /* Edge interupt MASK */
-#define TSI148_LCSR_VICR_EDGIS_DIS     (1<<20) /* Edge interupt Disable */
+#define TSI148_LCSR_VICR_EDGIS_M       (3<<20) /* Edge interrupt MASK */
+#define TSI148_LCSR_VICR_EDGIS_DIS     (1<<20) /* Edge interrupt Disable */
 #define TSI148_LCSR_VICR_EDGIS_IRQ1    (2<<20) /* IRQ1 to Edge */
 #define TSI148_LCSR_VICR_EDGIS_IRQ2    (3<<20) /* IRQ2 to Edge */
 
index a910a0c4388bb212405bc4383a0032aa8aedc65d..4910e92c52af089ba53dce0d5b22d7105036de44 100644 (file)
@@ -6,7 +6,7 @@ Driver registration
 
 As with other subsystems within the Linux kernel, VME device drivers register
 with the VME subsystem, typically called from the devices init routine.  This is
-achieved via a call to the follwoing function:
+achieved via a call to the following function:
 
        int vme_register_driver (struct vme_driver *driver);
 
@@ -108,7 +108,7 @@ Master windows
 ==============
 
 Master windows provide access from the local processor[s] out onto the VME bus.
-The number of windows available and the available access modes is dependant on
+The number of windows available and the available access modes is dependent on
 the underlying chipset. A window must be configured before it can be used.
 
 
@@ -163,7 +163,7 @@ Slave windows
 
 Slave windows provide devices on the VME bus access into mapped portions of the
 local memory. The number of windows available and the access modes that can be
-used is dependant on the underlying chipset. A window must be configured before
+used is dependent on the underlying chipset. A window must be configured before
 it can be used.
 
 
index 061e730df2d08144d408307e080949b4940081d1..c3ba693a8cad5062b05eee3dc6fe9ed7231aa836 100644 (file)
@@ -1,6 +1,6 @@
 config VT6655
    tristate "VIA Technologies VT6655 support"
-   depends on PCI && WLAN
+   depends on PCI && WLAN && m
    select WIRELESS_EXT
    select WEXT_PRIV
    ---help---
index 951a3a8ddcb27b63cc531330740cfc5896a0e7f0..2721e07984960cc2ff2c5c48469058ebe8665d91 100644 (file)
@@ -1186,7 +1186,7 @@ CARDbStartMeasure (
             wDuration += 1; // 1 TU for channel switching
 
             if ((LODWORD(qwStartTSF) == 0) && (HIDWORD(qwStartTSF) == 0)) {
-                // start imediately by setting start TSF == current TSF + 2 TU
+                // start immediately by setting start TSF == current TSF + 2 TU
                 LODWORD(qwStartTSF) = LODWORD(qwCurrTSF) + 2048;
                 HIDWORD(qwStartTSF) = HIDWORD(qwCurrTSF);
                 if (LODWORD(qwCurrTSF) > LODWORD(qwStartTSF)) {
index efaf19bc07b7de5bc173b78bf2c7a2d3bffa7698..ad39c8727e9b2e892d0c27757d35c91f862996d4 100644 (file)
@@ -137,7 +137,7 @@ DEVICE_PARAM(TxDescriptors1,"Number of transmit descriptors1");
 /* IP_byte_align[] is used for IP header unsigned long byte aligned
    0: indicate the IP header won't be unsigned long byte aligned.(Default) .
    1: indicate the IP header will be unsigned long byte aligned.
-      In some enviroment, the IP header should be unsigned long byte aligned,
+      In some environment, the IP header should be unsigned long byte aligned,
       or the packet will be droped when we receive it. (eg: IPVS)
 */
 DEVICE_PARAM(IP_byte_align,"Enable IP header dword aligned");
index abd6745bc3fe08226a48ce6d0dd245b40176d268..c30170a2bc445dd6c9d17395bc6143507d10a190 100644 (file)
@@ -587,7 +587,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
             if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
 
                // Call mgr to begin the deauthentication
-                // reason = (3) beacuse sta has left ESS
+                // reason = (3) because sta has left ESS
                 if (pMgmt->eCurrState>= WMAC_STATE_AUTH) {
                     vMgrDeAuthenBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (3), &Status);
                 }
index 141e80b843afa7d11abb03789bfc30837a793e8b..e3ae562f521a1fe8a1c7344df2a5ff55b968db0c 100644 (file)
@@ -220,7 +220,7 @@ typedef enum tagWMAC_POWER_MODE {
 */
 
 
-// Tx Managment Packet descriptor
+// Tx Management Packet descriptor
 typedef struct tagSTxMgmtPacket {
 
     PUWLAN_80211HDR     p80211Header;
@@ -230,7 +230,7 @@ typedef struct tagSTxMgmtPacket {
 } STxMgmtPacket, *PSTxMgmtPacket;
 
 
-// Rx Managment Packet descriptor
+// Rx Management Packet descriptor
 typedef struct tagSRxMgmtPacket {
 
     PUWLAN_80211HDR     p80211Header;
index a441ba513c401b8329b3fff0f912716287fff944..f89ab205c8e068166fbe3ad4ae66c3f6e1e3e6ec 100644 (file)
@@ -1,6 +1,6 @@
 config VT6656
        tristate "VIA Technologies VT6656 support"
-       depends on USB && WLAN
+       depends on USB && WLAN && m
        select WIRELESS_EXT
        select WEXT_PRIV
        select FW_LOADER
index 8f18578a59038b3c786acd19325c7d80e3e6b26d..5185d61564d77b90953f3f23d06549bd427adefa 100644 (file)
@@ -1938,7 +1938,7 @@ s_vGenerateMACHeader (
  *  Out:
  *      none
  *
- * Return Value: CMD_STATUS_PENDING if MAC Tx resource avaliable; otherwise FALSE
+ * Return Value: CMD_STATUS_PENDING if MAC Tx resource available; otherwise FALSE
  *
 -*/
 
index b83b660b1f0f996512c29ec9f08ff87577e80dfc..019fb52de3662c105959771814290170819fdf6f 100644 (file)
@@ -421,7 +421,7 @@ void vRunCommand(void *hDeviceContext)
                     pMgmt->eScanState = WMAC_IS_SCANNING;
                     pDevice->byScanBBType = pDevice->byBBType;  //lucas
                     pDevice->bStopDataPkt = TRUE;
-                    // Turn off RCR_BSSID filter everytime
+                    // Turn off RCR_BSSID filter every time
                     MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_BSSID);
                     pDevice->byRxMode &= ~RCR_BSSID;
 
@@ -604,7 +604,7 @@ void vRunCommand(void *hDeviceContext)
             // if Infra mode
             if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
                 // Call mgr to begin the deauthentication
-                // reason = (3) beacuse sta has left ESS
+                // reason = (3) because sta has left ESS
              if (pMgmt->eCurrState >= WMAC_STATE_AUTH) {
                vMgrDeAuthenBeginSta((void *)pDevice,
                                     pMgmt,
index 594f3a89d8a7dcca8792e64a8a460eb595a8a331..13dfb3bf8328659a22caf900d3880494b9b00647 100644 (file)
@@ -218,7 +218,7 @@ typedef enum tagWMAC_POWER_MODE {
 
 
 
-// Tx Managment Packet descriptor
+// Tx Management Packet descriptor
 typedef struct tagSTxMgmtPacket {
 
     PUWLAN_80211HDR     p80211Header;
@@ -228,7 +228,7 @@ typedef struct tagSTxMgmtPacket {
 } STxMgmtPacket, *PSTxMgmtPacket;
 
 
-// Rx Managment Packet descriptor
+// Rx Management Packet descriptor
 typedef struct tagSRxMgmtPacket {
 
     PUWLAN_80211HDR     p80211Header;
index 16b8ec12451097a1aa645e1430065bc46ac71d9f..c461d4f60bfb82269cf690caa8f91e76c182c53d 100644 (file)
@@ -1082,7 +1082,7 @@ cy_as_dma_received_data(cy_as_device *dev_p,
        /*
         * if the data received exceeds the size of the DMA buffer,
         * clip the data to the size of the buffer.  this can lead
-        * to loosing some data, but is not different than doing
+        * to losing some data, but is not different than doing
         * non-packet reads on the other endpoints.
         */
        if (dsize > dma_p->size - dma_p->offset)
index 60b6f3525332a26068bd352b2b3bee405f8fccce..76821e51b81718cc51c7a2a9eed9d5ae5241113f 100644 (file)
@@ -126,7 +126,7 @@ find_endpoint_directions(cy_as_device *dev_p,
        cy_as_physical_endpoint_state desired;
 
        /*
-        * note, there is no error checking here becuase
+        * note, there is no error checking here because
         * ISO error checking happens when the API is called.
         */
        for (i = 0; i < 10; i++) {
index d43dd858de5893e543cbf52817259d02c3fa49c3..96a86d088305cabe8071a8e35e3bf895114d4de9 100644 (file)
@@ -432,7 +432,7 @@ cy_as_mail_box_queued_data_handler(cy_as_device *dev_p)
 * is received.  When a complete request is received, the callback
 * associated with requests on that context is called.  When a complete
 * response is recevied, the callback associated with the request that
-* generated the reponse is called.
+* generated the response is called.
 */
 void
 cy_as_mail_box_interrupt_handler(cy_as_device *dev_p)
index 7852410b0a4c30c009e1e6576a0ea52dc815a805..4564fc11df226f45fb394b41df2b7d6990d3c65f 100644 (file)
@@ -428,7 +428,7 @@ my_misc_callback(cy_as_device *dev_p, uint8_t context,
                                if (v & CY_AS_MEM_P0_VM_SET_CFGMODE)
                                        cy_as_hal_print_message(
                                        "initialization message "
-                                       "recieved, but config bit "
+                                       "received, but config bit "
                                        "still set\n");
 
                                v = cy_as_hal_read_register(dev_p->tag,
@@ -436,7 +436,7 @@ my_misc_callback(cy_as_device *dev_p, uint8_t context,
                                if ((v & CY_AS_MEM_RST_RSTCMPT) == 0)
                                        cy_as_hal_print_message(
                                        "initialization message "
-                                       "recieved, but reset complete "
+                                       "received, but reset complete "
                                        "bit still not set\n");
                        }
                        break;
@@ -2381,7 +2381,7 @@ try_wakeup_again:
        /*
         * release the west bridge micro-_controller from reset,
         * so that firmware initialization can complete. the attempt
-        * to release antioch reset is made upto 8 times.
+        * to release antioch reset is made up to 8 times.
         */
        v = 0x03;
        count = 0x08;
index 368984633874b92c28df7568514e0bace0e6a40c..8598364f7ab7953d560cd2aa944de3215598c4b8 100644 (file)
@@ -346,7 +346,7 @@ cy_as_mtp_start(cy_as_device_handle handle,
 
                dev_p->mtp_event_cb = event_c_b;
                /*
-               * we register here becuase the start request may cause
+               * we register here because the start request may cause
                * events to occur before the response to the start request.
                */
                cy_as_ll_register_request_callback(dev_p,
@@ -424,7 +424,7 @@ my_handle_response_mtp_stop(cy_as_device *dev_p,
                goto destroy;
 
        /*
-       * we sucessfully shutdown the stack, so decrement
+       * we successfully shutdown the stack, so decrement
        * to make the count zero.
        */
        dev_p->mtp_count--;
index 2451404b88d4f6f697345c7f2f8e164cb2110c37..7abd6a35e828d2a6f6250239deffd7ba4d57a206 100644 (file)
@@ -1773,7 +1773,7 @@ cy_as_storage_async_oper(cy_as_device *dev_p, cy_as_end_point_number_t ep,
        if (unit > 255)
                return CY_AS_ERROR_NO_SUCH_UNIT;
 
-       /* We are supposed to return sucess if the number of
+       /* We are supposed to return success if the number of
        * blocks is zero
        */
        if (num_blocks == 0) {
@@ -1969,7 +1969,7 @@ cy_as_storage_sync_oper(cy_as_device *dev_p,
        if (cy_as_device_is_usb_async_pending(dev_p, 6))
                return CY_AS_ERROR_ASYNC_PENDING;
 
-       /* We are supposed to return sucess if the number of
+       /* We are supposed to return success if the number of
        * blocks is zero
        */
        if (num_blocks == 0)
@@ -3285,7 +3285,7 @@ cy_as_sdio_extended_i_o_async(
        if (callback == 0)
                return CY_AS_ERROR_NULL_CALLBACK;
 
-       /* We are supposed to return sucess if the number of
+       /* We are supposed to return success if the number of
         * blocks is zero
         */
        if (((misc_buf&CY_SDIO_BLOCKMODE) != 0) && (argument == 0)) {
index 92ea42503bf397d49739721a62543cd2f4b73add..1b55e611191ee9e9e92a3cb9ffe2b923b1a6febb 100644 (file)
@@ -739,7 +739,7 @@ cy_as_usb_start(cy_as_device_handle handle,
                cy_as_usb_reset_e_p0_state(dev_p);
 
                /*
-               * we register here becuase the start request may cause
+               * we register here because the start request may cause
                * events to occur before the response to the start request.
                */
                cy_as_ll_register_request_callback(dev_p,
@@ -867,7 +867,7 @@ my_handle_response_usb_stop(cy_as_device *dev_p,
                goto destroy;
 
        /*
-        * we sucessfully shutdown the stack, so
+        * we successfully shutdown the stack, so
         * decrement to make the count zero.
         */
        cy_as_usb_cleanup(dev_p);
index 21cdb0637beb391c2f2ee95402508159f2937a43..3bcedce13f4ae25c369a9ac6014587f869cb763d 100644 (file)
@@ -87,7 +87,7 @@
 
 
 /*
- * For performance reasons, we handle storage endpoint transfers upto 4 KB
+ * For performance reasons, we handle storage endpoint transfers up to 4 KB
  * within the HAL itself.
  */
  #define CYASSTORAGE_WRITE_EP_NUM      (4)
                                ((ep) == 6) || ((ep) == 8))
 
 /*
- * persistant, stores current GPMC interface cfg mode
+ * persistent, stores current GPMC interface cfg mode
  */
 static uint8_t pnand_16bit;
 
 /*
- * keep processing new WB DRQ in ISR untill all handled (performance feature)
+ * keep processing new WB DRQ in ISR until all handled (performance feature)
  */
 #define PROCESS_MULTIPLE_DRQ_IN_ISR (1)
 
@@ -157,7 +157,7 @@ typedef struct cy_as_hal_endpoint_dma {
         * dma_xfer_sz - size of the next dma xfer on P port
         * seg_xfer_cnt -  counts xfered bytes for in current sg_list
         *              memory segment
-        * req_xfer_cnt - total number of bytes transfered so far in
+        * req_xfer_cnt - total number of bytes transferred so far in
         *              current request
         * req_length - total request length
         */
@@ -2160,7 +2160,7 @@ void cy_as_hal_mem_set(void *ptr, uint8_t value, uint32_t cnt)
 /*
  * This function is expected to create a sleep channel.
  * The data structure that represents the sleep channel object
- * sleep channel (which is Linux "wait_queue_head_t wq" for this paticular HAL)
+ * sleep channel (which is Linux "wait_queue_head_t wq" for this particular HAL)
  * passed as a pointer, and allpocated by the caller
  * (typically as a local var on the stack) "Create" word should read as
  * "SleepOn", this func doesn't actually create anything
@@ -2364,7 +2364,7 @@ int start_o_m_a_p_kernel(const char *pgm,
         */
        cy_as_hal_gpmc_enable_16bit_bus(cy_true);
 #else
-   /* Astoria and GPMC are already in 8 bit mode, jsut initialize PNAND_CFG */
+   /* Astoria and GPMC are already in 8 bit mode, just initialize PNAND_CFG */
        ast_p_nand_casdi_write(CY_AS_MEM_PNAND_CFG, 0x0000);
 #endif
 
index 80dd530bc4fda9d65e12802878f65a3c7e8bfd57..6426ea61f3d4173ff1d8fd7073ad849aa74a7785 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 /*
- * This file contains the defintion of the hardware abstraction
+ * This file contains the definition of the hardware abstraction
  * layer on OMAP3430 talking to the West Bridge Astoria device
  */
 
index 3eee192ffe89ad82b677252ba6f833b89dd54c74..46f06ee29357127167165cf8736af83084206229 100644 (file)
@@ -51,7 +51,7 @@
  *                                                     GPMC_ADDR
  *                                                     [A8:A1]->upD[7:0]
  * INT#        -GPMC_nWP_GPIO_62
- * DACK        -N/C                             not conected
+ * DACK        -N/C                             not connected
  * WAKEUP-GPIO_167
  * RESET-GPIO_126
  * R/B -GPMC_WAIT2_GPIO_64
         *                                      will be monitored
         * PF_EN_ENGINE - 1- ENABLES ENGINE, but it needs to be started after
         *                                      that C ctrl reg bit 0
-        * PF_FIFO_THRESHOLD - FIFO threshhold in number of BUS(8 or 16) words
+        * PF_FIFO_THRESHOLD - FIFO threshold in number of BUS(8 or 16) words
         * PF_WEIGHTED_PRIO  - NUM of cycles granted to PFE if RND_ROBIN
         *                                      prioritization is enabled
         * PF_ROUND_ROBIN  - if enabled, gives priority to other CS, but
index 0bbb8a3e191df18963e98bafeaef480da125a3a2..d1996a27515e06b5d0ff37ddc986e74a2e5c2be1 100644 (file)
@@ -222,7 +222,7 @@ static int cyasblkdev_queue_thread(void *d)
                        continue;
                }
 
-               /* new req recieved, issue it to the driver  */
+               /* new req received, issue it to the driver  */
                set_current_state(TASK_RUNNING);
 
                #ifndef WESTBRIDGE_NDEBUG
index defa05cd5e50fff3d7ca94ad6b6125bdea41f1b5..be851ca54cecbf934bfdfe4f6f56390d024f5ddb 100644 (file)
@@ -587,6 +587,7 @@ static int cyasgadget_enable(
                        "cy_as_usb_end_point_config EP %s mismatch "
                        "on enabled\n", an_ep->usb_ep_inst.name);
                #endif
+               spin_unlock_irqrestore(&an_dev->lock, flags);
                return -EINVAL;
        }
 
index 0c0726b678ad359561b97923f6e4435e3efe8a35..6452a9070091cad5af00938db308d1ad092b29d1 100644 (file)
 #define CY_AS_REQUEST_LIST_STATE_QUEUED (0x00)
 /* The request is sent, waiting for response */
 #define CY_AS_REQUEST_LIST_STATE_WAITING (0x01)
-/* The response has been received, processing reponse */
+/* The response has been received, processing response */
 #define CY_AS_REQUEST_LIST_STATE_RECEIVED (0x02)
 /* The request/response is being canceled */
 #define CY_AS_REQUEST_LIST_STATE_CANCELING (0x03)
@@ -517,7 +517,7 @@ typedef struct cy_as_context {
        cy_as_ll_request_list_node *request_queue_p;
        /* The list node in the request queue */
        cy_as_ll_request_list_node *last_node_p;
-       /* Index upto which data is stored. */
+       /* Index up to which data is stored. */
        uint16_t queue_index;
        /* Index to the next request in the queue. */
        uint16_t rqt_index;
@@ -768,7 +768,7 @@ struct cy_as_device {
        uint32_t mtp_count;
        /* The MTP event callback supplied by the client */
        cy_as_mtp_event_callback mtp_event_cb;
-       /* The current block table to be transfered */
+       /* The current block table to be transferred */
        cy_as_mtp_block_table *tp_blk_tbl;
 
        cy_as_c_b_queue *func_cbs_mtp;
index 8dab5e900149717422728bc4e581c34a5175953f..16dc9f96018c0187133d3e90e0acda85fbc9bac9 100644 (file)
@@ -108,7 +108,7 @@ typedef enum cy_as_dma_direction {
    completes a requested DMA operation.
 
    Returns
-   CY_AS_ERROR_SUCCESS - the module initialized sucessfully
+   CY_AS_ERROR_SUCCESS - the module initialized successfully
    CY_AS_ERROR_OUT_OF_MEMORY - memory allocation failed during
                initialization
    CY_AS_ERROR_ALREADY_RUNNING - the DMA module was already running
@@ -131,7 +131,7 @@ cy_as_dma_start(
    then freeing the resources associated with each DMA endpoint.
 
    Returns
-   CY_AS_ERROR_SUCCESS - the module shutdown sucessfully
+   CY_AS_ERROR_SUCCESS - the module shutdown successfully
    CY_AS_ERROR_NOT_RUNNING - the DMA module was not running
 
    See Also
@@ -161,7 +161,7 @@ cy_as_dma_stop(
 
    Returns
    CY_AS_ERROR_SUCCESS - the traffic on the endpoint is canceled
-       sucessfully
+       successfully
 
    See Also
 */
@@ -266,7 +266,7 @@ cy_as_dma_queue_request(
    will have to maintain a list of sleep channels to wake.
 
    Returns
-   * CY_AS_ERROR_SUCCESS - the queue has drained sucessfully
+   * CY_AS_ERROR_SUCCESS - the queue has drained successfully
    * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given is not valid
    * CY_AS_ERROR_NESTED_SLEEP - CyAsDmaQueueRequest() was requested
    *   on an endpoint where CyAsDmaQueueRequest was already called
@@ -295,7 +295,7 @@ cy_as_dma_drain_queue(
    CyAsHalDmaSetupRead() functoins.
 
    Returns
-   * CY_AS_ERROR_SUCCESS - the value was set sucessfully
+   * CY_AS_ERROR_SUCCESS - the value was set successfully
    * CY_AS_ERROR_INVALID_SIZE - the size value was not valid
 */
 extern cy_as_return_status_t
index f78d60270d4593c41ce4a93cde690cd67236ba7d..2cd0af1ed781d23f00a3df286f642299fed0400a 100644 (file)
@@ -29,7 +29,7 @@
 */
 
 /* Summary
-   The function completed sucessfully
+   The function completed successfully
 */
 #define CY_AS_ERROR_SUCCESS     (0)
 
    Description
    This error is returned when an operation is attempted that cannot be
    completed while the USB stack is connected to a USB host.  In order
-   to sucessfully complete the desired operation, CyAsUsbDisconnect()
+   to successfully complete the desired operation, CyAsUsbDisconnect()
    must be called to disconnect from the host.
 */
 #define CY_AS_ERROR_USB_CONNECTED (53)
index 28136ad75115a65fc9e61534ae20595c389bff5d..5bcbe9bf2f5dda79374abe68a3c7c90bf0ad19cb 100644 (file)
@@ -597,7 +597,7 @@ cy_as_mem_set(
    CyAsHalSleepChannel.
 
    Returns
-   CyTrue is the initialization was sucessful, and CyFalse otherwise
+   CyTrue is the initialization was successful, and CyFalse otherwise
 
    See Also
    * CyAsHalSleepChannel
index 3d7063ea3093a67d73079b7d68541756d6615a3a..60a6fffb5d53aee851072e3268ce572eac6a3556 100644 (file)
@@ -69,7 +69,7 @@ cy_as_intr_start(
 
    Returns
    * CY_AS_ERROR_SUCCESS - the interrupt module was stopped
-   *   sucessfully
+   *   successfully
    * CY_AS_ERROR_NOT_RUNNING - the interrupt module was not
    *   running
 
index 2f0701850561a3d06874530cec0702030735d54c..df7c2b66cf273cdf2f7580dc99524ffb041127bf 100644 (file)
@@ -620,7 +620,7 @@ cy_as_misc_in_standby(
    * Nestable: YES
 
    Returns
-   * CY_AS_ERROR_SUCCESS - the firmware was sucessfully downloaded
+   * CY_AS_ERROR_SUCCESS - the firmware was successfully downloaded
    * CY_AS_ERROR_INVALID_HANDLE
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device
    *   was not configured
@@ -836,7 +836,7 @@ cy_as_misc_reset(
    ownership.
 
    Returns
-   * CY_AS_ERROR_SUCCESS - the p port sucessfully acquired the
+   * CY_AS_ERROR_SUCCESS - the p port successfully acquired the
    *   resource of interest
    * CY_AS_ERROR_INVALID_HANDLE
    * CY_AS_ERROR_NOT_CONFIGURED
@@ -879,7 +879,7 @@ cy_as_misc_acquire_resource(
    * Valid In Asynchronous Callback: NO
 
    Returns
-   * CY_AS_ERROR_SUCCESS - the p port sucessfully released
+   * CY_AS_ERROR_SUCCESS - the p port successfully released
    *   the resource of interest
    * CY_AS_ERROR_INVALID_HANDLE
    * CY_AS_ERROR_NOT_CONFIGURED
@@ -929,7 +929,7 @@ cy_as_misc_release_resource(
 
    Returns
    * CY_AS_ERROR_SUCCESS - the trace configuration has been
-   *   sucessfully changed
+   *   successfully changed
    * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
    * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device
    *   pair does not exist
index 317805fc4ff47ffcc15eb5ae00b437c00e936aac..773b645ea7ebcc0b9766df66e36e3d7ff84e3c43 100644 (file)
         * 1 : Debug mode
 
    Description
-   This reponse is sent to return the firmware version
+   This response is sent to return the firmware version
    number to the requestor.
  */
 #define CY_RESP_FIRMWARE_VERSION (16)
    This request is sent to the West Bridge when the P port
    needs to send data to the Host in a Turbo Endpoint.
    Upon receiving this event, Firmware will make the end point
-   avilable for the P port. If the length is zero, then
+   available for the P port. If the length is zero, then
    firmware will send a zero length packet.
 
    Direction
index 64f078cf202c08b9e7ecd7bddbabdea71410e6b6..52b93c3e4813620eaaf2e06622c5320b85dcc0f7 100644 (file)
@@ -832,7 +832,7 @@ typedef struct cy_as_sdio_func {
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been
    *   loaded into West Bridge
    * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
-   * CY_AS_ERROR_SUCCESS - the module started sucessfully
+   * CY_AS_ERROR_SUCCESS - the module started successfully
    * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating
    *   with the West Bridge device
    * CY_AS_ERROR_OUT_OF_MEMORY
@@ -882,7 +882,7 @@ cy_as_storage_start(
    * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was
    *   passed in
    * CY_AS_ERROR_SUCCESS - this module was shut
-   *   down sucessfully
+   *   down successfully
    * CY_AS_ERROR_TIMEOUT - a timeout occurred
    *   communicating with the West Bridge device
    * CY_AS_ERROR_NOT_RUNNING
@@ -934,7 +934,7 @@ cy_as_storage_stop(
    * CY_AS_ERROR_INVALID_HANDLE - an invalid handle
    *   was passed in
    * CY_AS_ERROR_SUCCESS - the function was registered
-   *   sucessfully
+   *   successfully
    * CY_AS_ERROR_NOT_RUNNING - the stack is not running
 
    See Also
@@ -981,7 +981,7 @@ cy_as_storage_register_callback(
    *   been started
    * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was
    *   passed in
-   * CY_AS_ERROR_SUCCESS - this request was sucessfully
+   * CY_AS_ERROR_SUCCESS - this request was successfully
    *   transmitted to the West Bridge device
    * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating
    *   with the West Bridge device
@@ -1034,7 +1034,7 @@ cy_as_storage_claim(
    *   been started
    * CY_AS_ERROR_INVALID_HANDLE - an invalid handle
    *   was passed in
-   * CY_AS_ERROR_SUCCESS - the media was sucessfully
+   * CY_AS_ERROR_SUCCESS - the media was successfully
    *   released
    * CY_AS_ERROR_MEDIA_NOT_CLAIMED - the media was not
    *   claimed by the P port
@@ -1905,7 +1905,7 @@ cy_as_storage_get_transfer_amount(
    differ between SD cards.
 
    A large erase can take a while to complete depending on the SD
-   card. In such a case it is reccomended that an async call is made.
+   card. In such a case it is recommended that an async call is made.
 
    Returns
    * CY_AS_ERROR_SUCCESS - API call completed successfully
@@ -1926,7 +1926,7 @@ cy_as_storage_get_transfer_amount(
    *   required before erase is allowed
    * CY_AS_ERROR_NO_SUCH_BUS
    * CY_AS_ERROR_NO_SUCH_DEVICE
-   * CY_AS_ERROR_NOT_SUPPORTED - Erase is currenly only supported
+   * CY_AS_ERROR_NOT_SUPPORTED - Erase is currently only supported
    *   on SD and using SD only firmware
    * CY_AS_ERROR_OUT_OF_MEMORY
 
@@ -1985,7 +1985,7 @@ cy_as_storage_erase(
    *   type was made
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
    * CY_AS_ERROR_INVALID_RESPONSE - an error message was
-   *   recieved from the firmware
+   *   received from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in
    *   reading from the media
    * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to
@@ -2047,7 +2047,7 @@ cy_as_sdio_get_c_i_s_info(
    *   pair does not exist
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
    * CY_AS_ERROR_INVALID_RESPONSE - an error message was
-   *   recieved from the firmware
+   *   received from the firmware
 
 */
 cy_as_return_status_t
@@ -2095,7 +2095,7 @@ cy_as_sdio_query_card(
    *   pair does not exist
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
    * CY_AS_ERROR_INVALID_RESPONSE - an error message was
-   *   recieved from the firmware
+   *   received from the firmware
    */
 cy_as_return_status_t
 cy_as_sdio_reset_card(
@@ -2139,7 +2139,7 @@ cy_as_sdio_reset_card(
    * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair
    *   does not exist
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
-   * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved
+   * CY_AS_ERROR_INVALID_RESPONSE - an error message was received
    *   from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading
    *   from the media
@@ -2198,7 +2198,7 @@ cy_as_sdio_direct_read(
    * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device
    * pair does not exist
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
-   * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved
+   * CY_AS_ERROR_INVALID_RESPONSE - an error message was received
    * from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in
    * reading from the media
@@ -2262,7 +2262,7 @@ cy_as_sdio_direct_write(
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory
    *   available
    * CY_AS_ERROR_INVALID_RESPONSE - an error message was
-   *   recieved from the firmware
+   *   received from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in
    *   reading from the media
    * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made
@@ -2319,7 +2319,7 @@ cy_as_sdio_set_blocksize(
    *   pair does not exist
    * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
-   * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved
+   * CY_AS_ERROR_INVALID_RESPONSE - an error message was received
    *   from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in
    *   reading from the media
@@ -2396,7 +2396,7 @@ cy_as_sdio_extended_read(
    * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
    * CY_AS_ERROR_INVALID_RESPONSE - an error message was
-   *   recieved from the firmware
+   *   received from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in
    *   reading from the media
    * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made
@@ -2471,7 +2471,7 @@ cy_as_sdio_extended_write(
    * pair does not exist
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
    * CY_AS_ERROR_INVALID_RESPONSE - an error message was
-   *   recieved from the firmware
+   *   received from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in
    *   reading from the media
    * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made
@@ -2714,7 +2714,7 @@ cy_as_sdio_suspend(
    * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory
    *   available
    * CY_AS_ERROR_INVALID_RESPONSE - an error message was
-   *   recieved from the firmware
+   *   received from the firmware
    * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error
    *   in reading from the media
    * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was
index 4a549e146812821d2f69f6763ba2d272fb34e716..e3ba9ca4c75f7c6cb783ce7139b017970f08ff8e 100644 (file)
@@ -464,7 +464,7 @@ typedef struct cy_as_usb_end_point_config {
    be selected on a partitioned storage device.
 
    Description
-   West Bridge firmware supports creating upto two
+   West Bridge firmware supports creating up to two
    partitions on mass storage devices connected to
    West Bridge.  When there are two partitions on a device,
    the user can choose which of these partitions should be
@@ -698,7 +698,7 @@ cy_as_usb_start(
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
    *   into West Bridge
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with
    *   the West Bridge device
 
@@ -752,7 +752,7 @@ cy_as_usb_register_callback(
    * Nestable: YES
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -791,7 +791,7 @@ cy_as_usb_connect(
    * Nestable: YES
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -825,7 +825,7 @@ cy_as_usb_disconnect(
    * Valid In Asynchronous Callback: Yes (if cb supplied)
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -855,13 +855,13 @@ cy_as_usb_set_enum_config(
    the USB stack
 
    Description
-   This function sends a request to West Bridge to retreive
+   This function sends a request to West Bridge to retrieve
    the current configuration
 
    * Valid In Asynchronous Callback: Yes (if cb supplied)
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -906,7 +906,7 @@ cy_as_usb_get_enum_config(
    Chapter 9.
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -993,7 +993,7 @@ cy_as_usb_clear_descriptors(
    Description
    This data structure the buffer to hold the descriptor
    data, and an in/out parameter ti indicate the
-   lenght of the buffer and descriptor data in bytes.
+   length of the buffer and descriptor data in bytes.
 
    See Also
    * CyAsUsbGetDescriptor
@@ -1027,7 +1027,7 @@ typedef struct cy_as_get_descriptor_data {
    Chapter 9.
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -1106,7 +1106,7 @@ cy_as_usb_get_descriptor(
    * Valid In Asynchronous Callback: NO
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -1140,7 +1140,7 @@ cy_as_usb_set_physical_configuration(
    Add documentation about endpoint configuration limitations
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -1181,7 +1181,7 @@ cy_as_usb_set_end_point_config(
    * Valid In Asynchronous Callback: NO
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
    *   been configured
    * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
@@ -1219,7 +1219,7 @@ cy_as_usb_get_end_point_config(
    functions store away the configuration information and this
    CyAsUsbCommitConfig() actually finds the
    best hardware configuration based on the requested endpoint
-   configuration and sends thsi optimal
+   configuration and sends this optimal
    confiuration down to the West Bridge device.
 
    * Valid In Asynchronous Callback: YES (if cb supplied)
@@ -1268,7 +1268,7 @@ cy_as_usb_commit_config(
    * Valid In Asynchronous Callback: NO
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with
    *   the West Bridge device
    * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
@@ -1311,7 +1311,7 @@ cy_as_usb_read_data(
    * Valid In Asynchronous Callback: YES
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with
    *   the West Bridge device
    * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
@@ -1355,7 +1355,7 @@ cy_as_usb_read_data_async(
    a zero length packet transmitted to the USB host.
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with
    *   the West Bridge device
    * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
@@ -1395,7 +1395,7 @@ cy_as_usb_write_data(
    in a zero length packet transmitted to the USB host.
 
    Returns
-   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+   * CY_AS_ERROR_SUCCESS - this module was shut down successfully
    * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with
    *   the West Bridge device
    * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
@@ -1435,7 +1435,7 @@ cy_as_usb_write_data_async(
 
    Returns
    * CY_AS_ERROR_SUCCESS - this module was shut down
-   *   sucessfully
+   *   successfully
    * CY_AS_ERROR_NOT_RUNNING - the USB stack is not
    *   running
    * CY_AS_ERROR_ASYNC_NOT_PENDING - no asynchronous USB
@@ -1791,7 +1791,7 @@ cy_as_usb_set_m_s_report_threshold(
    device should be made visible to USB.
 
    Description
-   West Bridge firmware supports the creation of upto two
+   West Bridge firmware supports the creation of up to two
    partitions on mass storage devices connected to the West Bridge
    device.  When there are two partitions on a device, the user can
    choose which of these partitions should be made visible to the
index 9cfea94bcea53cecde7cc3223bc17b7f699990bd..c9f0e8f856a0a7bb760f252beea98e35f3bcf8e1 100644 (file)
@@ -492,7 +492,7 @@ Mds_Tx(struct wbsoft_priv *adapter)
 
                        TxDesIndex = pMds->TxDesIndex; /* Get the current ID */
                        pTxDes->Descriptor_ID = TxDesIndex;
-                       pMds->TxDesFrom[TxDesIndex] = 2; /* Storing the information of source comming from */
+                       pMds->TxDesFrom[TxDesIndex] = 2; /* Storing the information of source coming from */
                        pMds->TxDesIndex++;
                        pMds->TxDesIndex %= MAX_USB_TX_DESCRIPTOR;
 
index 47beaec86e4a7168fa4eceabbf7847f8f1f6f7b6..edee8b9385be8c5ca9e7412c0c92c739b4afb082 100644 (file)
@@ -116,7 +116,7 @@ LICENSE
 
 The Agere Systems license applies. This is why I include the original
 README.wlags49. The instructions in that file are bogus now. I also
-include the man page. Eventhough setting parameters on the module
+include the man page. Even though setting parameters on the module
 does not work anymore but it provides some information about all the
 settings.
 
index 14aa415b1a82acfd238f4b6f760d2d4e838619f0..94032b6ac2b5ecdce82c7f3fad4b79035fcf883f 100644 (file)
@@ -1,7 +1,7 @@
 First of all, the best thing would be that this driver becomes obsolte by
 adding support for Hermes II and Hermes II.5 cards to the existing orinoco
 driver. The orinoco driver currently only supports Hermes I based cards.
-Since this will not happen by magic and has not happend until now this
+Since this will not happen by magic and has not happened until now this
 driver provides a stop-gap solution for these type of cards.
 
 Having said that, the following wishlist comes to mind to make the driver
@@ -18,7 +18,7 @@ TODO:
        - the driver is split into a Hermes II and a Hermes II.5 part, it
          would be nice to handle both with one module instead of two
        - review by the wireless developer community
-       - verify the code against the coding standards for a propper linux
+       - verify the code against the coding standards for a proper linux
          driver
        - resolve license issues (?)
 
index d4bdd3ee8be13e568952fe8dfa084d9a0beb8348..a73317ef935049b9e8b6c983d67d3fd83775bc00 100644 (file)
@@ -540,7 +540,7 @@ HCF_STATIC hcf_16* BASED xxxx[ ] = {
 *
 *.CONDITIONS
 * Except for hcf_action with HCF_ACT_INT_FORCE_ON or HCF_ACT_INT_OFF as parameter or hcf_connect with an I/O
-* address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceeded by a call of hcf_action with
+* address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceded by a call of hcf_action with
 * HCF_ACT_INT_OFF as parameter.
 * Note that hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF )
 * was called.
@@ -843,7 +843,7 @@ hcf_16      i;
 *.MODULE               int hcf_cntl( IFBP ifbp, hcf_16 cmd )
 *.PURPOSE              Connect or disconnect a specific port to a specific network.
 *!!  ;???????????????? continue needs more explanation
-*                              recovers by means of "continue" when the connect proces in CCX mode fails
+*                              recovers by means of "continue" when the connect process in CCX mode fails
 *                              Enables or disables data transmission and reception for the NIC.
 *                              Activates static NIC configuration for a specific port at connect.
 *                              Activates static configuration for all ports at enable.
@@ -1170,12 +1170,12 @@ LTV_STRCT       x;
                io_addr = io_base;
        }
 
-#if 0 //;? if a subsequent hcf_connect is preceeded by an hcf_disconnect the wakeup is not needed !!
+#if 0 //;? if a subsequent hcf_connect is preceded by an hcf_disconnect the wakeup is not needed !!
 #if HCF_SLEEP
     OUT_PORT_WORD( .....+HREG_IO, HREG_IO_WAKEUP_ASYNC );          //OPW not yet useable
        MSF_WAIT(800);                                                          // MSF-defined function to wait n microseconds.
        note that MSF_WAIT uses not yet defined!!!! IFB_IOBase and IFB_TickIni (via PROT_CNT_INI)
-       so be carefull if this code is restored
+       so be careful if this code is restored
 #endif // HCF_SLEEP
 #endif // 0
 
@@ -1563,7 +1563,7 @@ DESC_STRCT *p = descp->next_desc_addr;    //pointer to 2nd descriptor of frame
 * This function is called by the MSF to supply the HCF with new/more buffers for receive purposes.
 * The HCF can be used in 2 fashions: with and without encapsulation for data transfer.
 * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant.
-* As a consequence, some additional constaints apply to the number of descriptor and the buffers associated
+* As a consequence, some additional constraints apply to the number of descriptor and the buffers associated
 * with the first 2 descriptors. Independent of the encapsulation feature, the COUNT fields are ignored.
 * A special case is the supplying of the DELWA descriptor, which must be supplied as the first descriptor.
 *
@@ -1735,7 +1735,7 @@ DESC_STRCT *descp;        // pointer to start of FrameList
 * - in case encapsulation by the HCF is selected:
 *        -     The FrameList does not consists of at least 2 Descriptors.
 *        -     The first databuffer does not contain exactly the (space for) the 802.11 header (== 28 words)
-*        -     The first databuffer does not have a size to additionally accomodate the 802.3 header and the
+*        -     The first databuffer does not have a size to additionally accommodate the 802.3 header and the
 *              SNAP header of the frame after encapsulation (== 39 words).
 *        -     The second databuffer does not contain at least DA, SA and 'type/length' (==14 bytes or 7 words)
 *!! The 2nd part of the list of asserts should be kept in sync with put_frame_lst, in order to get
@@ -1762,14 +1762,14 @@ DESC_STRCT *descp;      // pointer to start of FrameList
 *      - Copy DA/SA fields from the 2nd buffer
 *   - Calculate total length of the message (snap-header + type-field + the length of all buffer fragments
 *     associated with the 802.3 frame (i.e all descriptors except the first), but not the DestinationAddress,
-*     SourceAddress and lenght-field)
+*     SourceAddress and length-field)
 *     Assert the message length
 *        Write length. Note that the message is in BE format, hence on LE platforms the length must be converted
 *        ;? THIS IS NOT WHAT CURRENTLY IS IMPLEMENTED
 *      - Write snap header. Note that the last byte of the snap header is NOT copied, that byte is already in
 *        place as result of the call to hcf_encap.
 *      Note that there are many ways to skin a cat. To express the offsets in the 1st buffer while writing
-*      the snap header, HFS_TYPE is choosen as a reference point to make it easier to grasp that the snap header
+*      the snap header, HFS_TYPE is chosen as a reference point to make it easier to grasp that the snap header
 *      and encapsualtion type are at least relative in the right.
 *8:    modify 1st descriptor to reflect moved part of the 802.3 header + Snap-header
 *      modify 2nd descriptor to skip the moved part of the 802.3 header (DA/SA
@@ -1933,7 +1933,7 @@ hcf_16    t = (hcf_16)(*type<<8) + *(type+1);                                                                                                                             /* 2 */
 *      HCF_SUCCESS                     Success
 *!!    via cmd_exe ( type >= CFG_RID_FW_MIN )
 *      HCF_ERR_NO_NIC          NIC removed during retrieval
-*      HCF_ERR_TIME_OUT        Expected Hermes event did not occure in expected time
+*      HCF_ERR_TIME_OUT        Expected Hermes event did not occur in expected time
 *!!    via cmd_exe and setup_bap (type >= CFG_RID_FW_MIN )
 *      HCF_ERR_DEFUNCT_...     HCF is in defunct mode (bits 0x7F reflect cause)
 *
@@ -2958,7 +2958,7 @@ or
 *      hcf_service_nic is also skipped in those cases.
 *      To prevent that hcf_service_nic reports bogus information to the MSF with all - possibly difficult to
 *      debug - undesirable side effects, it is paramount to check the NIC presence. In former days the presence
-*      test was based on the Hermes register HREG_SW_0. Since in HCF_ACT_INT_OFF is choosen for strategy based on
+*      test was based on the Hermes register HREG_SW_0. Since in HCF_ACT_INT_OFF is chosen for strategy based on
 *      HREG_EV_STAT, this is now also used in hcf_service_nic. The motivation to change strategy is partly
 *      due to inconsistent F/W implementations with respect to HREG_SW_0 manipulation around reset and download.
 *      Note that in polled environments Card Removal is not detected by INT_OFF which makes the check in
@@ -4048,7 +4048,7 @@ hcf_32 FAR        *p4; //prevent side effects from macro
        HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len )
        HCFASSERT( word_len == 0 || ((hcf_32)bufp & 1 ) == 0, (hcf_32)bufp )
        HCFASSERT( word_len <= len, MERGE2( word_len, len ) )
-       //see put_frag for an alternative implementation, but be carefull about what are int's and what are
+       //see put_frag for an alternative implementation, but be careful about what are int's and what are
        //hcf_16's
        if ( word_len ) {                                                               //.  if there is anything to convert
 hcf_8 c;
@@ -4712,7 +4712,7 @@ int rc = HCF_SUCCESS;
 *      Note that len is unsigned, so even MSF I/F violation works out O.K.
 *      The '2' in the expression "len+2" is used because 1 word is needed for L itself and 1 word is needed
 *      for the zero-sentinel
-*8:    update MailBox Info length report to MSF with "oldest" MB Info Block size. Be carefull here, if you get
+*8:    update MailBox Info length report to MSF with "oldest" MB Info Block size. Be careful here, if you get
 *      here before the MailBox is registered, you can't read from the buffer addressed by IFB_MBp (it is the
 *      Null buffer) so don't move this code till the end of this routine but keep it where there is garuanteed
 *      a buffer.
index 4e20171b782995dbd866b3585d06a16e70c156c3..cb1966d8473fb27fa98b5c90336c9311d44dc2de 100644 (file)
@@ -315,7 +315,7 @@ err: these values should match;
 
 #if HCF_DMA
 //************************* DMA (bus mastering)
-       // Be carefull to use these registers only at a genuine 32 bits NIC
+       // Be careful to use these registers only at a genuine 32 bits NIC
        // On 16 bits NICs, these addresses are mapped into the range 0x00 through 0x3F with all consequences
        // thereof, e.g.  HREG_DMA_CTRL register maps to HREG_CMD.
 #define HREG_DMA_CTRL                                          0x0040
index 9e5da0815371655d6c6a6a201692ceb43d1c2a86..522a31090c58e53a5bf8402bfa891be9a095ad0e 100644 (file)
@@ -2575,7 +2575,7 @@ static int wireless_set_scan(struct net_device *dev, struct iw_request_info *inf
          * This looks like a nice place to test if the HCF is still
          * communicating with the card. It seems that sometimes BAP_1
          * gets corrupted. By looking at the comments in HCF the
-         * cause is still a mistery. Okay, the communication to the
+         * cause is still a mystery. Okay, the communication to the
          * card is dead, reset the card to revive.
          */
        if((lp->hcfCtx.IFB_CardStat & CARD_STAT_DEFUNCT) != 0)
@@ -3924,7 +3924,7 @@ void wl_wext_event_mic_failed( struct net_device *dev )
        memset( msg, 0, sizeof( msg ));
 
 
-       /* Becuase MIC failures are not part of the Wireless Extensions yet, they
+       /* Because MIC failures are not part of the Wireless Extensions yet, they
           must be passed as a string using an IWEVCUSTOM event. In order for the
           event to be effective, the string format must be known by both the
           driver and the supplicant. The following is the string format used by the
@@ -3999,7 +3999,7 @@ void wl_wext_event_assoc_ie( struct net_device *dev )
                memcpy( &data.rawData, &( lp->ltvRecord.u.u8[1] ), 88 );
                wpa_ie = wl_parse_wpa_ie( &data, &length );
 
-               /* Becuase this event (Association WPA-IE) is not part of the Wireless
+               /* Because this event (Association WPA-IE) is not part of the Wireless
                Extensions yet, it must be passed as a string using an IWEVCUSTOM event.
                In order for the event to be effective, the string format must be known
                by both the driver and the supplicant. The following is the string format
index 14aa415b1a82acfd238f4b6f760d2d4e838619f0..94032b6ac2b5ecdce82c7f3fad4b79035fcf883f 100644 (file)
@@ -1,7 +1,7 @@
 First of all, the best thing would be that this driver becomes obsolte by
 adding support for Hermes II and Hermes II.5 cards to the existing orinoco
 driver. The orinoco driver currently only supports Hermes I based cards.
-Since this will not happen by magic and has not happend until now this
+Since this will not happen by magic and has not happened until now this
 driver provides a stop-gap solution for these type of cards.
 
 Having said that, the following wishlist comes to mind to make the driver
@@ -18,7 +18,7 @@ TODO:
        - the driver is split into a Hermes II and a Hermes II.5 part, it
          would be nice to handle both with one module instead of two
        - review by the wireless developer community
-       - verify the code against the coding standards for a propper linux
+       - verify the code against the coding standards for a proper linux
          driver
        - resolve license issues (?)
 
index ed751f418db96ebcd64b2dc3ad5d6048ce447b8c..21f25a21c291a0276029c7c579db19eaf2161b39 100644 (file)
@@ -1976,7 +1976,7 @@ static wlandevice_t *create_wlan(void)
 
        wlandev->nsdcaps = P80211_NSDCAP_HWFRAGMENT | P80211_NSDCAP_AUTOJOIN;
 
-       /* Initialize the device private data stucture. */
+       /* Initialize the device private data structure. */
        hw->dot11_desired_bss_type = 1;
 
        return wlandev;
index 8762a5327693ea1d5aeb4619a4a4cdcf513da672..9669c22cc82c7f1831a87410db622a4ed1a0c3f0 100644 (file)
@@ -7834,7 +7834,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
                                                == 600)) {
                        index++;
                }
-               /* Alan 10/19/2007; do the similiar adjustment like XGISearchCRT1Rate() */
+               /* Alan 10/19/2007; do the similar adjustment like XGISearchCRT1Rate() */
                if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 1024)
                                && (pVBInfo->RefIndex[RefreshRateTableIndex].YRes
                                                == 768)) {
index 4b87951f43224d55d9b39c4ef4216d9f11467526..d613e84aab620e3c3b9ffce884dbb1f450332e4c 100644 (file)
@@ -85,7 +85,7 @@ struct xgi_hw_device_info
                                            unsigned long *);
 };
 
-/* Addtional IOCTL for communication xgifb <> X driver        */
+/* Additional IOCTL for communication xgifb <> X driver        */
 /* If changing this, xgifb.h must also be changed (for xgifb) */
 
 
index 2c5fcfed59344205574b02b139dfc3b2de158d03..30cbb743d9baff040d18b0ee2404c44f14cf1991 100644 (file)
@@ -496,8 +496,8 @@ static int core_alua_state_check(
        nonop_delay_msecs = tg_pt_gp->tg_pt_gp_nonop_delay_msecs;
        spin_unlock(&tg_pt_gp_mem->tg_pt_gp_mem_lock);
        /*
-        * Process ALUA_ACCESS_STATE_ACTIVE_OPTMIZED in a seperate conditional
-        * statement so the complier knows explictly to check this case first.
+        * Process ALUA_ACCESS_STATE_ACTIVE_OPTMIZED in a separate conditional
+        * statement so the compiler knows explicitly to check this case first.
         * For the Optimized ALUA access state case, we want to process the
         * incoming fabric cmd ASAP..
         */
@@ -1157,7 +1157,7 @@ void core_alua_free_lu_gp(struct t10_alua_lu_gp *lu_gp)
                spin_unlock(&lu_gp->lu_gp_lock);
                /*
                 *
-                * lu_gp_mem is assoicated with a single
+                * lu_gp_mem is associated with a single
                 * struct se_device->dev_alua_lu_gp_mem, and is released when
                 * struct se_device is released via core_alua_free_lu_gp_mem().
                 *
@@ -1429,7 +1429,7 @@ void core_alua_free_tg_pt_gp(
                }
                spin_unlock(&tg_pt_gp->tg_pt_gp_lock);
                /*
-                * tg_pt_gp_mem is assoicated with a single
+                * tg_pt_gp_mem is associated with a single
                 * se_port->sep_alua_tg_pt_gp_mem, and is released via
                 * core_alua_free_tg_pt_gp_mem().
                 *
@@ -1963,7 +1963,7 @@ int core_setup_alua(struct se_device *dev, int force_pt)
                printk(KERN_INFO "%s: Enabling ALUA Emulation for SPC-3"
                        " device\n", TRANSPORT(dev)->name);
                /*
-                * Assoicate this struct se_device with the default ALUA
+                * Associate this struct se_device with the default ALUA
                 * LUN Group.
                 */
                lu_gp_mem = core_alua_allocate_lu_gp_mem(dev);
index 3fb8e32506ed4ddec9b4af2e5b62506edd9530aa..d25e20829012d61075ee470bf3fe5690ebd3afbe 100644 (file)
@@ -371,7 +371,7 @@ int core_update_device_list_for_node(
        if (!(enable)) {
                /*
                 * deve->se_lun_acl will be NULL for demo-mode created LUNs
-                * that have not been explictly concerted to MappedLUNs ->
+                * that have not been explicitly concerted to MappedLUNs ->
                 * struct se_lun_acl, but we remove deve->alua_port_list from
                 * port->sep_alua_list. This also means that active UAs and
                 * NodeACL context specific PR metadata for demo-mode
index d57ad672677f2c0d8e3ce23de2f9fb2beeb68ee8..1e193f32489578c736ae463d9cae9aed28c21aea 100644 (file)
@@ -433,7 +433,7 @@ char *iscsi_parse_pr_out_transport_id(
                /*
                 * Go ahead and do the lower case conversion of the received
                 * 12 ASCII characters representing the ISID in the TransportID
-                * for comparision against the running iSCSI session's ISID from
+                * for comparison against the running iSCSI session's ISID from
                 * iscsi_target.c:lio_sess_get_initiator_sid()
                 */
                for (i = 0; i < 12; i++) {
index 02f553aef43d00a64ed79a6dc37460f6691f6ec6..150c4305f385ea9c003341d8d853cac0fe4ab6bd 100644 (file)
@@ -159,7 +159,7 @@ static struct se_device *fd_create_virtdevice(
 #endif
 /*     flags |= O_DIRECT; */
        /*
-        * If fd_buffered_io=1 has not been set explictly (the default),
+        * If fd_buffered_io=1 has not been set explicitly (the default),
         * use O_SYNC to force FILEIO writes to disk.
         */
        if (!(fd_dev->fbd_flags & FDBD_USE_BUFFERED_IO))
index 2521f75362c3b2ddad86bdec6116ac6b0430095f..a79f518ca6e2b76e12312d55f536cdb732640802 100644 (file)
@@ -478,7 +478,7 @@ static int core_scsi3_pr_seq_non_holder(
                break;
        }
        /*
-        * Case where the CDB is explictly allowed in the above switch
+        * Case where the CDB is explicitly allowed in the above switch
         * statement.
         */
        if (!(ret) && !(other_cdb)) {
@@ -3735,7 +3735,7 @@ static int core_scsi3_emulate_pr_out(struct se_cmd *cmd, unsigned char *cdb)
                return PYX_TRANSPORT_LU_COMM_FAILURE;
 
        if (cmd->data_length < 24) {
-               printk(KERN_WARNING "SPC-PR: Recieved PR OUT parameter list"
+               printk(KERN_WARNING "SPC-PR: Received PR OUT parameter list"
                        " length too small: %u\n", cmd->data_length);
                return PYX_TRANSPORT_INVALID_PARAMETER_LIST;
        }
@@ -3778,7 +3778,7 @@ static int core_scsi3_emulate_pr_out(struct se_cmd *cmd, unsigned char *cdb)
         */
        if (!(spec_i_pt) && ((cdb[1] & 0x1f) != PRO_REGISTER_AND_MOVE) &&
            (cmd->data_length != 24)) {
-               printk(KERN_WARNING "SPC-PR: Recieved PR OUT illegal parameter"
+               printk(KERN_WARNING "SPC-PR: Received PR OUT illegal parameter"
                        " list length: %u\n", cmd->data_length);
                return PYX_TRANSPORT_INVALID_PARAMETER_LIST;
        }
index bf6aa8a9f1d8a3a8a968ce7846feb4be47ce7d2c..9583b23c9c84702f907e93adf3e1f8ca8419cd32 100644 (file)
@@ -719,7 +719,7 @@ static int transport_cmd_check_stop(
                        cmd->se_lun = NULL;
                        /*
                         * Some fabric modules like tcm_loop can release
-                        * their internally allocated I/O refrence now and
+                        * their internally allocated I/O reference now and
                         * struct se_cmd now.
                         */
                        if (CMD_TFO(cmd)->check_stop_free != NULL) {
@@ -2029,7 +2029,7 @@ int transport_generic_handle_data(
         * If the received CDB has aleady been ABORTED by the generic
         * target engine, we now call transport_check_aborted_status()
         * to queue any delated TASK_ABORTED status for the received CDB to the
-        * fabric module as we are expecting no futher incoming DATA OUT
+        * fabric module as we are expecting no further incoming DATA OUT
         * sequences at this point.
         */
        if (transport_check_aborted_status(cmd, 1) != 0)
@@ -2501,7 +2501,7 @@ static inline int transport_execute_task_attr(struct se_cmd *cmd)
        if (SE_DEV(cmd)->dev_task_attr_type != SAM_TASK_ATTR_EMULATED)
                return 1;
        /*
-        * Check for the existance of HEAD_OF_QUEUE, and if true return 1
+        * Check for the existence of HEAD_OF_QUEUE, and if true return 1
         * to allow the passed struct se_cmd list of tasks to the front of the list.
         */
         if (cmd->sam_task_attr == TASK_ATTR_HOQ) {
@@ -2547,7 +2547,7 @@ static inline int transport_execute_task_attr(struct se_cmd *cmd)
        if (atomic_read(&SE_DEV(cmd)->dev_ordered_sync) != 0) {
                /*
                 * Otherwise, add cmd w/ tasks to delayed cmd queue that
-                * will be drained upon competion of HEAD_OF_QUEUE task.
+                * will be drained upon completion of HEAD_OF_QUEUE task.
                 */
                spin_lock(&SE_DEV(cmd)->delayed_cmd_lock);
                cmd->se_cmd_flags |= SCF_DELAYED_CMD_FROM_SAM_ATTR;
@@ -2589,7 +2589,7 @@ static int transport_execute_tasks(struct se_cmd *cmd)
        }
        /*
         * Call transport_cmd_check_stop() to see if a fabric exception
-        * has occured that prevents execution.
+        * has occurred that prevents execution.
         */
        if (!(transport_cmd_check_stop(cmd, 0, TRANSPORT_PROCESSING))) {
                /*
@@ -3109,7 +3109,7 @@ static int transport_generic_cmd_sequencer(
        if (ret != 0) {
                cmd->transport_wait_for_tasks = &transport_nop_wait_for_tasks;
                /*
-                * Set SCSI additional sense code (ASC) to 'LUN Not Accessable';
+                * Set SCSI additional sense code (ASC) to 'LUN Not Accessible';
                 * The ALUA additional sense code qualifier (ASCQ) is determined
                 * by the ALUA primary or secondary access state..
                 */
@@ -3867,7 +3867,7 @@ static void transport_generic_complete_ok(struct se_cmd *cmd)
                }
        }
        /*
-        * Check for a callback, used by amoungst other things
+        * Check for a callback, used by amongst other things
         * XDWRITE_READ_10 emulation.
         */
        if (cmd->transport_complete_callback)
index a2ef346087e890ec461f35c8d20632643e03aee0..df355176a377432b8784bc7085d397019ca9978d 100644 (file)
@@ -247,7 +247,7 @@ void core_scsi3_ua_for_check_condition(
                }
                /*
                 * Otherwise for the default 00b, release the UNIT ATTENTION
-                * condition.  Return the ASC/ASCQ of the higest priority UA
+                * condition.  Return the ASC/ASCQ of the highest priority UA
                 * (head of the list) in the outgoing CHECK_CONDITION + sense.
                 */
                if (head) {
@@ -304,7 +304,7 @@ int core_scsi3_ua_clear_for_request_sense(
         * matching struct se_lun.
         *
         * Once the returning ASC/ASCQ values are set, we go ahead and
-        * release all of the Unit Attention conditions for the assoicated
+        * release all of the Unit Attention conditions for the associated
         * struct se_lun.
         */
        spin_lock(&deve->ua_lock);
index b00101972f20229e152a68822161fdf5c3df642a..d5f923bcdffeb907191297082b61cd5551226c39 100644 (file)
  * Added support for Linux 2.4.x kernels.
  *
  * Revision 3.77  2001/01/09 04:00:52  eokerson
- * Linetest will now test the line, even if it has previously succeded.
+ * Linetest will now test the line, even if it has previously succeeded.
  *
  * Revision 3.76  2001/01/08 19:27:00  eokerson
  * Fixed problem with standard cable on Internet PhoneCARD.
@@ -352,7 +352,7 @@ static void ixj_fsk_alloc(IXJ *j)
                } else {
                        j->fsksize = 8000;
                        if(ixjdebug & 0x0200) {
-                               printk("IXJ phone%d - allocate succeded\n", j->board);
+                               printk("IXJ phone%d - allocate succeeded\n", j->board);
                        }
                }
        }
@@ -487,7 +487,7 @@ DSPbase +
 8-9            Hardware Status Register                        Read Only
 A-B            Hardware Control Register                       Read Write
 C-D Host Transmit (Write) Data Buffer Access Port (buffer input)Write Only
-E-F Host Recieve (Read) Data Buffer Access Port (buffer input) Read Only
+E-F Host Receive (Read) Data Buffer Access Port (buffer input) Read Only
 ************************************************************************/
 
 static inline void ixj_read_HSR(IXJ *j)
@@ -4195,7 +4195,7 @@ static void ixj_aec_start(IXJ *j, int level)
                        ixj_WriteDSPCommand(0xE338, j); /* Set Echo Suppresser Attenuation to 0dB */
 
                        /* Now we can set the AGC initial parameters and turn it on */
-                       ixj_WriteDSPCommand(0xCF90, j); /* Set AGC Minumum gain */
+                       ixj_WriteDSPCommand(0xCF90, j); /* Set AGC Minimum gain */
                        ixj_WriteDSPCommand(0x0020, j); /* to 0.125 (-18dB) */
        
                        ixj_WriteDSPCommand(0xCF91, j); /* Set AGC Maximum gain */
index 4c32a43b791473eb7a7cda625f5ff3bcffb95668..2c841134f61c42dfd80f53db9828e75578e1f7cd 100644 (file)
@@ -1149,7 +1149,7 @@ typedef struct {
        unsigned int firstring:1; /* First ring cadence is complete */
        unsigned int pstncheck:1;       /* Currently checking the PSTN Line */
        unsigned int pstn_rmr:1;
-       unsigned int x:3;       /* unsed bits */
+       unsigned int x:3;       /* unused bits */
 
 } IXJ_FLAGS;
 
index c3425bb3a1f6fe2348330d8336c76fd3b60d4b90..b6f7d52f7c35ea0c8a74f6b14e4f7a1a09ec24d2 100644 (file)
@@ -255,7 +255,7 @@ static int hvc_iucv_write(struct hvc_iucv_private *priv,
                default:
                        written = -EIO;
                }
-               /* remove buffer if an error has occured or received data
+               /* remove buffer if an error has occurred or received data
                 * is not correct */
                if (rc || (rb->mbuf->version != MSG_VERSION) ||
                          (rb->msg.length    != MSG_SIZE(rb->mbuf->datalen)))
@@ -620,7 +620,7 @@ static void hvc_iucv_hangup(struct hvc_iucv_private *priv)
  *             the index of an struct hvc_iucv_private instance.
  *
  * This routine notifies the HVC back-end that a tty hangup (carrier loss,
- * virtual or otherwise) has occured.
+ * virtual or otherwise) has occurred.
  * The z/VM IUCV HVC device driver ignores virtual hangups (vhangup())
  * to keep an existing IUCV communication path established.
  * (Background: vhangup() is called from user space (by getty or login) to
index 5e2f52b33327e07acc5933dad1ffea7bc224dd41..e6eea1485244b6e4e52a845f48522b6f8e5f7599 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * vio driver interface to hvc_console.c
  *
- * This code was moved here to allow the remaing code to be reused as a
+ * This code was moved here to allow the remaining code to be reused as a
  * generic polling mode with semi-reliable transport driver core to the
  * console and tty subsystems.
  *
index bef238f9ffd73aa33fc397b56f6173a3be74f93e..4c8b66546930bc11dbc42ff39cc3b71bd533b39a 100644 (file)
  * arch/powerepc/include/asm/hvcserver.h
  *
  * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to
- * prevent possible lockup with realtime scheduling as similarily pointed out by
+ * prevent possible lockup with realtime scheduling as similarly pointed out by
  * akpm in hvc_console.  Changed resulted in the removal of hvcs_final_close()
  * to reorder cleanup operations and prevent discarding of pending data during
  * an hvcs_close().  Removed spinlock protection of hvcs_struct data members in
@@ -581,7 +581,7 @@ static void hvcs_try_write(struct hvcs_struct *hvcsd)
                        /*
                         * We are still obligated to deliver the data to the
                         * hypervisor even if the tty has been closed because
-                        * we commited to delivering it.  But don't try to wake
+                        * we committed to delivering it.  But don't try to wake
                         * a non-existent tty.
                         */
                        if (tty) {
@@ -1349,7 +1349,7 @@ static int hvcs_write(struct tty_struct *tty,
        spin_lock_irqsave(&hvcsd->lock, flags);
 
        /*
-        * Somehow an open succedded but the device was removed or the
+        * Somehow an open succeeded but the device was removed or the
         * connection terminated between the vty-server and partner vty during
         * the middle of a write operation?  This is a crummy place to do this
         * but we want to keep it all in the spinlock.
@@ -1420,7 +1420,7 @@ static int hvcs_write(struct tty_struct *tty,
 }
 
 /*
- * This is really asking how much can we guarentee that we can send or that we
+ * This is really asking how much can we guarantee that we can send or that we
  * absolutely WILL BUFFER if we can't send it.  This driver MUST honor the
  * return value, hence the reason for hvcs_struct buffering.
  */
index 41878a69203d72ae1d3b52830868ff561f1ca83e..0bf794313ffd5cb8a0b06d26ff7b1b5a69d496e5 100644 (file)
 #define MOXA_MUST_IIR_RTO              0x0C
 #define MOXA_MUST_IIR_LSR              0x06
 
-/* recieved Xon/Xoff or specical interrupt pending */
+/* received Xon/Xoff or specical interrupt pending */
 #define MOXA_MUST_IIR_XSC              0x10
 
 /* RTS/CTS change state interrupt pending */
index 176f63256b371153edee3d459b4cf93de6755388..74273e638c0dfce1d0350a14d57502a5692ee7d9 100644 (file)
@@ -74,7 +74,7 @@ module_param(debug, int, 0600);
 #endif
 
 /*
- * Semi-arbitary buffer size limits. 0710 is normally run with 32-64 byte
+ * Semi-arbitrary buffer size limits. 0710 is normally run with 32-64 byte
  * limits so this is plenty
  */
 #define MAX_MRU 512
@@ -82,7 +82,7 @@ module_param(debug, int, 0600);
 
 /*
  *     Each block of data we have queued to go out is in the form of
- *     a gsm_msg which holds everything we need in a link layer independant
+ *     a gsm_msg which holds everything we need in a link layer independent
  *     format
  */
 
@@ -1193,8 +1193,8 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
                break;
                /* Optional unsupported commands */
        case CMD_PN:    /* Parameter negotiation */
-       case CMD_RPN:   /* Remote port negotation */
-       case CMD_SNC:   /* Service negotation command */
+       case CMD_RPN:   /* Remote port negotiation */
+       case CMD_SNC:   /* Service negotiation command */
        default:
                /* Reply to bad commands with an NSC */
                buf[0] = command;
@@ -1658,8 +1658,12 @@ static void gsm_queue(struct gsm_mux *gsm)
 
        if ((gsm->control & ~PF) == UI)
                gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len);
-       /* generate final CRC with received FCS */
-       gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs);
+       if (gsm->encoding == 0){
+               /* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only.
+                           In this case it contain the last piece of data
+                           required to generate final CRC */
+               gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs);
+       }
        if (gsm->fcs != GOOD_FCS) {
                gsm->bad_fcs++;
                if (debug & 4)
@@ -2026,7 +2030,7 @@ EXPORT_SYMBOL_GPL(gsm_activate_mux);
  *     @mux: mux to free
  *
  *     Dispose of allocated resources for a dead mux. No refcounting
- *     at present so the mux must be truely dead.
+ *     at present so the mux must be truly dead.
  */
 void gsm_free_mux(struct gsm_mux *gsm)
 {
index 428f4fe0b5f745f81ee0e076b2e20d3717115b99..0ad32888091c16c1c27de4c032517df583ea4c9f 100644 (file)
@@ -95,6 +95,7 @@ static void n_tty_set_room(struct tty_struct *tty)
 {
        /* tty->read_cnt is not read locked ? */
        int     left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
+       int old_left;
 
        /*
         * If we are doing input canonicalization, and there are no
@@ -104,7 +105,12 @@ static void n_tty_set_room(struct tty_struct *tty)
         */
        if (left <= 0)
                left = tty->icanon && !tty->canon_data;
+       old_left = tty->receive_room;
        tty->receive_room = left;
+
+       /* Did this open up the receive buffer? We may need to flip */
+       if (left && !old_left)
+               schedule_work(&tty->buf.work);
 }
 
 static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty)
index f4f11164efe51f5dc69fa474a5b5c439851a11e1..fd0a98524d513482807c30055b849726f953b590 100644 (file)
@@ -1673,7 +1673,7 @@ static void ntty_hangup(struct tty_struct *tty)
 
 /*
  * called when the userspace process writes to the tty (/dev/noz*).
- * Data is inserted into a fifo, which is then read and transfered to the modem.
+ * Data is inserted into a fifo, which is then read and transferred to the modem.
  */
 static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
                      int count)
index 3780da8ad12d931762b4fca52409bfde5f074eba..036feeb5e3f6e9590c06852fefa95af977e3f8c9 100644 (file)
@@ -2060,7 +2060,7 @@ static __init int register_PCI(int i, struct pci_dev *dev)
                        sClockPrescale = 0x19;
                        rp_baud_base[i] = 230400;
                } else {
-                       /* mod 4 (devide by 5) prescale */
+                       /* mod 4 (divide by 5) prescale */
                        sClockPrescale = 0x14;
                        rp_baud_base[i] = 460800;
                }
@@ -2183,7 +2183,7 @@ static int __init init_ISA(int i)
                sClockPrescale = 0x19;  /* mod 9 (divide by 10) prescale */
                rp_baud_base[i] = 230400;
        } else {
-               sClockPrescale = 0x14;  /* mod 4 (devide by 5) prescale */
+               sClockPrescale = 0x14;  /* mod 4 (divide by 5) prescale */
                rp_baud_base[i] = 460800;
        }
 
index b3b881bc4712f47983c84ac2069a6f5c0b07b55e..6611535f444058e782ee96b054dd890c49039d54 100644 (file)
@@ -1629,7 +1629,7 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id)
                            up->port.iotype == UPIO_DWAPB32) &&
                          (iir & UART_IIR_BUSY) == UART_IIR_BUSY) {
                        /* The DesignWare APB UART has an Busy Detect (0x07)
-                        * interrupt meaning an LCR write attempt occured while the
+                        * interrupt meaning an LCR write attempt occurred while the
                         * UART was busy. The interrupt must be cleared by reading
                         * the UART status register (USR) and the LCR re-written. */
                        unsigned int status;
index 8b8930f700b5e18853a0e1d55d560f938a3d5864..738cec9807d35f4d968e50ea2a8db681ac3a8799 100644 (file)
@@ -433,7 +433,7 @@ static void __devexit sbs_exit(struct pci_dev *dev)
 /*
  * SIIG serial cards have an PCI interface chip which also controls
  * the UART clocking frequency. Each UART can be clocked independently
- * (except cards equiped with 4 UARTs) and initial clocking settings
+ * (except cards equipped with 4 UARTs) and initial clocking settings
  * are stored in the EEPROM chip. It can cause problems because this
  * version of serial driver doesn't support differently clocked UART's
  * on single PCI card. To prevent this, initialization functions set
index 57731e87008591675eb029598bee843d54c1eb47..6deee4e546be580d298c828ceea0b9c3b56f9e19 100644 (file)
@@ -520,7 +520,7 @@ static bool pl011_dma_tx_irq(struct uart_amba_port *uap)
 
        /*
         * We don't have a TX buffer queued, so try to queue one.
-        * If we succesfully queued a buffer, mask the TX IRQ.
+        * If we successfully queued a buffer, mask the TX IRQ.
         */
        if (pl011_dma_tx_refill(uap) > 0) {
                uap->im &= ~UART011_TXIM;
index 53a46822705621ec0f776340381d94c672655e69..8a869e58f6d7128fd844fb71626a6ca0b42cb82d 100644 (file)
@@ -1248,7 +1248,7 @@ static void icom_set_termios(struct uart_port *port,
                }
        }
 
-       /* Enable Transmitter and Reciever */
+       /* Enable Transmitter and Receiver */
        offset =
            (unsigned long) &ICOM_PORT->statStg->rcv[0] -
            (unsigned long) ICOM_PORT->statStg;
index dfcf4b1878aa3f2596fc9d6a8ffa21722bb2224e..62df72d9f0aa32bef8a58a19f447dea922bdd18a 100644 (file)
@@ -78,7 +78,7 @@
 #define  URXD_FRMERR     (1<<12)
 #define  URXD_BRK        (1<<11)
 #define  URXD_PRERR      (1<<10)
-#define  UCR1_ADEN       (1<<15) /* Auto dectect interrupt */
+#define  UCR1_ADEN       (1<<15) /* Auto detect interrupt */
 #define  UCR1_ADBR       (1<<14) /* Auto detect baud rate */
 #define  UCR1_TRDYEN     (1<<13) /* Transmitter ready interrupt enable */
 #define  UCR1_IDEN       (1<<12) /* Idle condition interrupt */
@@ -382,12 +382,13 @@ static void imx_start_tx(struct uart_port *port)
 static irqreturn_t imx_rtsint(int irq, void *dev_id)
 {
        struct imx_port *sport = dev_id;
-       unsigned int val = readl(sport->port.membase + USR1) & USR1_RTSS;
+       unsigned int val;
        unsigned long flags;
 
        spin_lock_irqsave(&sport->port.lock, flags);
 
        writel(USR1_RTSD, sport->port.membase + USR1);
+       val = readl(sport->port.membase + USR1) & USR1_RTSS;
        uart_handle_cts_change(&sport->port, !!val);
        wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 
index ebff4a1d4bcc04626f519ebd824f94af5f25a506..7b1cda59ebb53d4cc0f9db351d6b19746389a1b6 100644 (file)
@@ -375,7 +375,7 @@ static void ip22zilog_transmit_chars(struct uart_ip22zilog_port *up,
                 * be nice to transmit console writes just like we normally would for
                 * a TTY line. (ie. buffered and TX interrupt driven).  That is not
                 * easy because console writes cannot sleep.  One solution might be
-                * to poll on enough port->xmit space becomming free.  -DaveM
+                * to poll on enough port->xmit space becoming free.  -DaveM
                 */
                if (!(status & Tx_BUF_EMP))
                        return;
index 38a509c684cd297f0dfaa18bf67279bdfcd9d9b8..b704c8ce0d715bcb6555a263b4c450c154a66277 100644 (file)
@@ -273,7 +273,7 @@ struct neo_uart_struct {
         u8 fctr;               /* WR   FCTR - Feature Control Reg */
         u8 efr;                /* WR   EFR - Enhanced Function Reg */
         u8 tfifo;              /* WR   TXCNT/TXTRG - Transmit FIFO Reg */
-        u8 rfifo;              /* WR   RXCNT/RXTRG - Recieve FIFO Reg */
+        u8 rfifo;              /* WR   RXCNT/RXTRG - Receive FIFO Reg */
         u8 xoffchar1;  /* WR   XOFF 1 - XOff Character 1 Reg */
         u8 xoffchar2;  /* WR   XOFF 2 - XOff Character 2 Reg */
         u8 xonchar1;   /* WR   XON 1 - Xon Character 1 Reg */
index 7960d9633c15a2a18ad53b57540b6d316ca010bf..4538c3e3646ecf6bc648cbf8acac37f6ca0c6338 100644 (file)
@@ -381,7 +381,7 @@ static void neo_copy_data_from_uart_to_queue(struct jsm_channel *ch)
                /* Copy data from uart to the queue */
                memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, n);
                /*
-                * Since RX_FIFO_DATA_ERROR was 0, we are guarenteed
+                * Since RX_FIFO_DATA_ERROR was 0, we are guaranteed
                 * that all the data currently in the FIFO is free of
                 * breaks and parity/frame/orun errors.
                 */
@@ -1210,7 +1210,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
                         * Why would I check EVERY possibility of type of
                         * interrupt, when we know its TXRDY???
                         * Becuz for some reason, even tho we got triggered for TXRDY,
-                        * it seems to be occassionally wrong. Instead of TX, which
+                        * it seems to be occasionally wrong. Instead of TX, which
                         * it should be, I was getting things like RXDY too. Weird.
                         */
                        neo_parse_isr(brd, port);
index 7ab6323925026920c1e30e17d49f68100da33490..8415fc723b96db723d0af22d3121f0b8a4af3ee3 100644 (file)
@@ -369,7 +369,7 @@ struct max3107_port {
        struct spi_device *spi;
 
 #if defined(CONFIG_GPIOLIB)
-       /* GPIO chip stucture */
+       /* GPIO chip structure */
        struct gpio_chip chip;
 #endif
 
index 37e13c3d91d9970446f6ad66aaf96e3955dd33f3..2f548af4e98a866b40d7cc445aaf186859d3a59f 100644 (file)
@@ -23,7 +23,7 @@
  *    1 word. If SPI master controller doesn't support sclk frequency change,
  *    then the char need be sent out one by one with some delay
  *
- * 2. Currently only RX availabe interrrupt is used, no need for waiting TXE
+ * 2. Currently only RX available interrrupt is used, no need for waiting TXE
  *    interrupt for a low speed UART device
  */
 
index d1ef43af397ceb449645cac7e365054d5e415880..c37ea48c825aa9ed9e5296976036c835aabb494e 100644 (file)
@@ -21,7 +21,7 @@
 
 #define WC_IRQ_MASK            (0xF << 8)
 #define WC_TXE_IRQ_ENABLE      (1 << 11)       /* TX empty irq */
-#define WC_RXA_IRQ_ENABLE      (1 << 10)       /* RX availabe irq */
+#define WC_RXA_IRQ_ENABLE      (1 << 10)       /* RX available irq */
 #define WC_PAR_HIGH_IRQ_ENABLE (1 << 9)
 #define WC_REC_ACT_IRQ_ENABLE  (1 << 8)
 
index b906f11f7c1ad96908f2787d090acfd50e5f4d33..624701f8138af55a4c8edbc0f3da29d2a953e92c 100644 (file)
@@ -495,7 +495,7 @@ static void msm_hs_pm(struct uart_port *uport, unsigned int state,
  *
  * Interrupts should be disabled before we are called, as
  * we modify Set Baud rate
- * Set receive stale interrupt level, dependant on Bit Rate
+ * Set receive stale interrupt level, dependent on Bit Rate
  * Goal is to have around 8 ms before indicate stale.
  * roundup (((Bit Rate * .008) / 10) + 1
  */
@@ -1350,7 +1350,7 @@ static irqreturn_t msm_hs_rx_wakeup_isr(int irq, void *dev)
 
        spin_lock_irqsave(&uport->lock, flags);
        if (msm_uport->clk_state == MSM_HS_CLK_OFF) {
-               /* ignore the first irq - it is a pending irq that occured
+               /* ignore the first irq - it is a pending irq that occurred
                 * before enable_irq() */
                if (msm_uport->rx_wakeup.ignore)
                        msm_uport->rx_wakeup.ignore = 0;
index 763537943a530d71021887bef0767af2ac39a16d..47cadf474149fe957a179458f24dc66ea6a57f9f 100644 (file)
@@ -13,7 +13,7 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- * Note: This driver is made seperate from 8250 driver as we cannot
+ * Note: This driver is made separate from 8250 driver as we cannot
  * over load 8250 driver with omap platform specific configuration for
  * features like DMA, it makes easier to implement features like DMA and
  * hardware flow control and software flow control configuration with
index 5b9cde79e4eaf5c3f686f7b056952e04b1eef027..e1c8d4f1ce587dafe85febe3a70cd3b44f387545 100644 (file)
@@ -330,7 +330,7 @@ static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap)
                 * When that happens, I disable the receive side of the driver.
                 * Note that what I've been experiencing is a real irq loop where
                 * I'm getting flooded regardless of the actual port speed.
-                * Something stange is going on with the HW
+                * Something strange is going on with the HW
                 */
                if ((++loops) > 1000)
                        goto flood;
@@ -396,7 +396,7 @@ static void pmz_transmit_chars(struct uart_pmac_port *uap)
                 * be nice to transmit console writes just like we normally would for
                 * a TTY line. (ie. buffered and TX interrupt driven).  That is not
                 * easy because console writes cannot sleep.  One solution might be
-                * to poll on enough port->xmit space becomming free.  -DaveM
+                * to poll on enough port->xmit space becoming free.  -DaveM
                 */
                if (!(status & Tx_BUF_EMP))
                        return;
@@ -809,7 +809,7 @@ static int pmz_set_scc_power(struct uart_pmac_port *uap, int state)
 #endif /* !CONFIG_PPC_PMAC */
 
 /*
- * FixZeroBug....Works around a bug in the SCC receving channel.
+ * FixZeroBug....Works around a bug in the SCC receiving channel.
  * Inspired from Darwin code, 15 Sept. 2000  -DanM
  *
  * The following sequence prevents a problem that is seen with O'Hare ASICs
index 2335edafe903591d1cf9d7bd205855839c8224cc..9e2fa8d784e2aff4f33f12264ddb408441e82fe0 100644 (file)
@@ -64,7 +64,7 @@
 #define tx_enabled(port) ((port)->unused[0])
 #define rx_enabled(port) ((port)->unused[1])
 
-/* flag to ignore all characters comming in */
+/* flag to ignore all characters coming in */
 #define RXSTAT_DUMMY_READ (0x10000000)
 
 static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port)
@@ -291,7 +291,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id)
                goto out;
        }
 
-       /* if there isnt anything more to transmit, or the uart is now
+       /* if there isn't anything more to transmit, or the uart is now
         * stopped, disable the uart and exit
        */
 
index eb7958c675a80c7989ffeaced1fe65ef37ce0f6e..920a6f929c8b62ec1dab5dff99f9b11bf044e39b 100644 (file)
@@ -812,7 +812,7 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
 }
 
 /*
- * Here we define a transistion notifier so that we can update all of our
+ * Here we define a transition notifier so that we can update all of our
  * ports' baud rate when the peripheral clock changes.
  */
 static int sci_notifier(struct notifier_block *self,
@@ -1836,6 +1836,12 @@ static int __devinit serial_console_setup(struct console *co, char *options)
        sci_port = &sci_ports[co->index];
        port = &sci_port->port;
 
+       /*
+        * Refuse to handle uninitialized ports.
+        */
+       if (!port->ops)
+               return -ENODEV;
+
        ret = sci_remap_port(port);
        if (unlikely(ret != 0))
                return ret;
@@ -1866,13 +1872,6 @@ static struct console serial_console = {
        .data           = &sci_uart_driver,
 };
 
-static int __init sci_console_init(void)
-{
-       register_console(&serial_console);
-       return 0;
-}
-console_initcall(sci_console_init);
-
 static struct console early_serial_console = {
        .name           = "early_ttySC",
        .write          = serial_console_write,
@@ -1901,18 +1900,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev)
        register_console(&early_serial_console);
        return 0;
 }
+
+#define SCI_CONSOLE    (&serial_console)
+
 #else
 static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev)
 {
        return -EINVAL;
 }
-#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
 
-#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE)
-#define SCI_CONSOLE    (&serial_console)
-#else
-#define SCI_CONSOLE    0
-#endif
+#define SCI_CONSOLE    NULL
+
+#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
 
 static char banner[] __initdata =
        KERN_INFO "SuperH SCI(F) driver initialized\n";
index cff9a306660faede7827d705b5cf5d98fdef9067..377ae74e7154e8dedcb1808902a8114abd48a216 100644 (file)
@@ -146,7 +146,7 @@ static struct sn_sal_ops intr_ops = {
 };
 
 /* the console does output in two distinctly different ways:
- * synchronous (raw) and asynchronous (buffered).  initally, early_printk
+ * synchronous (raw) and asynchronous (buffered).  initially, early_printk
  * does synchronous output.  any data written goes directly to the SAL
  * to be output (incidentally, it is internally buffered by the SAL)
  * after interrupts and timers are initialized and available for use,
@@ -481,7 +481,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
        while (port->sc_ops->sal_input_pending()) {
                ch = port->sc_ops->sal_getc();
                if (ch < 0) {
-                       printk(KERN_ERR "sn_console: An error occured while "
+                       printk(KERN_ERR "sn_console: An error occurred while "
                               "obtaining data from the console (0x%0x)\n", ch);
                        break;
                }
index 99ff9abf57cede4e7b234a7d72ce983ff67aa892..8e916e76b7b54c851305bb746034142a369530d1 100644 (file)
@@ -474,7 +474,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up,
                 * be nice to transmit console writes just like we normally would for
                 * a TTY line. (ie. buffered and TX interrupt driven).  That is not
                 * easy because console writes cannot sleep.  One solution might be
-                * to poll on enough port->xmit space becomming free.  -DaveM
+                * to poll on enough port->xmit space becoming free.  -DaveM
                 */
                if (!(status & Tx_BUF_EMP))
                        return;
index 18888d005a0aeac870dcc001e24891fca5a80877..27da23d98e3f25f13b3a169ef78dbd20b79151d7 100644 (file)
@@ -4072,7 +4072,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
        
        if ( request_irq(info->irq_level,mgsl_interrupt,info->irq_flags,
                info->device_name, info ) < 0 ) {
-               printk( "%s(%d):Cant request interrupt on device %s IRQ=%d\n",
+               printk( "%s(%d):Can't request interrupt on device %s IRQ=%d\n",
                        __FILE__,__LINE__,info->device_name, info->irq_level );
                goto errout;
        }
@@ -4095,7 +4095,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
                info->memory_base = ioremap_nocache(info->phys_memory_base,
                                                                0x40000);
                if (!info->memory_base) {
-                       printk( "%s(%d):Cant map shared memory on device %s MemAddr=%08X\n",
+                       printk( "%s(%d):Can't map shared memory on device %s MemAddr=%08X\n",
                                __FILE__,__LINE__,info->device_name, info->phys_memory_base );
                        goto errout;
                }
@@ -4109,7 +4109,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
                info->lcr_base = ioremap_nocache(info->phys_lcr_base,
                                                                PAGE_SIZE);
                if (!info->lcr_base) {
-                       printk( "%s(%d):Cant map LCR memory on device %s MemAddr=%08X\n",
+                       printk( "%s(%d):Can't map LCR memory on device %s MemAddr=%08X\n",
                                __FILE__,__LINE__,info->device_name, info->phys_lcr_base );
                        goto errout;
                }
@@ -4119,7 +4119,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
                /* claim DMA channel */
                
                if (request_dma(info->dma_level,info->device_name) < 0){
-                       printk( "%s(%d):Cant request DMA channel on device %s DMA=%d\n",
+                       printk( "%s(%d):Can't request DMA channel on device %s DMA=%d\n",
                                __FILE__,__LINE__,info->device_name, info->dma_level );
                        mgsl_release_resources( info );
                        return -ENODEV;
@@ -4132,7 +4132,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
        }
        
        if ( mgsl_allocate_dma_buffers(info) < 0 ) {
-               printk( "%s(%d):Cant allocate DMA buffers on device %s DMA=%d\n",
+               printk( "%s(%d):Can't allocate DMA buffers on device %s DMA=%d\n",
                        __FILE__,__LINE__,info->device_name, info->dma_level );
                goto errout;
        }       
index a35dd549a00833739df7c4264ec018381a2183ff..18b48cd3b41ddbbb7a76f1c8898b907fac1b09ca 100644 (file)
@@ -3491,7 +3491,7 @@ static int claim_resources(struct slgt_info *info)
 
        info->reg_addr = ioremap_nocache(info->phys_reg_addr, SLGT_REG_SIZE);
        if (!info->reg_addr) {
-               DBGERR(("%s cant map device registers, addr=%08X\n",
+               DBGERR(("%s can't map device registers, addr=%08X\n",
                        info->device_name, info->phys_reg_addr));
                info->init_error = DiagStatus_CantAssignPciResources;
                goto errout;
index 327343694473de0ffb5156bbd876f615e670e690..c77831c7675a948db7837c5924380ecd75b9ccd6 100644 (file)
@@ -3595,7 +3595,7 @@ static int claim_resources(SLMP_INFO *info)
        info->memory_base = ioremap_nocache(info->phys_memory_base,
                                                                SCA_MEM_SIZE);
        if (!info->memory_base) {
-               printk( "%s(%d):%s Cant map shared memory, MemAddr=%08X\n",
+               printk( "%s(%d):%s Can't map shared memory, MemAddr=%08X\n",
                        __FILE__,__LINE__,info->device_name, info->phys_memory_base );
                info->init_error = DiagStatus_CantAssignPciResources;
                goto errout;
@@ -3603,7 +3603,7 @@ static int claim_resources(SLMP_INFO *info)
 
        info->lcr_base = ioremap_nocache(info->phys_lcr_base, PAGE_SIZE);
        if (!info->lcr_base) {
-               printk( "%s(%d):%s Cant map LCR memory, MemAddr=%08X\n",
+               printk( "%s(%d):%s Can't map LCR memory, MemAddr=%08X\n",
                        __FILE__,__LINE__,info->device_name, info->phys_lcr_base );
                info->init_error = DiagStatus_CantAssignPciResources;
                goto errout;
@@ -3612,7 +3612,7 @@ static int claim_resources(SLMP_INFO *info)
 
        info->sca_base = ioremap_nocache(info->phys_sca_base, PAGE_SIZE);
        if (!info->sca_base) {
-               printk( "%s(%d):%s Cant map SCA memory, MemAddr=%08X\n",
+               printk( "%s(%d):%s Can't map SCA memory, MemAddr=%08X\n",
                        __FILE__,__LINE__,info->device_name, info->phys_sca_base );
                info->init_error = DiagStatus_CantAssignPciResources;
                goto errout;
@@ -3622,7 +3622,7 @@ static int claim_resources(SLMP_INFO *info)
        info->statctrl_base = ioremap_nocache(info->phys_statctrl_base,
                                                                PAGE_SIZE);
        if (!info->statctrl_base) {
-               printk( "%s(%d):%s Cant map SCA Status/Control memory, MemAddr=%08X\n",
+               printk( "%s(%d):%s Can't map SCA Status/Control memory, MemAddr=%08X\n",
                        __FILE__,__LINE__,info->device_name, info->phys_statctrl_base );
                info->init_error = DiagStatus_CantAssignPciResources;
                goto errout;
@@ -3869,7 +3869,7 @@ static void device_init(int adapter_num, struct pci_dev *pdev)
                                        port_array[0]->irq_flags,
                                        port_array[0]->device_name,
                                        port_array[0]) < 0 ) {
-                       printk( "%s(%d):%s Cant request interrupt, IRQ=%d\n",
+                       printk( "%s(%d):%s Can't request interrupt, IRQ=%d\n",
                                __FILE__,__LINE__,
                                port_array[0]->device_name,
                                port_array[0]->irq_level );
index b9451219528b76bf01a900b0873dea751b27e9d5..f1a7918d71aac192107af9b45f5e2dde1508383a 100644 (file)
@@ -442,10 +442,8 @@ static void flush_to_ldisc(struct work_struct *work)
                           line discipline as we want to empty the queue */
                        if (test_bit(TTY_FLUSHPENDING, &tty->flags))
                                break;
-                       if (!tty->receive_room || seen_tail) {
-                               schedule_work(&tty->buf.work);
+                       if (!tty->receive_room || seen_tail)
                                break;
-                       }
                        if (count > tty->receive_room)
                                count = tty->receive_room;
                        char_buf = head->char_buf_ptr + head->read;
index 936a4ead6c2159549adfcca3b2cb683db1eb29db..d7d50b48287e8a7374e4d2e814527b4faa9dfaa9 100644 (file)
@@ -2134,7 +2134,7 @@ done:
  *     actually has driver level meaning and triggers a VC resize.
  *
  *     Locking:
- *             Driver dependant. The default do_resize method takes the
+ *             Driver dependent. The default do_resize method takes the
  *     tty termios mutex and ctrl_lock. The console takes its own lock
  *     then calls into the default method.
  */
@@ -2155,7 +2155,7 @@ static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
  *     tioccons        -       allow admin to move logical console
  *     @file: the file to become console
  *
- *     Allow the adminstrator to move the redirected console device
+ *     Allow the administrator to move the redirected console device
  *
  *     Locking: uses redirect_lock to guard the redirect information
  */
@@ -2290,7 +2290,7 @@ EXPORT_SYMBOL_GPL(tty_get_pgrp);
 /**
  *     tiocgpgrp               -       get process group
  *     @tty: tty passed by user
- *     @real_tty: tty side of the tty pased by the user if a pty else the tty
+ *     @real_tty: tty side of the tty passed by the user if a pty else the tty
  *     @p: returned pid
  *
  *     Obtain the process group of the tty. If there is no process group
@@ -2367,7 +2367,7 @@ out_unlock:
 /**
  *     tiocgsid                -       get session id
  *     @tty: tty passed by user
- *     @real_tty: tty side of the tty pased by the user if a pty else the tty
+ *     @real_tty: tty side of the tty passed by the user if a pty else the tty
  *     @p: pointer to returned session id
  *
  *     Obtain the session id of the tty. If there is no session
index 1a1135d580a24276418c58ba899b127514cd433a..21574cb32343d43797f3f67ca01a2c134736d537 100644 (file)
@@ -247,7 +247,7 @@ speed_t tty_termios_baud_rate(struct ktermios *termios)
        cbaud = termios->c_cflag & CBAUD;
 
 #ifdef BOTHER
-       /* Magic token for arbitary speed via c_ispeed/c_ospeed */
+       /* Magic token for arbitrary speed via c_ispeed/c_ospeed */
        if (cbaud == BOTHER)
                return termios->c_ospeed;
 #endif
@@ -283,7 +283,7 @@ speed_t tty_termios_input_baud_rate(struct ktermios *termios)
        if (cbaud == B0)
                return tty_termios_baud_rate(termios);
 
-       /* Magic token for arbitary speed via c_ispeed*/
+       /* Magic token for arbitrary speed via c_ispeed*/
        if (cbaud == BOTHER)
                return termios->c_ispeed;
 
@@ -449,7 +449,7 @@ EXPORT_SYMBOL(tty_get_baud_rate);
  *     @new: New termios
  *     @old: Old termios
  *
- *     Propogate the hardware specific terminal setting bits from
+ *     Propagate the hardware specific terminal setting bits from
  *     the old termios structure to the new one. This is used in cases
  *     where the hardware does not support reconfiguration or as a helper
  *     in some cases where only minimal reconfiguration is supported
index c83cdfb56fccc45638212d978280408a573d5a9a..4bea1efaec98edbff2dbc2e5db27ac807d70c7fb 100644 (file)
@@ -3963,7 +3963,7 @@ void reset_palette(struct vc_data *vc)
  *  of 32 pixels. Userspace fontdata is stored with 32 bytes (shorts/ints, 
  *  depending on width) reserved for each character which is kinda wasty, but 
  *  this is done in order to maintain compatibility with the EGA/VGA fonts. It 
- *  is upto the actual low-level console-driver convert data into its favorite
+ *  is up to the actual low-level console-driver convert data into its favorite
  *  format (maybe we should add a `fontoffset' field to the `display'
  *  structure so we won't have to convert the fontdata all the time.
  *  /Jes
index daf6e77de2b1ec120eb1d89135f6e56ae1e17641..e67b566e7aa3ff08ea6a8d42f17cabfeaf861473 100644 (file)
@@ -39,7 +39,7 @@ module_param(extram_pool_sz, int, 0);
 MODULE_PARM_DESC(extram_pool_sz, "external ram pool size to allocate");
 
 /*
- * Host event IRQ numbers from PRUSS - PRUSS can generate upto 8 interrupt
+ * Host event IRQ numbers from PRUSS - PRUSS can generate up to 8 interrupt
  * events to AINTC of ARM host processor - which can be used for IPC b/w PRUSS
  * firmware and user space application, async notification from PRU firmware
  * to user space application
index 41b6e51188e44e4ac66590231c4a884b96a8b8f3..006489d82dc3dbc41b3f1d96fbea3511cb3e6d25 100644 (file)
@@ -66,6 +66,7 @@ config USB_ARCH_HAS_EHCI
        default y if ARCH_VT8500
        default y if PLAT_SPEAR
        default y if ARCH_MSM
+       default y if MICROBLAZE
        default PCI
 
 # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
index b268e9fccb47004b9083188f6b689512b74ac56b..e71521ce30102a87e4acd58db35c4b14b9ec1a6d 100644 (file)
@@ -1283,7 +1283,7 @@ static void uea_set_bulk_timeout(struct uea_softc *sc, u32 dsrate)
 
        /* in bulk mode the modem have problem with high rate
         * changing internal timing could improve things, but the
-        * value is misterious.
+        * value is mysterious.
         * ADI930 don't support it (-EPIPE error).
         */
 
@@ -1743,7 +1743,7 @@ static int uea_send_cmvs_e1(struct uea_softc *sc)
                                goto out;
                }
        } else {
-               /* This realy should not happen */
+               /* This really should not happen */
                uea_err(INS_TO_USBDEV(sc), "bad cmvs version %d\n", ver);
                goto out;
        }
@@ -1798,7 +1798,7 @@ static int uea_send_cmvs_e4(struct uea_softc *sc)
                                goto out;
                }
        } else {
-               /* This realy should not happen */
+               /* This really should not happen */
                uea_err(INS_TO_USBDEV(sc), "bad cmvs version %d\n", ver);
                goto out;
        }
@@ -1829,7 +1829,7 @@ static int uea_start_reset(struct uea_softc *sc)
 
        /* mask interrupt */
        sc->booting = 1;
-       /* We need to set this here because, a ack timeout could have occured,
+       /* We need to set this here because, a ack timeout could have occurred,
         * but before we start the reboot, the ack occurs and set this to 1.
         * So we will failed to wait Ready CMV.
         */
index b6d49234e5217a9fd0779944469790cef5f479d0..62050f7a4f97fb7d8eebc8ea610056c6ad5adb3a 100644 (file)
@@ -27,7 +27,7 @@
  * the link between the common hardware parts and the subdrivers (e.g.
  * interrupt handling).
  *
- * The c67x00 has 2 SIE's (serial interface engine) wich can be configured
+ * The c67x00 has 2 SIE's (serial interface engine) which can be configured
  * to be host, device or OTG (with some limitations, E.G. only SIE1 can be OTG).
  *
  * Depending on the platform configuration, the SIE's are created and
index 74e44621e313af2ea6c462063f5faf427b2eb2da..e3d493d4d61ae4a70e903e3cfba887e663aab344 100644 (file)
@@ -34,7 +34,7 @@
 /*
  * The following parameters depend on the CPU speed, bus speed, ...
  * These can be tuned for specific use cases, e.g. if isochronous transfers
- * are very important, bandwith can be sacrificed to guarantee that the
+ * are very important, bandwidth can be sacrificed to guarantee that the
  * 1ms deadline will be met.
  * If bulk transfers are important, the MAX_FRAME_BW can be increased,
  * but some (or many) isochronous deadlines might not be met.
index f6b3c253f3fa92db1afe24be7cbcbf99684558d3..a03fbc15fa9cce3ed28f209380f2a091e73223c7 100644 (file)
@@ -907,7 +907,7 @@ static inline int c67x00_end_of_data(struct c67x00_td *td)
 
 /* Remove all td's from the list which come
  * after last_td and are meant for the same pipe.
- * This is used when a short packet has occured */
+ * This is used when a short packet has occurred */
 static inline void c67x00_clear_pipe(struct c67x00_hcd *c67x00,
                                     struct c67x00_td *last_td)
 {
index 5eeb570b9a617416c672c039339b8ff50a9cad2a..b4ea54dbf323606f7fe78de1521e36e057fc7e3d 100644 (file)
@@ -52,7 +52,7 @@
  */
 
 /*
- * The only reason to have several buffers is to accomodate assumptions
+ * The only reason to have several buffers is to accommodate assumptions
  * in line disciplines. They ask for empty space amount, receive our URB size,
  * and proceed to issue several 1-character writes, assuming they will fit.
  * The very first write takes a complete URB. Fortunately, this only happens
index 6a54634ab823df7628b1a52c2cf1542233cf5696..385acb895ab3518bcbd712ccf91e669220e0a5ea 100644 (file)
@@ -483,7 +483,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
                }
 
                done += n_characters;
-               /* Terminate if end-of-message bit recieved from device */
+               /* Terminate if end-of-message bit received from device */
                if ((buffer[8] &  0x01) && (actual >= n_characters + 12))
                        remaining = 0;
                else
index a3d2e2399655b84a348561e8aa27521212f21831..96fdfb815f895969e2d4c76750b8e0a5f7844c47 100644 (file)
@@ -221,7 +221,7 @@ static char *usb_dump_endpoint_descriptor(int speed, char *start, char *end,
                break;
        case USB_ENDPOINT_XFER_INT:
                type = "Int.";
-               if (speed == USB_SPEED_HIGH)
+               if (speed == USB_SPEED_HIGH || speed == USB_SPEED_SUPER)
                        interval = 1 << (desc->bInterval - 1);
                else
                        interval = desc->bInterval;
@@ -229,7 +229,8 @@ static char *usb_dump_endpoint_descriptor(int speed, char *start, char *end,
        default:        /* "can't happen" */
                return start;
        }
-       interval *= (speed == USB_SPEED_HIGH) ? 125 : 1000;
+       interval *= (speed == USB_SPEED_HIGH ||
+                    speed == USB_SPEED_SUPER) ? 125 : 1000;
        if (interval % 1000)
                unit = 'u';
        else {
@@ -542,8 +543,9 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes,
        if (level == 0) {
                int     max;
 
-               /* high speed reserves 80%, full/low reserves 90% */
-               if (usbdev->speed == USB_SPEED_HIGH)
+               /* super/high speed reserves 80%, full/low reserves 90% */
+               if (usbdev->speed == USB_SPEED_HIGH ||
+                   usbdev->speed == USB_SPEED_SUPER)
                        max = 800;
                else
                        max = FRAME_TIME_MAX_USECS_ALLOC;
index 02b4dbfa488a89f8471edd8f2c3075875960fb8b..77a7faec8d78a0e7efa8c15f2d96a0b40a538130 100644 (file)
@@ -700,7 +700,7 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd)
        /* The USB 2.0 spec says 256 ms.  This is close enough and won't
         * exceed that limit if HZ is 100. The math is more clunky than
         * maybe expected, this is to make sure that all timers for USB devices
-        * fire at the same time to give the CPU a break inbetween */
+        * fire at the same time to give the CPU a break in between */
        if (hcd->uses_new_polling ? HCD_POLL_RH(hcd) :
                        (length == 0 && hcd->status_urb != NULL))
                mod_timer (&hcd->rh_timer, (jiffies/(HZ/4) + 1) * (HZ/4));
@@ -1908,7 +1908,7 @@ void usb_free_streams(struct usb_interface *interface,
 
        /* Streams only apply to bulk endpoints. */
        for (i = 0; i < num_eps; i++)
-               if (!usb_endpoint_xfer_bulk(&eps[i]->desc))
+               if (!eps[i] || !usb_endpoint_xfer_bulk(&eps[i]->desc))
                        return;
 
        hcd->driver->free_streams(hcd, dev, eps, num_eps, mem_flags);
index 564eaa5525d7bdac66e58bed395a433be21849da..93720bdc9efd4a9ff2e4f0d01023f2432edd1f51 100644 (file)
@@ -1649,7 +1649,7 @@ void usb_disconnect(struct usb_device **pdev)
 
        /* mark the device as inactive, so any further urb submissions for
         * this device (and any of its children) will fail immediately.
-        * this quiesces everyting except pending urbs.
+        * this quiesces everything except pending urbs.
         */
        usb_set_device_state(udev, USB_STATE_NOTATTACHED);
        dev_info(&udev->dev, "USB disconnect, device number %d\n",
@@ -2285,7 +2285,17 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
        }
 
        /* see 7.1.7.6 */
-       status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND);
+       /* Clear PORT_POWER if it's a USB3.0 device connected to USB 3.0
+        * external hub.
+        * FIXME: this is a temporary workaround to make the system able
+        * to suspend/resume.
+        */
+       if ((hub->hdev->parent != NULL) && hub_is_superspeed(hub->hdev))
+               status = clear_port_feature(hub->hdev, port1,
+                                               USB_PORT_FEAT_POWER);
+       else
+               status = set_port_feature(hub->hdev, port1,
+                                               USB_PORT_FEAT_SUSPEND);
        if (status) {
                dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n",
                                port1, status);
index 0bc06e2bcfcb9e600eb2b020286a6df78484787a..a6a350f5827bb6a4240fb6b535e15defde84d5fd 100644 (file)
@@ -648,7 +648,7 @@ static int ehci_reset_port(int port)
                if (!(portsc & PORT_CONNECT))
                        return -ENOTCONN;
 
-               /* bomb out completely if something weird happend */
+               /* bomb out completely if something weird happened */
                if ((portsc & PORT_CSC))
                        return -EINVAL;
 
index f8dd7269d79cf13fdf89e92950f5508b70a41c87..6e42aab75806e12c58e7b572e1dc953a13a32fa0 100644 (file)
@@ -278,7 +278,7 @@ static int udc_enable_dev_setup_interrupts(struct udc *dev)
        return 0;
 }
 
-/* Calculates fifo start of endpoint based on preceeding endpoints */
+/* Calculates fifo start of endpoint based on preceding endpoints */
 static int udc_set_txfifo_addr(struct udc_ep *ep)
 {
        struct udc      *dev;
@@ -2137,7 +2137,7 @@ static irqreturn_t udc_data_out_isr(struct udc *dev, int ep_ix)
        if (use_dma) {
                /* BNA event ? */
                if (tmp & AMD_BIT(UDC_EPSTS_BNA)) {
-                       DBG(dev, "BNA ep%dout occured - DESPTR = %x \n",
+                       DBG(dev, "BNA ep%dout occurred - DESPTR = %x \n",
                                        ep->num, readl(&ep->regs->desptr));
                        /* clear BNA */
                        writel(tmp | AMD_BIT(UDC_EPSTS_BNA), &ep->regs->sts);
@@ -2151,7 +2151,7 @@ static irqreturn_t udc_data_out_isr(struct udc *dev, int ep_ix)
        }
        /* HE event ? */
        if (tmp & AMD_BIT(UDC_EPSTS_HE)) {
-               dev_err(&dev->pdev->dev, "HE ep%dout occured\n", ep->num);
+               dev_err(&dev->pdev->dev, "HE ep%dout occurred\n", ep->num);
 
                /* clear HE */
                writel(tmp | AMD_BIT(UDC_EPSTS_HE), &ep->regs->sts);
@@ -2354,7 +2354,7 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix)
                /* BNA ? */
                if (epsts & AMD_BIT(UDC_EPSTS_BNA)) {
                        dev_err(&dev->pdev->dev,
-                               "BNA ep%din occured - DESPTR = %08lx \n",
+                               "BNA ep%din occurred - DESPTR = %08lx \n",
                                ep->num,
                                (unsigned long) readl(&ep->regs->desptr));
 
@@ -2367,7 +2367,7 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix)
        /* HE event ? */
        if (epsts & AMD_BIT(UDC_EPSTS_HE)) {
                dev_err(&dev->pdev->dev,
-                       "HE ep%dn occured - DESPTR = %08lx \n",
+                       "HE ep%dn occurred - DESPTR = %08lx \n",
                        ep->num, (unsigned long) readl(&ep->regs->desptr));
 
                /* clear HE */
@@ -2384,7 +2384,7 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix)
                        req = list_entry(ep->queue.next,
                                        struct udc_request, queue);
                        /*
-                        * length bytes transfered
+                        * length bytes transferred
                         * check dma done of last desc. in PPBDU mode
                         */
                        if (use_dma_ppb_du) {
@@ -2784,7 +2784,7 @@ static irqreturn_t udc_control_in_isr(struct udc *dev)
                                        /* write fifo */
                                        udc_txfifo_write(ep, &req->req);
 
-                                       /* lengh bytes transfered */
+                                       /* lengh bytes transferred */
                                        len = req->req.length - req->req.actual;
                                        if (len > ep->ep.maxpacket)
                                                len = ep->ep.maxpacket;
index 4bbabbbfc93f9625cdee07fd158b24fbf4f305ed..1d1c7543468e1bb52c7d9119c1adb20273aa6ff9 100644 (file)
@@ -584,7 +584,7 @@ union udc_setup_data {
  * SET and GET bitfields in u32 values
  * via constants for mask/offset:
  * <bit_field_stub_name> is the text between
- * UDC_ and _MASK|_OFS of appropiate
+ * UDC_ and _MASK|_OFS of appropriate
  * constant
  *
  * set bitfield value in u32 u32Val
index bb8ddf0469f904bc8326d74be5a4d8d54cf1bec9..9b7cdb16f26bc378d663e10a7963c50e17ca3fbe 100644 (file)
@@ -826,7 +826,7 @@ done:
        return status;
 }
 
-/* reinit == restore inital software state */
+/* reinit == restore initial software state */
 static void udc_reinit(struct at91_udc *udc)
 {
        u32 i;
index c2251c40a205cdff9b7672f451a39fbe477d9e6a..82314ed22506957fb781eb5c9002f21676433192 100644 (file)
@@ -42,7 +42,7 @@
 static struct usb_composite_driver *composite;
 static int (*composite_gadget_bind)(struct usb_composite_dev *cdev);
 
-/* Some systems will need runtime overrides for the  product identifers
+/* Some systems will need runtime overrides for the  product identifiers
  * published in the device descriptor, either numbers or strings or both.
  * String parameters are in UTF-8 (superset of ASCII's 7 bit characters).
  */
@@ -205,14 +205,14 @@ int usb_function_activate(struct usb_function *function)
  * usb_interface_id() is called from usb_function.bind() callbacks to
  * allocate new interface IDs.  The function driver will then store that
  * ID in interface, association, CDC union, and other descriptors.  It
- * will also handle any control requests targetted at that interface,
+ * will also handle any control requests targeted at that interface,
  * particularly changing its altsetting via set_alt().  There may
  * also be class-specific or vendor-specific requests to handle.
  *
  * All interface identifier should be allocated using this routine, to
  * ensure that for example different functions don't wrongly assign
  * different meanings to the same identifier.  Note that since interface
- * identifers are configuration-specific, functions used in more than
+ * identifiers are configuration-specific, functions used in more than
  * one configuration (or more than once in a given configuration) need
  * multiple versions of the relevant descriptors.
  *
index 00975ed903d12532629951e1510de2c49e28ff7c..0111f8a9cf7fcc3f6345a9e6d612ea5683474530 100644 (file)
@@ -706,6 +706,7 @@ f_audio_unbind(struct usb_configuration *c, struct usb_function *f)
        struct f_audio          *audio = func_to_audio(f);
 
        usb_free_descriptors(f->descriptors);
+       usb_free_descriptors(f->hs_descriptors);
        kfree(audio);
 }
 
@@ -742,7 +743,7 @@ int __init control_selector_init(struct f_audio *audio)
 }
 
 /**
- * audio_bind_config - add USB audio fucntion to a configuration
+ * audio_bind_config - add USB audio function to a configuration
  * @c: the configuration to supcard the USB audio function
  * Context: single threaded during gadget setup
  *
index 95dd4662d6a83acb3153433713c3e48889500f69..b3c304290150028cfafca5e9f192862617971ea8 100644 (file)
@@ -314,6 +314,9 @@ eem_unbind(struct usb_configuration *c, struct usb_function *f)
 
 static void eem_cmd_complete(struct usb_ep *ep, struct usb_request *req)
 {
+       struct sk_buff *skb = (struct sk_buff *)req->context;
+
+       dev_kfree_skb_any(skb);
 }
 
 /*
@@ -428,10 +431,11 @@ static int eem_unwrap(struct gether *port,
                                skb_trim(skb2, len);
                                put_unaligned_le16(BIT(15) | BIT(11) | len,
                                                        skb_push(skb2, 2));
-                               skb_copy_bits(skb, 0, req->buf, skb->len);
-                               req->length = skb->len;
+                               skb_copy_bits(skb2, 0, req->buf, skb2->len);
+                               req->length = skb2->len;
                                req->complete = eem_cmd_complete;
                                req->zero = 1;
+                               req->context = skb2;
                                if (usb_ep_queue(port->in_ep, req, GFP_ATOMIC))
                                        DBG(cdev, "echo response queue fail\n");
                                break;
index 130eee678c8bbd84043303378e18a2cf95fb783c..86902a60bcdb12c529fda3fc8c66d2789a1c9e99 100644 (file)
@@ -111,7 +111,7 @@ static inline unsigned ncm_bitrate(struct usb_gadget *g)
 #define NTB_OUT_SIZE           16384
 
 /*
- * skbs of size less than that will not be alligned
+ * skbs of size less than that will not be aligned
  * to NCM's dwNtbInMaxSize to save bus bandwidth
  */
 
index aee7e3c53c380bf625763ed2af17296591b02a7a..36613b37c50442c96a3bad47449365aaf31b1e89 100644 (file)
@@ -1148,6 +1148,12 @@ static int qe_ep_tx(struct qe_ep *ep, struct qe_frame *frame)
 static int txcomplete(struct qe_ep *ep, unsigned char restart)
 {
        if (ep->tx_req != NULL) {
+               struct qe_req *req = ep->tx_req;
+               unsigned zlp = 0, last_len = 0;
+
+               last_len = min_t(unsigned, req->req.length - ep->sent,
+                               ep->ep.maxpacket);
+
                if (!restart) {
                        int asent = ep->last;
                        ep->sent += asent;
@@ -1156,9 +1162,18 @@ static int txcomplete(struct qe_ep *ep, unsigned char restart)
                        ep->last = 0;
                }
 
+               /* zlp needed when req->re.zero is set */
+               if (req->req.zero) {
+                       if (last_len == 0 ||
+                               (req->req.length % ep->ep.maxpacket) != 0)
+                               zlp = 0;
+                       else
+                               zlp = 1;
+               } else
+                       zlp = 0;
+
                /* a request already were transmitted completely */
-               if ((ep->tx_req->req.length - ep->sent) <= 0) {
-                       ep->tx_req->req.actual = (unsigned int)ep->sent;
+               if (((ep->tx_req->req.length - ep->sent) <= 0) && !zlp) {
                        done(ep, ep->tx_req, 0);
                        ep->tx_req = NULL;
                        ep->last = 0;
@@ -1191,6 +1206,7 @@ static int qe_usb_senddata(struct qe_ep *ep, struct qe_frame *frame)
        buf = (u8 *)ep->tx_req->req.buf + ep->sent;
        if (buf && size) {
                ep->last = size;
+               ep->tx_req->req.actual += size;
                frame_set_data(frame, buf);
                frame_set_length(frame, size);
                frame_set_status(frame, FRAME_OK);
index bea5b827bebeb7e48eb468818eb6e19ce69b4780..e35e24fd64bb38a9edb1e1347cdc2e6f6e0583b2 100644 (file)
@@ -208,14 +208,14 @@ struct qe_frame{
 /* Frame status field */
 /* Receive side */
 #define FRAME_OK               0x00000000 /* Frame tranmitted or received OK */
-#define FRAME_ERROR            0x80000000 /* Error occured on frame */
+#define FRAME_ERROR            0x80000000 /* Error occurred on frame */
 #define START_FRAME_LOST       0x40000000 /* START_FRAME_LOST */
 #define END_FRAME_LOST         0x20000000 /* END_FRAME_LOST */
 #define RX_ER_NONOCT           0x10000000 /* Rx Non Octet Aligned Packet */
 #define RX_ER_BITSTUFF         0x08000000 /* Frame Aborted --Received packet
                                             with bit stuff error */
 #define RX_ER_CRC              0x04000000 /* Received packet with CRC error */
-#define RX_ER_OVERUN           0x02000000 /* Over-run occured on reception */
+#define RX_ER_OVERUN           0x02000000 /* Over-run occurred on reception */
 #define RX_ER_PID              0x01000000 /* Wrong PID received */
 /* Tranmit side */
 #define TX_ER_NAK              0x00800000 /* Received NAK handshake */
@@ -379,7 +379,7 @@ struct qe_udc {
 #define T_LSP         0x01000000         /* Low-speed transaction */
 #define T_PID         0x00c00000         /* packet id */
 #define T_NAK         0x00100000         /* No ack. */
-#define T_STAL        0x00080000         /* Stall recieved */
+#define T_STAL        0x00080000         /* Stall received */
 #define T_TO          0x00040000         /* time out */
 #define T_UN          0x00020000         /* underrun */
 
index 912cb8e63fe32774372cfe282e8e70204e758d58..07499c1cdcc48852279d7ee7cc82fc364d70c387 100644 (file)
@@ -464,7 +464,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
 
        max = le16_to_cpu(desc->wMaxPacketSize);
 
-       /* Disable automatic zlp generation.  Driver is reponsible to indicate
+       /* Disable automatic zlp generation.  Driver is responsible to indicate
         * explicitly through req->req.zero.  This is needed to enable multi-td
         * request. */
        zlt = 1;
@@ -648,7 +648,7 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
                        | EP_QUEUE_HEAD_STATUS_HALT));
        dQH->size_ioc_int_sts &= temp;
 
-       /* Ensure that updates to the QH will occure before priming. */
+       /* Ensure that updates to the QH will occur before priming. */
        wmb();
 
        /* Prime endpoint by writing 1 to ENDPTPRIME */
@@ -1459,7 +1459,7 @@ static int process_ep_req(struct fsl_udc *udc, int pipe,
                                status = -EILSEQ;
                                break;
                        } else
-                               ERR("Unknown error has occured (0x%x)!\n",
+                               ERR("Unknown error has occurred (0x%x)!\n",
                                        errors);
 
                } else if (le32_to_cpu(curr_td->size_ioc_sts)
index 20aeceed48c712e1db819b0047f970787923205f..e88cce5c2c0d707abd79bb9be61ce1ec46e7d23a 100644 (file)
@@ -15,7 +15,7 @@ struct usb_dr_device {
        u8 res1[256];
        u16 caplength;          /* Capability Register Length */
        u16 hciversion;         /* Host Controller Interface Version */
-       u32 hcsparams;          /* Host Controller Structual Parameters */
+       u32 hcsparams;          /* Host Controller Structural Parameters */
        u32 hccparams;          /* Host Controller Capability Parameters */
        u8 res2[20];
        u32 dciversion;         /* Device Controller Interface Version */
@@ -52,7 +52,7 @@ struct usb_dr_host {
        u8 res1[256];
        u16 caplength;          /* Capability Register Length */
        u16 hciversion;         /* Host Controller Interface Version */
-       u32 hcsparams;          /* Host Controller Structual Parameters */
+       u32 hcsparams;          /* Host Controller Structural Parameters */
        u32 hccparams;          /* Host Controller Capability Parameters */
        u8 res2[20];
        u32 dciversion;         /* Device Controller Interface Version */
index 0ab7e141d4940061f489b8862479a3e58d19df16..47b86b99d449bd3b9117732c3f5b5862773e4ec4 100644 (file)
@@ -67,7 +67,7 @@ MODULE_PARM_DESC(index, "Index value for the USB MIDI Gadget adapter.");
 module_param(id, charp, 0444);
 MODULE_PARM_DESC(id, "ID string for the USB MIDI Gadget adapter.");
 
-/* Some systems will want different product identifers published in the
+/* Some systems will want different product identifiers published in the
  * device descriptor, either numbers or strings or both.  These string
  * parameters are in UTF-8 (superset of ASCII's 7 bit characters).
  */
index 3ed73f49cf188cd98b92cc3e847a6e40f0062efb..a01383f71f38639c5539f5b82431ef1186ee6b60 100644 (file)
@@ -386,8 +386,10 @@ ep_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
 
        /* halt any endpoint by doing a "wrong direction" i/o call */
        if (usb_endpoint_dir_in(&data->desc)) {
-               if (usb_endpoint_xfer_isoc(&data->desc))
+               if (usb_endpoint_xfer_isoc(&data->desc)) {
+                       mutex_unlock(&data->lock);
                        return -EINVAL;
+               }
                DBG (data->dev, "%s halt\n", data->name);
                spin_lock_irq (&data->dev->lock);
                if (likely (data->ep != NULL))
index 1eca8b47ce3c366836240c1aa0c352ea9cfefb01..9cee88a43a73e1893cb9373d0e22b5b331347aed 100644 (file)
@@ -642,7 +642,7 @@ static int queue_dtd(struct langwell_ep *ep, struct langwell_request *req)
        dqh->dtd_status &= dtd_status;
        dev_vdbg(&dev->pdev->dev, "dqh->dtd_status = 0x%x\n", dqh->dtd_status);
 
-       /* ensure that updates to the dQH will occure before priming */
+       /* ensure that updates to the dQH will occur before priming */
        wmb();
 
        /* write 1 to endptprime register to PRIME endpoint */
index d5468a7f38e0d8de3a1ea9a8f6dfb05b243020fd..b62b2640deb0b7c9e6a0f9cf81f2c8242fdf37d1 100644 (file)
@@ -325,7 +325,7 @@ static int queue_dtd(struct mv_ep *ep, struct mv_req *req)
 
                        /*
                         * Ensure that updates to the QH will
-                        * occure before priming.
+                        * occur before priming.
                         */
                        wmb();
 
@@ -338,7 +338,7 @@ static int queue_dtd(struct mv_ep *ep, struct mv_req *req)
                        & EP_QUEUE_HEAD_NEXT_POINTER_MASK;;
                dqh->size_ioc_int_sts = 0;
 
-               /* Ensure that updates to the QH will occure before priming. */
+               /* Ensure that updates to the QH will occur before priming. */
                wmb();
 
                /* Prime the Endpoint */
@@ -1845,7 +1845,7 @@ static irqreturn_t mv_udc_irq(int irq, void *dev)
                return IRQ_NONE;
        }
 
-       /* Clear all the interrupts occured */
+       /* Clear all the interrupts occurred */
        writel(status, &udc->op_regs->usbsts);
 
        if (status & USBSTS_ERR)
index d09155b25d73c98d8f7b9dd2028b75433556d3d2..24696f7fa6a9a7a412c229f8667edd1895e1226d 100644 (file)
@@ -117,7 +117,7 @@ module_param (fifo_mode, ushort, 0644);
 
 /* enable_suspend -- When enabled, the driver will respond to
  * USB suspend requests by powering down the NET2280.  Otherwise,
- * USB suspend requests will be ignored.  This is acceptible for
+ * USB suspend requests will be ignored.  This is acceptable for
  * self-powered devices
  */
 static int enable_suspend = 0;
index b5364f9d7cd227a73b342da1ef9e2d2081aa6070..55ca63ad350630b6506cef326f7b734d8cb4717a 100644 (file)
@@ -203,7 +203,7 @@ static int __init nokia_bind(struct usb_composite_dev *cdev)
                goto err_usb;
        }
 
-       /* finaly register the configuration */
+       /* finally register the configuration */
        status = usb_add_config(cdev, &nokia_config_500ma_driver,
                        nokia_bind_config);
        if (status < 0)
index 3e4b35e50c2446b8926a687b1cb39e61d473cdff..68dbcc3e4cc2cb005bd2606a8bb64a4c35a12d81 100644 (file)
@@ -1608,7 +1608,7 @@ static int pch_udc_pcd_queue(struct usb_ep *usbep, struct usb_request *usbreq,
                return -EINVAL;
        if (!dev->driver || (dev->gadget.speed == USB_SPEED_UNKNOWN))
                return -ESHUTDOWN;
-       spin_lock_irqsave(&ep->dev->lock, iflags);
+       spin_lock_irqsave(&dev->lock, iflags);
        /* map the buffer for dma */
        if (usbreq->length &&
            ((usbreq->dma == DMA_ADDR_INVALID) || !usbreq->dma)) {
@@ -1625,8 +1625,10 @@ static int pch_udc_pcd_queue(struct usb_ep *usbep, struct usb_request *usbreq,
                                                             DMA_FROM_DEVICE);
                } else {
                        req->buf = kzalloc(usbreq->length, GFP_ATOMIC);
-                       if (!req->buf)
-                               return -ENOMEM;
+                       if (!req->buf) {
+                               retval = -ENOMEM;
+                               goto probe_end;
+                       }
                        if (ep->in) {
                                memcpy(req->buf, usbreq->buf, usbreq->length);
                                req->dma = dma_map_single(&dev->pdev->dev,
index 12ff6cffedc9d481fd2429fc537acd9d8ea6d41d..c3f2bd42bd5aec22861f0ad7650bb942621537b9 100644 (file)
@@ -126,7 +126,7 @@ static struct printer_dev usb_printer_gadget;
 #define PRINTER_VENDOR_NUM     0x0525          /* NetChip */
 #define PRINTER_PRODUCT_NUM    0xa4a8          /* Linux-USB Printer Gadget */
 
-/* Some systems will want different product identifers published in the
+/* Some systems will want different product identifiers published in the
  * device descriptor, either numbers or strings or both.  These string
  * parameters are in UTF-8 (superset of ASCII's 7 bit characters).
  */
index 2efd6732d1308fe8a2a9b92808995ad8eb7fb126..78a39a41547d0fb19c99254222c870ea51f1c3cf 100644 (file)
@@ -602,7 +602,7 @@ static void inc_ep_stats_reqs(struct pxa_ep *ep, int is_in)
 /**
  * inc_ep_stats_bytes - Update ep stats counts
  * @ep: physical endpoint
- * @count: bytes transfered on endpoint
+ * @count: bytes transferred on endpoint
  * @is_in: ep direction (USB_DIR_IN or 0)
  */
 static void inc_ep_stats_bytes(struct pxa_ep *ep, int count, int is_in)
@@ -877,7 +877,7 @@ static void nuke(struct pxa_ep *ep, int status)
  * If there is less space in request than bytes received in OUT endpoint,
  * bytes are left in the OUT endpoint.
  *
- * Returns how many bytes were actually transfered
+ * Returns how many bytes were actually transferred
  */
 static int read_packet(struct pxa_ep *ep, struct pxa27x_request *req)
 {
@@ -914,7 +914,7 @@ static int read_packet(struct pxa_ep *ep, struct pxa27x_request *req)
  * endpoint. If there are no bytes to transfer, doesn't write anything
  * to physical endpoint.
  *
- * Returns how many bytes were actually transfered.
+ * Returns how many bytes were actually transferred.
  */
 static int write_packet(struct pxa_ep *ep, struct pxa27x_request *req,
                        unsigned int max)
@@ -991,7 +991,7 @@ static int read_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
  * caller guarantees at least one packet buffer is ready (or a zlp).
  * Doesn't complete the request, that's the caller's job
  *
- * Returns 1 if request fully transfered, 0 if partial transfer
+ * Returns 1 if request fully transferred, 0 if partial transfer
  */
 static int write_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
 {
@@ -1094,7 +1094,7 @@ static int read_ep0_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
  * Sends a request (or a part of the request) to the control endpoint (ep0 in).
  * If the request doesn't fit, the remaining part will be sent from irq.
  * The request is considered fully written only if either :
- *   - last write transfered all remaining bytes, but fifo was not fully filled
+ *   - last write transferred all remaining bytes, but fifo was not fully filled
  *   - last write was a 0 length write
  *
  * Returns 1 if request fully written, 0 if request only partially sent
@@ -1548,7 +1548,7 @@ static int pxa_udc_get_frame(struct usb_gadget *_gadget)
  * pxa_udc_wakeup - Force udc device out of suspend
  * @_gadget: usb gadget
  *
- * Returns 0 if successfull, error code otherwise
+ * Returns 0 if successful, error code otherwise
  */
 static int pxa_udc_wakeup(struct usb_gadget *_gadget)
 {
index 015118535f77db3e8418909b850dfb0ed576fd00..6dcc1f68fa6041531e73eed8104d5c1acff1338b 100644 (file)
@@ -1083,7 +1083,9 @@ static void irq_device_state(struct r8a66597 *r8a66597)
 
        if (dvsq == DS_DFLT) {
                /* bus reset */
+               spin_unlock(&r8a66597->lock);
                r8a66597->driver->disconnect(&r8a66597->gadget);
+               spin_lock(&r8a66597->lock);
                r8a66597_update_usb_speed(r8a66597);
        }
        if (r8a66597->old_dvsq == DS_CNFG && dvsq != DS_CNFG)
index ef825c3baed966b69a00a454f254f1814bb29650..0912679de99af870b91da2fefd6631c0a26d98ab 100644 (file)
@@ -41,8 +41,8 @@
 /* EP0_MPS_LIMIT
  *
  * Unfortunately there seems to be a limit of the amount of data that can
- * be transfered by IN transactions on EP0. This is either 127 bytes or 3
- * packets (which practially means 1 packet and 63 bytes of data) when the
+ * be transferred by IN transactions on EP0. This is either 127 bytes or 3
+ * packets (which practically means 1 packet and 63 bytes of data) when the
  * MPS is set to 64.
  *
  * This means if we are wanting to move >127 bytes of data, we need to
@@ -783,7 +783,7 @@ static void s3c_hsotg_start_req(struct s3c_hsotg *hsotg,
                       hsotg->regs + S3C_DIEPINT(index));
 
        /* Note, trying to clear the NAK here causes problems with transmit
-        * on the S3C6400 ending up with the TXFIFO becomming full. */
+        * on the S3C6400 ending up with the TXFIFO becoming full. */
 
        /* check ep is enabled */
        if (!(readl(hsotg->regs + epctrl_reg) & S3C_DxEPCTL_EPEna))
@@ -1176,10 +1176,10 @@ static void s3c_hsotg_process_control(struct s3c_hsotg *hsotg,
                writel(ctrl, hsotg->regs + reg);
 
                dev_dbg(hsotg->dev,
-                       "writen DxEPCTL=0x%08x to %08x (DxEPCTL=0x%08x)\n",
+                       "written DxEPCTL=0x%08x to %08x (DxEPCTL=0x%08x)\n",
                        ctrl, reg, readl(hsotg->regs + reg));
 
-               /* don't belive we need to anything more to get the EP
+               /* don't believe we need to anything more to get the EP
                 * to reply with a STALL packet */
        }
 }
@@ -1416,7 +1416,7 @@ static void s3c_hsotg_rx_data(struct s3c_hsotg *hsotg, int ep_idx, int size)
  * transaction.
  *
  * Note, since we don't write any data to the TxFIFO, then it is
- * currently belived that we do not need to wait for any space in
+ * currently believed that we do not need to wait for any space in
  * the TxFIFO.
  */
 static void s3c_hsotg_send_zlp(struct s3c_hsotg *hsotg,
@@ -1540,7 +1540,7 @@ static u32 s3c_hsotg_read_frameno(struct s3c_hsotg *hsotg)
  * that requires processing, so find out what is in there and do the
  * appropriate read.
  *
- * The RXFIFO is a true FIFO, the packets comming out are still in packet
+ * The RXFIFO is a true FIFO, the packets coming out are still in packet
  * chunks, so if you have x packets received on an endpoint you'll get x
  * FIFO events delivered, each with a packet's worth of data in it.
  *
@@ -2188,7 +2188,7 @@ irq_retry:
 
        /* these next two seem to crop-up occasionally causing the core
         * to shutdown the USB transfer, so try clearing them and logging
-        * the occurence. */
+        * the occurrence. */
 
        if (gintsts & S3C_GINTSTS_GOUTNakEff) {
                dev_info(hsotg->dev, "GOUTNakEff triggered\n");
@@ -2469,7 +2469,7 @@ static struct usb_ep_ops s3c_hsotg_ep_ops = {
        .queue          = s3c_hsotg_ep_queue,
        .dequeue        = s3c_hsotg_ep_dequeue,
        .set_halt       = s3c_hsotg_ep_sethalt,
-       /* note, don't belive we have any call for the fifo routines */
+       /* note, don't believe we have any call for the fifo routines */
 };
 
 /**
index 9483acdf2e9e86212311b8ee13b65849fc85c0ac..e0e0787b724b8eff4bb31e329709f31acb55e961 100644 (file)
@@ -402,7 +402,7 @@ config FHCI_DEBUG
        depends on USB_FHCI_HCD && DEBUG_FS
        help
          Say "y" to see some FHCI debug information and statistics
-         throught debugfs.
+         through debugfs.
 
 config USB_U132_HCD
        tristate "Elan U132 Adapter Host Controller"
index 98ded66e8d3fc5ccfbe4bfd9170c51e99cf3b752..42abd0f603bfbcd4291c78b0768b2d552b029500 100644 (file)
@@ -1247,24 +1247,27 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
 
 static void scan_async (struct ehci_hcd *ehci)
 {
+       bool                    stopped;
        struct ehci_qh          *qh;
        enum ehci_timer_action  action = TIMER_IO_WATCHDOG;
 
        ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index);
        timer_action_done (ehci, TIMER_ASYNC_SHRINK);
 rescan:
+       stopped = !HC_IS_RUNNING(ehci_to_hcd(ehci)->state);
        qh = ehci->async->qh_next.qh;
        if (likely (qh != NULL)) {
                do {
                        /* clean any finished work for this qh */
-                       if (!list_empty (&qh->qtd_list)
-                                       && qh->stamp != ehci->stamp) {
+                       if (!list_empty(&qh->qtd_list) && (stopped ||
+                                       qh->stamp != ehci->stamp)) {
                                int temp;
 
                                /* unlinks could happen here; completion
                                 * reporting drops the lock.  rescan using
                                 * the latest schedule, but don't rescan
-                                * qhs we already finished (no looping).
+                                * qhs we already finished (no looping)
+                                * unless the controller is stopped.
                                 */
                                qh = qh_get (qh);
                                qh->stamp = ehci->stamp;
@@ -1285,9 +1288,9 @@ rescan:
                         */
                        if (list_empty(&qh->qtd_list)
                                        && qh->qh_state == QH_STATE_LINKED) {
-                               if (!ehci->reclaim
-                                       && ((ehci->stamp - qh->stamp) & 0x1fff)
-                                               >= (EHCI_SHRINK_FRAMES * 8))
+                               if (!ehci->reclaim && (stopped ||
+                                       ((ehci->stamp - qh->stamp) & 0x1fff)
+                                               >= EHCI_SHRINK_FRAMES * 8))
                                        start_unlink_async(ehci, qh);
                                else
                                        action = TIMER_ASYNC_SHRINK;
index f86d3fa20214a1bcd5587f80f39e290e856852bd..333ddc1569198631879c6ad22696361e322f38fe 100644 (file)
@@ -644,7 +644,7 @@ static inline void ehci_writel(const struct ehci_hcd *ehci,
 /*
  * On certain ppc-44x SoC there is a HW issue, that could only worked around with
  * explicit suspend/operate of OHCI. This function hereby makes sense only on that arch.
- * Other common bits are dependant on has_amcc_usb23 quirk flag.
+ * Other common bits are dependent on has_amcc_usb23 quirk flag.
  */
 #ifdef CONFIG_44x
 static inline void set_ohci_hcfs(struct ehci_hcd *ehci, int operational)
index b84ff7e518962bf1f9c34c781927649c76e918ac..19223c7449e152a9a144d4fd174ad452c2c53113 100644 (file)
@@ -401,7 +401,7 @@ static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
                /* 1 td fro setup,1 for ack */
                size = 2;
        case PIPE_BULK:
-               /* one td for every 4096 bytes(can be upto 8k) */
+               /* one td for every 4096 bytes(can be up to 8k) */
                size += urb->transfer_buffer_length / 4096;
                /* ...add for any remaining bytes... */
                if ((urb->transfer_buffer_length % 4096) != 0)
index 38fe058fbe61faf09f8908c13143dd82c9f787f7..0ea577bfca2ab2f0c918349a9dda9d83adfc1f17 100644 (file)
@@ -40,7 +40,7 @@
 #define TD_RXER                0x0020 /* Rx error or not */
 
 #define TD_NAK         0x0010 /* No ack. */
-#define TD_STAL                0x0008 /* Stall recieved */
+#define TD_STAL                0x0008 /* Stall received */
 #define TD_TO          0x0004 /* time out */
 #define TD_UN          0x0002 /* underrun */
 #define TD_NO          0x0010 /* Rx Non Octet Aligned Packet */
@@ -274,7 +274,7 @@ void fhci_init_ep_registers(struct fhci_usb *usb, struct endpoint *ep,
  * It is also preparing the TDs for new frames. If the Tx interrupts
  * are disabled, the application should call that routine to get
  * confirmation about the submitted frames. Otherwise, the routine is
- * called frome the interrupt service routine during the Tx interrupt.
+ * called from the interrupt service routine during the Tx interrupt.
  * In that case the application is informed by calling the application
  * specific 'fhci_transaction_confirm' routine
  */
@@ -337,7 +337,7 @@ static void fhci_td_transaction_confirm(struct fhci_usb *usb)
                                        pkt->status = USB_TD_RX_ER_NONOCT;
                                else
                                        fhci_err(usb->fhci, "illegal error "
-                                                "occured\n");
+                                                "occurred\n");
                        } else if (td_status & TD_NAK)
                                pkt->status = USB_TD_TX_ER_NAK;
                        else if (td_status & TD_TO)
@@ -347,7 +347,7 @@ static void fhci_td_transaction_confirm(struct fhci_usb *usb)
                        else if (td_status & TD_STAL)
                                pkt->status = USB_TD_TX_ER_STALL;
                        else
-                               fhci_err(usb->fhci, "illegal error occured\n");
+                               fhci_err(usb->fhci, "illegal error occurred\n");
                } else if ((extra_data & TD_TOK_IN) &&
                                pkt->len > td_length - CRC_SIZE) {
                        pkt->status = USB_TD_RX_DATA_UNDERUN;
index 71c3caaea4c1fe3f1b42506f70f2ae75d6d14030..dc6939a44a1add3b958ba6c34f20740b000c5789 100644 (file)
@@ -82,7 +82,7 @@
 #define USB_TD_RX_ER_NONOCT    0x40000000 /* Tx Non Octet Aligned Packet */
 #define USB_TD_RX_ER_BITSTUFF  0x20000000 /* Frame Aborted-Received pkt */
 #define USB_TD_RX_ER_CRC       0x10000000 /* CRC error */
-#define USB_TD_RX_ER_OVERUN    0x08000000 /* Over - run occured */
+#define USB_TD_RX_ER_OVERUN    0x08000000 /* Over - run occurred */
 #define USB_TD_RX_ER_PID       0x04000000 /* wrong PID received */
 #define USB_TD_RX_DATA_UNDERUN 0x02000000 /* shorter than expected */
 #define USB_TD_RX_DATA_OVERUN  0x01000000 /* longer than expected */
@@ -363,7 +363,7 @@ struct ed {
 struct td {
        void *data;              /* a pointer to the data buffer */
        unsigned int len;        /* length of the data to be submitted */
-       unsigned int actual_len; /* actual bytes transfered on this td */
+       unsigned int actual_len; /* actual bytes transferred on this td */
        enum fhci_ta_type type;  /* transaction type */
        u8 toggle;               /* toggle for next trans. within this TD */
        u16 iso_index;           /* ISO transaction index */
index 2562e92e3178184246fe0ec4139e523f1bf06de9..af05718bdc73c3fbff260e251c1530860e17a427 100644 (file)
@@ -1323,7 +1323,7 @@ static void process_etds(struct usb_hcd *hcd, struct imx21 *imx21, int sof)
  * (and hence no interrupt occurs).
  * This causes the transfer in question to hang.
  * The kludge below checks for this condition at each SOF and processes any
- * blocked ETDs (after an arbitary 10 frame wait)
+ * blocked ETDs (after an arbitrary 10 frame wait)
  *
  * With a single active transfer the usbtest test suite will run for days
  * without the kludge.
index 12db961acdfbba78e6a11ae6764feb2fb9c89386..9a2c400e6090491b2727d722bf6c1f9701d63523 100644 (file)
@@ -13,7 +13,7 @@
 
 /* Full speed: max # of bytes to transfer for a single urb
    at a time must be < 1024 && must be multiple of 64.
-   832 allows transfering 4kiB within 5 frames. */
+   832 allows transferring 4kiB within 5 frames. */
 #define MAX_TRANSFER_SIZE_FULLSPEED    832
 
 /* Low speed: there is no reason to schedule in very big
index 662cd002adfc42a5a69e000d7397064ab9332e5a..f97570a847ca073ff16c3eee7ae9845f5515e04c 100644 (file)
@@ -546,7 +546,7 @@ static void postproc_ep(struct isp1362_hcd *isp1362_hcd, struct isp1362_ep *ep)
                        if (usb_pipecontrol(urb->pipe)) {
                                ep->nextpid = USB_PID_ACK;
                                /* save the data underrun error code for later and
-                                * procede with the status stage
+                                * proceed with the status stage
                                 */
                                urb->actual_length += PTD_GET_COUNT(ptd);
                                BUG_ON(urb->actual_length > urb->transfer_buffer_length);
index f50e84ac570aa9eced485e6372db76287fa9df76..795345ad45e62881fb8e28a1abce639a3088cac8 100644 (file)
@@ -295,7 +295,7 @@ static void alloc_mem(struct usb_hcd *hcd, struct isp1760_qtd *qtd)
        }
 
        dev_err(hcd->self.controller,
-                               "%s: Can not allocate %lu bytes of memory\n"
+                               "%s: Cannot allocate %zu bytes of memory\n"
                                "Current memory map:\n",
                                __func__, qtd->length);
        for (i = 0; i < BLOCKS; i++) {
index 17a6043c1fa072cba3d84c01fe8f6ba83005fff3..958d985f29513f36b2840b77a532c09a7bafa45e 100644 (file)
@@ -33,7 +33,7 @@
 
 #ifdef __LITTLE_ENDIAN
 #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C)
-#elif __BIG_ENDIAN
+#elif defined(__BIG_ENDIAN)
 #define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C | \
                          USBH_ENABLE_BE)
 #else
index e7288639edb051489bf4cf73feb44b9e5de807a5..d557235148606d282070d2807d58fd63715e7167 100644 (file)
@@ -162,7 +162,7 @@ static int ohci_urb_enqueue (
                // case PIPE_INTERRUPT:
                // case PIPE_BULK:
                default:
-                       /* one TD for every 4096 Bytes (can be upto 8K) */
+                       /* one TD for every 4096 Bytes (can be up to 8K) */
                        size += urb->transfer_buffer_length / 4096;
                        /* ... and for any remaining bytes ... */
                        if ((urb->transfer_buffer_length % 4096) != 0)
index 44e4deb362e132431632ca7bf4ae5a2ea7ac8ea1..4a771f6cc822306ae5708aa8f3ceec36aae72e44 100644 (file)
@@ -2879,7 +2879,7 @@ static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
        /* Ok, we have more job to do! :) */
 
        for (i = 0; i < num - 1; i++) {
-               /* Get free micro URB poll till a free urb is recieved */
+               /* Get free micro URB poll till a free urb is received */
 
                do {
                        murb = (struct urb *) oxu_murb_alloc(oxu);
@@ -2911,7 +2911,7 @@ static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
 
        /* Last urb requires special handling  */
 
-       /* Get free micro URB poll till a free urb is recieved */
+       /* Get free micro URB poll till a free urb is received */
        do {
                murb = (struct urb *) oxu_murb_alloc(oxu);
                if (!murb)
index 1d586d4f7b56d5e3a0c38cf793dfec8dbf2554af..9b166d70ae91f8508642fee95097e958e21d2165 100644 (file)
@@ -84,65 +84,92 @@ int usb_amd_find_chipset_info(void)
 {
        u8 rev = 0;
        unsigned long flags;
+       struct amd_chipset_info info;
+       int ret;
 
        spin_lock_irqsave(&amd_lock, flags);
 
-       amd_chipset.probe_count++;
        /* probe only once */
-       if (amd_chipset.probe_count > 1) {
+       if (amd_chipset.probe_count > 0) {
+               amd_chipset.probe_count++;
                spin_unlock_irqrestore(&amd_lock, flags);
                return amd_chipset.probe_result;
        }
+       memset(&info, 0, sizeof(info));
+       spin_unlock_irqrestore(&amd_lock, flags);
 
-       amd_chipset.smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL);
-       if (amd_chipset.smbus_dev) {
-               rev = amd_chipset.smbus_dev->revision;
+       info.smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL);
+       if (info.smbus_dev) {
+               rev = info.smbus_dev->revision;
                if (rev >= 0x40)
-                       amd_chipset.sb_type = 1;
+                       info.sb_type = 1;
                else if (rev >= 0x30 && rev <= 0x3b)
-                       amd_chipset.sb_type = 3;
+                       info.sb_type = 3;
        } else {
-               amd_chipset.smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
-                                                       0x780b, NULL);
-               if (!amd_chipset.smbus_dev) {
-                       spin_unlock_irqrestore(&amd_lock, flags);
-                       return 0;
+               info.smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+                                               0x780b, NULL);
+               if (!info.smbus_dev) {
+                       ret = 0;
+                       goto commit;
                }
-               rev = amd_chipset.smbus_dev->revision;
+
+               rev = info.smbus_dev->revision;
                if (rev >= 0x11 && rev <= 0x18)
-                       amd_chipset.sb_type = 2;
+                       info.sb_type = 2;
        }
 
-       if (amd_chipset.sb_type == 0) {
-               if (amd_chipset.smbus_dev) {
-                       pci_dev_put(amd_chipset.smbus_dev);
-                       amd_chipset.smbus_dev = NULL;
+       if (info.sb_type == 0) {
+               if (info.smbus_dev) {
+                       pci_dev_put(info.smbus_dev);
+                       info.smbus_dev = NULL;
                }
-               spin_unlock_irqrestore(&amd_lock, flags);
-               return 0;
+               ret = 0;
+               goto commit;
        }
 
-       amd_chipset.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x9601, NULL);
-       if (amd_chipset.nb_dev) {
-               amd_chipset.nb_type = 1;
+       info.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x9601, NULL);
+       if (info.nb_dev) {
+               info.nb_type = 1;
        } else {
-               amd_chipset.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD,
-                                                       0x1510, NULL);
-               if (amd_chipset.nb_dev) {
-                       amd_chipset.nb_type = 2;
-               } else  {
-                       amd_chipset.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD,
-                                                               0x9600, NULL);
-                       if (amd_chipset.nb_dev)
-                               amd_chipset.nb_type = 3;
+               info.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL);
+               if (info.nb_dev) {
+                       info.nb_type = 2;
+               } else {
+                       info.nb_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+                                                    0x9600, NULL);
+                       if (info.nb_dev)
+                               info.nb_type = 3;
                }
        }
 
-       amd_chipset.probe_result = 1;
+       ret = info.probe_result = 1;
        printk(KERN_DEBUG "QUIRK: Enable AMD PLL fix\n");
 
-       spin_unlock_irqrestore(&amd_lock, flags);
-       return amd_chipset.probe_result;
+commit:
+
+       spin_lock_irqsave(&amd_lock, flags);
+       if (amd_chipset.probe_count > 0) {
+               /* race - someone else was faster - drop devices */
+
+               /* Mark that we where here */
+               amd_chipset.probe_count++;
+               ret = amd_chipset.probe_result;
+
+               spin_unlock_irqrestore(&amd_lock, flags);
+
+               if (info.nb_dev)
+                       pci_dev_put(info.nb_dev);
+               if (info.smbus_dev)
+                       pci_dev_put(info.smbus_dev);
+
+       } else {
+               /* no race - commit the result */
+               info.probe_count++;
+               amd_chipset = info;
+               spin_unlock_irqrestore(&amd_lock, flags);
+       }
+
+       return ret;
 }
 EXPORT_SYMBOL_GPL(usb_amd_find_chipset_info);
 
@@ -284,6 +311,7 @@ EXPORT_SYMBOL_GPL(usb_amd_quirk_pll_enable);
 
 void usb_amd_dev_put(void)
 {
+       struct pci_dev *nb, *smbus;
        unsigned long flags;
 
        spin_lock_irqsave(&amd_lock, flags);
@@ -294,20 +322,23 @@ void usb_amd_dev_put(void)
                return;
        }
 
-       if (amd_chipset.nb_dev) {
-               pci_dev_put(amd_chipset.nb_dev);
-               amd_chipset.nb_dev = NULL;
-       }
-       if (amd_chipset.smbus_dev) {
-               pci_dev_put(amd_chipset.smbus_dev);
-               amd_chipset.smbus_dev = NULL;
-       }
+       /* save them to pci_dev_put outside of spinlock */
+       nb    = amd_chipset.nb_dev;
+       smbus = amd_chipset.smbus_dev;
+
+       amd_chipset.nb_dev = NULL;
+       amd_chipset.smbus_dev = NULL;
        amd_chipset.nb_type = 0;
        amd_chipset.sb_type = 0;
        amd_chipset.isoc_reqs = 0;
        amd_chipset.probe_result = 0;
 
        spin_unlock_irqrestore(&amd_lock, flags);
+
+       if (nb)
+               pci_dev_put(nb);
+       if (smbus)
+               pci_dev_put(smbus);
 }
 EXPORT_SYMBOL_GPL(usb_amd_dev_put);
 
index dc0ab8382f5d7d60ab24794f8ed47e466e347539..d6e175428618d4b31f69bd3d323e7c5aef93deae 100644 (file)
@@ -739,7 +739,7 @@ static int get_urb_status_from_qtd(struct urb *urb, u32 status)
  * process_inactive_qtd - process an inactive (but not halted) qTD.
  *
  * Update the urb with the transfer bytes from the qTD, if the urb is
- * completely transfered or (in the case of an IN only) the LPF is
+ * completely transferred or (in the case of an IN only) the LPF is
  * set, then the transfer is complete and the urb should be returned
  * to the system.
  */
index a003e79aacdc0e06efe85cfa3dc53a2579c850b2..627f3438028ce3a54d49fd7d691143b58f6fac18 100644 (file)
@@ -846,7 +846,7 @@ static u32 xhci_find_real_port_number(struct xhci_hcd *xhci,
                 * Skip ports that don't have known speeds, or have duplicate
                 * Extended Capabilities port speed entries.
                 */
-               if (port_speed == 0 || port_speed == -1)
+               if (port_speed == 0 || port_speed == DUPLICATE_ENTRY)
                        continue;
 
                /*
@@ -974,6 +974,47 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
        return 0;
 }
 
+/*
+ * Convert interval expressed as 2^(bInterval - 1) == interval into
+ * straight exponent value 2^n == interval.
+ *
+ */
+static unsigned int xhci_parse_exponent_interval(struct usb_device *udev,
+               struct usb_host_endpoint *ep)
+{
+       unsigned int interval;
+
+       interval = clamp_val(ep->desc.bInterval, 1, 16) - 1;
+       if (interval != ep->desc.bInterval - 1)
+               dev_warn(&udev->dev,
+                        "ep %#x - rounding interval to %d microframes\n",
+                        ep->desc.bEndpointAddress,
+                        1 << interval);
+
+       return interval;
+}
+
+/*
+ * Convert bInterval expressed in frames (in 1-255 range) to exponent of
+ * microframes, rounded down to nearest power of 2.
+ */
+static unsigned int xhci_parse_frame_interval(struct usb_device *udev,
+               struct usb_host_endpoint *ep)
+{
+       unsigned int interval;
+
+       interval = fls(8 * ep->desc.bInterval) - 1;
+       interval = clamp_val(interval, 3, 10);
+       if ((1 << interval) != 8 * ep->desc.bInterval)
+               dev_warn(&udev->dev,
+                        "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n",
+                        ep->desc.bEndpointAddress,
+                        1 << interval,
+                        8 * ep->desc.bInterval);
+
+       return interval;
+}
+
 /* Return the polling or NAK interval.
  *
  * The polling interval is expressed in "microframes".  If xHCI's Interval field
@@ -982,7 +1023,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
  * The NAK interval is one NAK per 1 to 255 microframes, or no NAKs if interval
  * is set to 0.
  */
-static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
+static unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
                struct usb_host_endpoint *ep)
 {
        unsigned int interval = 0;
@@ -991,45 +1032,38 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
        case USB_SPEED_HIGH:
                /* Max NAK rate */
                if (usb_endpoint_xfer_control(&ep->desc) ||
-                               usb_endpoint_xfer_bulk(&ep->desc))
+                   usb_endpoint_xfer_bulk(&ep->desc)) {
                        interval = ep->desc.bInterval;
+                       break;
+               }
                /* Fall through - SS and HS isoc/int have same decoding */
+
        case USB_SPEED_SUPER:
                if (usb_endpoint_xfer_int(&ep->desc) ||
-                               usb_endpoint_xfer_isoc(&ep->desc)) {
-                       if (ep->desc.bInterval == 0)
-                               interval = 0;
-                       else
-                               interval = ep->desc.bInterval - 1;
-                       if (interval > 15)
-                               interval = 15;
-                       if (interval != ep->desc.bInterval + 1)
-                               dev_warn(&udev->dev, "ep %#x - rounding interval to %d microframes\n",
-                                               ep->desc.bEndpointAddress, 1 << interval);
+                   usb_endpoint_xfer_isoc(&ep->desc)) {
+                       interval = xhci_parse_exponent_interval(udev, ep);
                }
                break;
-       /* Convert bInterval (in 1-255 frames) to microframes and round down to
-        * nearest power of 2.
-        */
+
        case USB_SPEED_FULL:
+               if (usb_endpoint_xfer_int(&ep->desc)) {
+                       interval = xhci_parse_exponent_interval(udev, ep);
+                       break;
+               }
+               /*
+                * Fall through for isochronous endpoint interval decoding
+                * since it uses the same rules as low speed interrupt
+                * endpoints.
+                */
+
        case USB_SPEED_LOW:
                if (usb_endpoint_xfer_int(&ep->desc) ||
-                               usb_endpoint_xfer_isoc(&ep->desc)) {
-                       interval = fls(8*ep->desc.bInterval) - 1;
-                       if (interval > 10)
-                               interval = 10;
-                       if (interval < 3)
-                               interval = 3;
-                       if ((1 << interval) != 8*ep->desc.bInterval)
-                               dev_warn(&udev->dev,
-                                               "ep %#x - rounding interval"
-                                               " to %d microframes, "
-                                               "ep desc says %d microframes\n",
-                                               ep->desc.bEndpointAddress,
-                                               1 << interval,
-                                               8*ep->desc.bInterval);
+                   usb_endpoint_xfer_isoc(&ep->desc)) {
+
+                       interval = xhci_parse_frame_interval(udev, ep);
                }
                break;
+
        default:
                BUG();
        }
@@ -1041,7 +1075,7 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
  * transaction opportunities per microframe", but that goes in the Max Burst
  * endpoint context field.
  */
-static inline u32 xhci_get_endpoint_mult(struct usb_device *udev,
+static u32 xhci_get_endpoint_mult(struct usb_device *udev,
                struct usb_host_endpoint *ep)
 {
        if (udev->speed != USB_SPEED_SUPER ||
@@ -1050,7 +1084,7 @@ static inline u32 xhci_get_endpoint_mult(struct usb_device *udev,
        return ep->ss_ep_comp.bmAttributes;
 }
 
-static inline u32 xhci_get_endpoint_type(struct usb_device *udev,
+static u32 xhci_get_endpoint_type(struct usb_device *udev,
                struct usb_host_endpoint *ep)
 {
        int in;
@@ -1084,7 +1118,7 @@ static inline u32 xhci_get_endpoint_type(struct usb_device *udev,
  * Basically, this is the maxpacket size, multiplied by the burst size
  * and mult size.
  */
-static inline u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci,
+static u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci,
                struct usb_device *udev,
                struct usb_host_endpoint *ep)
 {
@@ -1727,12 +1761,12 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports,
                         * found a similar duplicate.
                         */
                        if (xhci->port_array[i] != major_revision &&
-                               xhci->port_array[i] != (u8) -1) {
+                               xhci->port_array[i] != DUPLICATE_ENTRY) {
                                if (xhci->port_array[i] == 0x03)
                                        xhci->num_usb3_ports--;
                                else
                                        xhci->num_usb2_ports--;
-                               xhci->port_array[i] = (u8) -1;
+                               xhci->port_array[i] = DUPLICATE_ENTRY;
                        }
                        /* FIXME: Should we disable the port? */
                        continue;
@@ -1831,7 +1865,7 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
                for (i = 0; i < num_ports; i++) {
                        if (xhci->port_array[i] == 0x03 ||
                                        xhci->port_array[i] == 0 ||
-                                       xhci->port_array[i] == -1)
+                                       xhci->port_array[i] == DUPLICATE_ENTRY)
                                continue;
 
                        xhci->usb2_ports[port_index] =
index ceea9f33491c0d1dd379bc48db4fc9fd486a518b..a10494c2f3c7749a83fe52b2479c469da47e9d0e 100644 (file)
@@ -114,6 +114,10 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
        if (pdev->vendor == PCI_VENDOR_ID_NEC)
                xhci->quirks |= XHCI_NEC_HOST;
 
+       /* AMD PLL quirk */
+       if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info())
+               xhci->quirks |= XHCI_AMD_PLL_FIX;
+
        /* Make sure the HC is halted. */
        retval = xhci_halt(xhci);
        if (retval)
index cfc1ad92473f5f5ae77403a07e55ae03c2f71690..7437386a9a50afeea3ad87bfd5b2f66f0a861947 100644 (file)
@@ -93,7 +93,7 @@ dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg,
 /* Does this link TRB point to the first segment in a ring,
  * or was the previous TRB the last TRB on the last segment in the ERST?
  */
-static inline bool last_trb_on_last_seg(struct xhci_hcd *xhci, struct xhci_ring *ring,
+static bool last_trb_on_last_seg(struct xhci_hcd *xhci, struct xhci_ring *ring,
                struct xhci_segment *seg, union xhci_trb *trb)
 {
        if (ring == xhci->event_ring)
@@ -107,7 +107,7 @@ static inline bool last_trb_on_last_seg(struct xhci_hcd *xhci, struct xhci_ring
  * segment?  I.e. would the updated event TRB pointer step off the end of the
  * event seg?
  */
-static inline int last_trb(struct xhci_hcd *xhci, struct xhci_ring *ring,
+static int last_trb(struct xhci_hcd *xhci, struct xhci_ring *ring,
                struct xhci_segment *seg, union xhci_trb *trb)
 {
        if (ring == xhci->event_ring)
@@ -116,7 +116,7 @@ static inline int last_trb(struct xhci_hcd *xhci, struct xhci_ring *ring,
                return (trb->link.control & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK);
 }
 
-static inline int enqueue_is_link_trb(struct xhci_ring *ring)
+static int enqueue_is_link_trb(struct xhci_ring *ring)
 {
        struct xhci_link_trb *link = &ring->enqueue->link;
        return ((link->control & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK));
@@ -592,7 +592,7 @@ void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
        ep->ep_state |= SET_DEQ_PENDING;
 }
 
-static inline void xhci_stop_watchdog_timer_in_irq(struct xhci_hcd *xhci,
+static void xhci_stop_watchdog_timer_in_irq(struct xhci_hcd *xhci,
                struct xhci_virt_ep *ep)
 {
        ep->ep_state &= ~EP_HALT_PENDING;
@@ -619,6 +619,13 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,
 
        /* Only giveback urb when this is the last td in urb */
        if (urb_priv->td_cnt == urb_priv->length) {
+               if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+                       xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs--;
+                       if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs == 0) {
+                               if (xhci->quirks & XHCI_AMD_PLL_FIX)
+                                       usb_amd_quirk_pll_enable();
+                       }
+               }
                usb_hcd_unlink_urb_from_ep(hcd, urb);
                xhci_dbg(xhci, "Giveback %s URB %p\n", adjective, urb);
 
@@ -1209,7 +1216,7 @@ static unsigned int find_faked_portnum_from_hw_portnum(struct usb_hcd *hcd,
                 * Skip ports that don't have known speeds, or have duplicate
                 * Extended Capabilities port speed entries.
                 */
-               if (port_speed == 0 || port_speed == -1)
+               if (port_speed == 0 || port_speed == DUPLICATE_ENTRY)
                        continue;
 
                /*
@@ -1235,6 +1242,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
        u8 major_revision;
        struct xhci_bus_state *bus_state;
        u32 __iomem **port_array;
+       bool bogus_port_status = false;
 
        /* Port status change events always have a successful completion code */
        if (GET_COMP_CODE(event->generic.field[2]) != COMP_SUCCESS) {
@@ -1247,6 +1255,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
        max_ports = HCS_MAX_PORTS(xhci->hcs_params1);
        if ((port_id <= 0) || (port_id > max_ports)) {
                xhci_warn(xhci, "Invalid port id %d\n", port_id);
+               bogus_port_status = true;
                goto cleanup;
        }
 
@@ -1258,12 +1267,14 @@ static void handle_port_status(struct xhci_hcd *xhci,
                xhci_warn(xhci, "Event for port %u not in "
                                "Extended Capabilities, ignoring.\n",
                                port_id);
+               bogus_port_status = true;
                goto cleanup;
        }
-       if (major_revision == (u8) -1) {
+       if (major_revision == DUPLICATE_ENTRY) {
                xhci_warn(xhci, "Event for port %u duplicated in"
                                "Extended Capabilities, ignoring.\n",
                                port_id);
+               bogus_port_status = true;
                goto cleanup;
        }
 
@@ -1335,6 +1346,13 @@ cleanup:
        /* Update event ring dequeue pointer before dropping the lock */
        inc_deq(xhci, xhci->event_ring, true);
 
+       /* Don't make the USB core poll the roothub if we got a bad port status
+        * change event.  Besides, at that point we can't tell which roothub
+        * (USB 2.0 or USB 3.0) to kick.
+        */
+       if (bogus_port_status)
+               return;
+
        spin_unlock(&xhci->lock);
        /* Pass this up to the core */
        usb_hcd_poll_rh_status(hcd);
@@ -1554,8 +1572,17 @@ td_cleanup:
 
                urb_priv->td_cnt++;
                /* Giveback the urb when all the tds are completed */
-               if (urb_priv->td_cnt == urb_priv->length)
+               if (urb_priv->td_cnt == urb_priv->length) {
                        ret = 1;
+                       if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
+                               xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs--;
+                               if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs
+                                       == 0) {
+                                       if (xhci->quirks & XHCI_AMD_PLL_FIX)
+                                               usb_amd_quirk_pll_enable();
+                               }
+                       }
+               }
        }
 
        return ret;
@@ -1675,71 +1702,52 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
        struct urb_priv *urb_priv;
        int idx;
        int len = 0;
-       int skip_td = 0;
        union xhci_trb *cur_trb;
        struct xhci_segment *cur_seg;
+       struct usb_iso_packet_descriptor *frame;
        u32 trb_comp_code;
+       bool skip_td = false;
 
        ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer);
        trb_comp_code = GET_COMP_CODE(event->transfer_len);
        urb_priv = td->urb->hcpriv;
        idx = urb_priv->td_cnt;
+       frame = &td->urb->iso_frame_desc[idx];
 
-       if (ep->skip) {
-               /* The transfer is partly done */
-               *status = -EXDEV;
-               td->urb->iso_frame_desc[idx].status = -EXDEV;
-       } else {
-               /* handle completion code */
-               switch (trb_comp_code) {
-               case COMP_SUCCESS:
-                       td->urb->iso_frame_desc[idx].status = 0;
-                       xhci_dbg(xhci, "Successful isoc transfer!\n");
-                       break;
-               case COMP_SHORT_TX:
-                       if (td->urb->transfer_flags & URB_SHORT_NOT_OK)
-                               td->urb->iso_frame_desc[idx].status =
-                                        -EREMOTEIO;
-                       else
-                               td->urb->iso_frame_desc[idx].status = 0;
-                       break;
-               case COMP_BW_OVER:
-                       td->urb->iso_frame_desc[idx].status = -ECOMM;
-                       skip_td = 1;
-                       break;
-               case COMP_BUFF_OVER:
-               case COMP_BABBLE:
-                       td->urb->iso_frame_desc[idx].status = -EOVERFLOW;
-                       skip_td = 1;
-                       break;
-               case COMP_STALL:
-                       td->urb->iso_frame_desc[idx].status = -EPROTO;
-                       skip_td = 1;
-                       break;
-               case COMP_STOP:
-               case COMP_STOP_INVAL:
-                       break;
-               default:
-                       td->urb->iso_frame_desc[idx].status = -1;
-                       break;
-               }
-       }
-
-       /* calc actual length */
-       if (ep->skip) {
-               td->urb->iso_frame_desc[idx].actual_length = 0;
-               /* Update ring dequeue pointer */
-               while (ep_ring->dequeue != td->last_trb)
-                       inc_deq(xhci, ep_ring, false);
-               inc_deq(xhci, ep_ring, false);
-               return finish_td(xhci, td, event_trb, event, ep, status, true);
+       /* handle completion code */
+       switch (trb_comp_code) {
+       case COMP_SUCCESS:
+               frame->status = 0;
+               xhci_dbg(xhci, "Successful isoc transfer!\n");
+               break;
+       case COMP_SHORT_TX:
+               frame->status = td->urb->transfer_flags & URB_SHORT_NOT_OK ?
+                               -EREMOTEIO : 0;
+               break;
+       case COMP_BW_OVER:
+               frame->status = -ECOMM;
+               skip_td = true;
+               break;
+       case COMP_BUFF_OVER:
+       case COMP_BABBLE:
+               frame->status = -EOVERFLOW;
+               skip_td = true;
+               break;
+       case COMP_STALL:
+               frame->status = -EPROTO;
+               skip_td = true;
+               break;
+       case COMP_STOP:
+       case COMP_STOP_INVAL:
+               break;
+       default:
+               frame->status = -1;
+               break;
        }
 
-       if (trb_comp_code == COMP_SUCCESS || skip_td == 1) {
-               td->urb->iso_frame_desc[idx].actual_length =
-                       td->urb->iso_frame_desc[idx].length;
-               td->urb->actual_length +=
-                       td->urb->iso_frame_desc[idx].length;
+       if (trb_comp_code == COMP_SUCCESS || skip_td) {
+               frame->actual_length = frame->length;
+               td->urb->actual_length += frame->length;
        } else {
                for (cur_trb = ep_ring->dequeue,
                     cur_seg = ep_ring->deq_seg; cur_trb != event_trb;
@@ -1755,7 +1763,7 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
                        TRB_LEN(event->transfer_len);
 
                if (trb_comp_code != COMP_STOP_INVAL) {
-                       td->urb->iso_frame_desc[idx].actual_length = len;
+                       frame->actual_length = len;
                        td->urb->actual_length += len;
                }
        }
@@ -1766,6 +1774,35 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
        return finish_td(xhci, td, event_trb, event, ep, status, false);
 }
 
+static int skip_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
+                       struct xhci_transfer_event *event,
+                       struct xhci_virt_ep *ep, int *status)
+{
+       struct xhci_ring *ep_ring;
+       struct urb_priv *urb_priv;
+       struct usb_iso_packet_descriptor *frame;
+       int idx;
+
+       ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer);
+       urb_priv = td->urb->hcpriv;
+       idx = urb_priv->td_cnt;
+       frame = &td->urb->iso_frame_desc[idx];
+
+       /* The transfer is partly done */
+       *status = -EXDEV;
+       frame->status = -EXDEV;
+
+       /* calc actual length */
+       frame->actual_length = 0;
+
+       /* Update ring dequeue pointer */
+       while (ep_ring->dequeue != td->last_trb)
+               inc_deq(xhci, ep_ring, false);
+       inc_deq(xhci, ep_ring, false);
+
+       return finish_td(xhci, td, NULL, event, ep, status, true);
+}
+
 /*
  * Process bulk and interrupt tds, update urb status and actual_length.
  */
@@ -2024,36 +2061,42 @@ static int handle_tx_event(struct xhci_hcd *xhci,
                }
 
                td = list_entry(ep_ring->td_list.next, struct xhci_td, td_list);
+
                /* Is this a TRB in the currently executing TD? */
                event_seg = trb_in_td(ep_ring->deq_seg, ep_ring->dequeue,
                                td->last_trb, event_dma);
-               if (event_seg && ep->skip) {
+               if (!event_seg) {
+                       if (!ep->skip ||
+                           !usb_endpoint_xfer_isoc(&td->urb->ep->desc)) {
+                               /* HC is busted, give up! */
+                               xhci_err(xhci,
+                                       "ERROR Transfer event TRB DMA ptr not "
+                                       "part of current TD\n");
+                               return -ESHUTDOWN;
+                       }
+
+                       ret = skip_isoc_td(xhci, td, event, ep, &status);
+                       goto cleanup;
+               }
+
+               if (ep->skip) {
                        xhci_dbg(xhci, "Found td. Clear skip flag.\n");
                        ep->skip = false;
                }
-               if (!event_seg &&
-                  (!ep->skip || !usb_endpoint_xfer_isoc(&td->urb->ep->desc))) {
-                       /* HC is busted, give up! */
-                       xhci_err(xhci, "ERROR Transfer event TRB DMA ptr not "
-                                       "part of current TD\n");
-                       return -ESHUTDOWN;
-               }
 
-               if (event_seg) {
-                       event_trb = &event_seg->trbs[(event_dma -
-                                        event_seg->dma) / sizeof(*event_trb)];
-                       /*
-                        * No-op TRB should not trigger interrupts.
-                        * If event_trb is a no-op TRB, it means the
-                        * corresponding TD has been cancelled. Just ignore
-                        * the TD.
-                        */
-                       if ((event_trb->generic.field[3] & TRB_TYPE_BITMASK)
-                                        == TRB_TYPE(TRB_TR_NOOP)) {
-                               xhci_dbg(xhci, "event_trb is a no-op TRB. "
-                                               "Skip it\n");
-                               goto cleanup;
-                       }
+               event_trb = &event_seg->trbs[(event_dma - event_seg->dma) /
+                                               sizeof(*event_trb)];
+               /*
+                * No-op TRB should not trigger interrupts.
+                * If event_trb is a no-op TRB, it means the
+                * corresponding TD has been cancelled. Just ignore
+                * the TD.
+                */
+               if ((event_trb->generic.field[3] & TRB_TYPE_BITMASK)
+                                == TRB_TYPE(TRB_TR_NOOP)) {
+                       xhci_dbg(xhci,
+                                "event_trb is a no-op TRB. Skip it\n");
+                       goto cleanup;
                }
 
                /* Now update the urb's actual_length and give back to
@@ -3126,6 +3169,12 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
                }
        }
 
+       if (xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs == 0) {
+               if (xhci->quirks & XHCI_AMD_PLL_FIX)
+                       usb_amd_quirk_pll_disable();
+       }
+       xhci_to_hcd(xhci)->self.bandwidth_isoc_reqs++;
+
        giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
                        start_cycle, start_trb);
        return 0;
index 9a3645fd759b619ae953db4d00973094799eb312..81b976e45880900065b505611c0fb762d5852015 100644 (file)
@@ -550,6 +550,9 @@ void xhci_stop(struct usb_hcd *hcd)
        del_timer_sync(&xhci->event_ring_timer);
 #endif
 
+       if (xhci->quirks & XHCI_AMD_PLL_FIX)
+               usb_amd_dev_put();
+
        xhci_dbg(xhci, "// Disabling event ring interrupts\n");
        temp = xhci_readl(xhci, &xhci->op_regs->status);
        xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status);
@@ -741,7 +744,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
        int                     retval;
 
        /* Wait a bit if either of the roothubs need to settle from the
-        * transistion into bus suspend.
+        * transition into bus suspend.
         */
        if (time_before(jiffies, xhci->bus_state[0].next_statechange) ||
                        time_before(jiffies,
@@ -771,7 +774,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
 
        /* If restore operation fails, re-initialize the HC during resume */
        if ((temp & STS_SRE) || hibernated) {
-               usb_root_hub_lost_power(hcd->self.root_hub);
+               /* Let the USB core know _both_ roothubs lost power. */
+               usb_root_hub_lost_power(xhci->main_hcd->self.root_hub);
+               usb_root_hub_lost_power(xhci->shared_hcd->self.root_hub);
 
                xhci_dbg(xhci, "Stop HCD\n");
                xhci_halt(xhci);
@@ -2072,7 +2077,7 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
                return -EINVAL;
        }
        vdev = xhci->devs[udev->slot_id];
-       /* Mark each endpoint as being in transistion, so
+       /* Mark each endpoint as being in transition, so
         * xhci_urb_enqueue() will reject all URBs.
         */
        for (i = 0; i < num_eps; i++) {
@@ -2386,10 +2391,18 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
        /* Everything but endpoint 0 is disabled, so free or cache the rings. */
        last_freed_endpoint = 1;
        for (i = 1; i < 31; ++i) {
-               if (!virt_dev->eps[i].ring)
-                       continue;
-               xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i);
-               last_freed_endpoint = i;
+               struct xhci_virt_ep *ep = &virt_dev->eps[i];
+
+               if (ep->ep_state & EP_HAS_STREAMS) {
+                       xhci_free_stream_info(xhci, ep->stream_info);
+                       ep->stream_info = NULL;
+                       ep->ep_state &= ~EP_HAS_STREAMS;
+               }
+
+               if (ep->ring) {
+                       xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i);
+                       last_freed_endpoint = i;
+               }
        }
        xhci_dbg(xhci, "Output context after successful reset device cmd:\n");
        xhci_dbg_ctx(xhci, virt_dev->out_ctx, last_freed_endpoint);
index 711de253bc0f84e7503d2957e37f26a85401619a..ba1be6b7cc6d91774323e9dd0848e759fe338c9f 100644 (file)
@@ -30,6 +30,7 @@
 
 /* Code sharing between pci-quirks and xhci hcd */
 #include       "xhci-ext-caps.h"
+#include "pci-quirks.h"
 
 /* xHCI PCI Configuration Registers */
 #define XHCI_SBRN_OFFSET       (0x60)
@@ -232,7 +233,7 @@ struct xhci_op_regs {
  * notification type that matches a bit set in this bit field.
  */
 #define        DEV_NOTE_MASK           (0xffff)
-#define ENABLE_DEV_NOTE(x)     (1 << x)
+#define ENABLE_DEV_NOTE(x)     (1 << (x))
 /* Most of the device notification types should only be used for debug.
  * SW does need to pay attention to function wake notifications.
  */
@@ -348,6 +349,9 @@ struct xhci_op_regs {
 /* Initiate a warm port reset - complete when PORT_WRC is '1' */
 #define PORT_WR                (1 << 31)
 
+/* We mark duplicate entries with -1 */
+#define DUPLICATE_ENTRY ((u8)(-1))
+
 /* Port Power Management Status and Control - port_power_base bitmasks */
 /* Inactivity timer value for transitions into U1, in microseconds.
  * Timeout can be up to 127us.  0xFF means an infinite timeout.
@@ -601,11 +605,11 @@ struct xhci_ep_ctx {
 #define EP_STATE_STOPPED       3
 #define EP_STATE_ERROR         4
 /* Mult - Max number of burtst within an interval, in EP companion desc. */
-#define EP_MULT(p)             ((p & 0x3) << 8)
+#define EP_MULT(p)             (((p) & 0x3) << 8)
 /* bits 10:14 are Max Primary Streams */
 /* bit 15 is Linear Stream Array */
 /* Interval - period between requests to an endpoint - 125u increments. */
-#define EP_INTERVAL(p)         ((p & 0xff) << 16)
+#define EP_INTERVAL(p)         (((p) & 0xff) << 16)
 #define EP_INTERVAL_TO_UFRAMES(p)              (1 << (((p) >> 16) & 0xff))
 #define EP_MAXPSTREAMS_MASK    (0x1f << 10)
 #define EP_MAXPSTREAMS(p)      (((p) << 10) & EP_MAXPSTREAMS_MASK)
@@ -873,7 +877,7 @@ struct xhci_transfer_event {
 #define COMP_CMD_ABORT 25
 /* Stopped - transfer was terminated by a stop endpoint command */
 #define COMP_STOP      26
-/* Same as COMP_EP_STOPPED, but the transfered length in the event is invalid */
+/* Same as COMP_EP_STOPPED, but the transferred length in the event is invalid */
 #define COMP_STOP_INVAL        27
 /* Control Abort Error - Debug Capability - control pipe aborted */
 #define COMP_DBG_ABORT 28
@@ -1276,6 +1280,7 @@ struct xhci_hcd {
 #define        XHCI_LINK_TRB_QUIRK     (1 << 0)
 #define XHCI_RESET_EP_QUIRK    (1 << 1)
 #define XHCI_NEC_HOST          (1 << 2)
+#define XHCI_AMD_PLL_FIX       (1 << 3)
        /* There are two roothubs to keep track of bus suspend info for */
        struct xhci_bus_state   bus_state[2];
        /* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */
index c90c89dc00035c1e3c2da06fb177f11c82ed28dd..a0037961e5bdd76709666599e5cda7e295b0c9c0 100644 (file)
@@ -69,7 +69,7 @@
  *     20000513 added IDs for all products supported by Windows driver (john)
  *     20000514 Rewrote mts_scsi_queuecommand to use URBs (john)
  *     20000514 Version 0.0.8j
- *      20000514 Fix reporting of non-existant devices to SCSI layer (john)
+ *      20000514 Fix reporting of non-existent devices to SCSI layer (john)
  *     20000514 Added MTS_DEBUG_INT (john)
  *     20000514 Changed "usb-microtek" to "microtek" for consistency (john)
  *     20000514 Stupid bug fixes (john)
@@ -557,14 +557,14 @@ mts_build_transfer_context(struct scsi_cmnd *srb, struct mts_desc* desc)
 
        if ( !memcmp( srb->cmnd, mts_read_image_sig, mts_read_image_sig_len )
 ) {            pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_image);
-               MTS_DEBUG( "transfering from desc->ep_image == %d\n",
+               MTS_DEBUG( "transferring from desc->ep_image == %d\n",
                           (int)desc->ep_image );
        } else if ( MTS_DIRECTION_IS_IN(srb->cmnd[0]) ) {
                        pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_response);
-                       MTS_DEBUG( "transfering from desc->ep_response == %d\n",
+                       MTS_DEBUG( "transferring from desc->ep_response == %d\n",
                                   (int)desc->ep_response);
        } else {
-               MTS_DEBUG("transfering to desc->ep_out == %d\n",
+               MTS_DEBUG("transferring to desc->ep_out == %d\n",
                          (int)desc->ep_out);
                pipe = usb_sndbulkpipe(desc->usb_dev,desc->ep_out);
        }
index e573e470401528134dc55a69a6921e3849ed45eb..a2190b983f526d67fc951c74672b2b5aa858823a 100644 (file)
@@ -40,7 +40,7 @@
 #ifdef CONFIG_USB_DYNAMIC_MINORS
 #define IOWARRIOR_MINOR_BASE   0
 #else
-#define IOWARRIOR_MINOR_BASE   208     // SKELETON_MINOR_BASE 192 + 16, not offical yet
+#define IOWARRIOR_MINOR_BASE   208     // SKELETON_MINOR_BASE 192 + 16, not official yet
 #endif
 
 /* interrupt input queue size */
index 4cbb7e4b368d24d3461b02c28804bcf5badf76ba..74073b363c30f86536daa948a43961654e23bbb7 100644 (file)
@@ -14,7 +14,7 @@ config USB_MUSB_HDRC
        select TWL4030_USB if MACH_OMAP_3430SDP
        select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
        select USB_OTG_UTILS
-       tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
+       bool 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
        help
          Say Y here if your system has a dual role high speed USB
          controller based on the Mentor Graphics silicon IP.  Then
@@ -30,8 +30,8 @@ config USB_MUSB_HDRC
 
          If you do not know what this is, please say N.
 
-         To compile this driver as a module, choose M here; the
-         module will be called "musb-hdrc".
+#        To compile this driver as a module, choose M here; the
+#        module will be called "musb-hdrc".
 
 choice
        prompt "Platform Glue Layer"
index 52312e8af213a4d0d6cdd515aa50757fd06bfa56..8e2a1ff8a35a8b71cbe6296bf5d546b0d46035c6 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/cacheflush.h>
 
 #include "musb_core.h"
+#include "musbhsdma.h"
 #include "blackfin.h"
 
 struct bfin_glue {
@@ -332,6 +333,27 @@ static int bfin_musb_set_mode(struct musb *musb, u8 musb_mode)
        return -EIO;
 }
 
+static int bfin_musb_adjust_channel_params(struct dma_channel *channel,
+                               u16 packet_sz, u8 *mode,
+                               dma_addr_t *dma_addr, u32 *len)
+{
+       struct musb_dma_channel *musb_channel = channel->private_data;
+
+       /*
+        * Anomaly 05000450 might cause data corruption when using DMA
+        * MODE 1 transmits with short packet.  So to work around this,
+        * we truncate all MODE 1 transfers down to a multiple of the
+        * max packet size, and then do the last short packet transfer
+        * (if there is any) using MODE 0.
+        */
+       if (ANOMALY_05000450) {
+               if (musb_channel->transmit && *mode == 1)
+                       *len = *len - (*len % packet_sz);
+       }
+
+       return 0;
+}
+
 static void bfin_musb_reg_init(struct musb *musb)
 {
        if (ANOMALY_05000346) {
@@ -430,6 +452,8 @@ static const struct musb_platform_ops bfin_ops = {
 
        .vbus_status    = bfin_musb_vbus_status,
        .set_vbus       = bfin_musb_set_vbus,
+
+       .adjust_channel_params = bfin_musb_adjust_channel_params,
 };
 
 static u64 bfin_dmamask = DMA_BIT_MASK(32);
index de55a3c3259ac1a403e3c4d730781eeb63fda77c..ab434fbd8c35446863052fb7df19607c295b8228 100644 (file)
@@ -597,12 +597,12 @@ cppi_next_tx_segment(struct musb *musb, struct cppi_channel *tx)
                length = min(n_bds * maxpacket, length);
        }
 
-       DBG(4, "TX DMA%d, pktSz %d %s bds %d dma 0x%x len %u\n",
+       DBG(4, "TX DMA%d, pktSz %d %s bds %d dma 0x%llx len %u\n",
                        tx->index,
                        maxpacket,
                        rndis ? "rndis" : "transparent",
                        n_bds,
-                       addr, length);
+                       (unsigned long long)addr, length);
 
        cppi_rndis_update(tx, 0, musb->ctrl_base, rndis);
 
@@ -820,7 +820,7 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket)
        length = min(n_bds * maxpacket, length);
 
        DBG(4, "RX DMA%d seg, maxp %d %s bds %d (cnt %d) "
-                       "dma 0x%x len %u %u/%u\n",
+                       "dma 0x%llx len %u %u/%u\n",
                        rx->index, maxpacket,
                        onepacket
                                ? (is_rndis ? "rndis" : "onepacket")
@@ -829,7 +829,8 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket)
                        musb_readl(tibase,
                                DAVINCI_RXCPPI_BUFCNT0_REG + (rx->index * 4))
                                        & 0xffff,
-                       addr, length, rx->channel.actual_len, rx->buf_len);
+                       (unsigned long long)addr, length,
+                       rx->channel.actual_len, rx->buf_len);
 
        /* only queue one segment at a time, since the hardware prevents
         * correct queue shutdown after unexpected short packets
@@ -1039,9 +1040,9 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch)
                if (!completed && (bd->hw_options & CPPI_OWN_SET))
                        break;
 
-               DBG(5, "C/RXBD %08x: nxt %08x buf %08x "
+               DBG(5, "C/RXBD %llx: nxt %08x buf %08x "
                        "off.len %08x opt.len %08x (%d)\n",
-                       bd->dma, bd->hw_next, bd->hw_bufp,
+                       (unsigned long long)bd->dma, bd->hw_next, bd->hw_bufp,
                        bd->hw_off_len, bd->hw_options,
                        rx->channel.actual_len);
 
@@ -1111,11 +1112,12 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch)
                musb_ep_select(cppi->mregs, rx->index + 1);
                csr = musb_readw(regs, MUSB_RXCSR);
                if (csr & MUSB_RXCSR_DMAENAB) {
-                       DBG(4, "list%d %p/%p, last %08x%s, csr %04x\n",
+                       DBG(4, "list%d %p/%p, last %llx%s, csr %04x\n",
                                rx->index,
                                rx->head, rx->tail,
                                rx->last_processed
-                                       ? rx->last_processed->dma
+                                       ? (unsigned long long)
+                                               rx->last_processed->dma
                                        : 0,
                                completed ? ", completed" : "",
                                csr);
@@ -1167,8 +1169,11 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
        tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG);
        rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG);
 
-       if (!tx && !rx)
+       if (!tx && !rx) {
+               if (cppi->irq)
+                       spin_unlock_irqrestore(&musb->lock, flags);
                return IRQ_NONE;
+       }
 
        DBG(4, "CPPI IRQ Tx%x Rx%x\n", tx, rx);
 
@@ -1199,7 +1204,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
                 */
                if (NULL == bd) {
                        DBG(1, "null BD\n");
-                       tx_ram->tx_complete = 0;
+                       musb_writel(&tx_ram->tx_complete, 0, 0);
                        continue;
                }
 
@@ -1452,7 +1457,7 @@ static int cppi_channel_abort(struct dma_channel *channel)
                 *    compare mode by writing 1 to the tx_complete register.
                 */
                cppi_reset_tx(tx_ram, 1);
-               cppi_ch->head = 0;
+               cppi_ch->head = NULL;
                musb_writel(&tx_ram->tx_complete, 0, 1);
                cppi_dump_tx(5, cppi_ch, " (done teardown)");
 
index 630ae7f3cd4cf1ff9288f38cbca245b504d38629..f10ff00ca09ea377bbd7dd6167e3723260bd78f9 100644 (file)
@@ -1030,6 +1030,7 @@ static void musb_shutdown(struct platform_device *pdev)
        struct musb     *musb = dev_to_musb(&pdev->dev);
        unsigned long   flags;
 
+       pm_runtime_get_sync(musb->controller);
        spin_lock_irqsave(&musb->lock, flags);
        musb_platform_disable(musb);
        musb_generic_disable(musb);
@@ -1040,6 +1041,7 @@ static void musb_shutdown(struct platform_device *pdev)
        musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
        musb_platform_exit(musb);
 
+       pm_runtime_put(musb->controller);
        /* FIXME power down */
 }
 
index 4bd9e2145ee416dec1cf516538b0597cf94fa08f..0e053b5879601fa93a77a8caede70773b1360f27 100644 (file)
@@ -261,6 +261,7 @@ enum musb_g_ep0_state {
  * @try_ilde:  tries to idle the IP
  * @vbus_status: returns vbus status if possible
  * @set_vbus:  forces vbus status
+ * @channel_program: pre check for standard dma channel_program func
  */
 struct musb_platform_ops {
        int     (*init)(struct musb *musb);
@@ -274,6 +275,10 @@ struct musb_platform_ops {
 
        int     (*vbus_status)(struct musb *musb);
        void    (*set_vbus)(struct musb *musb, int on);
+
+       int     (*adjust_channel_params)(struct dma_channel *channel,
+                               u16 packet_sz, u8 *mode,
+                               dma_addr_t *dma_addr, u32 *len);
 };
 
 /*
index 98519c5d8b5cc23e5407dac87a521004d8885f59..6dfbf9ffd7a63660ef472b6b3a932ecf22fd0341 100644 (file)
@@ -535,7 +535,7 @@ void musb_g_tx(struct musb *musb, u8 epnum)
                        is_dma = 1;
                        csr |= MUSB_TXCSR_P_WZC_BITS;
                        csr &= ~(MUSB_TXCSR_DMAENAB | MUSB_TXCSR_P_UNDERRUN |
-                                MUSB_TXCSR_TXPKTRDY);
+                                MUSB_TXCSR_TXPKTRDY | MUSB_TXCSR_AUTOSET);
                        musb_writew(epio, MUSB_TXCSR, csr);
                        /* Ensure writebuffer is empty. */
                        csr = musb_readw(epio, MUSB_TXCSR);
@@ -1296,7 +1296,7 @@ static int musb_gadget_dequeue(struct usb_ep *ep, struct usb_request *request)
        }
 
        /* if the hardware doesn't have the request, easy ... */
-       if (musb_ep->req_list.next != &request->list || musb_ep->busy)
+       if (musb_ep->req_list.next != &req->list || musb_ep->busy)
                musb_g_giveback(musb_ep, request, -ECONNRESET);
 
        /* ... else abort the dma transfer ... */
index 0144a2d481fd8daf8b8c3ab30102e57154096c5e..d281792db05c414cc0a6f2c30a62967dd8a458e9 100644 (file)
@@ -169,6 +169,14 @@ static int dma_channel_program(struct dma_channel *channel,
        BUG_ON(channel->status == MUSB_DMA_STATUS_UNKNOWN ||
                channel->status == MUSB_DMA_STATUS_BUSY);
 
+       /* Let targets check/tweak the arguments */
+       if (musb->ops->adjust_channel_params) {
+               int ret = musb->ops->adjust_channel_params(channel,
+                       packet_sz, &mode, &dma_addr, &len);
+               if (ret)
+                       return ret;
+       }
+
        /*
         * The DMA engine in RTL1.8 and above cannot handle
         * DMA addresses that are not aligned to a 4 byte boundary.
index 25cb8b0003b152c751087251a593c39e482c326e..57a27fa954b41fdd7b0fba880fd3c9da2b64b19c 100644 (file)
@@ -259,9 +259,10 @@ static int musb_otg_notifications(struct notifier_block *nb,
        case USB_EVENT_VBUS:
                DBG(4, "VBUS Connect\n");
 
+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
                if (musb->gadget_driver)
                        pm_runtime_get_sync(musb->controller);
-
+#endif
                otg_init(musb->xceiv);
                break;
 
index d6384e4aeef96ba77448fa048cbc6560a4d2353d..f7e04bf34a13a86f7439b2033b255137f10d039b 100644 (file)
@@ -93,6 +93,8 @@ static int __init ux500_probe(struct platform_device *pdev)
        }
 
        musb->dev.parent                = &pdev->dev;
+       musb->dev.dma_mask              = pdev->dev.dma_mask;
+       musb->dev.coherent_dma_mask     = pdev->dev.coherent_dma_mask;
 
        glue->dev                       = &pdev->dev;
        glue->musb                      = musb;
index 8c6fdef61d1cebeab4f3a9c270a26fedb7b21d48..e25700f44b6f603650d1057e1674d7a8617cff25 100644 (file)
@@ -1531,7 +1531,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
        i2c_set_clientdata(i2c, isp);
        isp->client = i2c;
 
-       /* verify the chip (shouldn't be necesary) */
+       /* verify the chip (shouldn't be necessary) */
        status = isp1301_get_u16(isp, ISP1301_VENDOR_ID);
        if (status != I2C_VENDOR_ID_PHILIPS) {
                dev_dbg(&i2c->dev, "not philips id: %d\n", status);
index 7f9b8cd4514bee72f5ce3c9e44f839203f732431..e973ff19c55a3009ec4557498fe0ea67f1b75b3e 100644 (file)
@@ -580,7 +580,7 @@ static void langwell_otg_add_ktimer(enum langwell_otg_timer_type timers)
                time = TB_BUS_SUSPEND;
                break;
        default:
-               dev_dbg(lnw->dev, "unkown timer, cannot enable it\n");
+               dev_dbg(lnw->dev, "unknown timer, cannot enable it\n");
                return;
        }
 
@@ -1381,7 +1381,7 @@ static void langwell_otg_work(struct work_struct *work)
                        } else if (!iotg->hsm.a_bus_req && iotg->otg.host &&
                                        iotg->otg.host->b_hnp_enable) {
                                /* It is not safe enough to do a fast
-                                * transistion from A_WAIT_BCON to
+                                * transition from A_WAIT_BCON to
                                 * A_SUSPEND */
                                msleep(10000);
                                if (iotg->hsm.a_bus_req)
index 0db6ace16f7ba687e69b13cc445fb2026a6131f5..aba201cb872c44af5ba253484b73d07668aa098d 100644 (file)
@@ -16,7 +16,7 @@
  * When reading the process is almost equal except that the header starts with
  * 0x00 0x20.
  *
- * The device simply need some stuff to understand data comming from the usb
+ * The device simply need some stuff to understand data coming from the usb
  * buffer: The First and Second byte is used for a Header, the Third and Fourth
  * tells the  device the amount of information the package holds.
  * Packages are 60 bytes long Header Stuff.
@@ -30,7 +30,7 @@
  * one.
  *
  * The driver registers himself with the USB-serial core and the USB Core. I had
- * to implement a probe function agains USB-serial, because other way, the
+ * to implement a probe function against USB-serial, because other way, the
  * driver was attaching himself to both interfaces. I have tryed with different
  * configurations of usb_serial_driver with out exit, only the probe function
  * could handle this correctly.
index 4df3e0cecbae7c666570a85a5d1dfb659ecf6b63..0f11afdda134387f311896534374c30a89eda318 100644 (file)
@@ -101,7 +101,7 @@ static const struct usb_device_id id_table[] = {
        { USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */
        { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
        { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */
-       { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demostration module */
+       { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */
        { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesys ETRX2USB */
        { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */
        { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
index 987e9bf7bd02812bdb2d352951790e00102b4b4b..d9906eb9d16af4ea4b10dde628205e9816db5717 100644 (file)
@@ -35,7 +35,7 @@
  *
  *  Lonnie Mendez <dignome@gmail.com>
  *  04-10-2004
- *     Driver modified to support dynamic line settings.  Various improvments
+ *     Driver modified to support dynamic line settings.  Various improvements
  *      and features.
  *
  *  Neil Whelchel
index 65967b36365f41b714d1818b1b3fa243a3c7a1cd..4de6ef0ae52af2b541890a920641e1e792f8c3d7 100644 (file)
@@ -17,7 +17,7 @@
  * See Documentation/usb/usb-serial.txt for more information on using this
  * driver
  *
- * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
+ * See http://ftdi-usb-sio.sourceforge.net for up to date testing info
  *     and extra documentation
  *
  * Change entries from 2004 and earlier can be found in versions of this
@@ -151,6 +151,8 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = {
  * /sys/bus/usb/ftdi_sio/new_id, then send patch/report!
  */
 static struct usb_device_id id_table_combined [] = {
+       { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
@@ -525,6 +527,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2803_8_PID) },
        { USB_DEVICE(IDTECH_VID, IDTECH_IDT1221U_PID) },
        { USB_DEVICE(OCT_VID, OCT_US101_PID) },
+       { USB_DEVICE(OCT_VID, OCT_DK201_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_HE_TIRA1_PID),
                .driver_info = (kernel_ulong_t)&ftdi_HE_TIRA1_quirk },
        { USB_DEVICE(FTDI_VID, FTDI_USB_UIRT_PID),
@@ -787,6 +790,8 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) },
+       { USB_DEVICE(FTDI_VID, HAMEG_HO720_PID) },
+       { USB_DEVICE(FTDI_VID, HAMEG_HO730_PID) },
        { USB_DEVICE(FTDI_VID, HAMEG_HO870_PID) },
        { USB_DEVICE(FTDI_VID, MJSG_GENERIC_PID) },
        { USB_DEVICE(FTDI_VID, MJSG_SR_RADIO_PID) },
index c543e55bafbaff09fbc3c1d31b3726c58532486c..efffc23723bdf94aae454a025b9b419453f54b3f 100644 (file)
  * Hameg HO820 and HO870 interface (using VID 0x0403)
  */
 #define HAMEG_HO820_PID                        0xed74
+#define HAMEG_HO730_PID                        0xed73
+#define HAMEG_HO720_PID                        0xed72
 #define HAMEG_HO870_PID                        0xed71
 
 /*
 /* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */
 /* Also rebadged as Dick Smith Electronics (Aus) XH6451 */
 /* Also rebadged as SIIG Inc. model US2308 hardware version 1 */
+#define OCT_DK201_PID          0x0103  /* OCT DK201 USB docking station */
 #define OCT_US101_PID          0x0421  /* OCT US101 USB to RS-232 */
 
 /*
 #define QIHARDWARE_VID                 0x20B7
 #define MILKYMISTONE_JTAGSERIAL_PID    0x0713
 
+/*
+ * CTI GmbH RS485 Converter http://www.cti-lean.com/
+ */
+/* USB-485-Mini*/
+#define FTDI_CTI_MINI_PID      0xF608
+/* USB-Nano-485*/
+#define FTDI_CTI_NANO_PID      0xF60B
+
+
index f1aedfa7c420f0e06fba5ccb3a588127422b549d..abf095be5753419184423ad117f23cc4ea4dbf5f 100644 (file)
@@ -1981,7 +1981,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial,
        if (code == IOSP_STATUS_OPEN_RSP) {
                edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3);
                edge_port->maxTxCredits = edge_port->txCredits;
-               dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __func__, edge_serial->rxPort, byte2, edge_port->txCredits);
+               dbg("%s - Port %u Open Response Initial MSR = %02x TxBufferSize = %d", __func__, edge_serial->rxPort, byte2, edge_port->txCredits);
                handle_new_msr(edge_port, byte2);
 
                /* send the current line settings to the port so we are
index dced7ec654701a561b9ec1cdec243e4af1e7b781..ad9c1d47a619b7e537a884ca7f2e2680a9137d6f 100644 (file)
@@ -68,7 +68,7 @@ struct comMapper {
 #define PROC_SET_COM_ENTRY             2
 
 
-/* The following sturcture is passed to the write */
+/* The following structure is passed to the write */
 struct procWrite {
        int     Command;
        union {
index d8434910fa7b723afa97a339c9893f074582973c..0aac00afb5c8212403466a3ede7a49b78f63a2e7 100644 (file)
@@ -433,7 +433,7 @@ static int write_i2c_mem(struct edgeport_serial *serial,
 
        /* We can only send a maximum of 1 aligned byte page at a time */
 
-       /* calulate the number of bytes left in the first page */
+       /* calculate the number of bytes left in the first page */
        write_length = EPROM_PAGE_SIZE -
                                (start_address & (EPROM_PAGE_SIZE - 1));
 
index d2c019637e459368efbb23b4f0d0156cddf872e3..ba0d28727ccb1e6628c0492432558cb6314a61f7 100644 (file)
@@ -106,7 +106,7 @@ static void mct_u232_break_ctl(struct tty_struct *tty, int break_state);
 static int  mct_u232_tiocmget(struct tty_struct *tty);
 static int  mct_u232_tiocmset(struct tty_struct *tty,
                        unsigned int set, unsigned int clear);
-static int  mct_u232_ioctl(struct tty_struct *tty, struct file *file,
+static int  mct_u232_ioctl(struct tty_struct *tty,
                        unsigned int cmd, unsigned long arg);
 static int  mct_u232_get_icount(struct tty_struct *tty,
                        struct serial_icounter_struct *icount);
@@ -874,7 +874,7 @@ static void mct_u232_unthrottle(struct tty_struct *tty)
        }
 }
 
-static int  mct_u232_ioctl(struct tty_struct *tty, struct file *file,
+static int  mct_u232_ioctl(struct tty_struct *tty,
                        unsigned int cmd, unsigned long arg)
 {
        DEFINE_WAIT(wait);
index 201f6096844bb35c7da3678edda5425bdff0cdac..1b5633f469843b0d82d23baea31ef05ba3f4ae5b 100644 (file)
@@ -116,7 +116,7 @@ static void opticon_read_bulk_callback(struct urb *urb)
                } else {
                        if ((data[0] == 0x00) && (data[1] == 0x01)) {
                                spin_lock_irqsave(&priv->lock, flags);
-                               /* CTS status infomation package */
+                               /* CTS status information package */
                                if (data[2] == 0x00)
                                        priv->cts = false;
                                else
@@ -413,7 +413,7 @@ static int opticon_tiocmget(struct tty_struct *tty)
        return result;
 }
 
-static int opticon_tiocmset(struct tty_struct *tty, struct file *file,
+static int opticon_tiocmset(struct tty_struct *tty,
                           unsigned int set, unsigned int clear)
 {
        struct usb_serial_port *port = tty->driver_data;
index 75c7f456eed52880bb181e8dd3d53d5aca01a3c3..d77ff0435896bf098c39fda885d2370de685cc0c 100644 (file)
@@ -407,6 +407,10 @@ static void option_instat_callback(struct urb *urb);
 /* ONDA MT825UP HSDPA 14.2 modem */
 #define ONDA_MT825UP         0x000b
 
+/* Samsung products */
+#define SAMSUNG_VENDOR_ID                       0x04e8
+#define SAMSUNG_PRODUCT_GT_B3730                0x6889
+
 /* some devices interfaces need special handling due to a number of reasons */
 enum option_blacklist_reason {
                OPTION_BLACKLIST_NONE = 0,
@@ -968,6 +972,7 @@ static const struct usb_device_id option_ids[] = {
        { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) },
        { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
        { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */
+       { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730/GT-B3710 LTE USB modem.*/
        { } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
index 8858201eb1d39cddb1150d2077f954226a4b833e..54a9dab1f33b4e4d335201d04572499ab701c424 100644 (file)
@@ -111,7 +111,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
        ifnum = intf->desc.bInterfaceNumber;
        dbg("This Interface = %d", ifnum);
 
-       data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private),
+       data = kzalloc(sizeof(struct usb_wwan_intf_private),
                                         GFP_KERNEL);
        if (!data)
                return -ENOMEM;
@@ -134,8 +134,10 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
                    usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) {
                        dbg("QDL port found");
 
-                       if (serial->interface->num_altsetting == 1)
-                               return 0;
+                       if (serial->interface->num_altsetting == 1) {
+                               retval = 0; /* Success */
+                               break;
+                       }
 
                        retval = usb_set_interface(serial->dev, ifnum, 1);
                        if (retval < 0) {
@@ -145,7 +147,6 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
                                retval = -ENODEV;
                                kfree(data);
                        }
-                       return retval;
                }
                break;
 
@@ -166,6 +167,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
                                        "Could not set interface, error %d\n",
                                        retval);
                                retval = -ENODEV;
+                               kfree(data);
                        }
                } else if (ifnum == 2) {
                        dbg("Modem port found");
@@ -177,7 +179,6 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
                                retval = -ENODEV;
                                kfree(data);
                        }
-                       return retval;
                } else if (ifnum==3) {
                        /*
                         * NMEA (serial line 9600 8N1)
@@ -191,6 +192,7 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
                                        "Could not set interface, error %d\n",
                                        retval);
                                retval = -ENODEV;
+                               kfree(data);
                        }
                }
                break;
@@ -199,12 +201,27 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
                dev_err(&serial->dev->dev,
                        "unknown number of interfaces: %d\n", nintf);
                kfree(data);
-               return -ENODEV;
+               retval = -ENODEV;
        }
 
+       /* Set serial->private if not returning -ENODEV */
+       if (retval != -ENODEV)
+               usb_set_serial_data(serial, data);
        return retval;
 }
 
+static void qc_release(struct usb_serial *serial)
+{
+       struct usb_wwan_intf_private *priv = usb_get_serial_data(serial);
+
+       dbg("%s", __func__);
+
+       /* Call usb_wwan release & free the private data allocated in qcprobe */
+       usb_wwan_release(serial);
+       usb_set_serial_data(serial, NULL);
+       kfree(priv);
+}
+
 static struct usb_serial_driver qcdevice = {
        .driver = {
                .owner     = THIS_MODULE,
@@ -222,7 +239,7 @@ static struct usb_serial_driver qcdevice = {
        .chars_in_buffer     = usb_wwan_chars_in_buffer,
        .attach              = usb_wwan_startup,
        .disconnect          = usb_wwan_disconnect,
-       .release             = usb_wwan_release,
+       .release             = qc_release,
 #ifdef CONFIG_PM
        .suspend             = usb_wwan_suspend,
        .resume              = usb_wwan_resume,
index 08e03745e251da230f3017b3b5bf8905954760c0..0e5aafda45379e6526b57cd2ff174b836718737a 100644 (file)
@@ -562,7 +562,7 @@ static int ene_sd_init(struct us_data *us)
 
        result = ene_send_scsi_cmd(us, FDIR_READ, NULL, 0);
        if (result != USB_STOR_XFER_GOOD) {
-               US_DEBUGP("Exection SD Init Code Fail !!\n");
+               US_DEBUGP("Execution SD Init Code Fail !!\n");
                return USB_STOR_TRANSPORT_ERROR;
        }
 
@@ -581,7 +581,7 @@ static int ene_sd_init(struct us_data *us)
 
        result = ene_send_scsi_cmd(us, FDIR_READ, &buf, 0);
        if (result != USB_STOR_XFER_GOOD) {
-               US_DEBUGP("Exection SD Init Code Fail !!\n");
+               US_DEBUGP("Execution SD Init Code Fail !!\n");
                return USB_STOR_TRANSPORT_ERROR;
        }
 
index 6b9982cd54230b434a50677eefe4b14f2b3bada3..09e52ba47ddf5274a3bc3ccc6f8fa446275172c5 100644 (file)
@@ -1510,7 +1510,7 @@ static int isd200_Initialization(struct us_data *us)
  * Protocol and Transport for the ISD200 ASIC
  *
  * This protocol and transport are for ATA devices connected to an ISD200
- * ASIC.  An ATAPI device that is conected as a slave device will be
+ * ASIC.  An ATAPI device that is connected as a slave device will be
  * detected in the driver initialization function and the protocol will
  * be changed to an ATAPI protocol (Transparent SCSI).
  *
index 689ee1fb702a4351a7fdb2a0e0a400a682eabd4f..13b8bcdf3dbafd675a49501dd532b330beb2ecfa 100644 (file)
@@ -123,7 +123,7 @@ static int slave_configure(struct scsi_device *sdev)
 {
        struct us_data *us = host_to_us(sdev->host);
 
-       /* Many devices have trouble transfering more than 32KB at a time,
+       /* Many devices have trouble transferring more than 32KB at a time,
         * while others have trouble with more than 64K. At this time we
         * are limiting both to 32K (64 sectores).
         */
index bd3f415893d81f3ffd76d77cd6fe64f8739035ba..0b00091d2ae914b252abd1d397639b181de9510e 100644 (file)
@@ -340,7 +340,7 @@ static int usbat_check_status(struct us_data *us)
 }
 
 /*
- * Stores critical information in internal registers in prepartion for the execution
+ * Stores critical information in internal registers in preparation for the execution
  * of a conditional usbat_read_blocks or usbat_write_blocks call.
  */
 static int usbat_set_shuttle_features(struct us_data *us,
index 827c87f10cc5a80c06f84afd38d7d66b7249f0d6..7e4bf95f8f7bb999305f28f485674e129aeeb2f5 100644 (file)
@@ -180,7 +180,7 @@ static void bytewise_xor(void *_bo, const void *_bi1, const void *_bi2,
  *     using the 14 bytes of @a to fill up
  *     b1.{mac_header,e0,security_reserved,padding}.
  *
- * NOTE: The definiton of l(a) in WUSB1.0[6.5] vs the definition of
+ * NOTE: The definition of l(a) in WUSB1.0[6.5] vs the definition of
  *       l(m) is orthogonal, they bear no relationship, so it is not
  *       in conflict with the parameter's relation that
  *       WUSB1.0[6.4.2]) defines.
@@ -272,7 +272,7 @@ static int wusb_ccm_mac(struct crypto_blkcipher *tfm_cbc,
 
        /* Now we crypt the MIC Tag (*iv) with Ax -- values per WUSB1.0[6.5]
         * The procedure is to AES crypt the A0 block and XOR the MIC
-        * Tag agains it; we only do the first 8 bytes and place it
+        * Tag against it; we only do the first 8 bytes and place it
         * directly in the destination buffer.
         *
         * POS Crypto API: size is assumed to be AES's block size.
index 4ed97360c04637810875295b206717f194edabda..6f4fafdc240117d0fd2879001e0c63db8981901a 100644 (file)
@@ -71,7 +71,7 @@ static void wusbhc_rsv_complete_cb(struct uwb_rsv *rsv)
 
 /**
  * wusbhc_rsv_establish - establish a reservation for the cluster
- * @wusbhc: the WUSB HC requesting a bandwith reservation
+ * @wusbhc: the WUSB HC requesting a bandwidth reservation
  */
 int wusbhc_rsv_establish(struct wusbhc *wusbhc)
 {
index c175b7300c7368016deb5118a579fe3b6073fde5..39de3900ad20df04dc821e58f0db676c27bbe5be 100644 (file)
@@ -133,7 +133,7 @@ static int wusbhc_rh_port_reset(struct wusbhc *wusbhc, u8 port_idx)
  *           big of a problem [and we can't make it an spinlock
  *           because other parts need to take it and sleep] .
  *
- *           @usb_hcd is refcounted, so it won't dissapear under us
+ *           @usb_hcd is refcounted, so it won't disappear under us
  *           and before killing a host, the polling of the root hub
  *           would be stopped anyway.
  */
index 8cb9d80207fa686c880cfcafaa49ef8fa9390ce3..ca80171f42c64483871eeec79bd8d4fda09e1fbf 100644 (file)
@@ -24,7 +24,7 @@
  *
  * RPIPE
  *
- *   Targetted at different downstream endpoints
+ *   Targeted at different downstream endpoints
  *
  *   Descriptor: use to config the remote pipe.
  *
index 84b744c428a4bcc72593ce9c77ac4c4e8bc6fddc..6ccd93a9b909966536fd89a4bbe6f7959f9b9d93 100644 (file)
@@ -61,7 +61,7 @@
  *
  *     Two methods it could be done:
  *
- *     (a) set up a timer everytime an rpipe's use count drops to 1
+ *     (a) set up a timer every time an rpipe's use count drops to 1
  *         (which means unused) or when a transfer ends. Reset the
  *         timer when a xfer is queued. If the timer expires, release
  *         the rpipe [see rpipe_ep_disable()].
@@ -140,7 +140,7 @@ struct wa_xfer {
 
        struct wahc *wa;                /* Wire adapter we are plugged to */
        struct usb_host_endpoint *ep;
-       struct urb *urb;                /* URB we are transfering for */
+       struct urb *urb;                /* URB we are transferring for */
        struct wa_seg **seg;            /* transfer segments */
        u8 segs, segs_submitted, segs_done;
        unsigned is_inbound:1;
@@ -161,7 +161,7 @@ static inline void wa_xfer_init(struct wa_xfer *xfer)
 }
 
 /*
- * Destory a transfer structure
+ * Destroy a transfer structure
  *
  * Note that the xfer->seg[index] thingies follow the URB life cycle,
  * so we need to put them, not free them.
@@ -494,7 +494,7 @@ static void __wa_xfer_setup_hdr0(struct wa_xfer *xfer,
  * function does almost the same thing and they work closely
  * together.
  *
- * If the seg request has failed but this DTO phase has suceeded,
+ * If the seg request has failed but this DTO phase has succeeded,
  * wa_seg_cb() has already failed the segment and moved the
  * status to WA_SEG_ERROR, so this will go through 'case 0' and
  * effectively do nothing.
index 6bd426b7ec07f6062436dd81b0fc083b552755cd..3a2d09162e70f2d6480bf0f7f1ea3b19e48c07b2 100644 (file)
@@ -231,7 +231,7 @@ struct wusb_port {
  *
  *    Most of the times when you need to use it, it will be non-NULL,
  *    so there is no real need to check for it (wusb_dev will
- *    dissapear before usb_dev).
+ *    disappear before usb_dev).
  *
  *  - The following fields need to be filled out before calling
  *    wusbhc_create(): ports_max, mmcies_max, mmcie_{add,rm}.
index 08bd6dbfd4a6d03acf870d4328633e05dd0db401..3e5454aba5d4b3e37303b9ec7f8ebcfd229b96e2 100644 (file)
@@ -61,7 +61,7 @@
 
 
 /**
- * If a beacon dissapears for longer than this, then we consider the
+ * If a beacon disappears for longer than this, then we consider the
  * device who was represented by that beacon to be gone.
  *
  * ECMA-368[17.2.3, last para] establishes that a device must not
index a8d83e25e3b66e21bb3ac48f2548b9334dbaf8ee..3fbcf789dfaad71ec81f5f3b9e8776ec18abaa26 100644 (file)
@@ -27,7 +27,7 @@
 
 /* DRP Conflict Actions ([ECMA-368 2nd Edition] 17.4.6) */
 enum uwb_drp_conflict_action {
-       /* Reservation is mantained, no action needed */
+       /* Reservation is maintained, no action needed */
        UWB_DRP_CONFLICT_MANTAIN = 0,
        
        /* the device shall not transmit frames in conflicting MASs in
@@ -741,12 +741,12 @@ void uwb_drp_process_all(struct uwb_rc *rc, struct uwb_rc_evt_drp *drp_evt,
  * DRP notifications can occur for three different reasons:
  *
  * - UWB_DRP_NOTIF_DRP_IE_RECVD: one or more DRP IEs with the RC as
- *   the target or source have been recieved.
+ *   the target or source have been received.
  *
  *   These DRP IEs could be new or for an existing reservation.
  *
  *   If the DRP IE for an existing reservation ceases to be to
- *   recieved for at least mMaxLostBeacons, the reservation should be
+ *   received for at least mMaxLostBeacons, the reservation should be
  *   considered to be terminated.  Note that the TERMINATE reason (see
  *   below) may not always be signalled (e.g., the remote device has
  *   two or more reservations established with the RC).
index b0091c771b9a2d3c8d29fd782000df41cc777c31..b4395f41a00743768bc4c44a66dddf1e29ec5df6 100644 (file)
@@ -168,7 +168,7 @@ int uwb_rc_mac_addr_setup(struct uwb_rc *rc)
        }
 
        if (uwb_mac_addr_unset(&addr) || uwb_mac_addr_bcast(&addr)) {
-               addr.data[0] = 0x02; /* locally adminstered and unicast */
+               addr.data[0] = 0x02; /* locally administered and unicast */
                get_random_bytes(&addr.data[1], sizeof(addr.data)-1);
 
                result = uwb_rc_mac_addr_set(rc, &addr);
index 27849292b552aab93c7ac3be1eae6650607a1d1a..3de630b0f6913510233113b8e52f30889e494cf1 100644 (file)
@@ -52,7 +52,7 @@ const char *__strerror[] = {
        "cancelled",
        "invalid state",
        "invalid size",
-       "ack not recieved",
+       "ack not received",
        "no more asie notification",
 };
 
index ccd2184e05d245a9521757a170883ed3b5197013..b2948ec578784b30f2a6fd740fb098196876af7a 100644 (file)
@@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(umc_device_register);
  * First we unregister the device, make sure the driver can do it's
  * resource release thing and then we try to release any left over
  * resources. We take a ref to the device, to make sure it doesn't
- * dissapear under our feet.
+ * disappear under our feet.
  */
 void umc_device_unregister(struct umc_dev *umc)
 {
index ccecf99745873327b1c373d677e8f0b2e49921c1..4484c721f0f9b1ce6a160b5d7e450d0245b2e772 100644 (file)
@@ -637,7 +637,7 @@ static inline unsigned int chan_to_field(unsigned int chan, const struct fb_bitf
  *     magnitude which needs to be scaled in this function for the hardware.
  *     Things to take into consideration are how many color registers, if
  *     any, are supported with the current color visual. With truecolor mode
- *     no color palettes are supported. Here a psuedo palette is created
+ *     no color palettes are supported. Here a pseudo palette is created
  *     which we store the value in pseudo_palette in struct fb_info. For
  *     pseudocolor mode we have a limited color palette. To deal with this
  *     we can program what color is displayed for a particular pixel value.
index d437b3daf1f5f08b39172048f44e6c2c7510ffca..ebb893c49e9027b9d9cb3aa897e83db394026ff0 100644 (file)
@@ -3124,12 +3124,12 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev,
                M = pll_regs[2];
 
                /*
-                * PLL Feedback Divider N (Dependant on CLOCK_CNTL):
+                * PLL Feedback Divider N (Dependent on CLOCK_CNTL):
                 */
                N = pll_regs[7 + (clock_cntl & 3)];
 
                /*
-                * PLL Post Divider P (Dependant on CLOCK_CNTL):
+                * PLL Post Divider P (Dependent on CLOCK_CNTL):
                 */
                P = 1 << (pll_regs[6] >> ((clock_cntl & 3) << 1));
 
index 2ba8b3c421a1e03af15524c4e49d233ebcec8149..46f72ed5351065dadcce9703e012ae92ea1e7d23 100644 (file)
@@ -51,7 +51,7 @@
  * to a larger number and saturate CUR_HORZ_POSN to zero.
  *
  * if Y becomes negative, CUR_VERT_OFFSET must be adjusted to a larger number,
- * CUR_OFFSET must be adjusted to a point to the appropraite line in the cursor
+ * CUR_OFFSET must be adjusted to a point to the appropriate line in the cursor
  * definitation and CUR_VERT_POSN must be saturated to zero.
  */
 
index 4ea187d937681ae154eeaef876675dbf9fd5622c..5dff32ac8044be8de287c7e4c156dd0c577eb3c8 100644 (file)
@@ -1572,7 +1572,7 @@ static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev)
        /* Copy monitor specs from panel data */
        /* fixme: we're setting up LCD controller windows, so these dont give a
        damn as to what the monitor specs are (the panel itself does, but that
-       isnt done here...so maybe need a generic catchall monitor setting??? */
+       isn't done here...so maybe need a generic catchall monitor setting??? */
        memcpy(&fbi->monspecs, &panel->monspecs, sizeof(struct fb_monspecs));
 
        /* We first try the user mode passed in argument. If that failed,
index af6098396fe6d067d17a40e439c56ba254a72ab5..c6533bad26f86cb647792198cf4de02446cd64a8 100644 (file)
@@ -109,7 +109,7 @@ static unsigned long corgibl_flags;
 #define CORGIBL_BATTLOW       0x02
 
 /*
- * This is only a psuedo I2C interface. We can't use the standard kernel
+ * This is only a pseudo I2C interface. We can't use the standard kernel
  * routines as the interface is write only. We just assume the data is acked...
  */
 static void lcdtg_ssp_i2c_send(struct corgi_lcd *lcd, uint8_t data)
index bbca3127071e3a380acce9a843c8b963361fc322..be20b5cbe26cb9e1dd244a284f898727ffa5c5ea 100644 (file)
@@ -6,7 +6,7 @@
  * GPL v2
  *
  * This driver assumes single CPU. That's okay, because collie is
- * slightly old hardware, and noone is going to retrofit second CPU to
+ * slightly old hardware, and no one is going to retrofit second CPU to
  * old PDA.
  */
 
index c8e1f04941bd5333e467fa358f06691067ad0e3a..23b6c4b62c78cdd642083b7b36245dca2d13d5e6 100644 (file)
@@ -154,8 +154,10 @@ static int __devinit lq035q1_spidev_probe(struct spi_device *spi)
 
        ret = lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
        ret |= lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
-       if (ret)
+       if (ret) {
+               kfree(ctl);
                return ret;
+       }
 
        spi_set_drvdata(spi, ctl);
 
index 8c7f9e4fc6ebfff31838cefb56ac90dbdebf4f47..cd591b5152a56baa9e6a2e607e3ca842bea921dc 100644 (file)
@@ -87,12 +87,12 @@ static const u8 init_NTSC_TESTPATTERN[] = {
 
 static const u8 init_NTSC[] = {
        0x00, 0x1E,     /* Power up all DACs and PLL */
-       0xC3, 0x26,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xC5, 0x12,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xC2, 0x4A,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xC6, 0x5E,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xBD, 0x19,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xBF, 0x42,     /* Program RGB->YCrCb Color Space convertion matrix */
+       0xC3, 0x26,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xC5, 0x12,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xC2, 0x4A,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xC6, 0x5E,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xBD, 0x19,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xBF, 0x42,     /* Program RGB->YCrCb Color Space conversion matrix */
        0x8C, 0x1F,     /* NTSC Subcarrier Frequency */
        0x8D, 0x7C,     /* NTSC Subcarrier Frequency */
        0x8E, 0xF0,     /* NTSC Subcarrier Frequency */
@@ -109,12 +109,12 @@ static const u8 init_NTSC[] = {
 
 static const u8 init_PAL[] = {
        0x00, 0x1E,     /* Power up all DACs and PLL */
-       0xC3, 0x26,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xC5, 0x12,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xC2, 0x4A,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xC6, 0x5E,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xBD, 0x19,     /* Program RGB->YCrCb Color Space convertion matrix */
-       0xBF, 0x42,     /* Program RGB->YCrCb Color Space convertion matrix */
+       0xC3, 0x26,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xC5, 0x12,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xC2, 0x4A,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xC6, 0x5E,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xBD, 0x19,     /* Program RGB->YCrCb Color Space conversion matrix */
+       0xBF, 0x42,     /* Program RGB->YCrCb Color Space conversion matrix */
        0x8C, 0xCB,     /* PAL Subcarrier Frequency */
        0x8D, 0x8A,     /* PAL Subcarrier Frequency */
        0x8E, 0x09,     /* PAL Subcarrier Frequency */
index c58393402da2ef466bd8de0edce08dae0ea53aac..8745637e4b7e3811d27935b07dd1a24e6f3700c0 100644 (file)
@@ -370,7 +370,6 @@ static void fb_flashcursor(struct work_struct *work)
 {
        struct fb_info *info = container_of(work, struct fb_info, queue);
        struct fbcon_ops *ops = info->fbcon_par;
-       struct display *p;
        struct vc_data *vc = NULL;
        int c;
        int mode;
@@ -386,7 +385,6 @@ static void fb_flashcursor(struct work_struct *work)
                return;
        }
 
-       p = &fb_display[vc->vc_num];
        c = scr_readw((u16 *) vc->vc_pos);
        mode = (!ops->cursor_flash || ops->cursor_state.enable) ?
                CM_ERASE : CM_DRAW;
index a19a7f33133e80e995e004c6b1a74486c8e4fb6e..fa6e698e63c4d81cfab4089bcaa70e18ce829a31 100644 (file)
@@ -1,5 +1,5 @@
 
-/* Hand composed "Miniscule" 4x6 font, with binary data generated using
+/* Hand composed "Minuscule" 4x6 font, with binary data generated using
  * Perl stub.
  *
  * Use 'perl -x mini_4x6.c < mini_4x6.c > new_version.c' to regenerate
index 8d61ef96eedd5b7942346950223513eaf4ed52e9..8b7d47386f3983d883e04bb26be5837a23c65437 100644 (file)
@@ -763,7 +763,7 @@ static int fb_wait_for_vsync(struct fb_info *info)
 
        /*
         * Set flag to 0 and wait for isr to set to 1. It would seem there is a
-        * race condition here where the ISR could have occured just before or
+        * race condition here where the ISR could have occurred just before or
         * just after this set. But since we are just coarsely waiting for
         * a frame to complete then that's OK. i.e. if the frame completed
         * just before this code executed then we have to wait another full
index f6a09ab0dac6dad6184f783a9fe89e9dc04934b6..0c647d7af0ee8d58b2bae7ca780cdbf24ecd7046 100644 (file)
@@ -182,7 +182,7 @@ void display_device_unregister(struct display_device *ddev)
        mutex_lock(&ddev->lock);
        device_unregister(ddev->dev);
        mutex_unlock(&ddev->lock);
-       // Mark device index as avaliable
+       // Mark device index as available
        mutex_lock(&allocated_dsp_lock);
        idr_remove(&allocated_dsp, ddev->idx);
        mutex_unlock(&allocated_dsp_lock);
index 70477c2e4b619cd6a2ca5562771e15243cd647a3..4eb38db36e4b4a3c9d50e6a169cd71fd088ba8cb 100644 (file)
@@ -53,6 +53,7 @@ enum {
        M_MB_7_1,       /* MacBook, 7th rev. */
        M_MB_SR,        /* MacBook, 2nd gen, (Santa Rosa) */
        M_MBA,          /* MacBook Air */
+       M_MBA_3,        /* Macbook Air, 3rd rev */
        M_MBP,          /* MacBook Pro */
        M_MBP_2,        /* MacBook Pro 2nd gen */
        M_MBP_2_2,      /* MacBook Pro 2,2nd gen */
@@ -64,43 +65,54 @@ enum {
        M_MBP_6_1,      /* MacBook Pro, 6,1th gen */
        M_MBP_6_2,      /* MacBook Pro, 6,2th gen */
        M_MBP_7_1,      /* MacBook Pro, 7,1th gen */
+       M_MBP_8_2,      /* MacBook Pro, 8,2nd gen */
        M_UNKNOWN       /* placeholder */
 };
 
+#define OVERRIDE_NONE  0x0
+#define OVERRIDE_BASE  0x1
+#define OVERRIDE_STRIDE        0x2
+#define OVERRIDE_HEIGHT        0x4
+#define OVERRIDE_WIDTH 0x8
+
 static struct efifb_dmi_info {
        char *optname;
        unsigned long base;
        int stride;
        int width;
        int height;
+       int flags;
 } dmi_list[] __initdata = {
-       [M_I17] = { "i17", 0x80010000, 1472 * 4, 1440, 900 },
-       [M_I20] = { "i20", 0x80010000, 1728 * 4, 1680, 1050 }, /* guess */
-       [M_I20_SR] = { "imac7", 0x40010000, 1728 * 4, 1680, 1050 },
-       [M_I24] = { "i24", 0x80010000, 2048 * 4, 1920, 1200 }, /* guess */
-       [M_I24_8_1] = { "imac8", 0xc0060000, 2048 * 4, 1920, 1200 },
-       [M_I24_10_1] = { "imac10", 0xc0010000, 2048 * 4, 1920, 1080 },
-       [M_I27_11_1] = { "imac11", 0xc0010000, 2560 * 4, 2560, 1440 },
-       [M_MINI]= { "mini", 0x80000000, 2048 * 4, 1024, 768 },
-       [M_MINI_3_1] = { "mini31", 0x40010000, 1024 * 4, 1024, 768 },
-       [M_MINI_4_1] = { "mini41", 0xc0010000, 2048 * 4, 1920, 1200 },
-       [M_MB] = { "macbook", 0x80000000, 2048 * 4, 1280, 800 },
-       [M_MB_5_1] = { "macbook51", 0x80010000, 2048 * 4, 1280, 800 },
-       [M_MB_6_1] = { "macbook61", 0x80010000, 2048 * 4, 1280, 800 },
-       [M_MB_7_1] = { "macbook71", 0x80010000, 2048 * 4, 1280, 800 },
-       [M_MBA] = { "mba", 0x80000000, 2048 * 4, 1280, 800 },
-       [M_MBP] = { "mbp", 0x80010000, 1472 * 4, 1440, 900 },
-       [M_MBP_2] = { "mbp2", 0, 0, 0, 0 }, /* placeholder */
-       [M_MBP_2_2] = { "mbp22", 0x80010000, 1472 * 4, 1440, 900 },
-       [M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900 },
-       [M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200 },
-       [M_MBP_5_1] = { "mbp51", 0xc0010000, 2048 * 4, 1440, 900 },
-       [M_MBP_5_2] = { "mbp52", 0xc0010000, 2048 * 4, 1920, 1200 },
-       [M_MBP_5_3] = { "mbp53", 0xd0010000, 2048 * 4, 1440, 900 },
-       [M_MBP_6_1] = { "mbp61", 0x90030000, 2048 * 4, 1920, 1200 },
-       [M_MBP_6_2] = { "mbp62", 0x90030000, 2048 * 4, 1680, 1050 },
-       [M_MBP_7_1] = { "mbp71", 0xc0010000, 2048 * 4, 1280, 800 },
-       [M_UNKNOWN] = { NULL, 0, 0, 0, 0 }
+       [M_I17] = { "i17", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
+       [M_I20] = { "i20", 0x80010000, 1728 * 4, 1680, 1050, OVERRIDE_NONE }, /* guess */
+       [M_I20_SR] = { "imac7", 0x40010000, 1728 * 4, 1680, 1050, OVERRIDE_NONE },
+       [M_I24] = { "i24", 0x80010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, /* guess */
+       [M_I24_8_1] = { "imac8", 0xc0060000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
+       [M_I24_10_1] = { "imac10", 0xc0010000, 2048 * 4, 1920, 1080, OVERRIDE_NONE },
+       [M_I27_11_1] = { "imac11", 0xc0010000, 2560 * 4, 2560, 1440, OVERRIDE_NONE },
+       [M_MINI]= { "mini", 0x80000000, 2048 * 4, 1024, 768, OVERRIDE_NONE },
+       [M_MINI_3_1] = { "mini31", 0x40010000, 1024 * 4, 1024, 768, OVERRIDE_NONE },
+       [M_MINI_4_1] = { "mini41", 0xc0010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
+       [M_MB] = { "macbook", 0x80000000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
+       [M_MB_5_1] = { "macbook51", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
+       [M_MB_6_1] = { "macbook61", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
+       [M_MB_7_1] = { "macbook71", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
+       [M_MBA] = { "mba", 0x80000000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
+       /* 11" Macbook Air 3,1 passes the wrong stride */
+       [M_MBA_3] = { "mba3", 0, 2048 * 4, 0, 0, OVERRIDE_STRIDE },
+       [M_MBP] = { "mbp", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
+       [M_MBP_2] = { "mbp2", 0, 0, 0, 0, OVERRIDE_NONE }, /* placeholder */
+       [M_MBP_2_2] = { "mbp22", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
+       [M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900, OVERRIDE_NONE },
+       [M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
+       [M_MBP_5_1] = { "mbp51", 0xc0010000, 2048 * 4, 1440, 900, OVERRIDE_NONE },
+       [M_MBP_5_2] = { "mbp52", 0xc0010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
+       [M_MBP_5_3] = { "mbp53", 0xd0010000, 2048 * 4, 1440, 900, OVERRIDE_NONE },
+       [M_MBP_6_1] = { "mbp61", 0x90030000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
+       [M_MBP_6_2] = { "mbp62", 0x90030000, 2048 * 4, 1680, 1050, OVERRIDE_NONE },
+       [M_MBP_7_1] = { "mbp71", 0xc0010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
+       [M_MBP_8_2] = { "mbp82", 0x90010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
+       [M_UNKNOWN] = { NULL, 0, 0, 0, 0, OVERRIDE_NONE }
 };
 
 static int set_system(const struct dmi_system_id *id);
@@ -138,6 +150,7 @@ static const struct dmi_system_id dmi_system_table[] __initconst = {
        EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook6,1", M_MB_6_1),
        EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook7,1", M_MB_7_1),
        EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir1,1", M_MBA),
+       EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir3,1", M_MBA_3),
        EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro1,1", M_MBP),
        EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,1", M_MBP_2),
        EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,2", M_MBP_2_2),
@@ -151,19 +164,26 @@ static const struct dmi_system_id dmi_system_table[] __initconst = {
        EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,1", M_MBP_6_1),
        EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,2", M_MBP_6_2),
        EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro7,1", M_MBP_7_1),
+       EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro8,2", M_MBP_8_2),
        {},
 };
 
+#define choose_value(dmivalue, fwvalue, field, flags) ({       \
+               typeof(fwvalue) _ret_ = fwvalue;                \
+               if ((flags) & (field))                          \
+                       _ret_ = dmivalue;                       \
+               else if ((fwvalue) == 0)                        \
+                       _ret_ = dmivalue;                       \
+               _ret_;                                          \
+       })
+
 static int set_system(const struct dmi_system_id *id)
 {
        struct efifb_dmi_info *info = id->driver_data;
-       if (info->base == 0)
-               return 0;
 
-       printk(KERN_INFO "efifb: dmi detected %s - framebuffer at %p "
-                        "(%dx%d, stride %d)\n", id->ident,
-                        (void *)info->base, info->width, info->height,
-                        info->stride);
+       if (info->base == 0 && info->height == 0 && info->width == 0
+                       && info->stride == 0)
+               return 0;
 
        /* Trust the bootloader over the DMI tables */
        if (screen_info.lfb_base == 0) {
@@ -171,40 +191,47 @@ static int set_system(const struct dmi_system_id *id)
                struct pci_dev *dev = NULL;
                int found_bar = 0;
 #endif
-               screen_info.lfb_base = info->base;
+               if (info->base) {
+                       screen_info.lfb_base = choose_value(info->base,
+                               screen_info.lfb_base, OVERRIDE_BASE,
+                               info->flags);
 
 #if defined(CONFIG_PCI)
-               /* make sure that the address in the table is actually on a
-                * VGA device's PCI BAR */
-
-               for_each_pci_dev(dev) {
-                       int i;
-                       if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
-                               continue;
-                       for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
-                               resource_size_t start, end;
-
-                               start = pci_resource_start(dev, i);
-                               if (start == 0)
-                                       break;
-                               end = pci_resource_end(dev, i);
-                               if (screen_info.lfb_base >= start &&
-                                               screen_info.lfb_base < end) {
-                                       found_bar = 1;
+                       /* make sure that the address in the table is actually
+                        * on a VGA device's PCI BAR */
+
+                       for_each_pci_dev(dev) {
+                               int i;
+                               if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
+                                       continue;
+                               for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+                                       resource_size_t start, end;
+
+                                       start = pci_resource_start(dev, i);
+                                       if (start == 0)
+                                               break;
+                                       end = pci_resource_end(dev, i);
+                                       if (screen_info.lfb_base >= start &&
+                                           screen_info.lfb_base < end) {
+                                               found_bar = 1;
+                                       }
                                }
                        }
-               }
-               if (!found_bar)
-                       screen_info.lfb_base = 0;
+                       if (!found_bar)
+                               screen_info.lfb_base = 0;
 #endif
+               }
        }
        if (screen_info.lfb_base) {
-               if (screen_info.lfb_linelength == 0)
-                       screen_info.lfb_linelength = info->stride;
-               if (screen_info.lfb_width == 0)
-                       screen_info.lfb_width = info->width;
-               if (screen_info.lfb_height == 0)
-                       screen_info.lfb_height = info->height;
+               screen_info.lfb_linelength = choose_value(info->stride,
+                       screen_info.lfb_linelength, OVERRIDE_STRIDE,
+                       info->flags);
+               screen_info.lfb_width = choose_value(info->width,
+                       screen_info.lfb_width, OVERRIDE_WIDTH,
+                       info->flags);
+               screen_info.lfb_height = choose_value(info->height,
+                       screen_info.lfb_height, OVERRIDE_HEIGHT,
+                       info->flags);
                if (screen_info.orig_video_isVGA == 0)
                        screen_info.orig_video_isVGA = VIDEO_TYPE_EFI;
        } else {
@@ -214,6 +241,13 @@ static int set_system(const struct dmi_system_id *id)
                screen_info.orig_video_isVGA = 0;
                return 0;
        }
+
+       printk(KERN_INFO "efifb: dmi detected %s - framebuffer at %p "
+                        "(%dx%d, stride %d)\n", id->ident,
+                        (void *)screen_info.lfb_base, screen_info.lfb_width,
+                        screen_info.lfb_height, screen_info.lfb_linelength);
+
+
        return 1;
 }
 
index b358d045f130bf03b55921a8e8ac01c6113f46a4..cbdb1bd77c2103b284f07cddcee95178d48a0b10 100644 (file)
@@ -456,7 +456,7 @@ static int __init ep93xxfb_alloc_videomem(struct fb_info *info)
         * There is a bug in the ep93xx framebuffer which causes problems
         * if bit 27 of the physical address is set.
         * See: http://marc.info/?l=linux-arm-kernel&m=110061245502000&w=2
-        * There does not seem to be any offical errata for this, but I
+        * There does not seem to be any official errata for this, but I
         * have confirmed the problem exists on my hardware (ep9315) at
         * least.
         */
index e2bf95370e40bd63a5743b2ee26f5b6cd302095b..e0c2284924b63b4a390aa8a4eb862fcfddac2609 100644 (file)
@@ -1507,7 +1507,7 @@ void remove_conflicting_framebuffers(struct apertures_struct *a,
                        (primary && gen_aper && gen_aper->count &&
                         gen_aper->ranges[0].base == VGA_FB_PHYS)) {
 
-                       printk(KERN_ERR "fb: conflicting fb hw usage "
+                       printk(KERN_INFO "fb: conflicting fb hw usage "
                               "%s vs %s - removing generic driver\n",
                               name, registered_fb[i]->fix.id);
                        unregister_framebuffer(registered_fb[i]);
index f4a32779168bb9cadb739ae0acd438ed3d635296..04251ce89184bbfc752e2d927f48d0f534841c7b 100644 (file)
@@ -33,7 +33,7 @@
  * for driver private data (info->par). info->par (if any) will be
  * aligned to sizeof(long).
  *
- * Returns the new structure, or NULL if an error occured.
+ * Returns the new structure, or NULL if an error occurred.
  *
  */
 struct fb_info *framebuffer_alloc(size_t size, struct device *dev)
index 1b0feb8e7244b7bf6fbc1d606673ac03d8bf7656..d0533b7aad79908f600232677166ee042201fe05 100644 (file)
@@ -45,7 +45,7 @@
  *     buffer needs an amount of memory of 1.769.472 bytes which
  *     is near to 2 MByte (the allocated address space of Zorro2).
  *     The memory is channel interleaved. That means every channel
- *     owns four VRAMs. Unfortunatly most FrameMasters II are
+ *     owns four VRAMs. Unfortunately most FrameMasters II are
  *     not assembled with memory for the alpha channel. In this
  *     case it could be possible to add the frame buffer into the
  *     normal memory pool.
index 9048f87fa8c10fd4009872dd0daae82425d1f15d..bedf5be27f05352bf01f35f945e0d07ebd5e3fcf 100644 (file)
@@ -882,7 +882,7 @@ static inline __u32 CNVT_TOHW(__u32 val, __u32 width)
  * which needs to be scaled in this function for the hardware. Things to take
  * into consideration are how many color registers, if any, are supported with
  * the current color visual. With truecolor mode no color palettes are
- * supported. Here a psuedo palette is created which we store the value in
+ * supported. Here a pseudo palette is created which we store the value in
  * pseudo_palette in struct fb_info. For pseudocolor mode we have a limited
  * color palette.
  */
index 933899dca33a9ff4bd4cba5674ec2880a6a278c9..7e7b7a9ba274ba2d33450b68b76a55ba21fab898 100644 (file)
@@ -721,7 +721,7 @@ static int gbefb_set_par(struct fb_info *info)
 
           Tiles have the advantage that they can be allocated individually in
           memory. However, this mapping is not linear at all, which is not
-          really convienient. In order to support linear addressing, the GBE
+          really convenient. In order to support linear addressing, the GBE
           DMA hardware is fooled into thinking the screen is only one tile
           large and but has a greater height, so that the DMA transfer covers
           the same region.
index be8ccb47ebe039e11a84c32892ddfa046a000df8..cfcd8090f3134e4b9c1132eab909a9e1ddfba3d7 100644 (file)
@@ -117,7 +117,7 @@ enum gp_registers {
 };
 
 #define GP_BLT_STATUS_CE               (1 << 4)        /* cmd buf empty */
-#define GP_BLT_STATUS_PB               (1 << 0)        /* primative busy */
+#define GP_BLT_STATUS_PB               (1 << 0)        /* primitive busy */
 
 
 /* Display Controller registers (table 6-47 from the data book) */
index f5bedee4310a9ac8a3f50abb6852f924ae23c71f..7672d2ea9b357309e5c4f0ffd96ca1eeaf69b63d 100644 (file)
@@ -112,7 +112,7 @@ static inline int wait_for_engine_idle(struct fb_info *info)
  * @par: pointer to i810fb_par structure
  *
  * DESCRIPTION:
- * Checks/waits for sufficent space in ringbuffer of size
+ * Checks/waits for sufficient space in ringbuffer of size
  * space.  Returns the tail of the buffer
  */ 
 static inline u32 begin_iring(struct fb_info *info, u32 space)
index a8c9713413e66938e4cc432a5d738e0adc54449b..0aeeaa10708b2e70f9266ad45e7f969632e6eff3 100644 (file)
@@ -417,7 +417,7 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg,
        /***************** Horizontal decimation/scaling ***************************/
 
        /*
-        * Now we handle the horizontal case, this is a simplified verison of
+        * Now we handle the horizontal case, this is a simplified version of
         * the vertical case in that we decimate by factors of 2.  as we are
         * working in words we should always be able to decimate by these
         * factors.  as we always have to have a buffer which is aligned to a
index 244549e6136825981e67a64a483d4993e9f5b1d3..5d62698825892f857211acd61e5ffa0982b77e91 100644 (file)
@@ -16,7 +16,7 @@
 
 /*
  * Macros that access memory mapped card registers in PCI space
- * Add an appropraite section for your OS or processor architecture.
+ * Add an appropriate section for your OS or processor architecture.
  */
 #if defined(__KERNEL__)
 #include <asm/page.h>
index c6ed7801efe2e15ec4b5ba2e6c23488ed9211a3a..1e6e45b57b78ec683e27844e4cb81caaa124779a 100644 (file)
@@ -46,7 +46,7 @@ void DAC1064_global_restore(struct matrox_fb_info *minfo);
 #define      M1064_XDVICLKCTRL_DVILOOPCTL       0x30
        /* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */
 #define      M1064_XDVICLKCTRL_C2DVICLKEN       0x40
-       /* P1PLL loop filter bandwith selection */
+       /* P1PLL loop filter bandwidth selection */
 #define      M1064_XDVICLKCTRL_P1LOOPBWDTCTL    0x80
 #define M1064_XCURCOL0RED      0x08
 #define M1064_XCURCOL0GREEN    0x09
index 835aaaae6b9658eed7f22a4322e27254d01f1bf6..9a44cec394b51598146c5d4626107bebe0d185ed 100644 (file)
@@ -387,7 +387,7 @@ static int Ti3026_init(struct matrox_fb_info *minfo, struct my_timming *m)
                        hw->DACreg[POS3026_XMISCCTRL] = TVP3026_XMISCCTRL_DAC_PUP | TVP3026_XMISCCTRL_DAC_8BIT | TVP3026_XMISCCTRL_PSEL_DIS | TVP3026_XMISCCTRL_PSEL_LOW;
                        break;
                case 16:
-                       /* XLATCHCTRL should be _4_1 / _2_1... Why is not? (_2_1 is used everytime) */
+                       /* XLATCHCTRL should be _4_1 / _2_1... Why is not? (_2_1 is used every time) */
                        hw->DACreg[POS3026_XTRUECOLORCTRL] = (minfo->fbcon.var.green.length == 5) ? (TVP3026_XTRUECOLORCTRL_DIRECTCOLOR | TVP3026_XTRUECOLORCTRL_ORGB_1555) : (TVP3026_XTRUECOLORCTRL_DIRECTCOLOR | TVP3026_XTRUECOLORCTRL_RGB_565);
                        hw->DACreg[POS3026_XMUXCTRL] = muxctrl | TVP3026_XMUXCTRL_PIXEL_16BIT;
                        hw->DACreg[POS3026_XCLKCTRL] = TVP3026_XCLKCTRL_SRC_PLL | TVP3026_XCLKCTRL_DIV2;
@@ -399,7 +399,7 @@ static int Ti3026_init(struct matrox_fb_info *minfo, struct my_timming *m)
                        hw->DACreg[POS3026_XCLKCTRL] = TVP3026_XCLKCTRL_SRC_PLL | TVP3026_XCLKCTRL_DIV4;
                        break;
                case 32:
-                       /* XLATCHCTRL should be _2_1 / _1_1... Why is not? (_2_1 is used everytime) */
+                       /* XLATCHCTRL should be _2_1 / _1_1... Why is not? (_2_1 is used every time) */
                        hw->DACreg[POS3026_XMUXCTRL] = muxctrl | TVP3026_XMUXCTRL_PIXEL_32BIT;
                        break;
                default:
index 5ce6fa6e59f0b98c362a99419eb65d253b8f7cf9..44bf8d4a216b41afb4d15244b1370c8848285700 100644 (file)
@@ -621,7 +621,7 @@ static int matroxfb_decode_var(const struct matrox_fb_info *minfo,
                var->yoffset = var->yres_virtual - var->yres;
 
        if (bpp == 16 && var->green.length == 5) {
-               bpp--; /* an artifical value - 15 */
+               bpp--; /* an artificial value - 15 */
        }
 
        for (rgbt = table; rgbt->bpp < bpp; rgbt++);
index f96a471cb1a86d018e6ce435063ecf89b2159383..11ed57bb704e4cf644c29f1624cc3920848d5e9d 100644 (file)
@@ -12,7 +12,7 @@
 #undef MATROXFB_DEBUG
 
 /* heavy debugging: */
-/* -- logs putc[s], so everytime a char is displayed, it's logged */
+/* -- logs putc[s], so every time a char is displayed, it's logged */
 #undef MATROXFB_DEBUG_HEAVY
 
 /* This one _could_ cause infinite loops */
index 6c23aa3d3b897a4ac3547fa0ced35085922e9973..bc7c9300f2766f3eb9318b7e90a0d03f53824224 100644 (file)
@@ -8,7 +8,7 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- *   Auther:
+ *   Author:
  *        Wang Qiang(rurality.linux@gmail.com)  2009/12/16
  */
 
index 15e7f1912af9bd0bc40578aa3164d96bb2acabad..196fa2e7f438dbf2fd3cbc1ebbd4d813917a8bbb 100644 (file)
@@ -64,7 +64,7 @@ config FB_OMAP_MANUAL_UPDATE
        depends on FB_OMAP && FB_OMAP_LCDC_EXTERNAL
        help
          Say Y here, if your user-space applications are capable of
-         notifying the frame buffer driver when a change has occured in
+         notifying the frame buffer driver when a change has occurred in
          the frame buffer content and thus a reload of the image data to
          the external frame buffer is required. If unsure, say N.
 
index 0d44f070ef364f2e8cf583b38378da416dd1c113..a981def8099ad99ef761a28392bd229de234750d 100644 (file)
@@ -587,7 +587,7 @@ static void get_edid_timing_data(u8 *edid)
        struct hdmi_cm cm;
        struct omap_video_timings edid_timings;
 
-       /* seach block 0, there are 4 DTDs arranged in priority order */
+       /* search block 0, there are 4 DTDs arranged in priority order */
        for (count = 0; count < EDID_SIZE_BLOCK0_TIMING_DESCRIPTOR; count++) {
                current_descriptor_addrs =
                        EDID_DESCRIPTOR_BLOCK0_ADDRESS +
index cf4beb9dc9bb5a9603679eaa35dc0e7e652d1fb1..0283c7021090d05661a3cdf9c0724f986364530f 100644 (file)
@@ -25,7 +25,7 @@
 
 /*
  * WARNING: This controller is attached to System Bus 2 of the PXA which
- * needs its arbiter to be enabled explictly (CKENB & 1<<9).
+ * needs its arbiter to be enabled explicitly (CKENB & 1<<9).
  * There is currently no way to do this from Linux, so you need to teach
  * your bootloader for now.
  */
index a2e5b5100ab4edd8a8756905a0fbeefdd4091c4f..0f4e8c942f9e082e7410de7983ac28f81576c5f3 100644 (file)
@@ -1648,7 +1648,9 @@ pxafb_freq_transition(struct notifier_block *nb, unsigned long val, void *data)
 
        switch (val) {
        case CPUFREQ_PRECHANGE:
-               if (!fbi->overlay[0].usage && !fbi->overlay[1].usage)
+#ifdef CONFIG_FB_PXA_OVERLAY
+               if (!(fbi->overlay[0].usage || fbi->overlay[1].usage))
+#endif
                        set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE);
                break;
 
index 6817d187d46eac726b7cd44349b51ae480188155..3b6cdcac8f1a6a930dd49399dd4af97a9a835a8b 100644 (file)
@@ -48,7 +48,7 @@
 #undef writel
 #define writel(v, r) do { \
        printk(KERN_DEBUG "%s: %08x => %p\n", __func__, (unsigned int)v, r); \
-       __raw_writel(v, r); } while(0)
+       __raw_writel(v, r); } while (0)
 #endif /* FB_S3C_DEBUG_REGWRITE */
 
 /* irq_flags bits */
@@ -518,7 +518,7 @@ static int s3c_fb_set_par(struct fb_info *info)
 
                data = VIDTCON2_LINEVAL(var->yres - 1) |
                       VIDTCON2_HOZVAL(var->xres - 1);
-               writel(data, regs +sfb->variant.vidtcon + 8 );
+               writel(data, regs + sfb->variant.vidtcon + 8);
        }
 
        /* write the buffer address */
@@ -1304,6 +1304,7 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
 
 static int __devinit s3c_fb_probe(struct platform_device *pdev)
 {
+       const struct platform_device_id *platid;
        struct s3c_fb_driverdata *fbdrv;
        struct device *dev = &pdev->dev;
        struct s3c_fb_platdata *pd;
@@ -1312,7 +1313,8 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
        int win;
        int ret = 0;
 
-       fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)->driver_data;
+       platid = platform_get_device_id(pdev);
+       fbdrv = (struct s3c_fb_driverdata *)platid->driver_data;
 
        if (fbdrv->variant.nr_windows > S3C_FB_MAX_WIN) {
                dev_err(dev, "too many windows, cannot attach\n");
index ddedad9cd06971aa94a598f4a8930185e43982c7..c4482f2e5799130f946cb8daf80c63a295a83ee1 100644 (file)
@@ -71,9 +71,9 @@ static const int s3_memsizes[] = {4096, 0, 3072, 8192, 2048, 6144, 1024, 512};
 
 static const char * const s3_names[] = {"S3 Unknown", "S3 Trio32", "S3 Trio64", "S3 Trio64V+",
                        "S3 Trio64UV+", "S3 Trio64V2/DX", "S3 Trio64V2/GX",
-                       "S3 Plato/PX", "S3 Aurora64VP", "S3 Virge",
+                       "S3 Plato/PX", "S3 Aurora64V+", "S3 Virge",
                        "S3 Virge/VX", "S3 Virge/DX", "S3 Virge/GX",
-                       "S3 Virge/GX2", "S3 Virge/GX2P", "S3 Virge/GX2P",
+                       "S3 Virge/GX2", "S3 Virge/GX2+", "",
                        "S3 Trio3D/1X", "S3 Trio3D/2X", "S3 Trio3D/2X",
                        "S3 Trio3D"};
 
@@ -90,9 +90,8 @@ static const char * const s3_names[] = {"S3 Unknown", "S3 Trio32", "S3 Trio64",
 #define CHIP_988_VIRGE_VX      0x0A
 #define CHIP_375_VIRGE_DX      0x0B
 #define CHIP_385_VIRGE_GX      0x0C
-#define CHIP_356_VIRGE_GX2     0x0D
-#define CHIP_357_VIRGE_GX2P    0x0E
-#define CHIP_359_VIRGE_GX2P    0x0F
+#define CHIP_357_VIRGE_GX2     0x0D
+#define CHIP_359_VIRGE_GX2P    0x0E
 #define CHIP_360_TRIO3D_1X     0x10
 #define CHIP_362_TRIO3D_2X     0x11
 #define CHIP_368_TRIO3D_2X     0x12
@@ -359,7 +358,9 @@ static void s3_set_pixclock(struct fb_info *info, u32 pixclock)
        vga_w(par->state.vgabase, VGA_MIS_W, regval | VGA_MIS_ENB_PLL_LOAD);
 
        /* Set S3 clock registers */
-       if (par->chip == CHIP_360_TRIO3D_1X ||
+       if (par->chip == CHIP_357_VIRGE_GX2 ||
+           par->chip == CHIP_359_VIRGE_GX2P ||
+           par->chip == CHIP_360_TRIO3D_1X ||
            par->chip == CHIP_362_TRIO3D_2X ||
            par->chip == CHIP_368_TRIO3D_2X) {
                vga_wseq(par->state.vgabase, 0x12, (n - 2) | ((r & 3) << 6));   /* n and two bits of r */
@@ -560,7 +561,9 @@ static int s3fb_set_par(struct fb_info *info)
        pr_debug("fb%d: offset register       : %d\n", info->node, offset_value);
        svga_wcrt_multi(par->state.vgabase, s3_offset_regs, offset_value);
 
-       if (par->chip != CHIP_360_TRIO3D_1X &&
+       if (par->chip != CHIP_357_VIRGE_GX2 &&
+           par->chip != CHIP_359_VIRGE_GX2P &&
+           par->chip != CHIP_360_TRIO3D_1X &&
            par->chip != CHIP_362_TRIO3D_2X &&
            par->chip != CHIP_368_TRIO3D_2X) {
                vga_wcrt(par->state.vgabase, 0x54, 0x18); /* M parameter */
@@ -604,7 +607,9 @@ static int s3fb_set_par(struct fb_info *info)
                vga_wcrt(par->state.vgabase, 0x66, 0x90);
        }
 
-       if (par->chip == CHIP_360_TRIO3D_1X ||
+       if (par->chip == CHIP_357_VIRGE_GX2 ||
+           par->chip == CHIP_359_VIRGE_GX2P ||
+           par->chip == CHIP_360_TRIO3D_1X ||
            par->chip == CHIP_362_TRIO3D_2X ||
            par->chip == CHIP_368_TRIO3D_2X ||
            par->chip == CHIP_365_TRIO3D    ||
@@ -617,8 +622,7 @@ static int s3fb_set_par(struct fb_info *info)
                vga_wcrt(par->state.vgabase, 0x66, 0x81);
        }
 
-       if (par->chip == CHIP_356_VIRGE_GX2  ||
-           par->chip == CHIP_357_VIRGE_GX2P ||
+       if (par->chip == CHIP_357_VIRGE_GX2  ||
            par->chip == CHIP_359_VIRGE_GX2P ||
            par->chip == CHIP_360_TRIO3D_1X ||
            par->chip == CHIP_362_TRIO3D_2X ||
@@ -674,6 +678,8 @@ static int s3fb_set_par(struct fb_info *info)
                pr_debug("fb%d: 8 bit pseudocolor\n", info->node);
                svga_wcrt_mask(par->state.vgabase, 0x50, 0x00, 0x30);
                if (info->var.pixclock > 20000 ||
+                   par->chip == CHIP_357_VIRGE_GX2 ||
+                   par->chip == CHIP_359_VIRGE_GX2P ||
                    par->chip == CHIP_360_TRIO3D_1X ||
                    par->chip == CHIP_362_TRIO3D_2X ||
                    par->chip == CHIP_368_TRIO3D_2X)
@@ -702,7 +708,9 @@ static int s3fb_set_par(struct fb_info *info)
                } else {
                        svga_wcrt_mask(par->state.vgabase, 0x50, 0x10, 0x30);
                        svga_wcrt_mask(par->state.vgabase, 0x67, 0x30, 0xF0);
-                       if (par->chip != CHIP_360_TRIO3D_1X &&
+                       if (par->chip != CHIP_357_VIRGE_GX2 &&
+                           par->chip != CHIP_359_VIRGE_GX2P &&
+                           par->chip != CHIP_360_TRIO3D_1X &&
                            par->chip != CHIP_362_TRIO3D_2X &&
                            par->chip != CHIP_368_TRIO3D_2X)
                                hmul = 2;
@@ -727,7 +735,9 @@ static int s3fb_set_par(struct fb_info *info)
                } else {
                        svga_wcrt_mask(par->state.vgabase, 0x50, 0x10, 0x30);
                        svga_wcrt_mask(par->state.vgabase, 0x67, 0x50, 0xF0);
-                       if (par->chip != CHIP_360_TRIO3D_1X &&
+                       if (par->chip != CHIP_357_VIRGE_GX2 &&
+                           par->chip != CHIP_359_VIRGE_GX2P &&
+                           par->chip != CHIP_360_TRIO3D_1X &&
                            par->chip != CHIP_362_TRIO3D_2X &&
                            par->chip != CHIP_368_TRIO3D_2X)
                                hmul = 2;
@@ -1069,6 +1079,16 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
                        info->screen_size = 2 << 20;
                        break;
                }
+       } else if (par->chip == CHIP_357_VIRGE_GX2 ||
+                  par->chip == CHIP_359_VIRGE_GX2P) {
+               switch ((regval & 0xC0) >> 6) {
+               case 1: /* 4MB */
+                       info->screen_size = 4 << 20;
+                       break;
+               case 3: /* 2MB */
+                       info->screen_size = 2 << 20;
+                       break;
+               }
        } else
                info->screen_size = s3_memsizes[regval >> 5] << 10;
        info->fix.smem_len = info->screen_size;
@@ -1268,8 +1288,8 @@ static struct pci_device_id s3_devices[] __devinitdata = {
        {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x5631), .driver_data = CHIP_325_VIRGE},
        {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x883D), .driver_data = CHIP_988_VIRGE_VX},
        {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A01), .driver_data = CHIP_XXX_VIRGE_DXGX},
-       {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A10), .driver_data = CHIP_356_VIRGE_GX2},
-       {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A11), .driver_data = CHIP_357_VIRGE_GX2P},
+       {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A10), .driver_data = CHIP_357_VIRGE_GX2},
+       {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A11), .driver_data = CHIP_359_VIRGE_GX2P},
        {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A12), .driver_data = CHIP_359_VIRGE_GX2P},
        {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A13), .driver_data = CHIP_36X_TRIO3D_1X_2X},
        {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8904), .driver_data = CHIP_365_TRIO3D},
index b16e6138fdd46a971ee20c542a65a32a634bf0c4..bb71fea07284e547cbf2632141748b8155691a74 100644 (file)
@@ -159,8 +159,7 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan,
                else
                        dev_warn(&chan->par->pcidev->dev,
                                 "Failed to register I2C bus %s.\n", name);
-       } else
-               chan->par = NULL;
+       }
 
        return rc;
 }
@@ -170,9 +169,8 @@ void savagefb_create_i2c_busses(struct fb_info *info)
        struct savagefb_par *par = info->par;
        par->chan.par   = par;
 
-       switch(info->fix.accel) {
-       case FB_ACCEL_PROSAVAGE_DDRK:
-       case FB_ACCEL_PROSAVAGE_PM:
+       switch (par->chip) {
+       case S3_PROSAVAGE:
                par->chan.reg         = CR_SERIAL2;
                par->chan.ioaddr      = par->mmio.vbase;
                par->chan.algo.setsda = prosavage_gpio_setsda;
@@ -180,7 +178,7 @@ void savagefb_create_i2c_busses(struct fb_info *info)
                par->chan.algo.getsda = prosavage_gpio_getsda;
                par->chan.algo.getscl = prosavage_gpio_getscl;
                break;
-       case FB_ACCEL_SAVAGE4:
+       case S3_SAVAGE4:
                par->chan.reg = CR_SERIAL1;
                if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40))
                        par->chan.reg = CR_SERIAL2;
@@ -190,8 +188,8 @@ void savagefb_create_i2c_busses(struct fb_info *info)
                par->chan.algo.getsda = prosavage_gpio_getsda;
                par->chan.algo.getscl = prosavage_gpio_getscl;
                break;
-       case FB_ACCEL_SAVAGE2000:
-               par->chan.reg         = 0xff20;
+       case S3_SAVAGE2000:
+               par->chan.reg         = MM_SERIAL1;
                par->chan.ioaddr      = par->mmio.vbase;
                par->chan.algo.setsda = savage4_gpio_setsda;
                par->chan.algo.setscl = savage4_gpio_setscl;
index e4c3f214eb8ea6ad81397a38479e15c4e7275391..4e9490c19d7d3a7a07a3a87360de200ff2fb808e 100644 (file)
@@ -153,7 +153,7 @@ struct savage_reg {
        unsigned char CRTC[25];       /* Crtc Controller */
        unsigned char Sequencer[5];   /* Video Sequencer */
        unsigned char Graphics[9];    /* Video Graphics */
-       unsigned char Attribute[21];  /* Video Atribute */
+       unsigned char Attribute[21];  /* Video Attribute */
 
        unsigned int mode, refresh;
        unsigned char SR08, SR0E, SR0F;
index 487911e2926cbc6a8924a477240fc083943bf8c5..a2dc1a7ec7586bd3e5ae6d1689ccf71490317ed1 100644 (file)
@@ -385,7 +385,7 @@ SavageSetup2DEngine(struct savagefb_par  *par)
        BCI_SEND(GlobalBitmapDescriptor);
 
        /*
-        * I don't know why, sending this twice fixes the intial black screen,
+        * I don't know why, sending this twice fixes the initial black screen,
         * prevents X from crashing at least in Toshiba laptops with SavageIX.
         * --Tony
         */
@@ -2211,7 +2211,7 @@ static int __devinit savagefb_probe(struct pci_dev* dev,
                goto failed_mmio;
 
        video_len = savage_init_hw(par);
-       /* FIXME: cant be negative */
+       /* FIXME: can't be negative */
        if (video_len < 0) {
                err = video_len;
                goto failed_mmio;
index 757665bc500f1c009540673ed497f556f1a26024..9bcc61b4ef149a258e6159a9728ffebac2bd5daf 100644 (file)
@@ -643,7 +643,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
                        continue;
 
                board_cfg = &ch->cfg.board_cfg;
-               if (try_module_get(board_cfg->owner) && board_cfg->display_on) {
+               if (board_cfg->display_on && try_module_get(board_cfg->owner)) {
                        board_cfg->display_on(board_cfg->board_data, ch->info);
                        module_put(board_cfg->owner);
                }
@@ -688,7 +688,7 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
                }
 
                board_cfg = &ch->cfg.board_cfg;
-               if (try_module_get(board_cfg->owner) && board_cfg->display_off) {
+               if (board_cfg->display_off && try_module_get(board_cfg->owner)) {
                        board_cfg->display_off(board_cfg->board_data);
                        module_put(board_cfg->owner);
                }
@@ -1032,6 +1032,49 @@ static int sh_mobile_check_var(struct fb_var_screeninfo *var, struct fb_info *in
        return 0;
 }
 
+/*
+ * Screen blanking. Behavior is as follows:
+ * FB_BLANK_UNBLANK: screen unblanked, clocks enabled
+ * FB_BLANK_NORMAL: screen blanked, clocks enabled
+ * FB_BLANK_VSYNC,
+ * FB_BLANK_HSYNC,
+ * FB_BLANK_POWEROFF: screen blanked, clocks disabled
+ */
+static int sh_mobile_lcdc_blank(int blank, struct fb_info *info)
+{
+       struct sh_mobile_lcdc_chan *ch = info->par;
+       struct sh_mobile_lcdc_priv *p = ch->lcdc;
+
+       /* blank the screen? */
+       if (blank > FB_BLANK_UNBLANK && ch->blank_status == FB_BLANK_UNBLANK) {
+               struct fb_fillrect rect = {
+                       .width = info->var.xres,
+                       .height = info->var.yres,
+               };
+               sh_mobile_lcdc_fillrect(info, &rect);
+       }
+       /* turn clocks on? */
+       if (blank <= FB_BLANK_NORMAL && ch->blank_status > FB_BLANK_NORMAL) {
+               sh_mobile_lcdc_clk_on(p);
+       }
+       /* turn clocks off? */
+       if (blank > FB_BLANK_NORMAL && ch->blank_status <= FB_BLANK_NORMAL) {
+               /* make sure the screen is updated with the black fill before
+                * switching the clocks off. one vsync is not enough since
+                * blanking may occur in the middle of a refresh. deferred io
+                * mode will reenable the clocks and update the screen in time,
+                * so it does not need this. */
+               if (!info->fbdefio) {
+                       sh_mobile_wait_for_vsync(info);
+                       sh_mobile_wait_for_vsync(info);
+               }
+               sh_mobile_lcdc_clk_off(p);
+       }
+
+       ch->blank_status = blank;
+       return 0;
+}
+
 static struct fb_ops sh_mobile_lcdc_ops = {
        .owner          = THIS_MODULE,
        .fb_setcolreg   = sh_mobile_lcdc_setcolreg,
@@ -1040,6 +1083,7 @@ static struct fb_ops sh_mobile_lcdc_ops = {
        .fb_fillrect    = sh_mobile_lcdc_fillrect,
        .fb_copyarea    = sh_mobile_lcdc_copyarea,
        .fb_imageblit   = sh_mobile_lcdc_imageblit,
+       .fb_blank       = sh_mobile_lcdc_blank,
        .fb_pan_display = sh_mobile_fb_pan_display,
        .fb_ioctl       = sh_mobile_ioctl,
        .fb_open        = sh_mobile_open,
@@ -1254,7 +1298,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb,
 
        switch(action) {
        case FB_EVENT_SUSPEND:
-               if (try_module_get(board_cfg->owner) && board_cfg->display_off) {
+               if (board_cfg->display_off && try_module_get(board_cfg->owner)) {
                        board_cfg->display_off(board_cfg->board_data);
                        module_put(board_cfg->owner);
                }
@@ -1267,7 +1311,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb,
                mutex_unlock(&ch->open_lock);
 
                /* HDMI must be enabled before LCDC configuration */
-               if (try_module_get(board_cfg->owner) && board_cfg->display_on) {
+               if (board_cfg->display_on && try_module_get(board_cfg->owner)) {
                        board_cfg->display_on(board_cfg->board_data, info);
                        module_put(board_cfg->owner);
                }
index 4635eed63eee0f90e60f505935d8803c4a4c436e..f16cb5645a13fd12b8c95881dd51a5daab6352ad 100644 (file)
@@ -37,6 +37,7 @@ struct sh_mobile_lcdc_chan {
        struct completion vsync_completion;
        struct fb_var_screeninfo display_var;
        int use_count;
+       int blank_status;
        struct mutex open_lock;         /* protects the use counter */
 };
 
index 46d1a64fe80d0eb569912ead930aaa76d6734f05..56ef6b3a9851ca6f26a41b7be16a4c9678dacc9c 100644 (file)
@@ -265,7 +265,7 @@ static unsigned long sm501fb_ps_to_hz(unsigned long psvalue)
        return (unsigned long)numerator;
 }
 
-/* sm501fb_hz_to_ps is identical to the oposite transform */
+/* sm501fb_hz_to_ps is identical to the opposite transform */
 
 #define sm501fb_hz_to_ps(x) sm501fb_ps_to_hz(x)
 
@@ -1719,7 +1719,7 @@ static int sm501fb_init_fb(struct fb_info *fb,
               (head == HEAD_CRT) ? &sm501fb_ops_crt : &sm501fb_ops_pnl,
               sizeof(struct fb_ops));
 
-       /* update ops dependant on what we've been passed */
+       /* update ops dependent on what we've been passed */
 
        if ((pd->flags & SM501FB_FLAG_USE_HWCURSOR) == 0)
                par->ops.fb_cursor = NULL;
index 2ab704118c44f09a458d38641fe55c6574656db1..2301c275d63a60c033446637a3ebe5b169998a43 100644 (file)
@@ -221,7 +221,7 @@ static int __sst_wait_idle(u8 __iomem *vbase)
        while(1) {
                if (__sst_read(vbase, STATUS) & STATUS_FBI_BUSY) {
                        f_dddprintk("status: busy\n");
-/* FIXME basicaly, this is a busy wait. maybe not that good. oh well;
+/* FIXME basically, this is a busy wait. maybe not that good. oh well;
  * this is a small loop after all.
  * Or maybe we should use mdelay() or udelay() here instead ? */
                        count = 0;
@@ -501,7 +501,7 @@ static int sstfb_set_par(struct fb_info *info)
        }
 
        if (IS_VOODOO2(par)) {
-               /* voodoo2 has 32 pixel wide tiles , BUT stange things
+               /* voodoo2 has 32 pixel wide tiles , BUT strange things
                   happen with odd number of tiles */
                par->tiles_in_X = (info->var.xres + 63 ) / 64 * 2;
        } else {
@@ -920,11 +920,11 @@ static int __devinit sst_detect_ti(struct fb_info *info)
  * we get the 1st byte (M value) of preset f1,f7 and fB
  * why those 3 ? mmmh... for now, i'll do it the glide way...
  * and ask questions later. anyway, it seems that all the freq registers are
- * realy at their default state (cf specs) so i ask again, why those 3 regs ?
+ * really at their default state (cf specs) so i ask again, why those 3 regs ?
  * mmmmh.. it seems that's much more ugly than i thought. we use f0 and fA for
  * pll programming, so in fact, we *hope* that the f1, f7 & fB won't be
  * touched...
- * is it realy safe ? how can i reset this ramdac ? geee...
+ * is it really safe ? how can i reset this ramdac ? geee...
  */
 static int __devinit sst_detect_ics(struct fb_info *info)
 {
index 7fe5be4bc70e4ad3ff073ef576cb9c52533e40ed..addf7b615ef8d2e88a8130a73ce1f5aac12032db 100644 (file)
@@ -79,7 +79,7 @@ struct sti_glob_cfg_ext {
         u8 curr_mon;                   /* current monitor configured */
         u8 friendly_boot;              /* in friendly boot mode */
        s16 power;                      /* power calculation (in Watts) */
-       s32 freq_ref;                   /* frequency refrence */
+       s32 freq_ref;                   /* frequency reference */
        u32 sti_mem_addr;               /* pointer to global sti memory (size=sti_mem_request) */
        u32 future_ptr;                 /* pointer to future data */
 };
index 3ee5e63cfa4fd5ba919f49c70289b92db23b31d9..a99b994c9b6b121441937acf5ce6d6143cfc5d0e 100644 (file)
@@ -877,12 +877,12 @@ static void tdfxfb_fillrect(struct fb_info *info,
        else
                tdfx_rop = TDFX_ROP_XOR;
 
-       /* asume always rect->height < 4096 */
+       /* assume always rect->height < 4096 */
        if (dy + rect->height > 4095) {
                dstbase = stride * dy;
                dy = 0;
        }
-       /* asume always rect->width < 4096 */
+       /* assume always rect->width < 4096 */
        if (dx + rect->width > 4095) {
                dstbase += dx * bpp >> 3;
                dx = 0;
@@ -915,22 +915,22 @@ static void tdfxfb_copyarea(struct fb_info *info,
        u32 dstbase = 0;
        u32 srcbase = 0;
 
-       /* asume always area->height < 4096 */
+       /* assume always area->height < 4096 */
        if (sy + area->height > 4095) {
                srcbase = stride * sy;
                sy = 0;
        }
-       /* asume always area->width < 4096 */
+       /* assume always area->width < 4096 */
        if (sx + area->width > 4095) {
                srcbase += sx * bpp >> 3;
                sx = 0;
        }
-       /* asume always area->height < 4096 */
+       /* assume always area->height < 4096 */
        if (dy + area->height > 4095) {
                dstbase = stride * dy;
                dy = 0;
        }
-       /* asume always area->width < 4096 */
+       /* assume always area->width < 4096 */
        if (dx + area->width > 4095) {
                dstbase += dx * bpp >> 3;
                dx = 0;
@@ -1003,12 +1003,12 @@ static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image)
 #else
        srcfmt = 0x400000;
 #endif
-       /* asume always image->height < 4096 */
+       /* assume always image->height < 4096 */
        if (dy + image->height > 4095) {
                dstbase = stride * dy;
                dy = 0;
        }
-       /* asume always image->width < 4096 */
+       /* assume always image->width < 4096 */
        if (dx + image->width > 4095) {
                dstbase += dx * bpp >> 3;
                dx = 0;
@@ -1124,7 +1124,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
                 * lower half (least significant 64 bits) of a 128 bit word
                 * and pattern 1 the upper half. If you examine the data of
                 * the cursor image the graphics card uses then from the
-                * begining you see line one of pattern 0, line one of
+                * beginning you see line one of pattern 0, line one of
                 * pattern 1, line two of pattern 0, line two of pattern 1,
                 * etc etc. The linear stride for the cursor is always 16 bytes
                 * (128 bits) which is the maximum cursor width times two for
index 9710bf8caeaeb13db419928dffd3a0aa5c925fcb..0c341d739604b8857c91e6a99db4a01cdac09ca5 100644 (file)
@@ -359,7 +359,7 @@ tmiofb_acc_wait(struct fb_info *info, unsigned int ccs)
 {
        struct tmiofb_par *par = info->par;
        /*
-        * This code can be called whith interrupts disabled.
+        * This code can be called with interrupts disabled.
         * So instead of relaying on irq to trigger the event,
         * poll the state till the necessary command is executed.
         */
index 2c8364e9b632dafec12912307e55393ba7dc2fcd..68041d9dc2602e263474e7892c24b20c30e151b0 100644 (file)
@@ -769,7 +769,7 @@ static int dlfb_ops_ioctl(struct fb_info *info, unsigned int cmd,
 
                /*
                 * If we have a damage-aware client, turn fb_defio "off"
-                * To avoid perf imact of unecessary page fault handling.
+                * To avoid perf imact of unnecessary page fault handling.
                 * Done by resetting the delay for this fb_info to a very
                 * long period. Pages will become writable and stay that way.
                 * Reset to normal value when all clients have closed this fb.
index 28ccab44a39181c5f4f5caa7f7d58d2e2bf689e0..53b2c5aae06791becfea4721a3d0ad702e24f109 100644 (file)
@@ -152,7 +152,7 @@ static inline int setop(int op)
 }
 
 /* Set the Enable Set/Reset Register and return its old value.  
-   The code here always uses value 0xf for thsi register. */
+   The code here always uses value 0xf for this register. */
 static inline int setsr(int sr)
 {
        int oldsr;
index 781f3aa66b42712d989c015617000c020291b82a..29d70244a21fe53c75d314b61221e1b9dba29c0a 100644 (file)
@@ -139,7 +139,6 @@ struct chip_information {
 
 struct crt_setting_information {
        int iga_path;
-       int refresh_rate;
 };
 
 struct tmds_setting_information {
index 5728fd76bc11f691e144e004592dc0e3da6debb8..dc4c778877ceee51fdf128abe304f0fb3ce9a350 100644 (file)
@@ -2002,13 +2002,15 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
        int i;
        int index = 0;
        int h_addr, v_addr;
-       u32 pll_D_N, clock;
+       u32 pll_D_N, clock, refresh = viafb_refresh;
+
+       if (viafb_SAMM_ON && set_iga == IGA2)
+               refresh = viafb_refresh1;
 
        for (i = 0; i < video_mode->mode_array; i++) {
                index = i;
 
-               if (crt_table[i].refresh_rate == viaparinfo->
-                       crt_setting_info->refresh_rate)
+               if (crt_table[i].refresh_rate == refresh)
                        break;
        }
 
@@ -2019,7 +2021,7 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
        if ((viafb_LCD_ON | viafb_DVI_ON)
            && video_mode->crtc[0].crtc.hor_addr == 640
            && video_mode->crtc[0].crtc.ver_addr == 480
-           && viaparinfo->crt_setting_info->refresh_rate == 60) {
+           && refresh == 60) {
                /* The border is 8 pixels. */
                crt_reg.hor_blank_start = crt_reg.hor_blank_start - 8;
 
@@ -2070,7 +2072,6 @@ void __devinit viafb_init_chip_info(int chip_type)
        init_lvds_chip_info();
 
        viaparinfo->crt_setting_info->iga_path = IGA1;
-       viaparinfo->crt_setting_info->refresh_rate = viafb_refresh;
 
        /*Set IGA path for each device */
        viafb_set_iga_path();
@@ -2083,13 +2084,9 @@ void __devinit viafb_init_chip_info(int chip_type)
                viaparinfo->lvds_setting_info->lcd_mode;
 }
 
-void viafb_update_device_setting(int hres, int vres,
-       int bpp, int vmode_refresh, int flag)
+void viafb_update_device_setting(int hres, int vres, int bpp, int flag)
 {
        if (flag == 0) {
-               viaparinfo->crt_setting_info->refresh_rate =
-                       vmode_refresh;
-
                viaparinfo->tmds_setting_info->h_active = hres;
                viaparinfo->tmds_setting_info->v_active = vres;
 
index 7295263299f793c3d89c8194098bed7dd6a2f74a..8858593405aab122049c5d4a1365741287e7b98b 100644 (file)
@@ -949,8 +949,7 @@ void __devinit viafb_init_chip_info(int chip_type);
 void __devinit viafb_init_dac(int set_iga);
 int viafb_get_pixclock(int hres, int vres, int vmode_refresh);
 int viafb_get_refresh(int hres, int vres, u32 float_refresh);
-void viafb_update_device_setting(int hres, int vres, int bpp,
-                          int vmode_refresh, int flag);
+void viafb_update_device_setting(int hres, int vres, int bpp, int flag);
 
 void viafb_set_iga_path(void);
 void viafb_set_primary_color_register(u8 index, u8 red, u8 green, u8 blue);
index d05ccb62b55f7774282b775cb88eb8e0dbac6a75..35458a5eadc8e0f870c87a7180a683a4b4980c48 100644 (file)
@@ -174,7 +174,7 @@ void viafb_set_gamma_table(int bpp, unsigned int *gamma_table)
        }
 
        /* If adjust Gamma value in SAMM, fill IGA1,
-          IGA2 Gamma table simultanous. */
+          IGA2 Gamma table simultaneous. */
        /* Switch to IGA2 Gamma Table */
        if ((active_device_amount > 1) &&
                !((viaparinfo->chip_info->gfx_chip_name ==
index 1670ba82143f0fb7f526c9945ef7d8215d5b208c..f23be1708c141e4485be26728b2b24e5c45a9190 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __VIAUTILITY_H__
 #define __VIAUTILITY_H__
 
-/* These functions are used to get infomation about device's state */
+/* These functions are used to get information about device's state */
 void viafb_get_device_support_state(u32 *support_state);
 void viafb_get_device_connect_state(u32 *connect_state);
 bool viafb_lcd_get_support_expand_state(u32 xres, u32 yres);
index f555b891cc723ca1009cda0a0bc6cb97b9785e20..a542bed086e24900af1ee2f85ab670a2015ef4ff 100644 (file)
@@ -182,13 +182,24 @@ static int viafb_release(struct fb_info *info, int user)
        return 0;
 }
 
+static inline int get_var_refresh(struct fb_var_screeninfo *var)
+{
+       u32 htotal, vtotal;
+
+       htotal = var->left_margin + var->xres + var->right_margin
+               + var->hsync_len;
+       vtotal = var->upper_margin + var->yres + var->lower_margin
+               + var->vsync_len;
+       return PICOS2KHZ(var->pixclock) * 1000 / (htotal * vtotal);
+}
+
 static int viafb_check_var(struct fb_var_screeninfo *var,
        struct fb_info *info)
 {
-       int htotal, vtotal, depth;
+       int depth, refresh;
        struct VideoModeTable *vmode_entry;
        struct viafb_par *ppar = info->par;
-       u32 long_refresh, line;
+       u32 line;
 
        DEBUG_MSG(KERN_INFO "viafb_check_var!\n");
        /* Sanity check */
@@ -231,17 +242,11 @@ static int viafb_check_var(struct fb_var_screeninfo *var,
        /* Based on var passed in to calculate the refresh,
         * because our driver use some modes special.
         */
-       htotal = var->xres + var->left_margin +
-       var->right_margin + var->hsync_len;
-       vtotal = var->yres + var->upper_margin +
-               var->lower_margin + var->vsync_len;
-       long_refresh = 1000000000UL / var->pixclock * 1000;
-       long_refresh /= (htotal * vtotal);
-
-       viafb_refresh = viafb_get_refresh(var->xres, var->yres, long_refresh);
+       refresh = viafb_get_refresh(var->xres, var->yres,
+               get_var_refresh(var));
 
        /* Adjust var according to our driver's own table */
-       viafb_fill_var_timing_info(var, viafb_refresh, vmode_entry);
+       viafb_fill_var_timing_info(var, refresh, vmode_entry);
        if (var->accel_flags & FB_ACCELF_TEXT &&
                !ppar->shared->vdev->engine_mmio)
                var->accel_flags = 0;
@@ -253,12 +258,13 @@ static int viafb_set_par(struct fb_info *info)
 {
        struct viafb_par *viapar = info->par;
        struct VideoModeTable *vmode_entry, *vmode_entry1 = NULL;
+       int refresh;
        DEBUG_MSG(KERN_INFO "viafb_set_par!\n");
 
        viafb_update_fix(info);
        viapar->depth = fb_get_color_depth(&info->var, &info->fix);
        viafb_update_device_setting(viafbinfo->var.xres, viafbinfo->var.yres,
-               viafbinfo->var.bits_per_pixel, viafb_refresh, 0);
+               viafbinfo->var.bits_per_pixel, 0);
 
        vmode_entry = viafb_get_mode(viafbinfo->var.xres, viafbinfo->var.yres);
        if (viafb_dual_fb) {
@@ -266,7 +272,7 @@ static int viafb_set_par(struct fb_info *info)
                        viafbinfo1->var.yres);
                viafb_update_device_setting(viafbinfo1->var.xres,
                        viafbinfo1->var.yres, viafbinfo1->var.bits_per_pixel,
-                       viafb_refresh1, 1);
+                       1);
        } else if (viafb_SAMM_ON == 1) {
                DEBUG_MSG(KERN_INFO
                "viafb_second_xres = %d, viafb_second_yres = %d, bpp = %d\n",
@@ -275,14 +281,19 @@ static int viafb_set_par(struct fb_info *info)
                        viafb_second_yres);
 
                viafb_update_device_setting(viafb_second_xres,
-                       viafb_second_yres, viafb_bpp1, viafb_refresh1, 1);
+                       viafb_second_yres, viafb_bpp1, 1);
        }
 
+       refresh = viafb_get_refresh(info->var.xres, info->var.yres,
+               get_var_refresh(&info->var));
        if (vmode_entry) {
-               if (viafb_dual_fb && viapar->iga_path == IGA2)
+               if (viafb_dual_fb && viapar->iga_path == IGA2) {
                        viafb_bpp1 = info->var.bits_per_pixel;
-               else
+                       viafb_refresh1 = refresh;
+               } else {
                        viafb_bpp = info->var.bits_per_pixel;
+                       viafb_refresh = refresh;
+               }
 
                if (info->var.accel_flags & FB_ACCELF_TEXT)
                        info->flags &= ~FBINFO_HWACCEL_DISABLED;
@@ -1795,14 +1806,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
        default_var.xres_virtual = default_xres;
        default_var.yres_virtual = default_yres;
        default_var.bits_per_pixel = viafb_bpp;
-       default_var.pixclock =
-           viafb_get_pixclock(default_xres, default_yres, viafb_refresh);
-       default_var.left_margin = (default_xres >> 3) & 0xf8;
-       default_var.right_margin = 32;
-       default_var.upper_margin = 16;
-       default_var.lower_margin = 4;
-       default_var.hsync_len = default_var.left_margin;
-       default_var.vsync_len = 4;
+       viafb_fill_var_timing_info(&default_var, viafb_get_refresh(
+               default_var.xres, default_var.yres, viafb_refresh),
+               viafb_get_mode(default_var.xres, default_var.yres));
        viafb_setup_fixinfo(&viafbinfo->fix, viaparinfo);
        viafbinfo->var = default_var;
 
@@ -1841,15 +1847,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
                default_var.xres_virtual = viafb_second_virtual_xres;
                default_var.yres_virtual = viafb_second_virtual_yres;
                default_var.bits_per_pixel = viafb_bpp1;
-               default_var.pixclock =
-                   viafb_get_pixclock(viafb_second_xres, viafb_second_yres,
-                   viafb_refresh);
-               default_var.left_margin = (viafb_second_xres >> 3) & 0xf8;
-               default_var.right_margin = 32;
-               default_var.upper_margin = 16;
-               default_var.lower_margin = 4;
-               default_var.hsync_len = default_var.left_margin;
-               default_var.vsync_len = 4;
+               viafb_fill_var_timing_info(&default_var, viafb_get_refresh(
+                       default_var.xres, default_var.yres, viafb_refresh1),
+                       viafb_get_mode(default_var.xres, default_var.yres));
 
                viafb_setup_fixinfo(&viafbinfo1->fix, viaparinfo1);
                viafb_check_var(&default_var, viafbinfo1);
@@ -2004,22 +2004,24 @@ static int __init viafb_setup(char *options)
  */
 int __init viafb_init(void)
 {
-       u32 dummy;
+       u32 dummy_x, dummy_y;
 #ifndef MODULE
        char *option = NULL;
        if (fb_get_options("viafb", &option))
                return -ENODEV;
        viafb_setup(option);
 #endif
-       if (parse_mode(viafb_mode, &dummy, &dummy)
-               || parse_mode(viafb_mode1, &dummy, &dummy)
+       if (parse_mode(viafb_mode, &dummy_x, &dummy_y)
+               || !viafb_get_mode(dummy_x, dummy_y)
+               || parse_mode(viafb_mode1, &dummy_x, &dummy_y)
+               || !viafb_get_mode(dummy_x, dummy_y)
                || viafb_bpp < 0 || viafb_bpp > 32
                || viafb_bpp1 < 0 || viafb_bpp1 > 32
                || parse_active_dev())
                return -EINVAL;
 
        printk(KERN_INFO
-       "VIA Graphics Intergration Chipset framebuffer %d.%d initializing\n",
+       "VIA Graphics Integration Chipset framebuffer %d.%d initializing\n",
               VERSION_MAJOR, VERSION_MINOR);
        return 0;
 }
index d8b12c32e3ef3d2b76b96439341d0e218653a73e..c8be8af0cc6d5331983c814d2f9ad159ee6ee1aa 100644 (file)
@@ -1306,7 +1306,7 @@ static void w100_init_lcd(struct w100fb_par *par)
        union graphic_v_disp_u graphic_v_disp;
        union crtc_total_u crtc_total;
 
-       /* w3200 doesnt like undefined bits being set so zero register values first */
+       /* w3200 doesn't like undefined bits being set so zero register values first */
 
        active_h_disp.val = 0;
        active_h_disp.f.active_h_start=mode->left_margin;
index 4fb5b2bf23486c0bee03f0dd3de196aff7f40549..4bcc8b82640be13af193478aaa2c4699bc609d2b 100644 (file)
@@ -590,15 +590,10 @@ static struct virtio_config_ops virtio_pci_config_ops = {
 
 static void virtio_pci_release_dev(struct device *_d)
 {
-       struct virtio_device *dev = container_of(_d, struct virtio_device, dev);
+       struct virtio_device *dev = container_of(_d, struct virtio_device,
+                                                dev);
        struct virtio_pci_device *vp_dev = to_vp_device(dev);
-       struct pci_dev *pci_dev = vp_dev->pci_dev;
 
-       vp_del_vqs(dev);
-       pci_set_drvdata(pci_dev, NULL);
-       pci_iounmap(pci_dev, vp_dev->ioaddr);
-       pci_release_regions(pci_dev);
-       pci_disable_device(pci_dev);
        kfree(vp_dev);
 }
 
@@ -681,6 +676,12 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
        struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
 
        unregister_virtio_device(&vp_dev->vdev);
+
+       vp_del_vqs(&vp_dev->vdev);
+       pci_set_drvdata(pci_dev, NULL);
+       pci_iounmap(pci_dev, vp_dev->ioaddr);
+       pci_release_regions(pci_dev);
+       pci_disable_device(pci_dev);
 }
 
 #ifdef CONFIG_PM
index cc2f73e03475b620053765b373c8b1a39fc08762..b0043fb26a4d5dd8fcc9a2b7b66a18b3b44053b0 100644 (file)
@@ -371,6 +371,7 @@ void *virtqueue_detach_unused_buf(struct virtqueue *_vq)
                /* detach_buf clears data, so grab it now. */
                buf = vq->data[i];
                detach_buf(vq, i);
+               vq->vring.avail->idx--;
                END_USE(vq);
                return buf;
        }
index 38e96ab90945c8c821e60a18f907dee53a9eddc7..5ef385bfed18bedb5c7c6c5852af82449c1adc90 100644 (file)
@@ -545,7 +545,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte)
                return;
        }
 
-       /* Second write, data transfered. Release the module */
+       /* Second write, data transferred. Release the module */
        if (hdq_data->init_trans > 1) {
                omap_hdq_put(hdq_data);
                ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
index b69d71482554a2f6a0518b6879a9860188f39251..1b0f98bc51b5fbdaa9288bbc436fd4316dea38a0 100644 (file)
@@ -933,7 +933,7 @@ config PNX833X_WDT
        depends on SOC_PNX8335
        help
          Hardware driver for the PNX833x's watchdog. This is a
-         watchdog timer that will reboot the machine after a programable
+         watchdog timer that will reboot the machine after a programmable
          timer has expired and no process has written to /dev/watchdog during
          that time.
 
index d520bf9c3355878eb4cfa2073161fc19ab53d061..3f8608b922a7df6531b948de47437961ad8223be 100644 (file)
@@ -4,7 +4,7 @@
 
 # Only one watchdog can succeed. We probe the ISA/PCI/USB based
 # watchdog-cards first, then the architecture specific watchdog
-# drivers and then the architecture independant "softdog" driver.
+# drivers and then the architecture independent "softdog" driver.
 # This means that if your ISA/PCI/USB card isn't detected that
 # you can fall back to an architecture specific driver and if
 # that also fails then you can fall back to the software watchdog
@@ -153,7 +153,7 @@ obj-$(CONFIG_WATCHDOG_CP1XXX)               += cpwd.o
 # Xen
 obj-$(CONFIG_XEN_WDT) += xen_wdt.o
 
-# Architecture Independant
+# Architecture Independent
 obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o
 obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o
 obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o
index 2ffce4d75443821a5b2cedf1c3aceded9b57ee5a..b6a2b58cbe64a0bf05bac1761fcb47090adb35b0 100644 (file)
@@ -26,7 +26,7 @@
  *     Theory of Operation:
  *             The Watch-Dog Timer is provided to ensure that standalone
  *             Systems can always recover from catastrophic conditions that
- *             caused the CPU to crash. This condition may have occured by
+ *             caused the CPU to crash. This condition may have occurred by
  *             external EMI or a software bug. When the CPU stops working
  *             correctly, hardware on the board will either perform a hardware
  *             reset (cold boot) or a non-maskable interrupt (NMI) to bring the
index 35a0d12dad7351340fdd1cfc8b84cb221556e059..5fd020da7c5534f32f7823d966ee49610ac9d31a 100644 (file)
@@ -35,6 +35,7 @@
  *     document number 324645-001, 324646-001: Cougar Point (CPT)
  *     document number TBD                   : Patsburg (PBG)
  *     document number TBD                   : DH89xxCC
+ *     document number TBD                   : Panther Point
  */
 
 /*
@@ -153,6 +154,38 @@ enum iTCO_chipsets {
        TCO_PBG1,       /* Patsburg */
        TCO_PBG2,       /* Patsburg */
        TCO_DH89XXCC,   /* DH89xxCC */
+       TCO_PPT0,       /* Panther Point */
+       TCO_PPT1,       /* Panther Point */
+       TCO_PPT2,       /* Panther Point */
+       TCO_PPT3,       /* Panther Point */
+       TCO_PPT4,       /* Panther Point */
+       TCO_PPT5,       /* Panther Point */
+       TCO_PPT6,       /* Panther Point */
+       TCO_PPT7,       /* Panther Point */
+       TCO_PPT8,       /* Panther Point */
+       TCO_PPT9,       /* Panther Point */
+       TCO_PPT10,      /* Panther Point */
+       TCO_PPT11,      /* Panther Point */
+       TCO_PPT12,      /* Panther Point */
+       TCO_PPT13,      /* Panther Point */
+       TCO_PPT14,      /* Panther Point */
+       TCO_PPT15,      /* Panther Point */
+       TCO_PPT16,      /* Panther Point */
+       TCO_PPT17,      /* Panther Point */
+       TCO_PPT18,      /* Panther Point */
+       TCO_PPT19,      /* Panther Point */
+       TCO_PPT20,      /* Panther Point */
+       TCO_PPT21,      /* Panther Point */
+       TCO_PPT22,      /* Panther Point */
+       TCO_PPT23,      /* Panther Point */
+       TCO_PPT24,      /* Panther Point */
+       TCO_PPT25,      /* Panther Point */
+       TCO_PPT26,      /* Panther Point */
+       TCO_PPT27,      /* Panther Point */
+       TCO_PPT28,      /* Panther Point */
+       TCO_PPT29,      /* Panther Point */
+       TCO_PPT30,      /* Panther Point */
+       TCO_PPT31,      /* Panther Point */
 };
 
 static struct {
@@ -244,6 +277,38 @@ static struct {
        {"Patsburg", 2},
        {"Patsburg", 2},
        {"DH89xxCC", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
+       {"Panther Point", 2},
        {NULL, 0}
 };
 
@@ -363,6 +428,38 @@ static DEFINE_PCI_DEVICE_TABLE(iTCO_wdt_pci_tbl) = {
        { ITCO_PCI_DEVICE(0x1d40,                               TCO_PBG1)},
        { ITCO_PCI_DEVICE(0x1d41,                               TCO_PBG2)},
        { ITCO_PCI_DEVICE(0x2310,                               TCO_DH89XXCC)},
+       { ITCO_PCI_DEVICE(0x1e40,                               TCO_PPT0)},
+       { ITCO_PCI_DEVICE(0x1e41,                               TCO_PPT1)},
+       { ITCO_PCI_DEVICE(0x1e42,                               TCO_PPT2)},
+       { ITCO_PCI_DEVICE(0x1e43,                               TCO_PPT3)},
+       { ITCO_PCI_DEVICE(0x1e44,                               TCO_PPT4)},
+       { ITCO_PCI_DEVICE(0x1e45,                               TCO_PPT5)},
+       { ITCO_PCI_DEVICE(0x1e46,                               TCO_PPT6)},
+       { ITCO_PCI_DEVICE(0x1e47,                               TCO_PPT7)},
+       { ITCO_PCI_DEVICE(0x1e48,                               TCO_PPT8)},
+       { ITCO_PCI_DEVICE(0x1e49,                               TCO_PPT9)},
+       { ITCO_PCI_DEVICE(0x1e4a,                               TCO_PPT10)},
+       { ITCO_PCI_DEVICE(0x1e4b,                               TCO_PPT11)},
+       { ITCO_PCI_DEVICE(0x1e4c,                               TCO_PPT12)},
+       { ITCO_PCI_DEVICE(0x1e4d,                               TCO_PPT13)},
+       { ITCO_PCI_DEVICE(0x1e4e,                               TCO_PPT14)},
+       { ITCO_PCI_DEVICE(0x1e4f,                               TCO_PPT15)},
+       { ITCO_PCI_DEVICE(0x1e50,                               TCO_PPT16)},
+       { ITCO_PCI_DEVICE(0x1e51,                               TCO_PPT17)},
+       { ITCO_PCI_DEVICE(0x1e52,                               TCO_PPT18)},
+       { ITCO_PCI_DEVICE(0x1e53,                               TCO_PPT19)},
+       { ITCO_PCI_DEVICE(0x1e54,                               TCO_PPT20)},
+       { ITCO_PCI_DEVICE(0x1e55,                               TCO_PPT21)},
+       { ITCO_PCI_DEVICE(0x1e56,                               TCO_PPT22)},
+       { ITCO_PCI_DEVICE(0x1e57,                               TCO_PPT23)},
+       { ITCO_PCI_DEVICE(0x1e58,                               TCO_PPT24)},
+       { ITCO_PCI_DEVICE(0x1e59,                               TCO_PPT25)},
+       { ITCO_PCI_DEVICE(0x1e5a,                               TCO_PPT26)},
+       { ITCO_PCI_DEVICE(0x1e5b,                               TCO_PPT27)},
+       { ITCO_PCI_DEVICE(0x1e5c,                               TCO_PPT28)},
+       { ITCO_PCI_DEVICE(0x1e5d,                               TCO_PPT29)},
+       { ITCO_PCI_DEVICE(0x1e5e,                               TCO_PPT30)},
+       { ITCO_PCI_DEVICE(0x1e5f,                               TCO_PPT31)},
        { 0, },                 /* End of list */
 };
 MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl);
index 6709d723e017a0965ac179ccd6513c127c152e51..528bceb220fd5783383d8575e99ff2099fdbdd95 100644 (file)
@@ -195,7 +195,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev)
 
        if (!ofdev->dev.of_match)
                return -EINVAL;
-       wdt_type = match->data;
+       wdt_type = ofdev->dev.of_match->data;
 
        if (!freq || freq == -1)
                return -EINVAL;
index 139d773300c6f29feb8bb3128919027736347c3d..b7c139051575d45e722ecdd2cff8d89090f10475 100644 (file)
@@ -49,7 +49,7 @@
 #define WDT_DATA_IO_PORT    (WDT_INDEX_IO_PORT+1)
 #define SWC_LDN             0x04
 #define SIOCFG2             0x22       /* Serial IO register */
-#define WDCTL               0x10       /* Watchdog-Timer-Controll-Register */
+#define WDCTL               0x10       /* Watchdog-Timer-Control-Register */
 #define WDTO                0x11       /* Watchdog timeout register */
 #define WDCFG               0x12       /* Watchdog config register */
 
index 67ddeb1c830a31d15289268f49aec797881e68eb..ff11504c376e56848f7f7d180c09c69bd3e179b4 100644 (file)
@@ -273,7 +273,7 @@ static int __init sbc7240_wdt_init(void)
 
        /* The IO port 0x043 used to disable the watchdog
         * is already claimed by the system timer, so we
-        * cant request_region() it ...*/
+        * can't request_region() it ...*/
 
        if (timeout < 1 || timeout > SBC7240_MAX_TIMEOUT) {
                timeout = SBC7240_TIMEOUT;
index b61ab1c54293552af1005e508a9311053efee1a6..c7cf4b01f58dc8eec3c16ad6e7cb91b2770e2392 100644 (file)
@@ -201,7 +201,7 @@ static void sch311x_wdt_get_status(int *status)
        spin_lock(&sch311x_wdt_data.io_lock);
 
        /* -- Watchdog timer control --
-        * Bit 0   Status Bit: 0 = Timer counting, 1 = Timeout occured
+        * Bit 0   Status Bit: 0 = Timer counting, 1 = Timeout occurred
         * Bit 1   Reserved
         * Bit 2   Force Timeout: 1 = Forces WD timeout event (self-cleaning)
         * Bit 3   P20 Force Timeout enabled:
index 4e3e7eb5919c95b1ddf9327dfab21b5fc9d61b90..db84f2322d1ad1ef4d69f12ed2dd2936a03d4b16 100644 (file)
@@ -50,7 +50,7 @@
  * necssary.
  *
  * As a result of this timing problem, the only modes that are particularly
- * feasible are the 4096 and the 2048 divisors, which yeild 5.25 and 2.62ms
+ * feasible are the 4096 and the 2048 divisors, which yield 5.25 and 2.62ms
  * overflow periods respectively.
  *
  * Also, since we can't really expect userspace to be responsive enough
index df88cfa05f35c59d02be9622c804ea09edb7346c..e97b0499bd0da23497fd7bc115c940dbd1c5d3c6 100644 (file)
@@ -191,7 +191,7 @@ static inline void wdt_timer_conf(unsigned char conf)
 static inline void wdt_timer_ctrl(unsigned char reg)
 {
        /* -- Watchdog timer control --
-        * Bit 0   Status Bit: 0 = Timer counting, 1 = Timeout occured
+        * Bit 0   Status Bit: 0 = Timer counting, 1 = Timeout occurred
         * Bit 1   Power LED Toggle: 0 = Disable Toggle, 1 = Toggle at 1 Hz
         * Bit 2   Force Timeout: 1 = Forces WD timeout event (self-cleaning)
         * Bit 3   P20 Force Timeout enabled:
index 0a0efe713bc8a0618f1c6b1082ef4a58bead8a65..0d80e08b6439331e726fa8fe1c9f3c13e2deb0a5 100644 (file)
@@ -90,7 +90,7 @@ static void wdt_setload(unsigned int timeout)
        /*
         * sp805 runs counter with given value twice, after the end of first
         * counter it gives an interrupt and then starts counter again. If
-        * interrupt already occured then it resets the system. This is why
+        * interrupt already occurred then it resets the system. This is why
         * load is half of what should be required.
         */
        load = div_u64(rate, 2) * timeout - 1;
index 036343ba204eaab47758641c8657cb37bba08f54..33167b43ac7e4ad9ae981b53ad6ee9069d453296 100644 (file)
@@ -5,7 +5,7 @@
  * domain gets 1024 event channels, but NR_IRQ is not that large, we
  * must dynamically map irqs<->event channels.  The event channels
  * interface with the rest of the kernel by defining a xen interrupt
- * chip.  When an event is recieved, it is mapped to an irq and sent
+ * chip.  When an event is received, it is mapped to an irq and sent
  * through the normal interrupt processing path.
  *
  * There are four kinds of events which can be mapped to an event
@@ -416,7 +416,7 @@ static int __must_check xen_allocate_irq_dynamic(void)
 #ifdef CONFIG_X86_IO_APIC
        /*
         * For an HVM guest or domain 0 which see "real" (emulated or
-        * actual repectively) GSIs we allocate dynamic IRQs
+        * actual respectively) GSIs we allocate dynamic IRQs
         * e.g. those corresponding to event channels or MSIs
         * etc. from the range above those "real" GSIs to avoid
         * collisions.
@@ -912,8 +912,7 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn,
                              unsigned long irqflags,
                              const char *devname, void *dev_id)
 {
-       unsigned int irq;
-       int retval;
+       int irq, retval;
 
        irq = bind_evtchn_to_irq(evtchn);
        if (irq < 0)
@@ -955,8 +954,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
                            irq_handler_t handler,
                            unsigned long irqflags, const char *devname, void *dev_id)
 {
-       unsigned int irq;
-       int retval;
+       int irq, retval;
 
        irq = bind_virq_to_irq(virq, cpu);
        if (irq < 0)
index 95143dd6904daf459286079e769532f666014603..a2eee574784e801aec6463a8317267c24f928201 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/sysrq.h>
 #include <linux/stop_machine.h>
 #include <linux/freezer.h>
+#include <linux/syscore_ops.h>
 
 #include <xen/xen.h>
 #include <xen/xenbus.h>
@@ -61,7 +62,7 @@ static void xen_post_suspend(int cancelled)
        xen_mm_unpin_all();
 }
 
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
 static int xen_suspend(void *data)
 {
        struct suspend_info *si = data;
@@ -70,8 +71,13 @@ static int xen_suspend(void *data)
        BUG_ON(!irqs_disabled());
 
        err = sysdev_suspend(PMSG_FREEZE);
+       if (!err) {
+               err = syscore_suspend();
+               if (err)
+                       sysdev_resume();
+       }
        if (err) {
-               printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n",
+               printk(KERN_ERR "xen_suspend: system core suspend failed: %d\n",
                        err);
                return err;
        }
@@ -95,6 +101,7 @@ static int xen_suspend(void *data)
                xen_timer_resume();
        }
 
+       syscore_resume();
        sysdev_resume();
 
        return 0;
@@ -173,7 +180,7 @@ out:
 #endif
        shutting_down = SHUTDOWN_INVALID;
 }
-#endif /* CONFIG_HIBERNATION */
+#endif /* CONFIG_HIBERNATE_CALLBACKS */
 
 struct shutdown_handler {
        const char *command;
@@ -202,7 +209,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
                { "poweroff",   do_poweroff },
                { "halt",       do_poweroff },
                { "reboot",     do_reboot   },
-#ifdef CONFIG_HIBERNATION
+#ifdef CONFIG_HIBERNATE_CALLBACKS
                { "suspend",    do_suspend  },
 #endif
                {NULL, NULL},
index 0ee594569dcceb60f4ff795f48fe83c87003fd47..85b67ffa2a43eb184250b1a167eae215deaa0399 100644 (file)
@@ -286,11 +286,9 @@ static struct p9_fid *v9fs_fid_clone_with_uid(struct dentry *dentry, uid_t uid)
 
 struct p9_fid *v9fs_writeback_fid(struct dentry *dentry)
 {
-       int err, flags;
+       int err;
        struct p9_fid *fid;
-       struct v9fs_session_info *v9ses;
 
-       v9ses = v9fs_dentry2v9ses(dentry);
        fid = v9fs_fid_clone_with_uid(dentry, 0);
        if (IS_ERR(fid))
                goto error_out;
@@ -299,17 +297,8 @@ struct p9_fid *v9fs_writeback_fid(struct dentry *dentry)
         * dirty pages. We always request for the open fid in read-write
         * mode so that a partial page write which result in page
         * read can work.
-        *
-        * we don't have a tsyncfs operation for older version
-        * of protocol. So make sure the write back fid is
-        * opened in O_SYNC mode.
         */
-       if (!v9fs_proto_dotl(v9ses))
-               flags = O_RDWR | O_SYNC;
-       else
-               flags = O_RDWR;
-
-       err = p9_client_open(fid, flags);
+       err = p9_client_open(fid, O_RDWR);
        if (err < 0) {
                p9_client_clunk(fid);
                fid = ERR_PTR(err);
index 9665c2b840e6442a11b550f59da6ddf0ed73f256..e5ebedfc5ed8d345e366cd1482978a2ff2f2e4ae 100644 (file)
@@ -116,7 +116,6 @@ struct v9fs_session_info {
        struct list_head slist; /* list of sessions registered with v9fs */
        struct backing_dev_info bdi;
        struct rw_semaphore rename_sem;
-       struct p9_fid *root_fid; /* Used for file system sync */
 };
 
 /* cache_validity flags */
index b6a3b9f7fe4d85c428ce6ccacf3d84826075d24c..e022890c6f403283b4da166b7c56e4a27e14b975 100644 (file)
@@ -126,7 +126,9 @@ static int v9fs_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
                        retval = v9fs_refresh_inode_dotl(fid, inode);
                else
                        retval = v9fs_refresh_inode(fid, inode);
-               if (retval <= 0)
+               if (retval == -ENOENT)
+                       return 0;
+               if (retval < 0)
                        return retval;
        }
 out_valid:
index ffbb113d5f33537892fd001dd0d75af9e6d1fd69..82a7c38ddad0dec0c9ecded6fcc4d3eb93a50350 100644 (file)
@@ -811,7 +811,7 @@ v9fs_vfs_follow_link_dotl(struct dentry *dentry, struct nameidata *nd)
        fid = v9fs_fid_lookup(dentry);
        if (IS_ERR(fid)) {
                __putname(link);
-               link = ERR_PTR(PTR_ERR(fid));
+               link = ERR_CAST(fid);
                goto ndset;
        }
        retval = p9_client_readlink(fid, &target);
index f3eed3383e4fdeb87dddc890ad732925f0245319..feef6cdc1fd22d23ba45a8f98f2f21ec0a0dc95a 100644 (file)
@@ -154,6 +154,7 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
                retval = PTR_ERR(inode);
                goto release_sb;
        }
+
        root = d_alloc_root(inode);
        if (!root) {
                iput(inode);
@@ -185,21 +186,10 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
                p9stat_free(st);
                kfree(st);
        }
-       v9fs_fid_add(root, fid);
        retval = v9fs_get_acl(inode, fid);
        if (retval)
                goto release_sb;
-       /*
-        * Add the root fid to session info. This is used
-        * for file system sync. We want a cloned fid here
-        * so that we can do a sync_filesystem after a
-        * shrink_dcache_for_umount
-        */
-       v9ses->root_fid = v9fs_fid_clone(root);
-       if (IS_ERR(v9ses->root_fid)) {
-               retval = PTR_ERR(v9ses->root_fid);
-               goto release_sb;
-       }
+       v9fs_fid_add(root, fid);
 
        P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
        return dget(sb->s_root);
@@ -210,11 +200,15 @@ close_session:
        v9fs_session_close(v9ses);
        kfree(v9ses);
        return ERR_PTR(retval);
+
 release_sb:
        /*
-        * we will do the session_close and root dentry
-        * release in the below call.
+        * we will do the session_close and root dentry release
+        * in the below call. But we need to clunk fid, because we haven't
+        * attached the fid to dentry so it won't get clunked
+        * automatically.
         */
+       p9_client_clunk(fid);
        deactivate_locked_super(sb);
        return ERR_PTR(retval);
 }
@@ -232,7 +226,7 @@ static void v9fs_kill_super(struct super_block *s)
        P9_DPRINTK(P9_DEBUG_VFS, " %p\n", s);
 
        kill_anon_super(s);
-       p9_client_clunk(v9ses->root_fid);
+
        v9fs_session_cancel(v9ses);
        v9fs_session_close(v9ses);
        kfree(v9ses);
@@ -285,14 +279,6 @@ done:
        return res;
 }
 
-static int v9fs_sync_fs(struct super_block *sb, int wait)
-{
-       struct v9fs_session_info *v9ses = sb->s_fs_info;
-
-       P9_DPRINTK(P9_DEBUG_VFS, "v9fs_sync_fs: super_block %p\n", sb);
-       return p9_client_sync_fs(v9ses->root_fid);
-}
-
 static int v9fs_drop_inode(struct inode *inode)
 {
        struct v9fs_session_info *v9ses;
@@ -307,6 +293,51 @@ static int v9fs_drop_inode(struct inode *inode)
        return 1;
 }
 
+static int v9fs_write_inode(struct inode *inode,
+                           struct writeback_control *wbc)
+{
+       int ret;
+       struct p9_wstat wstat;
+       struct v9fs_inode *v9inode;
+       /*
+        * send an fsync request to server irrespective of
+        * wbc->sync_mode.
+        */
+       P9_DPRINTK(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode);
+       v9inode = V9FS_I(inode);
+       if (!v9inode->writeback_fid)
+               return 0;
+       v9fs_blank_wstat(&wstat);
+
+       ret = p9_client_wstat(v9inode->writeback_fid, &wstat);
+       if (ret < 0) {
+               __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
+               return ret;
+       }
+       return 0;
+}
+
+static int v9fs_write_inode_dotl(struct inode *inode,
+                                struct writeback_control *wbc)
+{
+       int ret;
+       struct v9fs_inode *v9inode;
+       /*
+        * send an fsync request to server irrespective of
+        * wbc->sync_mode.
+        */
+       P9_DPRINTK(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode);
+       v9inode = V9FS_I(inode);
+       if (!v9inode->writeback_fid)
+               return 0;
+       ret = p9_client_fsync(v9inode->writeback_fid, 0);
+       if (ret < 0) {
+               __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
+               return ret;
+       }
+       return 0;
+}
+
 static const struct super_operations v9fs_super_ops = {
        .alloc_inode = v9fs_alloc_inode,
        .destroy_inode = v9fs_destroy_inode,
@@ -314,17 +345,18 @@ static const struct super_operations v9fs_super_ops = {
        .evict_inode = v9fs_evict_inode,
        .show_options = generic_show_options,
        .umount_begin = v9fs_umount_begin,
+       .write_inode = v9fs_write_inode,
 };
 
 static const struct super_operations v9fs_super_ops_dotl = {
        .alloc_inode = v9fs_alloc_inode,
        .destroy_inode = v9fs_destroy_inode,
-       .sync_fs = v9fs_sync_fs,
        .statfs = v9fs_statfs,
        .drop_inode = v9fs_drop_inode,
        .evict_inode = v9fs_evict_inode,
        .show_options = generic_show_options,
        .umount_begin = v9fs_umount_begin,
+       .write_inode = v9fs_write_inode_dotl,
 };
 
 struct file_system_type v9fs_fs_type = {
index d1a5932bb0f183c63d855f48c91cceac4b3662ca..6935f05202acb502e8ae9554665ad7ae5f03270f 100644 (file)
@@ -51,7 +51,7 @@ static DEFINE_RWLOCK(adfs_map_lock);
 
 /*
  * This is fun.  We need to load up to 19 bits from the map at an
- * arbitary bit alignment.  (We're limited to 19 bits by F+ version 2).
+ * arbitrary bit alignment.  (We're limited to 19 bits by F+ version 2).
  */
 #define GET_FRAG_ID(_map,_start,_idmask)                               \
        ({                                                              \
index 0fb315dd4d2a77758da40ae63ce9252282305fcd..577763c3d88bb51e1ee41003298a4b545a1bb2fb 100644 (file)
@@ -98,7 +98,7 @@ static uint16_t afs_cell_cache_get_key(const void *cookie_netfs_data,
 }
 
 /*
- * provide new auxilliary cache data
+ * provide new auxiliary cache data
  */
 static uint16_t afs_cell_cache_get_aux(const void *cookie_netfs_data,
                                       void *buffer, uint16_t bufmax)
@@ -117,7 +117,7 @@ static uint16_t afs_cell_cache_get_aux(const void *cookie_netfs_data,
 }
 
 /*
- * check that the auxilliary data indicates that the entry is still valid
+ * check that the auxiliary data indicates that the entry is still valid
  */
 static enum fscache_checkaux afs_cell_cache_check_aux(void *cookie_netfs_data,
                                                      const void *buffer,
@@ -150,7 +150,7 @@ static uint16_t afs_vlocation_cache_get_key(const void *cookie_netfs_data,
 }
 
 /*
- * provide new auxilliary cache data
+ * provide new auxiliary cache data
  */
 static uint16_t afs_vlocation_cache_get_aux(const void *cookie_netfs_data,
                                            void *buffer, uint16_t bufmax)
@@ -172,7 +172,7 @@ static uint16_t afs_vlocation_cache_get_aux(const void *cookie_netfs_data,
 }
 
 /*
- * check that the auxilliary data indicates that the entry is still valid
+ * check that the auxiliary data indicates that the entry is still valid
  */
 static
 enum fscache_checkaux afs_vlocation_cache_check_aux(void *cookie_netfs_data,
@@ -283,7 +283,7 @@ static void afs_vnode_cache_get_attr(const void *cookie_netfs_data,
 }
 
 /*
- * provide new auxilliary cache data
+ * provide new auxiliary cache data
  */
 static uint16_t afs_vnode_cache_get_aux(const void *cookie_netfs_data,
                                        void *buffer, uint16_t bufmax)
@@ -309,7 +309,7 @@ static uint16_t afs_vnode_cache_get_aux(const void *cookie_netfs_data,
 }
 
 /*
- * check that the auxilliary data indicates that the entry is still valid
+ * check that the auxiliary data indicates that the entry is still valid
  */
 static enum fscache_checkaux afs_vnode_cache_check_aux(void *cookie_netfs_data,
                                                       const void *buffer,
index 0d5eeadf6121a23259c750490f46ef9c38d1d245..3c090b7555ea8f3a095e0504a69cbd696db13ab5 100644 (file)
@@ -293,7 +293,7 @@ struct afs_cell *afs_cell_lookup(const char *name, unsigned namesz,
                if (!cell) {
                        /* this should not happen unless user tries to mount
                         * when root cell is not set. Return an impossibly
-                        * bizzare errno to alert the user. Things like
+                        * bizarre errno to alert the user. Things like
                         * ENOENT might be "more appropriate" but they happen
                         * for other reasons.
                         */
index 1007ed6163146e5de5c5e0695ab6f40a6ad8c390..91dbe2a107f2adef13f1141ad57794240a704334 100644 (file)
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -128,7 +128,7 @@ EXPORT_SYMBOL(inode_newsize_ok);
  * setattr_copy must be called with i_mutex held.
  *
  * setattr_copy updates the inode's metadata with that specified
- * in attr. Noticably missing is inode size update, which is more complex
+ * in attr. Noticeably missing is inode size update, which is more complex
  * as it requires pagecache updates.
  *
  * The inode is not marked as dirty after this operation. The rationale is
index 96804a17bbd0b299279fd7848c48cd5bef119609..f55ae23b137e2a21001948e1c4b6b17795abc1b0 100644 (file)
@@ -612,7 +612,7 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry)
  * set the DMANAGED_AUTOMOUNT and DMANAGED_TRANSIT flags on the leaves
  * of the directory tree. There is no need to clear the automount flag
  * following a mount or restore it after an expire because these mounts
- * are always covered. However, it is neccessary to ensure that these
+ * are always covered. However, it is necessary to ensure that these
  * flags are clear on non-empty directories to avoid unnecessary calls
  * during path walks.
  */
index ce8c787916be825574c6bc92a03ea5dc1b1cba29..75a461cfaca620656b0d03c0e01b2eb4a8792ad6 100644 (file)
@@ -24,7 +24,7 @@ Version 0.9 (2002-03-14)
 
 Version 0.64 (2002-02-07)
 ==========
-* Did the string comparision really right this time (btree.c) [WD]
+* Did the string comparison really right this time (btree.c) [WD]
 
 * Fixed up some places where I assumed that a long int could hold
        a pointer value. (btree.c) [WD]
@@ -114,7 +114,7 @@ Version 0.6 (2001-12-15)
        More flexible. Will soon be controllable at mount time 
        (see TODO). [WD]
 
-* Rewrote datastream positon lookups.
+* Rewrote datastream position lookups.
        (datastream.c) [WD]
 
 * Moved the TODO list to its own file.
@@ -150,7 +150,7 @@ Version 0.50 (2001-11-13)
 * Anton also told me that the blocksize is not allowed to be larger than 
        the page size in linux, which is 4k i386. Oops. Added a test for 
        (blocksize > PAGE_SIZE), and refuse to mount in that case. What this 
-       practicaly means is that 8k blocksize volumes won't work without a major
+       practically means is that 8k blocksize volumes won't work without a major
        restructuring of the driver (or an alpha or other 64bit hardware). [WD]
 
 * Cleaned up the befs_count_blocks() function. Much smarter now. 
@@ -183,7 +183,7 @@ Version 0.45 (2001-10-29)
        structures into the generic pointer fields of the public structures 
        with kmalloc(). put_super and put_inode free them. This allows us not 
        to have to touch the definitions of the public structures in 
-       include/linux/fs.h. Also, befs_inode_info is huge (becuase of the 
+       include/linux/fs.h. Also, befs_inode_info is huge (because of the 
        symlink string). (super.c, inode.c, befs_fs.h) [WD]
 
 * Fixed a thinko that was corrupting file reads after the first block_run 
@@ -404,7 +404,7 @@ Version 0.4 (2001-10-28)
 
 * Fixed compile errors on 2.4.1 kernel (WD)
        Resolve rejected patches
-       Accomodate changed NLS interface (util.h)
+       Accommodate changed NLS interface (util.h)
        Needed to include <linux/slab.h> in most files
        Makefile changes
        fs/Config.in changes
index 7893eaa1e58c695d1cff286c0df64c3647b11e8e..eb557d9dc8be973ae82c89feb274275202080059 100644 (file)
@@ -234,7 +234,7 @@ typedef struct {
 } PACKED befs_btree_super;
 
 /*
- * Header stucture of each btree node
+ * Header structure of each btree node
  */
 typedef struct {
        fs64 left;
index 4202db7496cb51eb07cf3dfd7322b40dcc16ad08..a66c9b1136e06d8d4ab4ef40cad62c69aee4cae1 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Licensed under the GNU GPL. See the file COPYING for details.
  *
- * 2002-02-05: Sergey S. Kostyliov added binary search withing
+ * 2002-02-05: Sergey S. Kostyliov added binary search within
  *             btree nodes.
  *
  * Many thanks to:
index 06457ed8f3e7c5fc258fc8cdc7f0f3bf88eeddf4..54b8c28bebc8f8b4b63dcc1f010bbf035a09cbd6 100644 (file)
@@ -734,7 +734,7 @@ parse_options(char *options, befs_mount_options * opts)
 
 /* This function has the responsibiltiy of getting the
  * filesystem ready for unmounting. 
- * Basicly, we free everything that we allocated in
+ * Basically, we free everything that we allocated in
  * befs_read_inode
  */
 static void
index f34078d702d3bdbe1ee69bc1122b63d3facf5009..303983fabfd63391f3961a58be352303b7af0064 100644 (file)
@@ -941,9 +941,13 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        current->mm->start_stack = bprm->p;
 
 #ifdef arch_randomize_brk
-       if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1))
+       if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) {
                current->mm->brk = current->mm->start_brk =
                        arch_randomize_brk(current->mm);
+#ifdef CONFIG_COMPAT_BRK
+               current->brk_randomized = 1;
+#endif
+       }
 #endif
 
        if (current->personality & MMAP_PAGE_ZERO) {
index 811384bec8de8d486a9aa7355d49b0195995e97a..397d3057d336a201b744a6ceadec16eaed651c0e 100644 (file)
@@ -717,7 +717,7 @@ static int load_flat_file(struct linux_binprm * bprm,
         * help simplify all this mumbo jumbo
         *
         * We've got two different sections of relocation entries.
-        * The first is the GOT which resides at the begining of the data segment
+        * The first is the GOT which resides at the beginning of the data segment
         * and is terminated with a -1.  This one can be relocated in place.
         * The second is the extra relocation entries tacked after the image's
         * data segment. These require a little more processing as the entry is
index 4d6d4b6c2bf1d2d8122e6383e2a469be8dae8fbf..840a0d755248048cad3d65c47eed7ea91b514c45 100644 (file)
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1436,7 +1436,7 @@ EXPORT_SYMBOL(bio_flush_dcache_pages);
  *   preferred way to end I/O on a bio, it takes care of clearing
  *   BIO_UPTODATE on error. @error is 0 on success, and and one of the
  *   established -Exxxx (-EIO, for instance) error values in case
- *   something went wrong. Noone should call bi_end_io() directly on a
+ *   something went wrong. No one should call bi_end_io() directly on a
  *   bio unless they own it and thus know that it has an end_io
  *   function.
  **/
index c1511c674f53f19b81ac334419a6976e477ca373..5147bdd3b8e1cc0c86ae9ac4f32d1bcaa596d4b7 100644 (file)
@@ -653,7 +653,7 @@ void bd_forget(struct inode *inode)
  * @whole: whole block device containing @bdev, may equal @bdev
  * @holder: holder trying to claim @bdev
  *
- * Test whther @bdev can be claimed by @holder.
+ * Test whether @bdev can be claimed by @holder.
  *
  * CONTEXT:
  * spin_lock(&bdev_lock).
index de34bfad9ec3cab33f35ead4f31d9605f48af66c..5d505aaa72fb8326eb451687590b336c2e04052a 100644 (file)
@@ -178,16 +178,17 @@ static int btrfs_xattr_acl_set(struct dentry *dentry, const char *name,
 
        if (value) {
                acl = posix_acl_from_xattr(value, size);
-               if (acl == NULL) {
-                       value = NULL;
-                       size = 0;
+               if (acl) {
+                       ret = posix_acl_valid(acl);
+                       if (ret)
+                               goto out;
                } else if (IS_ERR(acl)) {
                        return PTR_ERR(acl);
                }
        }
 
        ret = btrfs_set_acl(NULL, dentry->d_inode, acl, type);
-
+out:
        posix_acl_release(acl);
 
        return ret;
index d47ce83078545e747e2567f8b1d3e3407e48aabd..8f4b81de3ae2a0ffb21b57080de5649d9a3785ff 100644 (file)
@@ -718,7 +718,7 @@ struct btrfs_space_info {
        u64 total_bytes;        /* total bytes in the space,
                                   this doesn't take mirrors into account */
        u64 bytes_used;         /* total bytes used,
-                                  this does't take mirrors into account */
+                                  this doesn't take mirrors into account */
        u64 bytes_pinned;       /* total bytes pinned, will be freed when the
                                   transaction finishes */
        u64 bytes_reserved;     /* total bytes the allocator has reserved for
@@ -740,8 +740,10 @@ struct btrfs_space_info {
         */
        unsigned long reservation_progress;
 
-       int full;               /* indicates that we cannot allocate any more
+       int full:1;             /* indicates that we cannot allocate any more
                                   chunks for this space */
+       int chunk_alloc:1;      /* set if we are allocating a chunk */
+
        int force_alloc;        /* set if we need to force a chunk alloc for
                                   this space */
 
@@ -1284,6 +1286,8 @@ struct btrfs_root {
 #define BTRFS_INODE_DIRSYNC            (1 << 10)
 #define BTRFS_INODE_COMPRESS           (1 << 11)
 
+#define BTRFS_INODE_ROOT_ITEM_INIT     (1 << 31)
+
 /* some macros to generate set/get funcs for the struct fields.  This
  * assumes there is a lefoo_to_cpu for every type, so lets make a simple
  * one for u8:
@@ -2359,6 +2363,8 @@ int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid);
 int btrfs_find_orphan_roots(struct btrfs_root *tree_root);
 int btrfs_set_root_node(struct btrfs_root_item *item,
                        struct extent_buffer *node);
+void btrfs_check_and_init_root_item(struct btrfs_root_item *item);
+
 /* dir-item.c */
 int btrfs_insert_dir_item(struct btrfs_trans_handle *trans,
                          struct btrfs_root *root, const char *name,
@@ -2572,6 +2578,11 @@ int btrfs_drop_extents(struct btrfs_trans_handle *trans, struct inode *inode,
 int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,
                              struct inode *inode, u64 start, u64 end);
 int btrfs_release_file(struct inode *inode, struct file *file);
+void btrfs_drop_pages(struct page **pages, size_t num_pages);
+int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
+                     struct page **pages, size_t num_pages,
+                     loff_t pos, size_t write_bytes,
+                     struct extent_state **cached);
 
 /* tree-defrag.c */
 int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
index d7a7315bd031a095c4f9f405afbb2b096a1e6f3e..228cf36ece8351475d5075f74e15624e4276e112 100644 (file)
@@ -1275,8 +1275,10 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root,
        root->commit_root = btrfs_root_node(root);
        BUG_ON(!root->node);
 out:
-       if (location->objectid != BTRFS_TREE_LOG_OBJECTID)
+       if (location->objectid != BTRFS_TREE_LOG_OBJECTID) {
                root->ref_cows = 1;
+               btrfs_check_and_init_root_item(&root->root_item);
+       }
 
        return root;
 }
@@ -2822,6 +2824,7 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
 
        spin_lock(&delayed_refs->lock);
        if (delayed_refs->num_entries == 0) {
+               spin_unlock(&delayed_refs->lock);
                printk(KERN_INFO "delayed_refs has NO entry\n");
                return ret;
        }
@@ -3055,7 +3058,7 @@ static int btrfs_cleanup_transaction(struct btrfs_root *root)
                btrfs_destroy_pinned_extent(root,
                                            root->fs_info->pinned_extents);
 
-               t->use_count = 0;
+               atomic_set(&t->use_count, 0);
                list_del_init(&t->list);
                memset(t, 0, sizeof(*t));
                kmem_cache_free(btrfs_transaction_cachep, t);
index f619c3cb13b7006cc7f95e273996917bbcebcf67..cd52f7f556efb753bc05138cb3e62e1f72a30354 100644 (file)
 #include "locking.h"
 #include "free-space-cache.h"
 
+/* control flags for do_chunk_alloc's force field
+ * CHUNK_ALLOC_NO_FORCE means to only allocate a chunk
+ * if we really need one.
+ *
+ * CHUNK_ALLOC_FORCE means it must try to allocate one
+ *
+ * CHUNK_ALLOC_LIMITED means to only try and allocate one
+ * if we have very few chunks already allocated.  This is
+ * used as part of the clustering code to help make sure
+ * we have a good pool of storage to cluster in, without
+ * filling the FS with empty chunks
+ *
+ */
+enum {
+       CHUNK_ALLOC_NO_FORCE = 0,
+       CHUNK_ALLOC_FORCE = 1,
+       CHUNK_ALLOC_LIMITED = 2,
+};
+
 static int update_block_group(struct btrfs_trans_handle *trans,
                              struct btrfs_root *root,
                              u64 bytenr, u64 num_bytes, int alloc);
@@ -3019,7 +3038,8 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags,
        found->bytes_readonly = 0;
        found->bytes_may_use = 0;
        found->full = 0;
-       found->force_alloc = 0;
+       found->force_alloc = CHUNK_ALLOC_NO_FORCE;
+       found->chunk_alloc = 0;
        *space_info = found;
        list_add_rcu(&found->list, &info->space_info);
        atomic_set(&found->caching_threads, 0);
@@ -3150,7 +3170,7 @@ again:
                if (!data_sinfo->full && alloc_chunk) {
                        u64 alloc_target;
 
-                       data_sinfo->force_alloc = 1;
+                       data_sinfo->force_alloc = CHUNK_ALLOC_FORCE;
                        spin_unlock(&data_sinfo->lock);
 alloc:
                        alloc_target = btrfs_get_alloc_profile(root, 1);
@@ -3160,7 +3180,8 @@ alloc:
 
                        ret = do_chunk_alloc(trans, root->fs_info->extent_root,
                                             bytes + 2 * 1024 * 1024,
-                                            alloc_target, 0);
+                                            alloc_target,
+                                            CHUNK_ALLOC_NO_FORCE);
                        btrfs_end_transaction(trans, root);
                        if (ret < 0) {
                                if (ret != -ENOSPC)
@@ -3239,31 +3260,56 @@ static void force_metadata_allocation(struct btrfs_fs_info *info)
        rcu_read_lock();
        list_for_each_entry_rcu(found, head, list) {
                if (found->flags & BTRFS_BLOCK_GROUP_METADATA)
-                       found->force_alloc = 1;
+                       found->force_alloc = CHUNK_ALLOC_FORCE;
        }
        rcu_read_unlock();
 }
 
 static int should_alloc_chunk(struct btrfs_root *root,
-                             struct btrfs_space_info *sinfo, u64 alloc_bytes)
+                             struct btrfs_space_info *sinfo, u64 alloc_bytes,
+                             int force)
 {
        u64 num_bytes = sinfo->total_bytes - sinfo->bytes_readonly;
+       u64 num_allocated = sinfo->bytes_used + sinfo->bytes_reserved;
        u64 thresh;
 
-       if (sinfo->bytes_used + sinfo->bytes_reserved +
-           alloc_bytes + 256 * 1024 * 1024 < num_bytes)
+       if (force == CHUNK_ALLOC_FORCE)
+               return 1;
+
+       /*
+        * in limited mode, we want to have some free space up to
+        * about 1% of the FS size.
+        */
+       if (force == CHUNK_ALLOC_LIMITED) {
+               thresh = btrfs_super_total_bytes(&root->fs_info->super_copy);
+               thresh = max_t(u64, 64 * 1024 * 1024,
+                              div_factor_fine(thresh, 1));
+
+               if (num_bytes - num_allocated < thresh)
+                       return 1;
+       }
+
+       /*
+        * we have two similar checks here, one based on percentage
+        * and once based on a hard number of 256MB.  The idea
+        * is that if we have a good amount of free
+        * room, don't allocate a chunk.  A good mount is
+        * less than 80% utilized of the chunks we have allocated,
+        * or more than 256MB free
+        */
+       if (num_allocated + alloc_bytes + 256 * 1024 * 1024 < num_bytes)
                return 0;
 
-       if (sinfo->bytes_used + sinfo->bytes_reserved +
-           alloc_bytes < div_factor(num_bytes, 8))
+       if (num_allocated + alloc_bytes < div_factor(num_bytes, 8))
                return 0;
 
        thresh = btrfs_super_total_bytes(&root->fs_info->super_copy);
+
+       /* 256MB or 5% of the FS */
        thresh = max_t(u64, 256 * 1024 * 1024, div_factor_fine(thresh, 5));
 
        if (num_bytes > thresh && sinfo->bytes_used < div_factor(num_bytes, 3))
                return 0;
-
        return 1;
 }
 
@@ -3273,10 +3319,9 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans,
 {
        struct btrfs_space_info *space_info;
        struct btrfs_fs_info *fs_info = extent_root->fs_info;
+       int wait_for_alloc = 0;
        int ret = 0;
 
-       mutex_lock(&fs_info->chunk_mutex);
-
        flags = btrfs_reduce_alloc_profile(extent_root, flags);
 
        space_info = __find_space_info(extent_root->fs_info, flags);
@@ -3287,21 +3332,40 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans,
        }
        BUG_ON(!space_info);
 
+again:
        spin_lock(&space_info->lock);
        if (space_info->force_alloc)
-               force = 1;
+               force = space_info->force_alloc;
        if (space_info->full) {
                spin_unlock(&space_info->lock);
-               goto out;
+               return 0;
        }
 
-       if (!force && !should_alloc_chunk(extent_root, space_info,
-                                         alloc_bytes)) {
+       if (!should_alloc_chunk(extent_root, space_info, alloc_bytes, force)) {
                spin_unlock(&space_info->lock);
-               goto out;
+               return 0;
+       } else if (space_info->chunk_alloc) {
+               wait_for_alloc = 1;
+       } else {
+               space_info->chunk_alloc = 1;
        }
+
        spin_unlock(&space_info->lock);
 
+       mutex_lock(&fs_info->chunk_mutex);
+
+       /*
+        * The chunk_mutex is held throughout the entirety of a chunk
+        * allocation, so once we've acquired the chunk_mutex we know that the
+        * other guy is done and we need to recheck and see if we should
+        * allocate.
+        */
+       if (wait_for_alloc) {
+               mutex_unlock(&fs_info->chunk_mutex);
+               wait_for_alloc = 0;
+               goto again;
+       }
+
        /*
         * If we have mixed data/metadata chunks we want to make sure we keep
         * allocating mixed chunks instead of individual chunks.
@@ -3327,9 +3391,10 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans,
                space_info->full = 1;
        else
                ret = 1;
-       space_info->force_alloc = 0;
+
+       space_info->force_alloc = CHUNK_ALLOC_NO_FORCE;
+       space_info->chunk_alloc = 0;
        spin_unlock(&space_info->lock);
-out:
        mutex_unlock(&extent_root->fs_info->chunk_mutex);
        return ret;
 }
@@ -5303,11 +5368,13 @@ loop:
 
                if (allowed_chunk_alloc) {
                        ret = do_chunk_alloc(trans, root, num_bytes +
-                                            2 * 1024 * 1024, data, 1);
+                                            2 * 1024 * 1024, data,
+                                            CHUNK_ALLOC_LIMITED);
                        allowed_chunk_alloc = 0;
                        done_chunk_alloc = 1;
-               } else if (!done_chunk_alloc) {
-                       space_info->force_alloc = 1;
+               } else if (!done_chunk_alloc &&
+                          space_info->force_alloc == CHUNK_ALLOC_NO_FORCE) {
+                       space_info->force_alloc = CHUNK_ALLOC_LIMITED;
                }
 
                if (loop < LOOP_NO_EMPTY_SIZE) {
@@ -5393,7 +5460,8 @@ again:
         */
        if (empty_size || root->ref_cows)
                ret = do_chunk_alloc(trans, root->fs_info->extent_root,
-                                    num_bytes + 2 * 1024 * 1024, data, 0);
+                                    num_bytes + 2 * 1024 * 1024, data,
+                                    CHUNK_ALLOC_NO_FORCE);
 
        WARN_ON(num_bytes < root->sectorsize);
        ret = find_free_extent(trans, root, num_bytes, empty_size,
@@ -5405,7 +5473,7 @@ again:
                num_bytes = num_bytes & ~(root->sectorsize - 1);
                num_bytes = max(num_bytes, min_alloc_size);
                do_chunk_alloc(trans, root->fs_info->extent_root,
-                              num_bytes, data, 1);
+                              num_bytes, data, CHUNK_ALLOC_FORCE);
                goto again;
        }
        if (ret == -ENOSPC && btrfs_test_opt(root, ENOSPC_DEBUG)) {
@@ -7991,6 +8059,10 @@ static noinline int relocate_one_extent(struct btrfs_root *extent_root,
                                u64 group_start = group->key.objectid;
                                new_extents = kmalloc(sizeof(*new_extents),
                                                      GFP_NOFS);
+                               if (!new_extents) {
+                                       ret = -ENOMEM;
+                                       goto out;
+                               }
                                nr_extents = 1;
                                ret = get_new_locations(reloc_inode,
                                                        extent_key,
@@ -8109,13 +8181,15 @@ int btrfs_set_block_group_ro(struct btrfs_root *root,
 
        alloc_flags = update_block_group_flags(root, cache->flags);
        if (alloc_flags != cache->flags)
-               do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, 1);
+               do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags,
+                              CHUNK_ALLOC_FORCE);
 
        ret = set_block_group_ro(cache);
        if (!ret)
                goto out;
        alloc_flags = get_alloc_profile(root, cache->space_info->flags);
-       ret = do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, 1);
+       ret = do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags,
+                            CHUNK_ALLOC_FORCE);
        if (ret < 0)
                goto out;
        ret = set_block_group_ro(cache);
@@ -8128,7 +8202,8 @@ int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans,
                            struct btrfs_root *root, u64 type)
 {
        u64 alloc_flags = get_alloc_profile(root, type);
-       return do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, 1);
+       return do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags,
+                             CHUNK_ALLOC_FORCE);
 }
 
 /*
index 20ddb28602a8fa0c0eb4c082966741f2f7fd15c8..ba41da59e31b1d93348622d7b47655234f5ff930 100644 (file)
@@ -690,6 +690,15 @@ static void cache_state(struct extent_state *state,
        }
 }
 
+static void uncache_state(struct extent_state **cached_ptr)
+{
+       if (cached_ptr && (*cached_ptr)) {
+               struct extent_state *state = *cached_ptr;
+               *cached_ptr = NULL;
+               free_extent_state(state);
+       }
+}
+
 /*
  * set some bits on a range in the tree.  This may require allocations or
  * sleeping, so the gfp mask is used to indicate what is allowed.
@@ -940,10 +949,10 @@ static int clear_extent_new(struct extent_io_tree *tree, u64 start, u64 end,
 }
 
 int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end,
-                       gfp_t mask)
+                       struct extent_state **cached_state, gfp_t mask)
 {
-       return set_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, NULL,
-                             NULL, mask);
+       return set_extent_bit(tree, start, end, EXTENT_UPTODATE, 0,
+                             NULL, cached_state, mask);
 }
 
 static int clear_extent_uptodate(struct extent_io_tree *tree, u64 start,
@@ -1012,8 +1021,7 @@ int unlock_extent_cached(struct extent_io_tree *tree, u64 start, u64 end,
                                mask);
 }
 
-int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end,
-                 gfp_t mask)
+int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask)
 {
        return clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, NULL,
                                mask);
@@ -1735,6 +1743,9 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
 
        do {
                struct page *page = bvec->bv_page;
+               struct extent_state *cached = NULL;
+               struct extent_state *state;
+
                tree = &BTRFS_I(page->mapping->host)->io_tree;
 
                start = ((u64)page->index << PAGE_CACHE_SHIFT) +
@@ -1749,9 +1760,20 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
                if (++bvec <= bvec_end)
                        prefetchw(&bvec->bv_page->flags);
 
+               spin_lock(&tree->lock);
+               state = find_first_extent_bit_state(tree, start, EXTENT_LOCKED);
+               if (state && state->start == start) {
+                       /*
+                        * take a reference on the state, unlock will drop
+                        * the ref
+                        */
+                       cache_state(state, &cached);
+               }
+               spin_unlock(&tree->lock);
+
                if (uptodate && tree->ops && tree->ops->readpage_end_io_hook) {
                        ret = tree->ops->readpage_end_io_hook(page, start, end,
-                                                             NULL);
+                                                             state);
                        if (ret)
                                uptodate = 0;
                }
@@ -1764,15 +1786,16 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
                                        test_bit(BIO_UPTODATE, &bio->bi_flags);
                                if (err)
                                        uptodate = 0;
+                               uncache_state(&cached);
                                continue;
                        }
                }
 
                if (uptodate) {
-                       set_extent_uptodate(tree, start, end,
+                       set_extent_uptodate(tree, start, end, &cached,
                                            GFP_ATOMIC);
                }
-               unlock_extent(tree, start, end, GFP_ATOMIC);
+               unlock_extent_cached(tree, start, end, &cached, GFP_ATOMIC);
 
                if (whole_page) {
                        if (uptodate) {
@@ -1811,6 +1834,7 @@ static void end_bio_extent_preparewrite(struct bio *bio, int err)
 
        do {
                struct page *page = bvec->bv_page;
+               struct extent_state *cached = NULL;
                tree = &BTRFS_I(page->mapping->host)->io_tree;
 
                start = ((u64)page->index << PAGE_CACHE_SHIFT) +
@@ -1821,13 +1845,14 @@ static void end_bio_extent_preparewrite(struct bio *bio, int err)
                        prefetchw(&bvec->bv_page->flags);
 
                if (uptodate) {
-                       set_extent_uptodate(tree, start, end, GFP_ATOMIC);
+                       set_extent_uptodate(tree, start, end, &cached,
+                                           GFP_ATOMIC);
                } else {
                        ClearPageUptodate(page);
                        SetPageError(page);
                }
 
-               unlock_extent(tree, start, end, GFP_ATOMIC);
+               unlock_extent_cached(tree, start, end, &cached, GFP_ATOMIC);
 
        } while (bvec >= bio->bi_io_vec);
 
@@ -2016,14 +2041,17 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
        while (cur <= end) {
                if (cur >= last_byte) {
                        char *userpage;
+                       struct extent_state *cached = NULL;
+
                        iosize = PAGE_CACHE_SIZE - page_offset;
                        userpage = kmap_atomic(page, KM_USER0);
                        memset(userpage + page_offset, 0, iosize);
                        flush_dcache_page(page);
                        kunmap_atomic(userpage, KM_USER0);
                        set_extent_uptodate(tree, cur, cur + iosize - 1,
-                                           GFP_NOFS);
-                       unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS);
+                                           &cached, GFP_NOFS);
+                       unlock_extent_cached(tree, cur, cur + iosize - 1,
+                                            &cached, GFP_NOFS);
                        break;
                }
                em = get_extent(inode, page, page_offset, cur,
@@ -2063,14 +2091,17 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
                /* we've found a hole, just zero and go on */
                if (block_start == EXTENT_MAP_HOLE) {
                        char *userpage;
+                       struct extent_state *cached = NULL;
+
                        userpage = kmap_atomic(page, KM_USER0);
                        memset(userpage + page_offset, 0, iosize);
                        flush_dcache_page(page);
                        kunmap_atomic(userpage, KM_USER0);
 
                        set_extent_uptodate(tree, cur, cur + iosize - 1,
-                                           GFP_NOFS);
-                       unlock_extent(tree, cur, cur + iosize - 1, GFP_NOFS);
+                                           &cached, GFP_NOFS);
+                       unlock_extent_cached(tree, cur, cur + iosize - 1,
+                                            &cached, GFP_NOFS);
                        cur = cur + iosize;
                        page_offset += iosize;
                        continue;
@@ -2650,7 +2681,7 @@ int extent_readpages(struct extent_io_tree *tree,
                prefetchw(&page->flags);
                list_del(&page->lru);
                if (!add_to_page_cache_lru(page, mapping,
-                                       page->index, GFP_KERNEL)) {
+                                       page->index, GFP_NOFS)) {
                        __extent_read_full_page(tree, page, get_extent,
                                                &bio, 0, &bio_flags);
                }
@@ -2789,9 +2820,12 @@ int extent_prepare_write(struct extent_io_tree *tree,
                        iocount++;
                        block_start = block_start + iosize;
                } else {
-                       set_extent_uptodate(tree, block_start, cur_end,
+                       struct extent_state *cached = NULL;
+
+                       set_extent_uptodate(tree, block_start, cur_end, &cached,
                                            GFP_NOFS);
-                       unlock_extent(tree, block_start, cur_end, GFP_NOFS);
+                       unlock_extent_cached(tree, block_start, cur_end,
+                                            &cached, GFP_NOFS);
                        block_start = cur_end + 1;
                }
                page_offset = block_start & (PAGE_CACHE_SIZE - 1);
@@ -3457,7 +3491,7 @@ int set_extent_buffer_uptodate(struct extent_io_tree *tree,
        num_pages = num_extent_pages(eb->start, eb->len);
 
        set_extent_uptodate(tree, eb->start, eb->start + eb->len - 1,
-                           GFP_NOFS);
+                           NULL, GFP_NOFS);
        for (i = 0; i < num_pages; i++) {
                page = extent_buffer_page(eb, i);
                if ((i == 0 && (eb->start & (PAGE_CACHE_SIZE - 1))) ||
@@ -3885,6 +3919,12 @@ static void move_pages(struct page *dst_page, struct page *src_page,
        kunmap_atomic(dst_kaddr, KM_USER0);
 }
 
+static inline bool areas_overlap(unsigned long src, unsigned long dst, unsigned long len)
+{
+       unsigned long distance = (src > dst) ? src - dst : dst - src;
+       return distance < len;
+}
+
 static void copy_pages(struct page *dst_page, struct page *src_page,
                       unsigned long dst_off, unsigned long src_off,
                       unsigned long len)
@@ -3892,10 +3932,12 @@ static void copy_pages(struct page *dst_page, struct page *src_page,
        char *dst_kaddr = kmap_atomic(dst_page, KM_USER0);
        char *src_kaddr;
 
-       if (dst_page != src_page)
+       if (dst_page != src_page) {
                src_kaddr = kmap_atomic(src_page, KM_USER1);
-       else
+       } else {
                src_kaddr = dst_kaddr;
+               BUG_ON(areas_overlap(src_off, dst_off, len));
+       }
 
        memcpy(dst_kaddr + dst_off, src_kaddr + src_off, len);
        kunmap_atomic(dst_kaddr, KM_USER0);
@@ -3970,7 +4012,7 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset,
                       "len %lu len %lu\n", dst_offset, len, dst->len);
                BUG_ON(1);
        }
-       if (dst_offset < src_offset) {
+       if (!areas_overlap(src_offset, dst_offset, len)) {
                memcpy_extent_buffer(dst, dst_offset, src_offset, len);
                return;
        }
index f62c5442835d1ab70da88d510ef6e073d050c794..af2d7179c37288f50371bfd2ffa5dd307b16af00 100644 (file)
@@ -208,7 +208,7 @@ int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
                   int bits, int exclusive_bits, u64 *failed_start,
                   struct extent_state **cached_state, gfp_t mask);
 int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end,
-                       gfp_t mask);
+                       struct extent_state **cached_state, gfp_t mask);
 int set_extent_new(struct extent_io_tree *tree, u64 start, u64 end,
                   gfp_t mask);
 int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end,
index 2b6c12e983b34a76e48242af2b003fa5b7d2d821..a24a3f2fa13e6fe4a1670073933aa1de61490dc4 100644 (file)
@@ -243,7 +243,7 @@ out:
  * Insert @em into @tree or perform a simple forward/backward merge with
  * existing mappings.  The extent_map struct passed in will be inserted
  * into the tree directly, with an additional reference taken, or a
- * reference dropped if the merge attempt was successfull.
+ * reference dropped if the merge attempt was successful.
  */
 int add_extent_mapping(struct extent_map_tree *tree,
                       struct extent_map *em)
index 656bc0a892b14c6b6a420cda879e3b3e1fc9acf7..75899a01dded75042b4c99f15a44cc83882730a4 100644 (file)
@@ -104,7 +104,7 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages,
 /*
  * unlocks pages after btrfs_file_write is done with them
  */
-static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages)
+void btrfs_drop_pages(struct page **pages, size_t num_pages)
 {
        size_t i;
        for (i = 0; i < num_pages; i++) {
@@ -127,16 +127,13 @@ static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages)
  * this also makes the decision about creating an inline extent vs
  * doing real data extents, marking pages dirty and delalloc as required.
  */
-static noinline int dirty_and_release_pages(struct btrfs_root *root,
-                                           struct file *file,
-                                           struct page **pages,
-                                           size_t num_pages,
-                                           loff_t pos,
-                                           size_t write_bytes)
+int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,
+                     struct page **pages, size_t num_pages,
+                     loff_t pos, size_t write_bytes,
+                     struct extent_state **cached)
 {
        int err = 0;
        int i;
-       struct inode *inode = fdentry(file)->d_inode;
        u64 num_bytes;
        u64 start_pos;
        u64 end_of_last_block;
@@ -149,7 +146,7 @@ static noinline int dirty_and_release_pages(struct btrfs_root *root,
 
        end_of_last_block = start_pos + num_bytes - 1;
        err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block,
-                                       NULL);
+                                       cached);
        if (err)
                return err;
 
@@ -906,7 +903,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
        unsigned long last_index;
        size_t num_written = 0;
        int nrptrs;
-       int ret;
+       int ret = 0;
 
        nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) /
                     PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
@@ -992,9 +989,9 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
                }
 
                if (copied > 0) {
-                       ret = dirty_and_release_pages(root, file, pages,
-                                                     dirty_pages, pos,
-                                                     copied);
+                       ret = btrfs_dirty_pages(root, inode, pages,
+                                               dirty_pages, pos, copied,
+                                               NULL);
                        if (ret) {
                                btrfs_delalloc_release_space(inode,
                                        dirty_pages << PAGE_CACHE_SHIFT);
index 0037427d8a9d27b6a14b980898b01ca39209f51a..63731a1fb0a1f9004e892a31e121ae977a9eff3a 100644 (file)
@@ -24,6 +24,7 @@
 #include "free-space-cache.h"
 #include "transaction.h"
 #include "disk-io.h"
+#include "extent_io.h"
 
 #define BITS_PER_BITMAP                (PAGE_CACHE_SIZE * 8)
 #define MAX_CACHE_BYTES_PER_GIG        (32 * 1024)
@@ -81,6 +82,8 @@ struct inode *lookup_free_space_inode(struct btrfs_root *root,
                return ERR_PTR(-ENOENT);
        }
 
+       inode->i_mapping->flags &= ~__GFP_FS;
+
        spin_lock(&block_group->lock);
        if (!root->fs_info->closing) {
                block_group->inode = igrab(inode);
@@ -222,6 +225,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
        u64 num_entries;
        u64 num_bitmaps;
        u64 generation;
+       u64 used = btrfs_block_group_used(&block_group->item);
        u32 cur_crc = ~(u32)0;
        pgoff_t index = 0;
        unsigned long first_page_offset;
@@ -467,6 +471,17 @@ next:
                index++;
        }
 
+       spin_lock(&block_group->tree_lock);
+       if (block_group->free_space != (block_group->key.offset - used -
+                                       block_group->bytes_super)) {
+               spin_unlock(&block_group->tree_lock);
+               printk(KERN_ERR "block group %llu has an wrong amount of free "
+                      "space\n", block_group->key.objectid);
+               ret = 0;
+               goto free_cache;
+       }
+       spin_unlock(&block_group->tree_lock);
+
        ret = 1;
 out:
        kfree(checksums);
@@ -493,18 +508,23 @@ int btrfs_write_out_cache(struct btrfs_root *root,
        struct inode *inode;
        struct rb_node *node;
        struct list_head *pos, *n;
+       struct page **pages;
        struct page *page;
        struct extent_state *cached_state = NULL;
+       struct btrfs_free_cluster *cluster = NULL;
+       struct extent_io_tree *unpin = NULL;
        struct list_head bitmap_list;
        struct btrfs_key key;
+       u64 start, end, len;
        u64 bytes = 0;
        u32 *crc, *checksums;
-       pgoff_t index = 0, last_index = 0;
        unsigned long first_page_offset;
-       int num_checksums;
+       int index = 0, num_pages = 0;
        int entries = 0;
        int bitmaps = 0;
        int ret = 0;
+       bool next_page = false;
+       bool out_of_space = false;
 
        root = root->fs_info->tree_root;
 
@@ -532,24 +552,43 @@ int btrfs_write_out_cache(struct btrfs_root *root,
                return 0;
        }
 
-       last_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
+       num_pages = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
+               PAGE_CACHE_SHIFT;
        filemap_write_and_wait(inode->i_mapping);
        btrfs_wait_ordered_range(inode, inode->i_size &
                                 ~(root->sectorsize - 1), (u64)-1);
 
        /* We need a checksum per page. */
-       num_checksums = i_size_read(inode) / PAGE_CACHE_SIZE;
-       crc = checksums  = kzalloc(sizeof(u32) * num_checksums, GFP_NOFS);
+       crc = checksums = kzalloc(sizeof(u32) * num_pages, GFP_NOFS);
        if (!crc) {
                iput(inode);
                return 0;
        }
 
+       pages = kzalloc(sizeof(struct page *) * num_pages, GFP_NOFS);
+       if (!pages) {
+               kfree(crc);
+               iput(inode);
+               return 0;
+       }
+
        /* Since the first page has all of our checksums and our generation we
         * need to calculate the offset into the page that we can start writing
         * our entries.
         */
-       first_page_offset = (sizeof(u32) * num_checksums) + sizeof(u64);
+       first_page_offset = (sizeof(u32) * num_pages) + sizeof(u64);
+
+       /* Get the cluster for this block_group if it exists */
+       if (!list_empty(&block_group->cluster_list))
+               cluster = list_entry(block_group->cluster_list.next,
+                                    struct btrfs_free_cluster,
+                                    block_group_list);
+
+       /*
+        * We shouldn't have switched the pinned extents yet so this is the
+        * right one
+        */
+       unpin = root->fs_info->pinned_extents;
 
        /*
         * Lock all pages first so we can lock the extent safely.
@@ -559,20 +598,18 @@ int btrfs_write_out_cache(struct btrfs_root *root,
         * after find_get_page at this point.  Just putting this here so people
         * know and don't freak out.
         */
-       while (index <= last_index) {
+       while (index < num_pages) {
                page = grab_cache_page(inode->i_mapping, index);
                if (!page) {
-                       pgoff_t i = 0;
+                       int i;
 
-                       while (i < index) {
-                               page = find_get_page(inode->i_mapping, i);
-                               unlock_page(page);
-                               page_cache_release(page);
-                               page_cache_release(page);
-                               i++;
+                       for (i = 0; i < num_pages; i++) {
+                               unlock_page(pages[i]);
+                               page_cache_release(pages[i]);
                        }
                        goto out_free;
                }
+               pages[index] = page;
                index++;
        }
 
@@ -580,6 +617,12 @@ int btrfs_write_out_cache(struct btrfs_root *root,
        lock_extent_bits(&BTRFS_I(inode)->io_tree, 0, i_size_read(inode) - 1,
                         0, &cached_state, GFP_NOFS);
 
+       /*
+        * When searching for pinned extents, we need to start at our start
+        * offset.
+        */
+       start = block_group->key.objectid;
+
        /* Write out the extent entries */
        do {
                struct btrfs_free_space_entry *entry;
@@ -587,18 +630,25 @@ int btrfs_write_out_cache(struct btrfs_root *root,
                unsigned long offset = 0;
                unsigned long start_offset = 0;
 
+               next_page = false;
+
                if (index == 0) {
                        start_offset = first_page_offset;
                        offset = start_offset;
                }
 
-               page = find_get_page(inode->i_mapping, index);
+               if (index >= num_pages) {
+                       out_of_space = true;
+                       break;
+               }
+
+               page = pages[index];
 
                addr = kmap(page);
                entry = addr + start_offset;
 
                memset(addr, 0, PAGE_CACHE_SIZE);
-               while (1) {
+               while (node && !next_page) {
                        struct btrfs_free_space *e;
 
                        e = rb_entry(node, struct btrfs_free_space, offset_index);
@@ -614,12 +664,49 @@ int btrfs_write_out_cache(struct btrfs_root *root,
                                entry->type = BTRFS_FREE_SPACE_EXTENT;
                        }
                        node = rb_next(node);
-                       if (!node)
-                               break;
+                       if (!node && cluster) {
+                               node = rb_first(&cluster->root);
+                               cluster = NULL;
+                       }
                        offset += sizeof(struct btrfs_free_space_entry);
                        if (offset + sizeof(struct btrfs_free_space_entry) >=
                            PAGE_CACHE_SIZE)
+                               next_page = true;
+                       entry++;
+               }
+
+               /*
+                * We want to add any pinned extents to our free space cache
+                * so we don't leak the space
+                */
+               while (!next_page && (start < block_group->key.objectid +
+                                     block_group->key.offset)) {
+                       ret = find_first_extent_bit(unpin, start, &start, &end,
+                                                   EXTENT_DIRTY);
+                       if (ret) {
+                               ret = 0;
+                               break;
+                       }
+
+                       /* This pinned extent is out of our range */
+                       if (start >= block_group->key.objectid +
+                           block_group->key.offset)
                                break;
+
+                       len = block_group->key.objectid +
+                               block_group->key.offset - start;
+                       len = min(len, end + 1 - start);
+
+                       entries++;
+                       entry->offset = cpu_to_le64(start);
+                       entry->bytes = cpu_to_le64(len);
+                       entry->type = BTRFS_FREE_SPACE_EXTENT;
+
+                       start = end + 1;
+                       offset += sizeof(struct btrfs_free_space_entry);
+                       if (offset + sizeof(struct btrfs_free_space_entry) >=
+                           PAGE_CACHE_SIZE)
+                               next_page = true;
                        entry++;
                }
                *crc = ~(u32)0;
@@ -632,25 +719,8 @@ int btrfs_write_out_cache(struct btrfs_root *root,
 
                bytes += PAGE_CACHE_SIZE;
 
-               ClearPageChecked(page);
-               set_page_extent_mapped(page);
-               SetPageUptodate(page);
-               set_page_dirty(page);
-
-               /*
-                * We need to release our reference we got for grab_cache_page,
-                * except for the first page which will hold our checksums, we
-                * do that below.
-                */
-               if (index != 0) {
-                       unlock_page(page);
-                       page_cache_release(page);
-               }
-
-               page_cache_release(page);
-
                index++;
-       } while (node);
+       } while (node || next_page);
 
        /* Write out the bitmaps */
        list_for_each_safe(pos, n, &bitmap_list) {
@@ -658,7 +728,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
                struct btrfs_free_space *entry =
                        list_entry(pos, struct btrfs_free_space, list);
 
-               page = find_get_page(inode->i_mapping, index);
+               if (index >= num_pages) {
+                       out_of_space = true;
+                       break;
+               }
+               page = pages[index];
 
                addr = kmap(page);
                memcpy(addr, entry->bitmap, PAGE_CACHE_SIZE);
@@ -669,64 +743,58 @@ int btrfs_write_out_cache(struct btrfs_root *root,
                crc++;
                bytes += PAGE_CACHE_SIZE;
 
-               ClearPageChecked(page);
-               set_page_extent_mapped(page);
-               SetPageUptodate(page);
-               set_page_dirty(page);
-               unlock_page(page);
-               page_cache_release(page);
-               page_cache_release(page);
                list_del_init(&entry->list);
                index++;
        }
 
+       if (out_of_space) {
+               btrfs_drop_pages(pages, num_pages);
+               unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
+                                    i_size_read(inode) - 1, &cached_state,
+                                    GFP_NOFS);
+               ret = 0;
+               goto out_free;
+       }
+
        /* Zero out the rest of the pages just to make sure */
-       while (index <= last_index) {
+       while (index < num_pages) {
                void *addr;
 
-               page = find_get_page(inode->i_mapping, index);
-
+               page = pages[index];
                addr = kmap(page);
                memset(addr, 0, PAGE_CACHE_SIZE);
                kunmap(page);
-               ClearPageChecked(page);
-               set_page_extent_mapped(page);
-               SetPageUptodate(page);
-               set_page_dirty(page);
-               unlock_page(page);
-               page_cache_release(page);
-               page_cache_release(page);
                bytes += PAGE_CACHE_SIZE;
                index++;
        }
 
-       btrfs_set_extent_delalloc(inode, 0, bytes - 1, &cached_state);
-
        /* Write the checksums and trans id to the first page */
        {
                void *addr;
                u64 *gen;
 
-               page = find_get_page(inode->i_mapping, 0);
+               page = pages[0];
 
                addr = kmap(page);
-               memcpy(addr, checksums, sizeof(u32) * num_checksums);
-               gen = addr + (sizeof(u32) * num_checksums);
+               memcpy(addr, checksums, sizeof(u32) * num_pages);
+               gen = addr + (sizeof(u32) * num_pages);
                *gen = trans->transid;
                kunmap(page);
-               ClearPageChecked(page);
-               set_page_extent_mapped(page);
-               SetPageUptodate(page);
-               set_page_dirty(page);
-               unlock_page(page);
-               page_cache_release(page);
-               page_cache_release(page);
        }
-       BTRFS_I(inode)->generation = trans->transid;
 
+       ret = btrfs_dirty_pages(root, inode, pages, num_pages, 0,
+                                           bytes, &cached_state);
+       btrfs_drop_pages(pages, num_pages);
        unlock_extent_cached(&BTRFS_I(inode)->io_tree, 0,
                             i_size_read(inode) - 1, &cached_state, GFP_NOFS);
 
+       if (ret) {
+               ret = 0;
+               goto out_free;
+       }
+
+       BTRFS_I(inode)->generation = trans->transid;
+
        filemap_write_and_wait(inode->i_mapping);
 
        key.objectid = BTRFS_FREE_SPACE_OBJECTID;
@@ -777,6 +845,7 @@ out_free:
                BTRFS_I(inode)->generation = 0;
        }
        kfree(checksums);
+       kfree(pages);
        btrfs_update_inode(trans, root, inode);
        iput(inode);
        return ret;
@@ -1699,10 +1768,13 @@ void btrfs_remove_free_space_cache(struct btrfs_block_group_cache *block_group)
 
        while ((node = rb_last(&block_group->free_space_offset)) != NULL) {
                info = rb_entry(node, struct btrfs_free_space, offset_index);
-               unlink_free_space(block_group, info);
-               if (info->bitmap)
-                       kfree(info->bitmap);
-               kmem_cache_free(btrfs_free_space_cachep, info);
+               if (!info->bitmap) {
+                       unlink_free_space(block_group, info);
+                       kmem_cache_free(btrfs_free_space_cachep, info);
+               } else {
+                       free_bitmap(block_group, info);
+               }
+
                if (need_resched()) {
                        spin_unlock(&block_group->tree_lock);
                        cond_resched();
@@ -2232,7 +2304,7 @@ int btrfs_trim_block_group(struct btrfs_block_group_cache *block_group,
                        start = entry->offset;
                        bytes = min(entry->bytes, end - start);
                        unlink_free_space(block_group, entry);
-                       kfree(entry);
+                       kmem_cache_free(btrfs_free_space_cachep, entry);
                }
 
                spin_unlock(&block_group->tree_lock);
index 93c28a1d6bdc758b5270e6b8c7b448d106f1ab7b..7cd8ab0ef04d5b3e95ccd572f96ca858457e8c18 100644 (file)
@@ -112,6 +112,7 @@ static int btrfs_init_inode_security(struct btrfs_trans_handle *trans,
 static noinline int insert_inline_extent(struct btrfs_trans_handle *trans,
                                struct btrfs_root *root, struct inode *inode,
                                u64 start, size_t size, size_t compressed_size,
+                               int compress_type,
                                struct page **compressed_pages)
 {
        struct btrfs_key key;
@@ -126,12 +127,9 @@ static noinline int insert_inline_extent(struct btrfs_trans_handle *trans,
        size_t cur_size = size;
        size_t datasize;
        unsigned long offset;
-       int compress_type = BTRFS_COMPRESS_NONE;
 
-       if (compressed_size && compressed_pages) {
-               compress_type = root->fs_info->compress_type;
+       if (compressed_size && compressed_pages)
                cur_size = compressed_size;
-       }
 
        path = btrfs_alloc_path();
        if (!path)
@@ -221,7 +219,7 @@ fail:
 static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans,
                                 struct btrfs_root *root,
                                 struct inode *inode, u64 start, u64 end,
-                                size_t compressed_size,
+                                size_t compressed_size, int compress_type,
                                 struct page **compressed_pages)
 {
        u64 isize = i_size_read(inode);
@@ -254,7 +252,7 @@ static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans,
                inline_len = min_t(u64, isize, actual_end);
        ret = insert_inline_extent(trans, root, inode, start,
                                   inline_len, compressed_size,
-                                  compressed_pages);
+                                  compress_type, compressed_pages);
        BUG_ON(ret);
        btrfs_delalloc_release_metadata(inode, end + 1 - start);
        btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0);
@@ -433,12 +431,13 @@ again:
                         * to make an uncompressed inline extent.
                         */
                        ret = cow_file_range_inline(trans, root, inode,
-                                                   start, end, 0, NULL);
+                                                   start, end, 0, 0, NULL);
                } else {
                        /* try making a compressed inline extent */
                        ret = cow_file_range_inline(trans, root, inode,
                                                    start, end,
-                                                   total_compressed, pages);
+                                                   total_compressed,
+                                                   compress_type, pages);
                }
                if (ret == 0) {
                        /*
@@ -792,7 +791,7 @@ static noinline int cow_file_range(struct inode *inode,
        if (start == 0) {
                /* lets try to make an inline extent */
                ret = cow_file_range_inline(trans, root, inode,
-                                           start, end, 0, NULL);
+                                           start, end, 0, 0, NULL);
                if (ret == 0) {
                        extent_clear_unlock_delalloc(inode,
                                     &BTRFS_I(inode)->io_tree,
@@ -955,6 +954,7 @@ static int cow_file_range_async(struct inode *inode, struct page *locked_page,
                         1, 0, NULL, GFP_NOFS);
        while (start < end) {
                async_cow = kmalloc(sizeof(*async_cow), GFP_NOFS);
+               BUG_ON(!async_cow);
                async_cow->inode = inode;
                async_cow->root = root;
                async_cow->locked_page = locked_page;
@@ -1771,9 +1771,12 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end)
        add_pending_csums(trans, inode, ordered_extent->file_offset,
                          &ordered_extent->list);
 
-       btrfs_ordered_update_i_size(inode, 0, ordered_extent);
-       ret = btrfs_update_inode(trans, root, inode);
-       BUG_ON(ret);
+       ret = btrfs_ordered_update_i_size(inode, 0, ordered_extent);
+       if (!ret) {
+               ret = btrfs_update_inode(trans, root, inode);
+               BUG_ON(ret);
+       }
+       ret = 0;
 out:
        if (nolock) {
                if (trans)
@@ -2222,8 +2225,6 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
                        insert = 1;
 #endif
                insert = 1;
-       } else {
-               WARN_ON(!BTRFS_I(inode)->orphan_meta_reserved);
        }
 
        if (!BTRFS_I(inode)->orphan_meta_reserved) {
@@ -2324,7 +2325,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
 
                /*
                 * if ret == 0 means we found what we were searching for, which
-                * is weird, but possible, so only screw with path if we didnt
+                * is weird, but possible, so only screw with path if we didn't
                 * find the key and see if we have stuff that matches
                 */
                if (ret > 0) {
@@ -2537,8 +2538,6 @@ static void btrfs_read_locked_inode(struct inode *inode)
        BTRFS_I(inode)->flags = btrfs_inode_flags(leaf, inode_item);
 
        alloc_group_block = btrfs_inode_block_group(leaf, inode_item);
-       if (location.objectid == BTRFS_FREE_SPACE_OBJECTID)
-               inode->i_mapping->flags &= ~__GFP_FS;
 
        /*
         * try to precache a NULL acl entry for files that don't have
@@ -2595,6 +2594,13 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
                            struct btrfs_inode_item *item,
                            struct inode *inode)
 {
+       if (!leaf->map_token)
+               map_private_extent_buffer(leaf, (unsigned long)item,
+                                         sizeof(struct btrfs_inode_item),
+                                         &leaf->map_token, &leaf->kaddr,
+                                         &leaf->map_start, &leaf->map_len,
+                                         KM_USER1);
+
        btrfs_set_inode_uid(leaf, item, inode->i_uid);
        btrfs_set_inode_gid(leaf, item, inode->i_gid);
        btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size);
@@ -2623,6 +2629,11 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
        btrfs_set_inode_rdev(leaf, item, inode->i_rdev);
        btrfs_set_inode_flags(leaf, item, BTRFS_I(inode)->flags);
        btrfs_set_inode_block_group(leaf, item, BTRFS_I(inode)->block_group);
+
+       if (leaf->map_token) {
+               unmap_extent_buffer(leaf, leaf->map_token, KM_USER1);
+               leaf->map_token = NULL;
+       }
 }
 
 /*
@@ -4212,10 +4223,8 @@ static int btrfs_real_readdir(struct file *filp, void *dirent,
        struct btrfs_key found_key;
        struct btrfs_path *path;
        int ret;
-       u32 nritems;
        struct extent_buffer *leaf;
        int slot;
-       int advance;
        unsigned char d_type;
        int over = 0;
        u32 di_cur;
@@ -4258,27 +4267,19 @@ static int btrfs_real_readdir(struct file *filp, void *dirent,
        ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
        if (ret < 0)
                goto err;
-       advance = 0;
 
        while (1) {
                leaf = path->nodes[0];
-               nritems = btrfs_header_nritems(leaf);
                slot = path->slots[0];
-               if (advance || slot >= nritems) {
-                       if (slot >= nritems - 1) {
-                               ret = btrfs_next_leaf(root, path);
-                               if (ret)
-                                       break;
-                               leaf = path->nodes[0];
-                               nritems = btrfs_header_nritems(leaf);
-                               slot = path->slots[0];
-                       } else {
-                               slot++;
-                               path->slots[0]++;
-                       }
+               if (slot >= btrfs_header_nritems(leaf)) {
+                       ret = btrfs_next_leaf(root, path);
+                       if (ret < 0)
+                               goto err;
+                       else if (ret > 0)
+                               break;
+                       continue;
                }
 
-               advance = 1;
                item = btrfs_item_nr(leaf, slot);
                btrfs_item_key_to_cpu(leaf, &found_key, slot);
 
@@ -4287,7 +4288,7 @@ static int btrfs_real_readdir(struct file *filp, void *dirent,
                if (btrfs_key_type(&found_key) != key_type)
                        break;
                if (found_key.offset < filp->f_pos)
-                       continue;
+                       goto next;
 
                filp->f_pos = found_key.offset;
 
@@ -4340,6 +4341,8 @@ skip:
                        di_cur += di_len;
                        di = (struct btrfs_dir_item *)((char *)di + di_len);
                }
+next:
+               path->slots[0]++;
        }
 
        /* Reached end of directory/root. Bump pos past the last item. */
@@ -4532,14 +4535,17 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
        BUG_ON(!path);
 
        inode = new_inode(root->fs_info->sb);
-       if (!inode)
+       if (!inode) {
+               btrfs_free_path(path);
                return ERR_PTR(-ENOMEM);
+       }
 
        if (dir) {
                trace_btrfs_inode_request(dir);
 
                ret = btrfs_set_inode_index(dir, index);
                if (ret) {
+                       btrfs_free_path(path);
                        iput(inode);
                        return ERR_PTR(ret);
                }
@@ -4726,9 +4732,10 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
        inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,
                                dentry->d_name.len, dir->i_ino, objectid,
                                BTRFS_I(dir)->block_group, mode, &index);
-       err = PTR_ERR(inode);
-       if (IS_ERR(inode))
+       if (IS_ERR(inode)) {
+               err = PTR_ERR(inode);
                goto out_unlock;
+       }
 
        err = btrfs_init_inode_security(trans, inode, dir, &dentry->d_name);
        if (err) {
@@ -4787,9 +4794,10 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
        inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,
                                dentry->d_name.len, dir->i_ino, objectid,
                                BTRFS_I(dir)->block_group, mode, &index);
-       err = PTR_ERR(inode);
-       if (IS_ERR(inode))
+       if (IS_ERR(inode)) {
+               err = PTR_ERR(inode);
                goto out_unlock;
+       }
 
        err = btrfs_init_inode_security(trans, inode, dir, &dentry->d_name);
        if (err) {
@@ -4839,9 +4847,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
        if (inode->i_nlink == ~0U)
                return -EMLINK;
 
-       btrfs_inc_nlink(inode);
-       inode->i_ctime = CURRENT_TIME;
-
        err = btrfs_set_inode_index(dir, &index);
        if (err)
                goto fail;
@@ -4857,6 +4862,9 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
                goto fail;
        }
 
+       btrfs_inc_nlink(inode);
+       inode->i_ctime = CURRENT_TIME;
+
        btrfs_set_trans_block_group(trans, dir);
        ihold(inode);
 
@@ -4994,6 +5002,8 @@ static noinline int uncompress_inline(struct btrfs_path *path,
        inline_size = btrfs_file_extent_inline_item_len(leaf,
                                        btrfs_item_nr(leaf, path->slots[0]));
        tmp = kmalloc(inline_size, GFP_NOFS);
+       if (!tmp)
+               return -ENOMEM;
        ptr = btrfs_file_extent_inline_start(item);
 
        read_extent_buffer(leaf, tmp, ptr, inline_size);
@@ -5226,7 +5236,7 @@ again:
                        btrfs_mark_buffer_dirty(leaf);
                }
                set_extent_uptodate(io_tree, em->start,
-                                   extent_map_end(em) - 1, GFP_NOFS);
+                                   extent_map_end(em) - 1, NULL, GFP_NOFS);
                goto insert;
        } else {
                printk(KERN_ERR "btrfs unknown found_type %d\n", found_type);
@@ -5433,17 +5443,30 @@ out:
 }
 
 static struct extent_map *btrfs_new_extent_direct(struct inode *inode,
+                                                 struct extent_map *em,
                                                  u64 start, u64 len)
 {
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct btrfs_trans_handle *trans;
-       struct extent_map *em;
        struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
        struct btrfs_key ins;
        u64 alloc_hint;
        int ret;
+       bool insert = false;
 
-       btrfs_drop_extent_cache(inode, start, start + len - 1, 0);
+       /*
+        * Ok if the extent map we looked up is a hole and is for the exact
+        * range we want, there is no reason to allocate a new one, however if
+        * it is not right then we need to free this one and drop the cache for
+        * our range.
+        */
+       if (em->block_start != EXTENT_MAP_HOLE || em->start != start ||
+           em->len != len) {
+               free_extent_map(em);
+               em = NULL;
+               insert = true;
+               btrfs_drop_extent_cache(inode, start, start + len - 1, 0);
+       }
 
        trans = btrfs_join_transaction(root, 0);
        if (IS_ERR(trans))
@@ -5459,10 +5482,12 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode,
                goto out;
        }
 
-       em = alloc_extent_map(GFP_NOFS);
        if (!em) {
-               em = ERR_PTR(-ENOMEM);
-               goto out;
+               em = alloc_extent_map(GFP_NOFS);
+               if (!em) {
+                       em = ERR_PTR(-ENOMEM);
+                       goto out;
+               }
        }
 
        em->start = start;
@@ -5472,9 +5497,15 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode,
        em->block_start = ins.objectid;
        em->block_len = ins.offset;
        em->bdev = root->fs_info->fs_devices->latest_bdev;
+
+       /*
+        * We need to do this because if we're using the original em we searched
+        * for, we could have EXTENT_FLAG_VACANCY set, and we don't want that.
+        */
+       em->flags = 0;
        set_bit(EXTENT_FLAG_PINNED, &em->flags);
 
-       while (1) {
+       while (insert) {
                write_lock(&em_tree->lock);
                ret = add_extent_mapping(em_tree, em);
                write_unlock(&em_tree->lock);
@@ -5692,8 +5723,7 @@ must_cow:
         * it above
         */
        len = bh_result->b_size;
-       free_extent_map(em);
-       em = btrfs_new_extent_direct(inode, start, len);
+       em = btrfs_new_extent_direct(inode, em, start, len);
        if (IS_ERR(em))
                return PTR_ERR(em);
        len = min(len, em->len - (start - em->start));
@@ -5856,8 +5886,10 @@ again:
        }
 
        add_pending_csums(trans, inode, ordered->file_offset, &ordered->list);
-       btrfs_ordered_update_i_size(inode, 0, ordered);
-       btrfs_update_inode(trans, root, inode);
+       ret = btrfs_ordered_update_i_size(inode, 0, ordered);
+       if (!ret)
+               btrfs_update_inode(trans, root, inode);
+       ret = 0;
 out_unlock:
        unlock_extent_cached(&BTRFS_I(inode)->io_tree, ordered->file_offset,
                             ordered->file_offset + ordered->len - 1,
@@ -5943,7 +5975,7 @@ static struct bio *btrfs_dio_bio_alloc(struct block_device *bdev,
 
 static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode,
                                         int rw, u64 file_offset, int skip_sum,
-                                        u32 *csums)
+                                        u32 *csums, int async_submit)
 {
        int write = rw & REQ_WRITE;
        struct btrfs_root *root = BTRFS_I(inode)->root;
@@ -5954,13 +5986,24 @@ static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode,
        if (ret)
                goto err;
 
-       if (write && !skip_sum) {
+       if (skip_sum)
+               goto map;
+
+       if (write && async_submit) {
                ret = btrfs_wq_submit_bio(root->fs_info,
                                   inode, rw, bio, 0, 0,
                                   file_offset,
                                   __btrfs_submit_bio_start_direct_io,
                                   __btrfs_submit_bio_done);
                goto err;
+       } else if (write) {
+               /*
+                * If we aren't doing async submit, calculate the csum of the
+                * bio now.
+                */
+               ret = btrfs_csum_one_bio(root, inode, bio, file_offset, 1);
+               if (ret)
+                       goto err;
        } else if (!skip_sum) {
                ret = btrfs_lookup_bio_sums_dio(root, inode, bio,
                                          file_offset, csums);
@@ -5968,7 +6011,8 @@ static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode,
                        goto err;
        }
 
-       ret = btrfs_map_bio(root, rw, bio, 0, 1);
+map:
+       ret = btrfs_map_bio(root, rw, bio, 0, async_submit);
 err:
        bio_put(bio);
        return ret;
@@ -5990,23 +6034,30 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip,
        int nr_pages = 0;
        u32 *csums = dip->csums;
        int ret = 0;
+       int async_submit = 0;
        int write = rw & REQ_WRITE;
 
-       bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS);
-       if (!bio)
-               return -ENOMEM;
-       bio->bi_private = dip;
-       bio->bi_end_io = btrfs_end_dio_bio;
-       atomic_inc(&dip->pending_bios);
-
        map_length = orig_bio->bi_size;
        ret = btrfs_map_block(map_tree, READ, start_sector << 9,
                              &map_length, NULL, 0);
        if (ret) {
-               bio_put(bio);
+               bio_put(orig_bio);
                return -EIO;
        }
 
+       if (map_length >= orig_bio->bi_size) {
+               bio = orig_bio;
+               goto submit;
+       }
+
+       async_submit = 1;
+       bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS);
+       if (!bio)
+               return -ENOMEM;
+       bio->bi_private = dip;
+       bio->bi_end_io = btrfs_end_dio_bio;
+       atomic_inc(&dip->pending_bios);
+
        while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) {
                if (unlikely(map_length < submit_len + bvec->bv_len ||
                    bio_add_page(bio, bvec->bv_page, bvec->bv_len,
@@ -6020,7 +6071,7 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip,
                        atomic_inc(&dip->pending_bios);
                        ret = __btrfs_submit_dio_bio(bio, inode, rw,
                                                     file_offset, skip_sum,
-                                                    csums);
+                                                    csums, async_submit);
                        if (ret) {
                                bio_put(bio);
                                atomic_dec(&dip->pending_bios);
@@ -6057,8 +6108,9 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip,
                }
        }
 
+submit:
        ret = __btrfs_submit_dio_bio(bio, inode, rw, file_offset, skip_sum,
-                                    csums);
+                                    csums, async_submit);
        if (!ret)
                return 0;
 
@@ -6153,6 +6205,7 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io
                        unsigned long nr_segs)
 {
        int seg;
+       int i;
        size_t size;
        unsigned long addr;
        unsigned blocksize_mask = root->sectorsize - 1;
@@ -6167,8 +6220,22 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io
                addr = (unsigned long)iov[seg].iov_base;
                size = iov[seg].iov_len;
                end += size;
-               if ((addr & blocksize_mask) || (size & blocksize_mask)) 
+               if ((addr & blocksize_mask) || (size & blocksize_mask))
                        goto out;
+
+               /* If this is a write we don't need to check anymore */
+               if (rw & WRITE)
+                       continue;
+
+               /*
+                * Check to make sure we don't have duplicate iov_base's in this
+                * iovec, if so return EINVAL, otherwise we'll get csum errors
+                * when reading back.
+                */
+               for (i = seg + 1; i < nr_segs; i++) {
+                       if (iov[seg].iov_base == iov[i].iov_base)
+                               goto out;
+               }
        }
        retval = 0;
 out:
@@ -6960,8 +7027,10 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
         * should cover the worst case number of items we'll modify.
         */
        trans = btrfs_start_transaction(root, 20);
-       if (IS_ERR(trans))
-               return PTR_ERR(trans);
+       if (IS_ERR(trans)) {
+                ret = PTR_ERR(trans);
+                goto out_notrans;
+        }
 
        btrfs_set_trans_block_group(trans, new_dir);
 
@@ -7061,7 +7130,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        }
 out_fail:
        btrfs_end_transaction_throttle(trans, root);
-
+out_notrans:
        if (old_inode->i_ino == BTRFS_FIRST_FREE_OBJECTID)
                up_read(&root->fs_info->subvol_sem);
 
@@ -7209,9 +7278,10 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
                                dentry->d_name.len, dir->i_ino, objectid,
                                BTRFS_I(dir)->block_group, S_IFLNK|S_IRWXUGO,
                                &index);
-       err = PTR_ERR(inode);
-       if (IS_ERR(inode))
+       if (IS_ERR(inode)) {
+               err = PTR_ERR(inode);
                goto out_unlock;
+       }
 
        err = btrfs_init_inode_security(trans, inode, dir, &dentry->d_name);
        if (err) {
index 7c07fe26b7cfcf7e7872686da07f5676e87549c4..ffb48d6c54334ab8fe0d29ae4d69cfa1b22d613c 100644 (file)
@@ -373,6 +373,10 @@ static noinline int create_subvol(struct btrfs_root *root,
        inode_item->nbytes = cpu_to_le64(root->leafsize);
        inode_item->mode = cpu_to_le32(S_IFDIR | 0755);
 
+       root_item.flags = 0;
+       root_item.byte_limit = 0;
+       inode_item->flags = cpu_to_le64(BTRFS_INODE_ROOT_ITEM_INIT);
+
        btrfs_set_root_bytenr(&root_item, leaf->start);
        btrfs_set_root_generation(&root_item, trans->transid);
        btrfs_set_root_level(&root_item, 0);
@@ -2283,7 +2287,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
        struct btrfs_ioctl_space_info space;
        struct btrfs_ioctl_space_info *dest;
        struct btrfs_ioctl_space_info *dest_orig;
-       struct btrfs_ioctl_space_info *user_dest;
+       struct btrfs_ioctl_space_info __user *user_dest;
        struct btrfs_space_info *info;
        u64 types[] = {BTRFS_BLOCK_GROUP_DATA,
                       BTRFS_BLOCK_GROUP_SYSTEM,
@@ -2436,8 +2440,10 @@ static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp
                return PTR_ERR(trans);
        transid = trans->transid;
        ret = btrfs_commit_transaction_async(trans, root, 0);
-       if (ret)
+       if (ret) {
+               btrfs_end_transaction(trans, root);
                return ret;
+       }
 
        if (argp)
                if (copy_to_user(argp, &transid, sizeof(transid)))
index 58250e09eb056213944db6703d78679fbb94d35f..199a801343126d2ce61b4c5fe83ef4e059b60791 100644 (file)
@@ -2346,7 +2346,7 @@ struct btrfs_root *select_one_root(struct btrfs_trans_handle *trans,
                root = next->root;
                BUG_ON(!root);
 
-               /* no other choice for non-refernce counted tree */
+               /* no other choice for non-references counted tree */
                if (!root->ref_cows)
                        return root;
 
index 29b2d7c930eb3f9242e7df8734a1651844285fcf..6928bff62daa8370b4d9efce397fac35208c9611 100644 (file)
@@ -473,3 +473,21 @@ again:
        btrfs_free_path(path);
        return 0;
 }
+
+/*
+ * Old btrfs forgets to init root_item->flags and root_item->byte_limit
+ * for subvolumes. To work around this problem, we steal a bit from
+ * root_item->inode_item->flags, and use it to indicate if those fields
+ * have been properly initialized.
+ */
+void btrfs_check_and_init_root_item(struct btrfs_root_item *root_item)
+{
+       u64 inode_flags = le64_to_cpu(root_item->inode.flags);
+
+       if (!(inode_flags & BTRFS_INODE_ROOT_ITEM_INIT)) {
+               inode_flags |= BTRFS_INODE_ROOT_ITEM_INIT;
+               root_item->inode.flags = cpu_to_le64(inode_flags);
+               root_item->flags = 0;
+               root_item->byte_limit = 0;
+       }
+}
index 2edfc039f098531bac7f3320e1fc6c3a3b52f074..0ac712efcdf293ac8e858fef443b57316b039037 100644 (file)
@@ -159,7 +159,7 @@ enum {
        Opt_compress_type, Opt_compress_force, Opt_compress_force_type,
        Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard,
        Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed,
-       Opt_enospc_debug, Opt_err,
+       Opt_enospc_debug, Opt_subvolrootid, Opt_err,
 };
 
 static match_table_t tokens = {
@@ -189,6 +189,7 @@ static match_table_t tokens = {
        {Opt_clear_cache, "clear_cache"},
        {Opt_user_subvol_rm_allowed, "user_subvol_rm_allowed"},
        {Opt_enospc_debug, "enospc_debug"},
+       {Opt_subvolrootid, "subvolrootid=%d"},
        {Opt_err, NULL},
 };
 
@@ -232,6 +233,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
                        break;
                case Opt_subvol:
                case Opt_subvolid:
+               case Opt_subvolrootid:
                case Opt_device:
                        /*
                         * These are parsed by btrfs_parse_early_options
@@ -388,7 +390,7 @@ out:
  */
 static int btrfs_parse_early_options(const char *options, fmode_t flags,
                void *holder, char **subvol_name, u64 *subvol_objectid,
-               struct btrfs_fs_devices **fs_devices)
+               u64 *subvol_rootid, struct btrfs_fs_devices **fs_devices)
 {
        substring_t args[MAX_OPT_ARGS];
        char *opts, *orig, *p;
@@ -429,6 +431,18 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
                                        *subvol_objectid = intarg;
                        }
                        break;
+               case Opt_subvolrootid:
+                       intarg = 0;
+                       error = match_int(&args[0], &intarg);
+                       if (!error) {
+                               /* we want the original fs_tree */
+                               if (!intarg)
+                                       *subvol_rootid =
+                                               BTRFS_FS_TREE_OBJECTID;
+                               else
+                                       *subvol_rootid = intarg;
+                       }
+                       break;
                case Opt_device:
                        error = btrfs_scan_one_device(match_strdup(&args[0]),
                                        flags, holder, fs_devices);
@@ -644,6 +658,7 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
 {
        struct btrfs_root *root = btrfs_sb(vfs->mnt_sb);
        struct btrfs_fs_info *info = root->fs_info;
+       char *compress_type;
 
        if (btrfs_test_opt(root, DEGRADED))
                seq_puts(seq, ",degraded");
@@ -662,8 +677,16 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
        if (info->thread_pool_size !=  min_t(unsigned long,
                                             num_online_cpus() + 2, 8))
                seq_printf(seq, ",thread_pool=%d", info->thread_pool_size);
-       if (btrfs_test_opt(root, COMPRESS))
-               seq_puts(seq, ",compress");
+       if (btrfs_test_opt(root, COMPRESS)) {
+               if (info->compress_type == BTRFS_COMPRESS_ZLIB)
+                       compress_type = "zlib";
+               else
+                       compress_type = "lzo";
+               if (btrfs_test_opt(root, FORCE_COMPRESS))
+                       seq_printf(seq, ",compress-force=%s", compress_type);
+               else
+                       seq_printf(seq, ",compress=%s", compress_type);
+       }
        if (btrfs_test_opt(root, NOSSD))
                seq_puts(seq, ",nossd");
        if (btrfs_test_opt(root, SSD_SPREAD))
@@ -678,6 +701,12 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
                seq_puts(seq, ",discard");
        if (!(root->fs_info->sb->s_flags & MS_POSIXACL))
                seq_puts(seq, ",noacl");
+       if (btrfs_test_opt(root, SPACE_CACHE))
+               seq_puts(seq, ",space_cache");
+       if (btrfs_test_opt(root, CLEAR_CACHE))
+               seq_puts(seq, ",clear_cache");
+       if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED))
+               seq_puts(seq, ",user_subvol_rm_allowed");
        return 0;
 }
 
@@ -721,6 +750,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
        fmode_t mode = FMODE_READ;
        char *subvol_name = NULL;
        u64 subvol_objectid = 0;
+       u64 subvol_rootid = 0;
        int error = 0;
 
        if (!(flags & MS_RDONLY))
@@ -728,7 +758,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
 
        error = btrfs_parse_early_options(data, mode, fs_type,
                                          &subvol_name, &subvol_objectid,
-                                         &fs_devices);
+                                         &subvol_rootid, &fs_devices);
        if (error)
                return ERR_PTR(error);
 
@@ -792,15 +822,17 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
                s->s_flags |= MS_ACTIVE;
        }
 
-       root = get_default_root(s, subvol_objectid);
-       if (IS_ERR(root)) {
-               error = PTR_ERR(root);
-               deactivate_locked_super(s);
-               goto error_free_subvol_name;
-       }
        /* if they gave us a subvolume name bind mount into that */
        if (strcmp(subvol_name, ".")) {
                struct dentry *new_root;
+
+               root = get_default_root(s, subvol_rootid);
+               if (IS_ERR(root)) {
+                       error = PTR_ERR(root);
+                       deactivate_locked_super(s);
+                       goto error_free_subvol_name;
+               }
+
                mutex_lock(&root->d_inode->i_mutex);
                new_root = lookup_one_len(subvol_name, root,
                                      strlen(subvol_name));
@@ -821,6 +853,13 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
                }
                dput(root);
                root = new_root;
+       } else {
+               root = get_default_root(s, subvol_objectid);
+               if (IS_ERR(root)) {
+                       error = PTR_ERR(root);
+                       deactivate_locked_super(s);
+                       goto error_free_subvol_name;
+               }
        }
 
        kfree(subvol_name);
index ce48eb59d6156dd72b8cfe4344e50411abe47d98..c571734d5e5a802ea73a0c6458dd41c0b2e56659 100644 (file)
 
 static noinline void put_transaction(struct btrfs_transaction *transaction)
 {
-       WARN_ON(transaction->use_count == 0);
-       transaction->use_count--;
-       if (transaction->use_count == 0) {
-               list_del_init(&transaction->list);
+       WARN_ON(atomic_read(&transaction->use_count) == 0);
+       if (atomic_dec_and_test(&transaction->use_count)) {
                memset(transaction, 0, sizeof(*transaction));
                kmem_cache_free(btrfs_transaction_cachep, transaction);
        }
@@ -60,14 +58,14 @@ static noinline int join_transaction(struct btrfs_root *root)
                if (!cur_trans)
                        return -ENOMEM;
                root->fs_info->generation++;
-               cur_trans->num_writers = 1;
+               atomic_set(&cur_trans->num_writers, 1);
                cur_trans->num_joined = 0;
                cur_trans->transid = root->fs_info->generation;
                init_waitqueue_head(&cur_trans->writer_wait);
                init_waitqueue_head(&cur_trans->commit_wait);
                cur_trans->in_commit = 0;
                cur_trans->blocked = 0;
-               cur_trans->use_count = 1;
+               atomic_set(&cur_trans->use_count, 1);
                cur_trans->commit_done = 0;
                cur_trans->start_time = get_seconds();
 
@@ -88,7 +86,7 @@ static noinline int join_transaction(struct btrfs_root *root)
                root->fs_info->running_transaction = cur_trans;
                spin_unlock(&root->fs_info->new_trans_lock);
        } else {
-               cur_trans->num_writers++;
+               atomic_inc(&cur_trans->num_writers);
                cur_trans->num_joined++;
        }
 
@@ -145,7 +143,7 @@ static void wait_current_trans(struct btrfs_root *root)
        cur_trans = root->fs_info->running_transaction;
        if (cur_trans && cur_trans->blocked) {
                DEFINE_WAIT(wait);
-               cur_trans->use_count++;
+               atomic_inc(&cur_trans->use_count);
                while (1) {
                        prepare_to_wait(&root->fs_info->transaction_wait, &wait,
                                        TASK_UNINTERRUPTIBLE);
@@ -181,6 +179,7 @@ static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root,
 {
        struct btrfs_trans_handle *h;
        struct btrfs_transaction *cur_trans;
+       int retries = 0;
        int ret;
 
        if (root->fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR)
@@ -197,13 +196,14 @@ again:
 
        ret = join_transaction(root);
        if (ret < 0) {
+               kmem_cache_free(btrfs_trans_handle_cachep, h);
                if (type != TRANS_JOIN_NOLOCK)
                        mutex_unlock(&root->fs_info->trans_mutex);
                return ERR_PTR(ret);
        }
 
        cur_trans = root->fs_info->running_transaction;
-       cur_trans->use_count++;
+       atomic_inc(&cur_trans->use_count);
        if (type != TRANS_JOIN_NOLOCK)
                mutex_unlock(&root->fs_info->trans_mutex);
 
@@ -223,10 +223,18 @@ again:
 
        if (num_items > 0) {
                ret = btrfs_trans_reserve_metadata(h, root, num_items);
-               if (ret == -EAGAIN) {
+               if (ret == -EAGAIN && !retries) {
+                       retries++;
                        btrfs_commit_transaction(h, root);
                        goto again;
+               } else if (ret == -EAGAIN) {
+                       /*
+                        * We have already retried and got EAGAIN, so really we
+                        * don't have space, so set ret to -ENOSPC.
+                        */
+                       ret = -ENOSPC;
                }
+
                if (ret < 0) {
                        btrfs_end_transaction(h, root);
                        return ERR_PTR(ret);
@@ -326,7 +334,7 @@ int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid)
                        goto out_unlock;  /* nothing committing|committed */
        }
 
-       cur_trans->use_count++;
+       atomic_inc(&cur_trans->use_count);
        mutex_unlock(&root->fs_info->trans_mutex);
 
        wait_for_commit(root, cur_trans);
@@ -456,18 +464,14 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
                        wake_up_process(info->transaction_kthread);
        }
 
-       if (lock)
-               mutex_lock(&info->trans_mutex);
        WARN_ON(cur_trans != info->running_transaction);
-       WARN_ON(cur_trans->num_writers < 1);
-       cur_trans->num_writers--;
+       WARN_ON(atomic_read(&cur_trans->num_writers) < 1);
+       atomic_dec(&cur_trans->num_writers);
 
        smp_mb();
        if (waitqueue_active(&cur_trans->writer_wait))
                wake_up(&cur_trans->writer_wait);
        put_transaction(cur_trans);
-       if (lock)
-               mutex_unlock(&info->trans_mutex);
 
        if (current->journal_info == trans)
                current->journal_info = NULL;
@@ -975,6 +979,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
        record_root_in_trans(trans, root);
        btrfs_set_root_last_snapshot(&root->root_item, trans->transid);
        memcpy(new_root_item, &root->root_item, sizeof(*new_root_item));
+       btrfs_check_and_init_root_item(new_root_item);
 
        root_flags = btrfs_root_flags(new_root_item);
        if (pending->readonly)
@@ -1176,7 +1181,7 @@ int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans,
        /* take transaction reference */
        mutex_lock(&root->fs_info->trans_mutex);
        cur_trans = trans->transaction;
-       cur_trans->use_count++;
+       atomic_inc(&cur_trans->use_count);
        mutex_unlock(&root->fs_info->trans_mutex);
 
        btrfs_end_transaction(trans, root);
@@ -1235,7 +1240,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
 
        mutex_lock(&root->fs_info->trans_mutex);
        if (cur_trans->in_commit) {
-               cur_trans->use_count++;
+               atomic_inc(&cur_trans->use_count);
                mutex_unlock(&root->fs_info->trans_mutex);
                btrfs_end_transaction(trans, root);
 
@@ -1257,7 +1262,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
                prev_trans = list_entry(cur_trans->list.prev,
                                        struct btrfs_transaction, list);
                if (!prev_trans->commit_done) {
-                       prev_trans->use_count++;
+                       atomic_inc(&prev_trans->use_count);
                        mutex_unlock(&root->fs_info->trans_mutex);
 
                        wait_for_commit(root, prev_trans);
@@ -1298,14 +1303,14 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
                                TASK_UNINTERRUPTIBLE);
 
                smp_mb();
-               if (cur_trans->num_writers > 1)
+               if (atomic_read(&cur_trans->num_writers) > 1)
                        schedule_timeout(MAX_SCHEDULE_TIMEOUT);
                else if (should_grow)
                        schedule_timeout(1);
 
                mutex_lock(&root->fs_info->trans_mutex);
                finish_wait(&cur_trans->writer_wait, &wait);
-       } while (cur_trans->num_writers > 1 ||
+       } while (atomic_read(&cur_trans->num_writers) > 1 ||
                 (should_grow && cur_trans->num_joined != joined));
 
        ret = create_pending_snapshots(trans, root->fs_info);
@@ -1392,6 +1397,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
 
        wake_up(&cur_trans->commit_wait);
 
+       list_del_init(&cur_trans->list);
        put_transaction(cur_trans);
        put_transaction(cur_trans);
 
index 229a594cacd5a15c8bbd71ed1575f57d615945e4..e441acc6c584a7e03859d3e63cd3e455312ff631 100644 (file)
@@ -27,11 +27,11 @@ struct btrfs_transaction {
         * total writers in this transaction, it must be zero before the
         * transaction can end
         */
-       unsigned long num_writers;
+       atomic_t num_writers;
 
        unsigned long num_joined;
        int in_commit;
-       int use_count;
+       atomic_t use_count;
        int commit_done;
        int blocked;
        struct list_head list;
index c50271ad3157675059656d8113e9804cf3872dfb..f997ec0c1ba4b8efb6b46f88160de43cda3da4f2 100644 (file)
@@ -2209,8 +2209,10 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
 
        log = root->log_root;
        path = btrfs_alloc_path();
-       if (!path)
-               return -ENOMEM;
+       if (!path) {
+               err = -ENOMEM;
+               goto out_unlock;
+       }
 
        di = btrfs_lookup_dir_item(trans, log, path, dir->i_ino,
                                   name, name_len, -1);
@@ -2271,6 +2273,7 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
        }
 fail:
        btrfs_free_path(path);
+out_unlock:
        mutex_unlock(&BTRFS_I(dir)->log_mutex);
        if (ret == -ENOSPC) {
                root->fs_info->last_trans_log_full_commit = trans->transid;
index 309a57b9fc85e3a6f09809da14d0cd9e1df55fb5..c7367ae5a3e6d9427add05ebf8a594ae92e81d5b 100644 (file)
@@ -155,6 +155,15 @@ static noinline int run_scheduled_bios(struct btrfs_device *device)
        unsigned long limit;
        unsigned long last_waited = 0;
        int force_reg = 0;
+       struct blk_plug plug;
+
+       /*
+        * this function runs all the bios we've collected for
+        * a particular device.  We don't want to wander off to
+        * another device without first sending all of these down.
+        * So, setup a plug here and finish it off before we return
+        */
+       blk_start_plug(&plug);
 
        bdi = blk_get_backing_dev_info(device->bdev);
        fs_info = device->dev_root->fs_info;
@@ -294,6 +303,7 @@ loop_lock:
        spin_unlock(&device->io_lock);
 
 done:
+       blk_finish_plug(&plug);
        return 0;
 }
 
index a5303b871b13874d574edb6dec5642cf2286e7cb..cfd660550ded035fd2fad7aadce102aa23fc27fb 100644 (file)
@@ -180,11 +180,10 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
        struct btrfs_path *path;
        struct extent_buffer *leaf;
        struct btrfs_dir_item *di;
-       int ret = 0, slot, advance;
+       int ret = 0, slot;
        size_t total_size = 0, size_left = size;
        unsigned long name_ptr;
        size_t name_len;
-       u32 nritems;
 
        /*
         * ok we want all objects associated with this id.
@@ -204,34 +203,24 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
        ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
        if (ret < 0)
                goto err;
-       advance = 0;
+
        while (1) {
                leaf = path->nodes[0];
-               nritems = btrfs_header_nritems(leaf);
                slot = path->slots[0];
 
                /* this is where we start walking through the path */
-               if (advance || slot >= nritems) {
+               if (slot >= btrfs_header_nritems(leaf)) {
                        /*
                         * if we've reached the last slot in this leaf we need
                         * to go to the next leaf and reset everything
                         */
-                       if (slot >= nritems-1) {
-                               ret = btrfs_next_leaf(root, path);
-                               if (ret)
-                                       break;
-                               leaf = path->nodes[0];
-                               nritems = btrfs_header_nritems(leaf);
-                               slot = path->slots[0];
-                       } else {
-                               /*
-                                * just walking through the slots on this leaf
-                                */
-                               slot++;
-                               path->slots[0]++;
-                       }
+                       ret = btrfs_next_leaf(root, path);
+                       if (ret < 0)
+                               goto err;
+                       else if (ret > 0)
+                               break;
+                       continue;
                }
-               advance = 1;
 
                btrfs_item_key_to_cpu(leaf, &found_key, slot);
 
@@ -250,7 +239,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
 
                /* we are just looking for how big our buffer needs to be */
                if (!size)
-                       continue;
+                       goto next;
 
                if (!buffer || (name_len + 1) > size_left) {
                        ret = -ERANGE;
@@ -263,6 +252,8 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
 
                size_left -= name_len + 1;
                buffer += name_len + 1;
+next:
+               path->slots[0]++;
        }
        ret = total_size;
 
index 37fe101a4e0dd22a85f4628e98285cc33c3ad879..1064805e653b481a086f3b51ad4d8bf32784b56b 100644 (file)
@@ -197,7 +197,7 @@ struct fscache_object *cachefiles_grab_object(struct fscache_object *_object)
 }
 
 /*
- * update the auxilliary data for an object object on disk
+ * update the auxiliary data for an object object on disk
  */
 static void cachefiles_update_object(struct fscache_object *_object)
 {
index 37368ba2e67c111352287c379c1f7b0235595c1c..e159c529fd2bbc845bbd893f645ac7633d91b9eb 100644 (file)
@@ -24,7 +24,7 @@
  * context needs to be associated with the osd write during writeback.
  *
  * Similarly, struct ceph_inode_info maintains a set of counters to
- * count dirty pages on the inode.  In the absense of snapshots,
+ * count dirty pages on the inode.  In the absence of snapshots,
  * i_wrbuffer_ref == i_wrbuffer_ref_head == the dirty page count.
  *
  * When a snapshot is taken (that is, when the client receives
index 6b61ded701e10a23b61199b91536f2178c629275..5323c330bbf3d4acad87fe6a48701b9ee7f27589 100644 (file)
@@ -765,7 +765,7 @@ int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int touch)
                        if (touch) {
                                struct rb_node *q;
 
-                               /* touch this + preceeding caps */
+                               /* touch this + preceding caps */
                                __touch_cap(cap);
                                for (q = rb_first(&ci->i_caps); q != p;
                                     q = rb_next(q)) {
index 0aee66b92af3158ff5ce9055c0a0490068d0a219..e86ec1155f8f401ec2722f6b8ae005f48c6d9a42 100644 (file)
@@ -342,7 +342,7 @@ static int build_snap_context(struct ceph_snap_realm *realm)
        num = 0;
        snapc->seq = realm->seq;
        if (parent) {
-               /* include any of parent's snaps occuring _after_ my
+               /* include any of parent's snaps occurring _after_ my
                   parent became my parent */
                for (i = 0; i < parent->cached_context->num_snaps; i++)
                        if (parent->cached_context->snaps[i] >=
index 7f7fa3c302aff6d7eaca09fcacf75b0ffde74f3f..ea940b1db77bdb1330b4efc795ad08b023e9acd2 100644 (file)
@@ -35,7 +35,7 @@ Adrian Bunk (kcalloc cleanups)
 Miklos Szeredi 
 Kazeon team for various fixes especially for 2.4 version.
 Asser Ferno (Change Notify support)
-Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup
+Shaggy (Dave Kleikamp) for innumerable small fs suggestions and some good cleanup
 Gunter Kukkukk (testing and suggestions for support of old servers)
 Igor Mammedov (DFS support)
 Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code)
index fe1683590828a0ed011fa4a2e6ca6cc157292dca..74ab165fc646aea64d873900b64696a2ef35f471 100644 (file)
@@ -685,22 +685,6 @@ LinuxExtensionsEnabled     If set to one then the client will attempt to
                        support and want to map the uid and gid fields 
                        to values supplied at mount (rather than the 
                        actual values, then set this to zero. (default 1)
-Experimental            When set to 1 used to enable certain experimental
-                       features (currently enables multipage writes
-                       when signing is enabled, the multipage write
-                       performance enhancement was disabled when
-                       signing turned on in case buffer was modified
-                       just before it was sent, also this flag will
-                       be used to use the new experimental directory change 
-                       notification code).  When set to 2 enables
-                       an additional experimental feature, "raw ntlmssp"
-                       session establishment support (which allows
-                       specifying "sec=ntlmssp" on mount). The Linux cifs
-                       module will use ntlmv2 authentication encapsulated
-                       in "raw ntlmssp" (not using SPNEGO) when
-                       "sec=ntlmssp" is specified on mount.
-                       This support also requires building cifs with
-                       the CONFIG_CIFS_EXPERIMENTAL configuration flag.
 
 These experimental features and tracing can be enabled by changing flags in 
 /proc/fs/cifs (after the cifs module has been installed or built into the 
index e654dfd092c3a8d0333af9771156898d1c9ed65e..53d57a3fe427c3d94218a7f54b4ab87df3d68031 100644 (file)
@@ -50,7 +50,7 @@ void cifs_fscache_unregister(void)
  */
 struct cifs_server_key {
        uint16_t        family;         /* address family */
-       uint16_t        port;           /* IP port */
+       __be16          port;           /* IP port */
        union {
                struct in_addr  ipv4_addr;
                struct in6_addr ipv6_addr;
index 65829d32128c253a661ecd61dc50f4893bc9f52d..30d01bc9085556bc810ce4d233f358728e6bea44 100644 (file)
@@ -423,7 +423,6 @@ static const struct file_operations cifs_lookup_cache_proc_fops;
 static const struct file_operations traceSMB_proc_fops;
 static const struct file_operations cifs_multiuser_mount_proc_fops;
 static const struct file_operations cifs_security_flags_proc_fops;
-static const struct file_operations cifs_experimental_proc_fops;
 static const struct file_operations cifs_linux_ext_proc_fops;
 
 void
@@ -441,8 +440,6 @@ cifs_proc_init(void)
        proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops);
        proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops);
        proc_create("OplockEnabled", 0, proc_fs_cifs, &cifs_oplock_proc_fops);
-       proc_create("Experimental", 0, proc_fs_cifs,
-                   &cifs_experimental_proc_fops);
        proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs,
                    &cifs_linux_ext_proc_fops);
        proc_create("MultiuserMount", 0, proc_fs_cifs,
@@ -469,7 +466,6 @@ cifs_proc_clean(void)
        remove_proc_entry("OplockEnabled", proc_fs_cifs);
        remove_proc_entry("SecurityFlags", proc_fs_cifs);
        remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs);
-       remove_proc_entry("Experimental", proc_fs_cifs);
        remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
        remove_proc_entry("fs/cifs", NULL);
 }
@@ -550,45 +546,6 @@ static const struct file_operations cifs_oplock_proc_fops = {
        .write          = cifs_oplock_proc_write,
 };
 
-static int cifs_experimental_proc_show(struct seq_file *m, void *v)
-{
-       seq_printf(m, "%d\n", experimEnabled);
-       return 0;
-}
-
-static int cifs_experimental_proc_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, cifs_experimental_proc_show, NULL);
-}
-
-static ssize_t cifs_experimental_proc_write(struct file *file,
-               const char __user *buffer, size_t count, loff_t *ppos)
-{
-       char c;
-       int rc;
-
-       rc = get_user(c, buffer);
-       if (rc)
-               return rc;
-       if (c == '0' || c == 'n' || c == 'N')
-               experimEnabled = 0;
-       else if (c == '1' || c == 'y' || c == 'Y')
-               experimEnabled = 1;
-       else if (c == '2')
-               experimEnabled = 2;
-
-       return count;
-}
-
-static const struct file_operations cifs_experimental_proc_fops = {
-       .owner          = THIS_MODULE,
-       .open           = cifs_experimental_proc_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-       .write          = cifs_experimental_proc_write,
-};
-
 static int cifs_linux_ext_proc_show(struct seq_file *m, void *v)
 {
        seq_printf(m, "%d\n", linuxExtEnabled);
index 0a265ad9e426ef0e9ec217604454db666290ff10..2b68ac57d97d3ffdd0bc8bd425cff8ef121138a3 100644 (file)
@@ -53,7 +53,7 @@ void cifs_dfs_release_automount_timer(void)
  *
  * Extracts sharename form full UNC.
  * i.e. strips from UNC trailing path that is not part of share
- * name and fixup missing '\' in the begining of DFS node refferal
+ * name and fixup missing '\' in the beginning of DFS node refferal
  * if necessary.
  * Returns pointer to share name on success or ERR_PTR on error.
  * Caller is responsible for freeing returned string.
index 4dfba82831654910b3aab62a9803dc95855a52f1..33d221394acae068807adea4eeca47317a821888 100644 (file)
@@ -113,7 +113,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
                   MAX_MECH_STR_LEN +
                   UID_KEY_LEN + (sizeof(uid_t) * 2) +
                   CREDUID_KEY_LEN + (sizeof(uid_t) * 2) +
-                  USER_KEY_LEN + strlen(sesInfo->userName) +
+                  USER_KEY_LEN + strlen(sesInfo->user_name) +
                   PID_KEY_LEN + (sizeof(pid_t) * 2) + 1;
 
        spnego_key = ERR_PTR(-ENOMEM);
@@ -153,7 +153,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
        sprintf(dp, ";creduid=0x%x", sesInfo->cred_uid);
 
        dp = description + strlen(description);
-       sprintf(dp, ";user=%s", sesInfo->userName);
+       sprintf(dp, ";user=%s", sesInfo->user_name);
 
        dp = description + strlen(description);
        sprintf(dp, ";pid=0x%x", current->pid);
index fc0fd4fde306b989c1593ef11ce2611fd49dca54..23d43cde4306042407dcd3df76d78ab81b793db7 100644 (file)
@@ -90,7 +90,7 @@ cifs_mapchar(char *target, const __u16 src_char, const struct nls_table *cp,
        case UNI_COLON:
                *target = ':';
                break;
-       case UNI_ASTERIK:
+       case UNI_ASTERISK:
                *target = '*';
                break;
        case UNI_QUESTION:
@@ -264,40 +264,40 @@ cifs_strndup_from_ucs(const char *src, const int maxlen, const bool is_unicode,
  * names are little endian 16 bit Unicode on the wire
  */
 int
-cifsConvertToUCS(__le16 *target, const char *source, int maxlen,
+cifsConvertToUCS(__le16 *target, const char *source, int srclen,
                 const struct nls_table *cp, int mapChars)
 {
        int i, j, charlen;
-       int len_remaining = maxlen;
        char src_char;
-       __u16 temp;
+       __le16 dst_char;
+       wchar_t tmp;
 
        if (!mapChars)
                return cifs_strtoUCS(target, source, PATH_MAX, cp);
 
-       for (i = 0, j = 0; i < maxlen; j++) {
+       for (i = 0, j = 0; i < srclen; j++) {
                src_char = source[i];
                switch (src_char) {
                case 0:
-                       put_unaligned_le16(0, &target[j]);
+                       put_unaligned(0, &target[j]);
                        goto ctoUCS_out;
                case ':':
-                       temp = UNI_COLON;
+                       dst_char = cpu_to_le16(UNI_COLON);
                        break;
                case '*':
-                       temp = UNI_ASTERIK;
+                       dst_char = cpu_to_le16(UNI_ASTERISK);
                        break;
                case '?':
-                       temp = UNI_QUESTION;
+                       dst_char = cpu_to_le16(UNI_QUESTION);
                        break;
                case '<':
-                       temp = UNI_LESSTHAN;
+                       dst_char = cpu_to_le16(UNI_LESSTHAN);
                        break;
                case '>':
-                       temp = UNI_GRTRTHAN;
+                       dst_char = cpu_to_le16(UNI_GRTRTHAN);
                        break;
                case '|':
-                       temp = UNI_PIPE;
+                       dst_char = cpu_to_le16(UNI_PIPE);
                        break;
                /*
                 * FIXME: We can not handle remapping backslash (UNI_SLASH)
@@ -305,17 +305,17 @@ cifsConvertToUCS(__le16 *target, const char *source, int maxlen,
                 * as they use backslash as separator.
                 */
                default:
-                       charlen = cp->char2uni(source+i, len_remaining,
-                                               &temp);
+                       charlen = cp->char2uni(source + i, srclen - i, &tmp);
+                       dst_char = cpu_to_le16(tmp);
+
                        /*
                         * if no match, use question mark, which at least in
                         * some cases serves as wild card
                         */
                        if (charlen < 1) {
-                               temp = 0x003f;
+                               dst_char = cpu_to_le16(0x003f);
                                charlen = 1;
                        }
-                       len_remaining -= charlen;
                        /*
                         * character may take more than one byte in the source
                         * string, but will take exactly two bytes in the
@@ -324,9 +324,8 @@ cifsConvertToUCS(__le16 *target, const char *source, int maxlen,
                        i += charlen;
                        continue;
                }
-               put_unaligned_le16(temp, &target[j]);
+               put_unaligned(dst_char, &target[j]);
                i++; /* move to next char in source string */
-               len_remaining--;
        }
 
 ctoUCS_out:
index 7fe6b52df5076a2eb14a7ec563403795e2e4c041..644dd882a5604c5ed6f900aad2a47478bc31b49a 100644 (file)
@@ -44,7 +44,7 @@
  * reserved symbols (along with \ and /), otherwise illegal to store
  * in filenames in NTFS
  */
-#define UNI_ASTERI    (__u16) ('*' + 0xF000)
+#define UNI_ASTERISK    (__u16) ('*' + 0xF000)
 #define UNI_QUESTION    (__u16) ('?' + 0xF000)
 #define UNI_COLON       (__u16) (':' + 0xF000)
 #define UNI_GRTRTHAN    (__u16) ('>' + 0xF000)
index a51585f9852b4627735e318e83478cbf512c9fbc..d1a016be73ba75c7a70cb099cd5fdb55150926a9 100644 (file)
 #include <linux/ctype.h>
 #include <linux/random.h>
 
-/* Calculate and return the CIFS signature based on the mac key and SMB PDU */
-/* the 16 byte signature must be allocated by the caller  */
-/* Note we only use the 1st eight bytes */
-/* Note that the smb header signature field on input contains the
-       sequence number before this function is called */
-
+/*
+ * Calculate and return the CIFS signature based on the mac key and SMB PDU.
+ * The 16 byte signature must be allocated by the caller. Note we only use the
+ * 1st eight bytes and that the smb header signature field on input contains
+ * the sequence number before this function is called. Also, this function
+ * should be called with the server->srv_mutex held.
+ */
 static int cifs_calculate_signature(const struct smb_hdr *cifs_pdu,
                                struct TCP_Server_Info *server, char *signature)
 {
@@ -209,8 +210,10 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu,
                                        cpu_to_le32(expected_sequence_number);
        cifs_pdu->Signature.Sequence.Reserved = 0;
 
+       mutex_lock(&server->srv_mutex);
        rc = cifs_calculate_signature(cifs_pdu, server,
                what_we_think_sig_should_be);
+       mutex_unlock(&server->srv_mutex);
 
        if (rc)
                return rc;
@@ -469,15 +472,15 @@ static int calc_ntlmv2_hash(struct cifsSesInfo *ses, char *ntlmv2_hash,
                return rc;
        }
 
-       /* convert ses->userName to unicode and uppercase */
-       len = strlen(ses->userName);
+       /* convert ses->user_name to unicode and uppercase */
+       len = strlen(ses->user_name);
        user = kmalloc(2 + (len * 2), GFP_KERNEL);
        if (user == NULL) {
                cERROR(1, "calc_ntlmv2_hash: user mem alloc failure\n");
                rc = -ENOMEM;
                goto calc_exit_2;
        }
-       len = cifs_strtoUCS((__le16 *)user, ses->userName, len, nls_cp);
+       len = cifs_strtoUCS((__le16 *)user, ses->user_name, len, nls_cp);
        UniStrupr(user);
 
        crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash,
index f2970136d17d06c27e0654bbf4f13e302b3dc815..5c412b33cd7c3ba11d584befbcffd12c210e760c 100644 (file)
@@ -53,7 +53,6 @@ int cifsFYI = 0;
 int cifsERROR = 1;
 int traceSMB = 0;
 unsigned int oplockEnabled = 1;
-unsigned int experimEnabled = 0;
 unsigned int linuxExtEnabled = 1;
 unsigned int lookupCacheEnabled = 1;
 unsigned int multiuser_mount = 0;
@@ -127,6 +126,7 @@ cifs_read_super(struct super_block *sb, void *data,
                kfree(cifs_sb);
                return rc;
        }
+       cifs_sb->bdi.ra_pages = default_backing_dev_info.ra_pages;
 
 #ifdef CONFIG_CIFS_DFS_UPCALL
        /* copy mount params to sb for use in submounts */
@@ -409,8 +409,8 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
 
        if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER)
                seq_printf(s, ",multiuser");
-       else if (tcon->ses->userName)
-               seq_printf(s, ",username=%s", tcon->ses->userName);
+       else if (tcon->ses->user_name)
+               seq_printf(s, ",username=%s", tcon->ses->user_name);
 
        if (tcon->ses->domainName)
                seq_printf(s, ",domain=%s", tcon->ses->domainName);
index 17afb0fbcaed362b85935d43d12702f8e815efb5..a5d1106fcbde82ea8b5ab5f61de9a29dc72148d2 100644 (file)
 
 #define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1)
 #define MAX_SERVER_SIZE 15
-#define MAX_SHARE_SIZE  64     /* used to be 20, this should still be enough */
-#define MAX_USERNAME_SIZE 32   /* 32 is to allow for 15 char names + null
-                                  termination then *2 for unicode versions */
-#define MAX_PASSWORD_SIZE 512  /* max for windows seems to be 256 wide chars */
+#define MAX_SHARE_SIZE 80
+#define MAX_USERNAME_SIZE 256  /* reasonable maximum for current servers */
+#define MAX_PASSWORD_SIZE 512  /* max for windows seems to be 256 wide chars */
 
 #define CIFS_MIN_RCV_POOL 4
 
@@ -92,7 +91,8 @@ enum statusEnum {
        CifsNew = 0,
        CifsGood,
        CifsExiting,
-       CifsNeedReconnect
+       CifsNeedReconnect,
+       CifsNeedNegotiate
 };
 
 enum securityEnum {
@@ -274,7 +274,7 @@ struct cifsSesInfo {
        int capabilities;
        char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for
                                TCP names - will ipv6 and sctp addresses fit? */
-       char userName[MAX_USERNAME_SIZE + 1];
+       char *user_name;
        char *domainName;
        char *password;
        struct session_key auth_key;
@@ -817,7 +817,6 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions
                                have the uid/password or Kerberos credential
                                or equivalent for current user */
 GLOBAL_EXTERN unsigned int oplockEnabled;
-GLOBAL_EXTERN unsigned int experimEnabled;
 GLOBAL_EXTERN unsigned int lookupCacheEnabled;
 GLOBAL_EXTERN unsigned int global_secflags;    /* if on, session setup sent
                                with more secure ntlmssp2 challenge/resp */
index 904aa47e3515130afdf4d7cf00214e8cfd955b5b..df959bae67281597a2c1b4ce643eb3893b0e6ee2 100644 (file)
@@ -142,9 +142,9 @@ cifs_reconnect_tcon(struct cifsTconInfo *tcon, int smb_command)
         */
        while (server->tcpStatus == CifsNeedReconnect) {
                wait_event_interruptible_timeout(server->response_q,
-                       (server->tcpStatus == CifsGood), 10 * HZ);
+                       (server->tcpStatus != CifsNeedReconnect), 10 * HZ);
 
-               /* is TCP session is reestablished now ?*/
+               /* are we still trying to reconnect? */
                if (server->tcpStatus != CifsNeedReconnect)
                        break;
 
@@ -729,7 +729,7 @@ CIFSSMBEcho(struct TCP_Server_Info *server)
                return rc;
 
        /* set up echo request */
-       smb->hdr.Tid = cpu_to_le16(0xffff);
+       smb->hdr.Tid = 0xffff;
        smb->hdr.WordCount = 1;
        put_unaligned_le16(1, &smb->EchoCount);
        put_bcc_le(1, &smb->hdr);
@@ -1884,10 +1884,10 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
                                        __constant_cpu_to_le16(CIFS_WRLCK))
                                pLockData->fl_type = F_WRLCK;
 
-                       pLockData->fl_start = parm_data->start;
-                       pLockData->fl_end = parm_data->start +
-                                               parm_data->length - 1;
-                       pLockData->fl_pid = parm_data->pid;
+                       pLockData->fl_start = le64_to_cpu(parm_data->start);
+                       pLockData->fl_end = pLockData->fl_start +
+                                       le64_to_cpu(parm_data->length) - 1;
+                       pLockData->fl_pid = le32_to_cpu(parm_data->pid);
                }
        }
 
@@ -5247,7 +5247,7 @@ cifs_fill_unix_set_info(FILE_UNIX_BASIC_INFO *data_offset,
         * Samba server ignores set of file size to zero due to bugs in some
         * older clients, but we should be precise - we use SetFileSize to
         * set file size and do not want to truncate file size to zero
-        * accidently as happened on one Samba server beta by putting
+        * accidentally as happened on one Samba server beta by putting
         * zero instead of -1 here
         */
        data_offset->EndOfFile = cpu_to_le64(NO_CHANGE_64);
index 8d6c17ab593dafd9dcb742da7febeaa546ec0c93..4bc862a80efa5a722ab8f6088a95c30b040fcd7b 100644 (file)
@@ -199,8 +199,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
        }
        spin_unlock(&GlobalMid_Lock);
 
-       while ((server->tcpStatus != CifsExiting) &&
-              (server->tcpStatus != CifsGood)) {
+       while (server->tcpStatus == CifsNeedReconnect) {
                try_to_freeze();
 
                /* we should try only the port we connected to before */
@@ -212,7 +211,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
                        atomic_inc(&tcpSesReconnectCount);
                        spin_lock(&GlobalMid_Lock);
                        if (server->tcpStatus != CifsExiting)
-                               server->tcpStatus = CifsGood;
+                               server->tcpStatus = CifsNeedNegotiate;
                        spin_unlock(&GlobalMid_Lock);
                }
        }
@@ -248,24 +247,24 @@ static int check2ndT2(struct smb_hdr *pSMB, unsigned int maxBufSize)
        total_data_size = get_unaligned_le16(&pSMBt->t2_rsp.TotalDataCount);
        data_in_this_rsp = get_unaligned_le16(&pSMBt->t2_rsp.DataCount);
 
-       remaining = total_data_size - data_in_this_rsp;
-
-       if (remaining == 0)
+       if (total_data_size == data_in_this_rsp)
                return 0;
-       else if (remaining < 0) {
+       else if (total_data_size < data_in_this_rsp) {
                cFYI(1, "total data %d smaller than data in frame %d",
                        total_data_size, data_in_this_rsp);
                return -EINVAL;
-       } else {
-               cFYI(1, "missing %d bytes from transact2, check next response",
-                       remaining);
-               if (total_data_size > maxBufSize) {
-                       cERROR(1, "TotalDataSize %d is over maximum buffer %d",
-                               total_data_size, maxBufSize);
-                       return -EINVAL;
-               }
-               return remaining;
        }
+
+       remaining = total_data_size - data_in_this_rsp;
+
+       cFYI(1, "missing %d bytes from transact2, check next response",
+               remaining);
+       if (total_data_size > maxBufSize) {
+               cERROR(1, "TotalDataSize %d is over maximum buffer %d",
+                       total_data_size, maxBufSize);
+               return -EINVAL;
+       }
+       return remaining;
 }
 
 static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB)
@@ -421,7 +420,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
                pdu_length = 4; /* enough to get RFC1001 header */
 
 incomplete_rcv:
-               if (echo_retries > 0 &&
+               if (echo_retries > 0 && server->tcpStatus == CifsGood &&
                    time_after(jiffies, server->lstrp +
                                        (echo_retries * SMB_ECHO_INTERVAL))) {
                        cERROR(1, "Server %s has not responded in %d seconds. "
@@ -808,8 +807,7 @@ static int
 cifs_parse_mount_options(char *options, const char *devname,
                         struct smb_vol *vol)
 {
-       char *value;
-       char *data;
+       char *value, *data, *end;
        unsigned int  temp_len, i, j;
        char separator[2];
        short int override_uid = -1;
@@ -852,6 +850,7 @@ cifs_parse_mount_options(char *options, const char *devname,
        if (!options)
                return 1;
 
+       end = options + strlen(options);
        if (strncmp(options, "sep=", 4) == 0) {
                if (options[4] != 0) {
                        separator[0] = options[4];
@@ -881,7 +880,8 @@ cifs_parse_mount_options(char *options, const char *devname,
                                /* null user, ie anonymous, authentication */
                                vol->nullauth = 1;
                        }
-                       if (strnlen(value, 200) < 200) {
+                       if (strnlen(value, MAX_USERNAME_SIZE) <
+                                               MAX_USERNAME_SIZE) {
                                vol->username = value;
                        } else {
                                printk(KERN_WARNING "CIFS: username too long\n");
@@ -916,6 +916,7 @@ cifs_parse_mount_options(char *options, const char *devname,
                        the only illegal character in a password is null */
 
                        if ((value[temp_len] == 0) &&
+                           (value + temp_len < end) &&
                            (value[temp_len+1] == separator[0])) {
                                /* reinsert comma */
                                value[temp_len] = separator[0];
@@ -1472,7 +1473,7 @@ srcip_matches(struct sockaddr *srcaddr, struct sockaddr *rhs)
 static bool
 match_port(struct TCP_Server_Info *server, struct sockaddr *addr)
 {
-       unsigned short int port, *sport;
+       __be16 port, *sport;
 
        switch (addr->sa_family) {
        case AF_INET:
@@ -1572,7 +1573,7 @@ match_security(struct TCP_Server_Info *server, struct smb_vol *vol)
                return false;
        }
 
-       /* now check if signing mode is acceptible */
+       /* now check if signing mode is acceptable */
        if ((secFlags & CIFSSEC_MAY_SIGN) == 0 &&
            (server->secMode & SECMODE_SIGN_REQUIRED))
                        return false;
@@ -1765,6 +1766,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
                module_put(THIS_MODULE);
                goto out_err_crypto_release;
        }
+       tcp_ses->tcpStatus = CifsNeedNegotiate;
 
        /* thread spawned, put it on the list */
        spin_lock(&cifs_tcp_ses_lock);
@@ -1808,7 +1810,9 @@ cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol)
                        break;
                default:
                        /* anything else takes username/password */
-                       if (strncmp(ses->userName, vol->username,
+                       if (ses->user_name == NULL)
+                               continue;
+                       if (strncmp(ses->user_name, vol->username,
                                    MAX_USERNAME_SIZE))
                                continue;
                        if (strlen(vol->username) != 0 &&
@@ -1851,6 +1855,8 @@ cifs_put_smb_ses(struct cifsSesInfo *ses)
        cifs_put_tcp_session(server);
 }
 
+static bool warned_on_ntlm;  /* globals init to false automatically */
+
 static struct cifsSesInfo *
 cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
 {
@@ -1906,9 +1912,11 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
        else
                sprintf(ses->serverName, "%pI4", &addr->sin_addr);
 
-       if (volume_info->username)
-               strncpy(ses->userName, volume_info->username,
-                       MAX_USERNAME_SIZE);
+       if (volume_info->username) {
+               ses->user_name = kstrdup(volume_info->username, GFP_KERNEL);
+               if (!ses->user_name)
+                       goto get_ses_fail;
+       }
 
        /* volume_info->password freed at unmount */
        if (volume_info->password) {
@@ -1923,6 +1931,15 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
        }
        ses->cred_uid = volume_info->cred_uid;
        ses->linux_uid = volume_info->linux_uid;
+
+       /* ntlmv2 is much stronger than ntlm security, and has been broadly
+       supported for many years, time to update default security mechanism */
+       if ((volume_info->secFlg == 0) && warned_on_ntlm == false) {
+               warned_on_ntlm = true;
+               cERROR(1, "default security mechanism requested.  The default "
+                       "security mechanism will be upgraded from ntlm to "
+                       "ntlmv2 in kernel release 2.6.41");
+       }
        ses->overrideSecFlg = volume_info->secFlg;
 
        mutex_lock(&ses->session_mutex);
@@ -2276,7 +2293,7 @@ static int
 generic_ip_connect(struct TCP_Server_Info *server)
 {
        int rc = 0;
-       unsigned short int sport;
+       __be16 sport;
        int slen, sfamily;
        struct socket *socket = server->ssocket;
        struct sockaddr *saddr;
@@ -2361,7 +2378,7 @@ generic_ip_connect(struct TCP_Server_Info *server)
 static int
 ip_connect(struct TCP_Server_Info *server)
 {
-       unsigned short int *sport;
+       __be16 *sport;
        struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr;
        struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr;
 
@@ -2826,7 +2843,7 @@ try_mount_again:
 
 remote_path_check:
        /* check if a whole path (including prepath) is not remote */
-       if (!rc && cifs_sb->prepathlen && tcon) {
+       if (!rc && tcon) {
                /* build_path_to_root works only when we have a valid tcon */
                full_path = cifs_build_path_to_root(cifs_sb, tcon);
                if (full_path == NULL) {
@@ -2933,7 +2950,7 @@ mount_fail_check:
                if (mount_data != mount_data_global)
                        kfree(mount_data);
                /* If find_unc succeeded then rc == 0 so we can not end */
-               /* up accidently freeing someone elses tcon struct */
+               /* up accidentally freeing someone elses tcon struct */
                if (tcon)
                        cifs_put_tcon(tcon);
                else if (pSesInfo)
index dd5f22918c33ae2cdde0dd15d2d93a381255a51b..9ea65cf367146905cc0dababe262397752a15894 100644 (file)
@@ -189,7 +189,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
                        inode->i_sb, mode, oflags, &oplock, &fileHandle, xid);
                /* EIO could indicate that (posix open) operation is not
                   supported, despite what server claimed in capability
-                  negotation.  EREMOTE indicates DFS junction, which is not
+                  negotiation.  EREMOTE indicates DFS junction, which is not
                   handled in posix open */
 
                if (rc == 0) {
index c27d236738fc08ff80d32eceabc8f412140afbb2..faf59529e847a2adceb9728d10e739adc822f1f5 100644 (file)
@@ -575,8 +575,10 @@ reopen_error_exit:
 
 int cifs_close(struct inode *inode, struct file *file)
 {
-       cifsFileInfo_put(file->private_data);
-       file->private_data = NULL;
+       if (file->private_data != NULL) {
+               cifsFileInfo_put(file->private_data);
+               file->private_data = NULL;
+       }
 
        /* return code from the ->release op is always ignored */
        return 0;
@@ -970,6 +972,9 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file,
             total_written += bytes_written) {
                rc = -EAGAIN;
                while (rc == -EAGAIN) {
+                       struct kvec iov[2];
+                       unsigned int len;
+
                        if (open_file->invalidHandle) {
                                /* we could deadlock if we called
                                   filemap_fdatawait from here so tell
@@ -979,31 +984,14 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file,
                                if (rc != 0)
                                        break;
                        }
-                       if (experimEnabled || (pTcon->ses->server &&
-                               ((pTcon->ses->server->secMode &
-                               (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
-                               == 0))) {
-                               struct kvec iov[2];
-                               unsigned int len;
-
-                               len = min((size_t)cifs_sb->wsize,
-                                         write_size - total_written);
-                               /* iov[0] is reserved for smb header */
-                               iov[1].iov_base = (char *)write_data +
-                                                 total_written;
-                               iov[1].iov_len = len;
-                               rc = CIFSSMBWrite2(xid, pTcon,
-                                               open_file->netfid, len,
-                                               *poffset, &bytes_written,
-                                               iov, 1, 0);
-                       } else
-                               rc = CIFSSMBWrite(xid, pTcon,
-                                        open_file->netfid,
-                                        min_t(const int, cifs_sb->wsize,
-                                              write_size - total_written),
-                                        *poffset, &bytes_written,
-                                        write_data + total_written,
-                                        NULL, 0);
+
+                       len = min((size_t)cifs_sb->wsize,
+                                 write_size - total_written);
+                       /* iov[0] is reserved for smb header */
+                       iov[1].iov_base = (char *)write_data + total_written;
+                       iov[1].iov_len = len;
+                       rc = CIFSSMBWrite2(xid, pTcon, open_file->netfid, len,
+                                          *poffset, &bytes_written, iov, 1, 0);
                }
                if (rc || (bytes_written == 0)) {
                        if (total_written)
@@ -1240,12 +1228,6 @@ static int cifs_writepages(struct address_space *mapping,
        }
 
        tcon = tlink_tcon(open_file->tlink);
-       if (!experimEnabled && tcon->ses->server->secMode &
-                       (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
-               cifsFileInfo_put(open_file);
-               kfree(iov);
-               return generic_writepages(mapping, wbc);
-       }
        cifsFileInfo_put(open_file);
 
        xid = GetXid();
@@ -1980,6 +1962,24 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
        return total_read;
 }
 
+/*
+ * If the page is mmap'ed into a process' page tables, then we need to make
+ * sure that it doesn't change while being written back.
+ */
+static int
+cifs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
+{
+       struct page *page = vmf->page;
+
+       lock_page(page);
+       return VM_FAULT_LOCKED;
+}
+
+static struct vm_operations_struct cifs_file_vm_ops = {
+       .fault = filemap_fault,
+       .page_mkwrite = cifs_page_mkwrite,
+};
+
 int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma)
 {
        int rc, xid;
@@ -1991,6 +1991,8 @@ int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma)
                cifs_invalidate_mapping(inode);
 
        rc = generic_file_mmap(file, vma);
+       if (rc == 0)
+               vma->vm_ops = &cifs_file_vm_ops;
        FreeXid(xid);
        return rc;
 }
@@ -2007,6 +2009,8 @@ int cifs_file_mmap(struct file *file, struct vm_area_struct *vma)
                return rc;
        }
        rc = generic_file_mmap(file, vma);
+       if (rc == 0)
+               vma->vm_ops = &cifs_file_vm_ops;
        FreeXid(xid);
        return rc;
 }
index e8804d3734044f578da6d4427e4961431d61ae5a..ce417a9764a3fe5c3963e1e93fe5e5b17bf7390c 100644 (file)
@@ -239,7 +239,7 @@ CIFSQueryMFSymLink(const int xid, struct cifsTconInfo *tcon,
        if (rc != 0)
                return rc;
 
-       if (file_info.EndOfFile != CIFS_MF_SYMLINK_FILE_SIZE) {
+       if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
                CIFSSMBClose(xid, tcon, netfid);
                /* it's not a symlink */
                return -EINVAL;
@@ -316,7 +316,7 @@ CIFSCheckMFSymlink(struct cifs_fattr *fattr,
        if (rc != 0)
                goto out;
 
-       if (file_info.EndOfFile != CIFS_MF_SYMLINK_FILE_SIZE) {
+       if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
                CIFSSMBClose(xid, pTcon, netfid);
                /* it's not a symlink */
                goto out;
index 2a930a752a784faea9ee912211c3f7a88e1ce9d5..0c684ae4c07163140f4d9009b2d2ccd1f0c86dd2 100644 (file)
@@ -100,6 +100,7 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
                memset(buf_to_free->password, 0, strlen(buf_to_free->password));
                kfree(buf_to_free->password);
        }
+       kfree(buf_to_free->user_name);
        kfree(buf_to_free->domainName);
        kfree(buf_to_free);
 }
@@ -520,7 +521,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
                        (struct smb_com_transaction_change_notify_rsp *)buf;
                struct file_notify_information *pnotify;
                __u32 data_offset = 0;
-               if (pSMBr->ByteCount > sizeof(struct file_notify_information)) {
+               if (get_bcc_le(buf) > sizeof(struct file_notify_information)) {
                        data_offset = le32_to_cpu(pSMBr->DataOffset);
 
                        pnotify = (struct file_notify_information *)
index 16765703131be6288e41f0d22d6994ffe3d7685f..f6728eb6f4b94774431136a8700ce9e96b4d2940 100644 (file)
@@ -219,12 +219,12 @@ static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,
                bcc_ptr++;
        } */
        /* copy user */
-       if (ses->userName == NULL) {
+       if (ses->user_name == NULL) {
                /* null user mount */
                *bcc_ptr = 0;
                *(bcc_ptr+1) = 0;
        } else {
-               bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->userName,
+               bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->user_name,
                                          MAX_USERNAME_SIZE, nls_cp);
        }
        bcc_ptr += 2 * bytes_ret;
@@ -244,12 +244,11 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,
        /* copy user */
        /* BB what about null user mounts - check that we do this BB */
        /* copy user */
-       if (ses->userName == NULL) {
-               /* BB what about null user mounts - check that we do this BB */
-       } else {
-               strncpy(bcc_ptr, ses->userName, MAX_USERNAME_SIZE);
-       }
-       bcc_ptr += strnlen(ses->userName, MAX_USERNAME_SIZE);
+       if (ses->user_name != NULL)
+               strncpy(bcc_ptr, ses->user_name, MAX_USERNAME_SIZE);
+       /* else null user mount */
+
+       bcc_ptr += strnlen(ses->user_name, MAX_USERNAME_SIZE);
        *bcc_ptr = 0;
        bcc_ptr++; /* account for null termination */
 
@@ -405,8 +404,8 @@ static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
        /* BB spec says that if AvId field of MsvAvTimestamp is populated then
                we must set the MIC field of the AUTHENTICATE_MESSAGE */
        ses->ntlmssp->server_flags = le32_to_cpu(pblob->NegotiateFlags);
-       tioffset = cpu_to_le16(pblob->TargetInfoArray.BufferOffset);
-       tilen = cpu_to_le16(pblob->TargetInfoArray.Length);
+       tioffset = le32_to_cpu(pblob->TargetInfoArray.BufferOffset);
+       tilen = le16_to_cpu(pblob->TargetInfoArray.Length);
        if (tilen) {
                ses->auth_key.response = kmalloc(tilen, GFP_KERNEL);
                if (!ses->auth_key.response) {
@@ -523,14 +522,14 @@ static int build_ntlmssp_auth_blob(unsigned char *pbuffer,
                tmp += len;
        }
 
-       if (ses->userName == NULL) {
+       if (ses->user_name == NULL) {
                sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer);
                sec_blob->UserName.Length = 0;
                sec_blob->UserName.MaximumLength = 0;
                tmp += 2;
        } else {
                int len;
-               len = cifs_strtoUCS((__le16 *)tmp, ses->userName,
+               len = cifs_strtoUCS((__le16 *)tmp, ses->user_name,
                                    MAX_USERNAME_SIZE, nls_cp);
                len *= 2; /* unicode is 2 bytes each */
                sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer);
index 90ff3cb10de3123d1ca9095d511552eccb7188fe..3313dd19f543841d7e4689cfd18da028e4522892 100644 (file)
@@ -990,7 +990,7 @@ static int configfs_dump(struct configfs_dirent *sd, int level)
  * This describes these functions and their helpers.
  *
  * Allow another kernel system to depend on a config_item.  If this
- * happens, the item cannot go away until the dependant can live without
+ * happens, the item cannot go away until the dependent can live without
  * it.  The idea is to give client modules as simple an interface as
  * possible.  When a system asks them to depend on an item, they just
  * call configfs_depend_item().  If the item is live and the client
index ad25c4cec7d50a7185459609bf6e5f63b9e9dcbd..22a0ef41bad1b1cd17fc6ce84023d52f65096ba5 100644 (file)
@@ -99,12 +99,9 @@ static struct kmem_cache *dentry_cache __read_mostly;
 static unsigned int d_hash_mask __read_mostly;
 static unsigned int d_hash_shift __read_mostly;
 
-struct dcache_hash_bucket {
-       struct hlist_bl_head head;
-};
-static struct dcache_hash_bucket *dentry_hashtable __read_mostly;
+static struct hlist_bl_head *dentry_hashtable __read_mostly;
 
-static inline struct dcache_hash_bucket *d_hash(struct dentry *parent,
+static inline struct hlist_bl_head *d_hash(struct dentry *parent,
                                        unsigned long hash)
 {
        hash += ((unsigned long) parent ^ GOLDEN_RATIO_PRIME) / L1_CACHE_BYTES;
@@ -112,16 +109,6 @@ static inline struct dcache_hash_bucket *d_hash(struct dentry *parent,
        return dentry_hashtable + (hash & D_HASHMASK);
 }
 
-static inline void spin_lock_bucket(struct dcache_hash_bucket *b)
-{
-       bit_spin_lock(0, (unsigned long *)&b->head.first);
-}
-
-static inline void spin_unlock_bucket(struct dcache_hash_bucket *b)
-{
-       __bit_spin_unlock(0, (unsigned long *)&b->head.first);
-}
-
 /* Statistics gathering. */
 struct dentry_stat_t dentry_stat = {
        .age_limit = 45,
@@ -167,8 +154,8 @@ static void d_free(struct dentry *dentry)
        if (dentry->d_op && dentry->d_op->d_release)
                dentry->d_op->d_release(dentry);
 
-       /* if dentry was never inserted into hash, immediate free is OK */
-       if (hlist_bl_unhashed(&dentry->d_hash))
+       /* if dentry was never visible to RCU, immediate free is OK */
+       if (!(dentry->d_flags & DCACHE_RCUACCESS))
                __d_free(&dentry->d_u.d_rcu);
        else
                call_rcu(&dentry->d_u.d_rcu, __d_free);
@@ -330,28 +317,19 @@ static struct dentry *d_kill(struct dentry *dentry, struct dentry *parent)
  */
 void __d_drop(struct dentry *dentry)
 {
-       if (!(dentry->d_flags & DCACHE_UNHASHED)) {
-               if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED)) {
-                       bit_spin_lock(0,
-                               (unsigned long *)&dentry->d_sb->s_anon.first);
-                       dentry->d_flags |= DCACHE_UNHASHED;
-                       hlist_bl_del_init(&dentry->d_hash);
-                       __bit_spin_unlock(0,
-                               (unsigned long *)&dentry->d_sb->s_anon.first);
-               } else {
-                       struct dcache_hash_bucket *b;
+       if (!d_unhashed(dentry)) {
+               struct hlist_bl_head *b;
+               if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED))
+                       b = &dentry->d_sb->s_anon;
+               else
                        b = d_hash(dentry->d_parent, dentry->d_name.hash);
-                       spin_lock_bucket(b);
-                       /*
-                        * We may not actually need to put DCACHE_UNHASHED
-                        * manipulations under the hash lock, but follow
-                        * the principle of least surprise.
-                        */
-                       dentry->d_flags |= DCACHE_UNHASHED;
-                       hlist_bl_del_rcu(&dentry->d_hash);
-                       spin_unlock_bucket(b);
-                       dentry_rcuwalk_barrier(dentry);
-               }
+
+               hlist_bl_lock(b);
+               __hlist_bl_del(&dentry->d_hash);
+               dentry->d_hash.pprev = NULL;
+               hlist_bl_unlock(b);
+
+               dentry_rcuwalk_barrier(dentry);
        }
 }
 EXPORT_SYMBOL(__d_drop);
@@ -1304,7 +1282,7 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)
        dname[name->len] = 0;
 
        dentry->d_count = 1;
-       dentry->d_flags = DCACHE_UNHASHED;
+       dentry->d_flags = 0;
        spin_lock_init(&dentry->d_lock);
        seqcount_init(&dentry->d_seq);
        dentry->d_inode = NULL;
@@ -1606,10 +1584,9 @@ struct dentry *d_obtain_alias(struct inode *inode)
        tmp->d_inode = inode;
        tmp->d_flags |= DCACHE_DISCONNECTED;
        list_add(&tmp->d_alias, &inode->i_dentry);
-       bit_spin_lock(0, (unsigned long *)&tmp->d_sb->s_anon.first);
-       tmp->d_flags &= ~DCACHE_UNHASHED;
+       hlist_bl_lock(&tmp->d_sb->s_anon);
        hlist_bl_add_head(&tmp->d_hash, &tmp->d_sb->s_anon);
-       __bit_spin_unlock(0, (unsigned long *)&tmp->d_sb->s_anon.first);
+       hlist_bl_unlock(&tmp->d_sb->s_anon);
        spin_unlock(&tmp->d_lock);
        spin_unlock(&inode->i_lock);
        security_d_instantiate(tmp, inode);
@@ -1789,7 +1766,7 @@ struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,
        unsigned int len = name->len;
        unsigned int hash = name->hash;
        const unsigned char *str = name->name;
-       struct dcache_hash_bucket *b = d_hash(parent, hash);
+       struct hlist_bl_head *b = d_hash(parent, hash);
        struct hlist_bl_node *node;
        struct dentry *dentry;
 
@@ -1813,7 +1790,7 @@ struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,
         *
         * See Documentation/filesystems/path-lookup.txt for more details.
         */
-       hlist_bl_for_each_entry_rcu(dentry, node, &b->head, d_hash) {
+       hlist_bl_for_each_entry_rcu(dentry, node, b, d_hash) {
                struct inode *i;
                const char *tname;
                int tlen;
@@ -1908,7 +1885,7 @@ struct dentry *__d_lookup(struct dentry *parent, struct qstr *name)
        unsigned int len = name->len;
        unsigned int hash = name->hash;
        const unsigned char *str = name->name;
-       struct dcache_hash_bucket *b = d_hash(parent, hash);
+       struct hlist_bl_head *b = d_hash(parent, hash);
        struct hlist_bl_node *node;
        struct dentry *found = NULL;
        struct dentry *dentry;
@@ -1935,7 +1912,7 @@ struct dentry *__d_lookup(struct dentry *parent, struct qstr *name)
         */
        rcu_read_lock();
        
-       hlist_bl_for_each_entry_rcu(dentry, node, &b->head, d_hash) {
+       hlist_bl_for_each_entry_rcu(dentry, node, b, d_hash) {
                const char *tname;
                int tlen;
 
@@ -2086,13 +2063,13 @@ again:
 }
 EXPORT_SYMBOL(d_delete);
 
-static void __d_rehash(struct dentry * entry, struct dcache_hash_bucket *b)
+static void __d_rehash(struct dentry * entry, struct hlist_bl_head *b)
 {
        BUG_ON(!d_unhashed(entry));
-       spin_lock_bucket(b);
-       entry->d_flags &= ~DCACHE_UNHASHED;
-       hlist_bl_add_head_rcu(&entry->d_hash, &b->head);
-       spin_unlock_bucket(b);
+       hlist_bl_lock(b);
+       entry->d_flags |= DCACHE_RCUACCESS;
+       hlist_bl_add_head_rcu(&entry->d_hash, b);
+       hlist_bl_unlock(b);
 }
 
 static void _d_rehash(struct dentry * entry)
@@ -2131,7 +2108,7 @@ EXPORT_SYMBOL(d_rehash);
  */
 void dentry_update_name_case(struct dentry *dentry, struct qstr *name)
 {
-       BUG_ON(!mutex_is_locked(&dentry->d_inode->i_mutex));
+       BUG_ON(!mutex_is_locked(&dentry->d_parent->d_inode->i_mutex));
        BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */
 
        spin_lock(&dentry->d_lock);
@@ -3025,7 +3002,7 @@ static void __init dcache_init_early(void)
 
        dentry_hashtable =
                alloc_large_system_hash("Dentry cache",
-                                       sizeof(struct dcache_hash_bucket),
+                                       sizeof(struct hlist_bl_head),
                                        dhash_entries,
                                        13,
                                        HASH_EARLY,
@@ -3034,7 +3011,7 @@ static void __init dcache_init_early(void)
                                        0);
 
        for (loop = 0; loop < (1 << d_hash_shift); loop++)
-               INIT_HLIST_BL_HEAD(&dentry_hashtable[loop].head);
+               INIT_HLIST_BL_HEAD(dentry_hashtable + loop);
 }
 
 static void __init dcache_init(void)
@@ -3057,7 +3034,7 @@ static void __init dcache_init(void)
 
        dentry_hashtable =
                alloc_large_system_hash("Dentry cache",
-                                       sizeof(struct dcache_hash_bucket),
+                                       sizeof(struct hlist_bl_head),
                                        dhash_entries,
                                        13,
                                        0,
@@ -3066,7 +3043,7 @@ static void __init dcache_init(void)
                                        0);
 
        for (loop = 0; loop < (1 << d_hash_shift); loop++)
-               INIT_HLIST_BL_HEAD(&dentry_hashtable[loop].head);
+               INIT_HLIST_BL_HEAD(dentry_hashtable + loop);
 }
 
 /* SLAB cache for __getname() consumers */
index 04b8c449303ff2f4607abb1a78ac10589ee87718..56d6bfcc1e48895f2d9523d70376779349b44cfa 100644 (file)
@@ -519,7 +519,7 @@ static void toss_rsb(struct kref *kref)
        }
 }
 
-/* When all references to the rsb are gone it's transfered to
+/* When all references to the rsb are gone it's transferred to
    the tossed list for later disposal. */
 
 static void put_rsb(struct dlm_rsb *r)
index bffa1e73b9a9e1aaf9f2b6dac8bbba25634374a6..5e2c71f05e461bdb3f1f9e8f15329e9439bda393 100644 (file)
@@ -810,7 +810,7 @@ static int tcp_accept_from_sock(struct connection *con)
 
        /*
         * Add it to the active queue in case we got data
-        * beween processing the accept adding the socket
+        * between processing the accept adding the socket
         * to the read_sockets list
         */
        if (!test_and_set_bit(CF_READ_PENDING, &addcon->flags))
index eda43f3626169ec9b08ad03fdecfd9b5aef7e821..14638235f7b2935093e31e43a36a09435dc80c73 100644 (file)
@@ -304,7 +304,7 @@ static void set_master_lkbs(struct dlm_rsb *r)
 }
 
 /*
- * Propogate the new master nodeid to locks
+ * Propagate the new master nodeid to locks
  * The NEW_MASTER flag tells dlm_recover_locks() which rsb's to consider.
  * The NEW_MASTER2 flag tells recover_lvb() and set_locks_purged() which
  * rsb's to consider.
index d2a70a4561f91257fe44d7cb867e9d14ec1ff908..b8d5c8091024cd1a66d8f36cf9d8fde25f3d2052 100644 (file)
@@ -1452,6 +1452,25 @@ static void set_default_header_data(struct ecryptfs_crypt_stat *crypt_stat)
        crypt_stat->metadata_size = ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE;
 }
 
+void ecryptfs_i_size_init(const char *page_virt, struct inode *inode)
+{
+       struct ecryptfs_mount_crypt_stat *mount_crypt_stat;
+       struct ecryptfs_crypt_stat *crypt_stat;
+       u64 file_size;
+
+       crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat;
+       mount_crypt_stat =
+               &ecryptfs_superblock_to_private(inode->i_sb)->mount_crypt_stat;
+       if (mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED) {
+               file_size = i_size_read(ecryptfs_inode_to_lower(inode));
+               if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR)
+                       file_size += crypt_stat->metadata_size;
+       } else
+               file_size = get_unaligned_be64(page_virt);
+       i_size_write(inode, (loff_t)file_size);
+       crypt_stat->flags |= ECRYPTFS_I_SIZE_INITIALIZED;
+}
+
 /**
  * ecryptfs_read_headers_virt
  * @page_virt: The virtual address into which to read the headers
@@ -1482,6 +1501,8 @@ static int ecryptfs_read_headers_virt(char *page_virt,
                rc = -EINVAL;
                goto out;
        }
+       if (!(crypt_stat->flags & ECRYPTFS_I_SIZE_INITIALIZED))
+               ecryptfs_i_size_init(page_virt, ecryptfs_dentry->d_inode);
        offset += MAGIC_ECRYPTFS_MARKER_SIZE_BYTES;
        rc = ecryptfs_process_flags(crypt_stat, (page_virt + offset),
                                    &bytes_read);
index bd3cafd0949de6d22179ca5f91115edf18f38fda..e70282775e2c193f11da232c897f6859a2e4334b 100644 (file)
@@ -269,6 +269,7 @@ struct ecryptfs_crypt_stat {
 #define ECRYPTFS_ENCFN_USE_MOUNT_FNEK 0x00000800
 #define ECRYPTFS_ENCFN_USE_FEK        0x00001000
 #define ECRYPTFS_UNLINK_SIGS          0x00002000
+#define ECRYPTFS_I_SIZE_INITIALIZED   0x00004000
        u32 flags;
        unsigned int file_version;
        size_t iv_bytes;
@@ -295,6 +296,8 @@ struct ecryptfs_crypt_stat {
 struct ecryptfs_inode_info {
        struct inode vfs_inode;
        struct inode *wii_inode;
+       struct mutex lower_file_mutex;
+       atomic_t lower_file_count;
        struct file *lower_file;
        struct ecryptfs_crypt_stat crypt_stat;
 };
@@ -626,6 +629,7 @@ struct ecryptfs_open_req {
 int ecryptfs_interpose(struct dentry *hidden_dentry,
                       struct dentry *this_dentry, struct super_block *sb,
                       u32 flags);
+void ecryptfs_i_size_init(const char *page_virt, struct inode *inode);
 int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry,
                                        struct dentry *lower_dentry,
                                        struct inode *ecryptfs_dir_inode);
@@ -757,7 +761,8 @@ int ecryptfs_privileged_open(struct file **lower_file,
                             struct dentry *lower_dentry,
                             struct vfsmount *lower_mnt,
                             const struct cred *cred);
-int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry);
+int ecryptfs_get_lower_file(struct dentry *ecryptfs_dentry);
+void ecryptfs_put_lower_file(struct inode *inode);
 int
 ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes,
                             size_t *packet_size,
index cedc913d11ba908f62be8711190a0883f4e95fbe..566e5472f78c3d6dae8e5008689eef281cba37ab 100644 (file)
@@ -191,10 +191,10 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
                                      | ECRYPTFS_ENCRYPTED);
        }
        mutex_unlock(&crypt_stat->cs_mutex);
-       rc = ecryptfs_init_persistent_file(ecryptfs_dentry);
+       rc = ecryptfs_get_lower_file(ecryptfs_dentry);
        if (rc) {
                printk(KERN_ERR "%s: Error attempting to initialize "
-                       "the persistent file for the dentry with name "
+                       "the lower file for the dentry with name "
                        "[%s]; rc = [%d]\n", __func__,
                        ecryptfs_dentry->d_name.name, rc);
                goto out_free;
@@ -202,9 +202,9 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
        if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_ACCMODE)
            == O_RDONLY && (file->f_flags & O_ACCMODE) != O_RDONLY) {
                rc = -EPERM;
-               printk(KERN_WARNING "%s: Lower persistent file is RO; eCryptfs "
+               printk(KERN_WARNING "%s: Lower file is RO; eCryptfs "
                       "file must hence be opened RO\n", __func__);
-               goto out_free;
+               goto out_put;
        }
        ecryptfs_set_file_lower(
                file, ecryptfs_inode_to_private(inode)->lower_file);
@@ -232,10 +232,11 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
                                       "Plaintext passthrough mode is not "
                                       "enabled; returning -EIO\n");
                                mutex_unlock(&crypt_stat->cs_mutex);
-                               goto out_free;
+                               goto out_put;
                        }
                        rc = 0;
-                       crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
+                       crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED
+                                              | ECRYPTFS_ENCRYPTED);
                        mutex_unlock(&crypt_stat->cs_mutex);
                        goto out;
                }
@@ -245,6 +246,8 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
                        "[0x%.16lx] size: [0x%.16llx]\n", inode, inode->i_ino,
                        (unsigned long long)i_size_read(inode));
        goto out;
+out_put:
+       ecryptfs_put_lower_file(inode);
 out_free:
        kmem_cache_free(ecryptfs_file_info_cache,
                        ecryptfs_file_to_private(file));
@@ -254,17 +257,13 @@ out:
 
 static int ecryptfs_flush(struct file *file, fl_owner_t td)
 {
-       int rc = 0;
-       struct file *lower_file = NULL;
-
-       lower_file = ecryptfs_file_to_lower(file);
-       if (lower_file->f_op && lower_file->f_op->flush)
-               rc = lower_file->f_op->flush(lower_file, td);
-       return rc;
+       return file->f_mode & FMODE_WRITE
+              ? filemap_write_and_wait(file->f_mapping) : 0;
 }
 
 static int ecryptfs_release(struct inode *inode, struct file *file)
 {
+       ecryptfs_put_lower_file(inode);
        kmem_cache_free(ecryptfs_file_info_cache,
                        ecryptfs_file_to_private(file));
        return 0;
index f99051b7adab1e7e107cc40e40bb39d57e20e5c1..4d4cc6a90cd57f18b330674f8e5320205cc2a5e6 100644 (file)
@@ -168,19 +168,18 @@ static int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry)
                                "context; rc = [%d]\n", rc);
                goto out;
        }
-       rc = ecryptfs_init_persistent_file(ecryptfs_dentry);
+       rc = ecryptfs_get_lower_file(ecryptfs_dentry);
        if (rc) {
                printk(KERN_ERR "%s: Error attempting to initialize "
-                       "the persistent file for the dentry with name "
+                       "the lower file for the dentry with name "
                        "[%s]; rc = [%d]\n", __func__,
                        ecryptfs_dentry->d_name.name, rc);
                goto out;
        }
        rc = ecryptfs_write_metadata(ecryptfs_dentry);
-       if (rc) {
+       if (rc)
                printk(KERN_ERR "Error writing headers; rc = [%d]\n", rc);
-               goto out;
-       }
+       ecryptfs_put_lower_file(ecryptfs_dentry->d_inode);
 out:
        return rc;
 }
@@ -226,11 +225,9 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry,
        struct dentry *lower_dir_dentry;
        struct vfsmount *lower_mnt;
        struct inode *lower_inode;
-       struct ecryptfs_mount_crypt_stat *mount_crypt_stat;
        struct ecryptfs_crypt_stat *crypt_stat;
        char *page_virt = NULL;
-       u64 file_size;
-       int rc = 0;
+       int put_lower = 0, rc = 0;
 
        lower_dir_dentry = lower_dentry->d_parent;
        lower_mnt = mntget(ecryptfs_dentry_to_lower_mnt(
@@ -277,14 +274,15 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry,
                rc = -ENOMEM;
                goto out;
        }
-       rc = ecryptfs_init_persistent_file(ecryptfs_dentry);
+       rc = ecryptfs_get_lower_file(ecryptfs_dentry);
        if (rc) {
                printk(KERN_ERR "%s: Error attempting to initialize "
-                       "the persistent file for the dentry with name "
+                       "the lower file for the dentry with name "
                        "[%s]; rc = [%d]\n", __func__,
                        ecryptfs_dentry->d_name.name, rc);
                goto out_free_kmem;
        }
+       put_lower = 1;
        crypt_stat = &ecryptfs_inode_to_private(
                                        ecryptfs_dentry->d_inode)->crypt_stat;
        /* TODO: lock for crypt_stat comparison */
@@ -302,18 +300,7 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry,
                }
                crypt_stat->flags |= ECRYPTFS_METADATA_IN_XATTR;
        }
-       mount_crypt_stat = &ecryptfs_superblock_to_private(
-               ecryptfs_dentry->d_sb)->mount_crypt_stat;
-       if (mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED) {
-               if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR)
-                       file_size = (crypt_stat->metadata_size
-                                    + i_size_read(lower_dentry->d_inode));
-               else
-                       file_size = i_size_read(lower_dentry->d_inode);
-       } else {
-               file_size = get_unaligned_be64(page_virt);
-       }
-       i_size_write(ecryptfs_dentry->d_inode, (loff_t)file_size);
+       ecryptfs_i_size_init(page_virt, ecryptfs_dentry->d_inode);
 out_free_kmem:
        kmem_cache_free(ecryptfs_header_cache_2, page_virt);
        goto out;
@@ -322,6 +309,8 @@ out_put:
        mntput(lower_mnt);
        d_drop(ecryptfs_dentry);
 out:
+       if (put_lower)
+               ecryptfs_put_lower_file(ecryptfs_dentry->d_inode);
        return rc;
 }
 
@@ -538,8 +527,6 @@ static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
        dget(lower_dentry);
        rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);
        dput(lower_dentry);
-       if (!rc)
-               d_delete(lower_dentry);
        fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
        dir->i_nlink = lower_dir_dentry->d_inode->i_nlink;
        unlock_dir(lower_dir_dentry);
@@ -610,8 +597,8 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                fsstack_copy_attr_all(old_dir, lower_old_dir_dentry->d_inode);
 out_lock:
        unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
-       dput(lower_new_dentry->d_parent);
-       dput(lower_old_dentry->d_parent);
+       dput(lower_new_dir_dentry);
+       dput(lower_old_dir_dentry);
        dput(lower_new_dentry);
        dput(lower_old_dentry);
        return rc;
@@ -759,8 +746,11 @@ static int truncate_upper(struct dentry *dentry, struct iattr *ia,
 
        if (unlikely((ia->ia_size == i_size))) {
                lower_ia->ia_valid &= ~ATTR_SIZE;
-               goto out;
+               return 0;
        }
+       rc = ecryptfs_get_lower_file(dentry);
+       if (rc)
+               return rc;
        crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat;
        /* Switch on growing or shrinking file */
        if (ia->ia_size > i_size) {
@@ -838,6 +828,7 @@ static int truncate_upper(struct dentry *dentry, struct iattr *ia,
                        lower_ia->ia_valid &= ~ATTR_SIZE;
        }
 out:
+       ecryptfs_put_lower_file(inode);
        return rc;
 }
 
@@ -913,7 +904,13 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
 
                mount_crypt_stat = &ecryptfs_superblock_to_private(
                        dentry->d_sb)->mount_crypt_stat;
+               rc = ecryptfs_get_lower_file(dentry);
+               if (rc) {
+                       mutex_unlock(&crypt_stat->cs_mutex);
+                       goto out;
+               }
                rc = ecryptfs_read_metadata(dentry);
+               ecryptfs_put_lower_file(inode);
                if (rc) {
                        if (!(mount_crypt_stat->flags
                              & ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED)) {
@@ -927,10 +924,17 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
                                goto out;
                        }
                        rc = 0;
-                       crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
+                       crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED
+                                              | ECRYPTFS_ENCRYPTED);
                }
        }
        mutex_unlock(&crypt_stat->cs_mutex);
+       if (S_ISREG(inode->i_mode)) {
+               rc = filemap_write_and_wait(inode->i_mapping);
+               if (rc)
+                       goto out;
+               fsstack_copy_attr_all(inode, lower_inode);
+       }
        memcpy(&lower_ia, ia, sizeof(lower_ia));
        if (ia->ia_valid & ATTR_FILE)
                lower_ia.ia_file = ecryptfs_file_to_lower(ia->ia_file);
index 0851ab6980f54038b8f0ed9239712fea573622c5..69f994a7d5249589bf594adaa4780bca967f08b2 100644 (file)
@@ -44,7 +44,7 @@ static struct task_struct *ecryptfs_kthread;
  * @ignored: ignored
  *
  * The eCryptfs kernel thread that has the responsibility of getting
- * the lower persistent file with RW permissions.
+ * the lower file with RW permissions.
  *
  * Returns zero on success; non-zero otherwise
  */
@@ -141,8 +141,8 @@ int ecryptfs_privileged_open(struct file **lower_file,
        int rc = 0;
 
        /* Corresponding dput() and mntput() are done when the
-        * persistent file is fput() when the eCryptfs inode is
-        * destroyed. */
+        * lower file is fput() when all eCryptfs files for the inode are
+        * released. */
        dget(lower_dentry);
        mntget(lower_mnt);
        flags |= IS_RDONLY(lower_dentry->d_inode) ? O_RDONLY : O_RDWR;
index c27c0ecf90bcec2394b5f44eece394fe3a7acb26..89b93389af8ee0a69b44cbfe709f4f766156a6c0 100644 (file)
@@ -96,7 +96,7 @@ void __ecryptfs_printk(const char *fmt, ...)
 }
 
 /**
- * ecryptfs_init_persistent_file
+ * ecryptfs_init_lower_file
  * @ecryptfs_dentry: Fully initialized eCryptfs dentry object, with
  *                   the lower dentry and the lower mount set
  *
@@ -104,42 +104,70 @@ void __ecryptfs_printk(const char *fmt, ...)
  * inode. All I/O operations to the lower inode occur through that
  * file. When the first eCryptfs dentry that interposes with the first
  * lower dentry for that inode is created, this function creates the
- * persistent file struct and associates it with the eCryptfs
- * inode. When the eCryptfs inode is destroyed, the file is closed.
+ * lower file struct and associates it with the eCryptfs
+ * inode. When all eCryptfs files associated with the inode are released, the
+ * file is closed.
  *
- * The persistent file will be opened with read/write permissions, if
+ * The lower file will be opened with read/write permissions, if
  * possible. Otherwise, it is opened read-only.
  *
- * This function does nothing if a lower persistent file is already
+ * This function does nothing if a lower file is already
  * associated with the eCryptfs inode.
  *
  * Returns zero on success; non-zero otherwise
  */
-int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry)
+static int ecryptfs_init_lower_file(struct dentry *dentry,
+                                   struct file **lower_file)
 {
        const struct cred *cred = current_cred();
-       struct ecryptfs_inode_info *inode_info =
-               ecryptfs_inode_to_private(ecryptfs_dentry->d_inode);
-       int rc = 0;
+       struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
+       struct vfsmount *lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
+       int rc;
 
-       if (!inode_info->lower_file) {
-               struct dentry *lower_dentry;
-               struct vfsmount *lower_mnt =
-                       ecryptfs_dentry_to_lower_mnt(ecryptfs_dentry);
+       rc = ecryptfs_privileged_open(lower_file, lower_dentry, lower_mnt,
+                                     cred);
+       if (rc) {
+               printk(KERN_ERR "Error opening lower file "
+                      "for lower_dentry [0x%p] and lower_mnt [0x%p]; "
+                      "rc = [%d]\n", lower_dentry, lower_mnt, rc);
+               (*lower_file) = NULL;
+       }
+       return rc;
+}
 
-               lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry);
-               rc = ecryptfs_privileged_open(&inode_info->lower_file,
-                                             lower_dentry, lower_mnt, cred);
-               if (rc) {
-                       printk(KERN_ERR "Error opening lower persistent file "
-                              "for lower_dentry [0x%p] and lower_mnt [0x%p]; "
-                              "rc = [%d]\n", lower_dentry, lower_mnt, rc);
-                       inode_info->lower_file = NULL;
-               }
+int ecryptfs_get_lower_file(struct dentry *dentry)
+{
+       struct ecryptfs_inode_info *inode_info =
+               ecryptfs_inode_to_private(dentry->d_inode);
+       int count, rc = 0;
+
+       mutex_lock(&inode_info->lower_file_mutex);
+       count = atomic_inc_return(&inode_info->lower_file_count);
+       if (WARN_ON_ONCE(count < 1))
+               rc = -EINVAL;
+       else if (count == 1) {
+               rc = ecryptfs_init_lower_file(dentry,
+                                             &inode_info->lower_file);
+               if (rc)
+                       atomic_set(&inode_info->lower_file_count, 0);
        }
+       mutex_unlock(&inode_info->lower_file_mutex);
        return rc;
 }
 
+void ecryptfs_put_lower_file(struct inode *inode)
+{
+       struct ecryptfs_inode_info *inode_info;
+
+       inode_info = ecryptfs_inode_to_private(inode);
+       if (atomic_dec_and_mutex_lock(&inode_info->lower_file_count,
+                                     &inode_info->lower_file_mutex)) {
+               fput(inode_info->lower_file);
+               inode_info->lower_file = NULL;
+               mutex_unlock(&inode_info->lower_file_mutex);
+       }
+}
+
 static struct inode *ecryptfs_get_inode(struct inode *lower_inode,
                       struct super_block *sb)
 {
@@ -276,7 +304,7 @@ static void ecryptfs_init_mount_crypt_stat(
 /**
  * ecryptfs_parse_options
  * @sb: The ecryptfs super block
- * @options: The options pased to the kernel
+ * @options: The options passed to the kernel
  *
  * Parse mount options:
  * debug=N        - ecryptfs_verbosity level for debug output
@@ -840,7 +868,7 @@ static int __init ecryptfs_init(void)
        }
        rc = ecryptfs_init_messaging();
        if (rc) {
-               printk(KERN_ERR "Failure occured while attempting to "
+               printk(KERN_ERR "Failure occurred while attempting to "
                                "initialize the communications channel to "
                                "ecryptfsd\n");
                goto out_destroy_kthread;
index bacc882e1ae40454f7623ac81e78968155d9ae55..245b517bf1b65ec5dc5dfa294891e40038d201d7 100644 (file)
@@ -55,6 +55,8 @@ static struct inode *ecryptfs_alloc_inode(struct super_block *sb)
        if (unlikely(!inode_info))
                goto out;
        ecryptfs_init_crypt_stat(&inode_info->crypt_stat);
+       mutex_init(&inode_info->lower_file_mutex);
+       atomic_set(&inode_info->lower_file_count, 0);
        inode_info->lower_file = NULL;
        inode = &inode_info->vfs_inode;
 out:
@@ -77,8 +79,7 @@ static void ecryptfs_i_callback(struct rcu_head *head)
  *
  * This is used during the final destruction of the inode.  All
  * allocation of memory related to the inode, including allocated
- * memory in the crypt_stat struct, will be released here. This
- * function also fput()'s the persistent file for the lower inode.
+ * memory in the crypt_stat struct, will be released here.
  * There should be no chance that this deallocation will be missed.
  */
 static void ecryptfs_destroy_inode(struct inode *inode)
@@ -86,16 +87,7 @@ static void ecryptfs_destroy_inode(struct inode *inode)
        struct ecryptfs_inode_info *inode_info;
 
        inode_info = ecryptfs_inode_to_private(inode);
-       if (inode_info->lower_file) {
-               struct dentry *lower_dentry =
-                       inode_info->lower_file->f_dentry;
-
-               BUG_ON(!lower_dentry);
-               if (lower_dentry->d_inode) {
-                       fput(inode_info->lower_file);
-                       inode_info->lower_file = NULL;
-               }
-       }
+       BUG_ON(inode_info->lower_file);
        ecryptfs_destroy_crypt_stat(&inode_info->crypt_stat);
        call_rcu(&inode->i_rcu, ecryptfs_i_callback);
 }
index ed38801b57a711075ae12dda582ca25c54d2257b..f9cfd168fbe2d4d408800e964268a8d40a3ec9ac 100644 (file)
@@ -181,7 +181,7 @@ struct eventpoll {
 
        /*
         * This is a single linked list that chains all the "struct epitem" that
-        * happened while transfering ready events to userspace w/out
+        * happened while transferring ready events to userspace w/out
         * holding ->lock.
         */
        struct epitem *ovflist;
@@ -606,7 +606,7 @@ static void ep_free(struct eventpoll *ep)
         * We do not need to hold "ep->mtx" here because the epoll file
         * is on the way to be removed and no one has references to it
         * anymore. The only hit might come from eventpoll_release_file() but
-        * holding "epmutex" is sufficent here.
+        * holding "epmutex" is sufficient here.
         */
        mutex_lock(&epmutex);
 
@@ -720,7 +720,7 @@ void eventpoll_release_file(struct file *file)
        /*
         * We don't want to get "file->f_lock" because it is not
         * necessary. It is not necessary because we're in the "struct file"
-        * cleanup path, and this means that noone is using this file anymore.
+        * cleanup path, and this means that no one is using this file anymore.
         * So, for example, epoll_ctl() cannot hit here since if we reach this
         * point, the file counter already went to zero and fget() would fail.
         * The only hit might come from ep_free() but by holding the mutex
@@ -1112,7 +1112,7 @@ static int ep_send_events_proc(struct eventpoll *ep, struct list_head *head,
                                 * Trigger mode, we need to insert back inside
                                 * the ready list, so that the next call to
                                 * epoll_wait() will check again the events
-                                * availability. At this point, noone can insert
+                                * availability. At this point, no one can insert
                                 * into ep->rdllist besides us. The epoll_ctl()
                                 * callers are locked out by
                                 * ep_scan_ready_list() holding "mtx" and the
index 5e74ad3d40090e66a5951cad3435a7570b6f8777..3bbd46956d77e2d61b6a6e9ad61b90759e5e706e 100644 (file)
@@ -115,7 +115,7 @@ struct exofs_sb_stats {
  * Describes the raid used in the FS. It is part of the device table.
  * This here is taken from the pNFS-objects definition. In exofs we
  * use one raid policy through-out the filesystem. (NOTE: the funny
- * alignment at begining. We take care of it at exofs_device_table.
+ * alignment at beginning. We take care of it at exofs_device_table.
  */
 struct exofs_dt_data_map {
        __le32  cb_num_comps;
@@ -136,7 +136,7 @@ struct exofs_dt_device_info {
        u8      systemid[OSD_SYSTEMID_LEN];
        __le64  long_name_offset;       /* If !0 then offset-in-file */
        __le32  osdname_len;            /* */
-       u8      osdname[44];            /* Embbeded, Ususally an asci uuid */
+       u8      osdname[44];            /* Embbeded, Usually an asci uuid */
 } __packed;
 
 /*
index 0d06f4e75699cf827b7528d07f31b40223eb49b1..8f44cef1b3efacb47ecf191f3ae00ea2737d0ea6 100644 (file)
@@ -850,7 +850,7 @@ static int find_next_reservable_window(
                rsv_window_remove(sb, my_rsv);
 
        /*
-        * Let's book the whole avaliable window for now.  We will check the
+        * Let's book the whole available window for now.  We will check the
         * disk bitmap later and then, if there are free blocks then we adjust
         * the window size if it's larger than requested.
         * Otherwise, we will remove this node from the tree next time
@@ -1357,9 +1357,9 @@ retry_alloc:
                        goto allocated;
        }
        /*
-        * We may end up a bogus ealier ENOSPC error due to
+        * We may end up a bogus earlier ENOSPC error due to
         * filesystem is "full" of reservations, but
-        * there maybe indeed free blocks avaliable on disk
+        * there maybe indeed free blocks available on disk
         * In this case, we just forget about the reservations
         * just do block allocation as without reservations.
         */
index c47f706878b5f1c8befcd65e5dc9c68b46382200..788e09a07f7ec840a7f521da7e790fc2b131ab90 100644 (file)
@@ -305,7 +305,7 @@ static ext2_fsblk_t ext2_find_near(struct inode *inode, Indirect *ind)
                return ind->bh->b_blocknr;
 
        /*
-        * It is going to be refered from inode itself? OK, just put it into
+        * It is going to be referred from inode itself? OK, just put it into
         * the same cylinder group then.
         */
        bg_start = ext2_group_first_block_no(inode->i_sb, ei->i_block_group);
@@ -913,7 +913,7 @@ static inline int all_zeroes(__le32 *p, __le32 *q)
  *
  *     When we do truncate() we may have to clean the ends of several indirect
  *     blocks but leave the blocks themselves alive. Block is partially
- *     truncated if some data below the new i_size is refered from it (and
+ *     truncated if some data below the new i_size is referred from it (and
  *     it is on the path to the first completely truncated data block, indeed).
  *     We have to free the top of that path along with everything to the right
  *     of the path. Since no allocation past the truncation point is possible
@@ -990,7 +990,7 @@ no_top:
  *     @p:     array of block numbers
  *     @q:     points immediately past the end of array
  *
- *     We are freeing all blocks refered from that array (numbers are
+ *     We are freeing all blocks referred from that array (numbers are
  *     stored as little-endian 32-bit) and updating @inode->i_blocks
  *     appropriately.
  */
@@ -1030,7 +1030,7 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q)
  *     @q:     pointer immediately past the end of array
  *     @depth: depth of the branches to free
  *
- *     We are freeing all blocks refered from these branches (numbers are
+ *     We are freeing all blocks referred from these branches (numbers are
  *     stored as little-endian 32-bit) and updating @inode->i_blocks
  *     appropriately.
  */
index 7731695e65d9fd658ad56e1cdde2e463f6cb3d65..0a78dae7e2cbbaea9f76045c7db6fe90426e278e 100644 (file)
@@ -1382,7 +1382,7 @@ static struct dentry *ext2_mount(struct file_system_type *fs_type,
 
 /* Read data from quotafile - avoid pagecache and such because we cannot afford
  * acquiring the locks... As quota files are never truncated and quota code
- * itself serializes the operations (and noone else should touch the files)
+ * itself serializes the operations (and no one else should touch the files)
  * we don't have to be afraid of races */
 static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data,
                               size_t len, loff_t off)
index c2e4dce984d2abd398640c0421a094d8afad72b8..529970617a21c5c45cd1cffa1b39c14f318d72aa 100644 (file)
@@ -35,7 +35,7 @@
  *   +------------------+
  *
  * The block header is followed by multiple entry descriptors. These entry
- * descriptors are variable in size, and alligned to EXT2_XATTR_PAD
+ * descriptors are variable in size, and aligned to EXT2_XATTR_PAD
  * byte boundaries. The entry descriptors are sorted by attribute name,
  * so that two extended attribute blocks can be compared efficiently.
  *
index 153242187fce7b3ddade632f538d8bec5ab47724..fe52297e31ad751abc46f5c6695d0e0b029ab3ed 100644 (file)
@@ -590,7 +590,7 @@ do_more:
                                BUFFER_TRACE(debug_bh, "Deleted!");
                                if (!bh2jh(bitmap_bh)->b_committed_data)
                                        BUFFER_TRACE(debug_bh,
-                                               "No commited data in bitmap");
+                                               "No committed data in bitmap");
                                BUFFER_TRACE2(debug_bh, bitmap_bh, "bitmap");
                                __brelse(debug_bh);
                        }
@@ -1063,7 +1063,7 @@ static int find_next_reservable_window(
                rsv_window_remove(sb, my_rsv);
 
        /*
-        * Let's book the whole avaliable window for now.  We will check the
+        * Let's book the whole available window for now.  We will check the
         * disk bitmap later and then, if there are free blocks then we adjust
         * the window size if it's larger than requested.
         * Otherwise, we will remove this node from the tree next time
@@ -1456,7 +1456,7 @@ static int ext3_has_free_blocks(struct ext3_sb_info *sbi)
  *
  * ext3_should_retry_alloc() is called when ENOSPC is returned, and if
  * it is profitable to retry the operation, this function will wait
- * for the current or commiting transaction to complete, and then
+ * for the current or committing transaction to complete, and then
  * return TRUE.
  *
  * if the total number of retries exceed three times, return FALSE.
@@ -1632,9 +1632,9 @@ retry_alloc:
                        goto allocated;
        }
        /*
-        * We may end up a bogus ealier ENOSPC error due to
+        * We may end up a bogus earlier ENOSPC error due to
         * filesystem is "full" of reservations, but
-        * there maybe indeed free blocks avaliable on disk
+        * there maybe indeed free blocks available on disk
         * In this case, we just forget about the reservations
         * just do block allocation as without reservations.
         */
index fe2541d250e44d0f9fe8a79f7ecbe39f5fbca34c..68b2e43d7c35fec1576cf7bd5d3136332720ad8e 100644 (file)
@@ -2055,7 +2055,7 @@ static inline int all_zeroes(__le32 *p, __le32 *q)
  *
  *     When we do truncate() we may have to clean the ends of several
  *     indirect blocks but leave the blocks themselves alive. Block is
- *     partially truncated if some data below the new i_size is refered
+ *     partially truncated if some data below the new i_size is referred
  *     from it (and it is on the path to the first completely truncated
  *     data block, indeed).  We have to free the top of that path along
  *     with everything to the right of the path. Since no allocation
@@ -2184,7 +2184,7 @@ static void ext3_clear_blocks(handle_t *handle, struct inode *inode,
  * @first:     array of block numbers
  * @last:      points immediately past the end of array
  *
- * We are freeing all blocks refered from that array (numbers are stored as
+ * We are freeing all blocks referred from that array (numbers are stored as
  * little-endian 32-bit) and updating @inode->i_blocks appropriately.
  *
  * We accumulate contiguous runs of blocks to free.  Conveniently, if these
@@ -2272,7 +2272,7 @@ static void ext3_free_data(handle_t *handle, struct inode *inode,
  *     @last:  pointer immediately past the end of array
  *     @depth: depth of the branches to free
  *
- *     We are freeing all blocks refered from these branches (numbers are
+ *     We are freeing all blocks referred from these branches (numbers are
  *     stored as little-endian 32-bit) and updating @inode->i_blocks
  *     appropriately.
  */
@@ -3291,7 +3291,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode)
        if (ext3_should_journal_data(inode))
                ret = 3 * (bpp + indirects) + 2;
        else
-               ret = 2 * (bpp + indirects) + 2;
+               ret = 2 * (bpp + indirects) + indirects + 2;
 
 #ifdef CONFIG_QUOTA
        /* We know that structure was already allocated during dquot_initialize so
index 108b142e11ed3552c598409c28e4ad5994e4e8a4..7916e4ce166a8ee4a3cb20f4ed112df48b82c9ec 100644 (file)
@@ -1009,7 +1009,7 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es,
 
        if (test_opt(sb, DEBUG))
                printk(KERN_DEBUG "EXT3-fs: extending last group from "E3FSBLK
-                      " upto "E3FSBLK" blocks\n",
+                      " up to "E3FSBLK" blocks\n",
                       o_blocks_count, n_blocks_count);
 
        if (n_blocks_count == 0 || n_blocks_count == o_blocks_count)
index 071689f86e18bf8991f3d43f528d3fee8b06d6af..3c6a9e0eadc18214b45686e175f0a474f638b23e 100644 (file)
@@ -2925,7 +2925,7 @@ static int ext3_quota_on(struct super_block *sb, int type, int format_id,
 
 /* Read data from quotafile - avoid pagecache and such because we cannot afford
  * acquiring the locks... As quota files are never truncated and quota code
- * itself serializes the operations (and noone else should touch the files)
+ * itself serializes the operations (and no one else should touch the files)
  * we don't have to be afraid of races */
 static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
                               size_t len, loff_t off)
index 97b970e7dd130abdcb86d4ece7c6526718e05cf0..1c67139ad4b422119c76d10f384dad9eabdf9158 100644 (file)
@@ -547,7 +547,7 @@ int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
  *
  * ext4_should_retry_alloc() is called when ENOSPC is returned, and if
  * it is profitable to retry the operation, this function will wait
- * for the current or commiting transaction to complete, and then
+ * for the current or committing transaction to complete, and then
  * return TRUE.
  *
  * if the total number of retries exceed three times, return FALSE.
index e25e99bf7ee13321afc8702bf91506a08557f148..d0f53538a57fd8663b03443898e4d12492ff399b 100644 (file)
@@ -86,8 +86,8 @@
 
 #ifdef CONFIG_QUOTA
 /* Amount of blocks needed for quota update - we know that the structure was
- * allocated so we need to update only inode+data */
-#define EXT4_QUOTA_TRANS_BLOCKS(sb) (test_opt(sb, QUOTA) ? 2 : 0)
+ * allocated so we need to update only data block */
+#define EXT4_QUOTA_TRANS_BLOCKS(sb) (test_opt(sb, QUOTA) ? 1 : 0)
 /* Amount of blocks needed for quota insert/delete - we do some block writes
  * but inode, sb and group updates are done only once */
 #define EXT4_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\
index dd2cb5076ff9d0831486fbc79757763da0c9bbc8..4890d6f3ad15a976417ae542296a0051fe97bc27 100644 (file)
@@ -1729,7 +1729,7 @@ repeat:
                BUG_ON(npath->p_depth != path->p_depth);
                eh = npath[depth].p_hdr;
                if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) {
-                       ext_debug("next leaf isnt full(%d)\n",
+                       ext_debug("next leaf isn't full(%d)\n",
                                  le16_to_cpu(eh->eh_entries));
                        path = npath;
                        goto repeat;
@@ -2533,7 +2533,7 @@ static int ext4_ext_zeroout(struct inode *inode, struct ext4_extent *ex)
 /*
  * This function is called by ext4_ext_map_blocks() if someone tries to write
  * to an uninitialized extent. It may result in splitting the uninitialized
- * extent into multiple extents (upto three - one initialized and two
+ * extent into multiple extents (up to three - one initialized and two
  * uninitialized).
  * There are three possibilities:
  *   a> There is no split required: Entire extent should be initialized
@@ -3174,7 +3174,7 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
                                                   path, flags);
                /*
                 * Flag the inode(non aio case) or end_io struct (aio case)
-                * that this IO needs to convertion to written when IO is
+                * that this IO needs to conversion to written when IO is
                 * completed
                 */
                if (io && !(io->flag & EXT4_IO_END_UNWRITTEN)) {
@@ -3460,10 +3460,10 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
                ext4_ext_mark_uninitialized(&newex);
                /*
                 * io_end structure was created for every IO write to an
-                * uninitialized extent. To avoid unecessary conversion,
+                * uninitialized extent. To avoid unnecessary conversion,
                 * here we flag the IO that really needs the conversion.
                 * For non asycn direct IO case, flag the inode state
-                * that we need to perform convertion when IO is done.
+                * that we need to perform conversion when IO is done.
                 */
                if ((flags & EXT4_GET_BLOCKS_PRE_IO)) {
                        if (io && !(io->flag & EXT4_IO_END_UNWRITTEN)) {
index 7f74019d6d7766e0657d7d8620c128c7006af5b7..e9473cbe80dfd00a7245e13f4de57229011a7bb2 100644 (file)
@@ -101,7 +101,7 @@ extern int ext4_flush_completed_IO(struct inode *inode)
                 * to the work-to-be schedule is freed.
                 *
                 * Thus we need to keep the io structure still valid here after
-                * convertion finished. The io structure has a flag to
+                * conversion finished. The io structure has a flag to
                 * avoid double converting from both fsync and background work
                 * queue work.
                 */
@@ -125,9 +125,11 @@ extern int ext4_flush_completed_IO(struct inode *inode)
  * the parent directory's parent as well, and so on recursively, if
  * they are also freshly created.
  */
-static void ext4_sync_parent(struct inode *inode)
+static int ext4_sync_parent(struct inode *inode)
 {
+       struct writeback_control wbc;
        struct dentry *dentry = NULL;
+       int ret = 0;
 
        while (inode && ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) {
                ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY);
@@ -136,8 +138,17 @@ static void ext4_sync_parent(struct inode *inode)
                if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode)
                        break;
                inode = dentry->d_parent->d_inode;
-               sync_mapping_buffers(inode->i_mapping);
+               ret = sync_mapping_buffers(inode->i_mapping);
+               if (ret)
+                       break;
+               memset(&wbc, 0, sizeof(wbc));
+               wbc.sync_mode = WB_SYNC_ALL;
+               wbc.nr_to_write = 0;         /* only write out the inode */
+               ret = sync_inode(inode, &wbc);
+               if (ret)
+                       break;
        }
+       return ret;
 }
 
 /*
@@ -176,7 +187,7 @@ int ext4_sync_file(struct file *file, int datasync)
        if (!journal) {
                ret = generic_file_fsync(file, datasync);
                if (!ret && !list_empty(&inode->i_dentry))
-                       ext4_sync_parent(inode);
+                       ret = ext4_sync_parent(inode);
                goto out;
        }
 
index 1a86282b90244c43fe75ae106d32c05b027b21d4..f2fa5e8a582caf92dba32df3cfad714920a85721 100644 (file)
@@ -2502,6 +2502,7 @@ static int ext4_da_get_block_prep(struct inode *inode, sector_t iblock,
                 * for partial write.
                 */
                set_buffer_new(bh);
+               set_buffer_mapped(bh);
        }
        return 0;
 }
@@ -2588,7 +2589,7 @@ static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate);
  * because we should have holes filled from ext4_page_mkwrite(). We even don't
  * need to file the inode to the transaction's list in ordered mode because if
  * we are writing back data added by write(), the inode is already there and if
- * we are writing back data modified via mmap(), noone guarantees in which
+ * we are writing back data modified via mmap(), no one guarantees in which
  * transaction the data will hit the disk. In case we are journaling data, we
  * cannot start transaction directly because transaction start ranks above page
  * lock so we have to do some magic.
@@ -2690,7 +2691,7 @@ static int ext4_writepage(struct page *page,
 
 /*
  * This is called via ext4_da_writepages() to
- * calulate the total number of credits to reserve to fit
+ * calculate the total number of credits to reserve to fit
  * a single extent allocation into a single transaction,
  * ext4_da_writpeages() will loop calling this before
  * the block allocation.
@@ -3304,7 +3305,7 @@ int ext4_alloc_da_blocks(struct inode *inode)
         * the pages by calling redirty_page_for_writepage() but that
         * would be ugly in the extreme.  So instead we would need to
         * replicate parts of the code in the above functions,
-        * simplifying them becuase we wouldn't actually intend to
+        * simplifying them because we wouldn't actually intend to
         * write out the pages, but rather only collect contiguous
         * logical block extents, call the multi-block allocator, and
         * then update the buffer heads with the block allocations.
@@ -3694,7 +3695,7 @@ retry:
  *
  * The unwrritten extents will be converted to written when DIO is completed.
  * For async direct IO, since the IO may still pending when return, we
- * set up an end_io call back function, which will do the convertion
+ * set up an end_io call back function, which will do the conversion
  * when async direct IO completed.
  *
  * If the O_DIRECT write will extend the file then add this inode to the
@@ -3717,7 +3718,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
                 * We could direct write to holes and fallocate.
                 *
                 * Allocated blocks to fill the hole are marked as uninitialized
-                * to prevent paralel buffered read to expose the stale data
+                * to prevent parallel buffered read to expose the stale data
                 * before DIO complete the data IO.
                 *
                 * As to previously fallocated extents, ext4 get_block
@@ -3778,7 +3779,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
                        int err;
                        /*
                         * for non AIO case, since the IO is already
-                        * completed, we could do the convertion right here
+                        * completed, we could do the conversion right here
                         */
                        err = ext4_convert_unwritten_extents(inode,
                                                             offset, ret);
@@ -4025,7 +4026,7 @@ static inline int all_zeroes(__le32 *p, __le32 *q)
  *
  *     When we do truncate() we may have to clean the ends of several
  *     indirect blocks but leave the blocks themselves alive. Block is
- *     partially truncated if some data below the new i_size is refered
+ *     partially truncated if some data below the new i_size is referred
  *     from it (and it is on the path to the first completely truncated
  *     data block, indeed).  We have to free the top of that path along
  *     with everything to the right of the path. Since no allocation
@@ -4169,7 +4170,7 @@ out_err:
  * @first:     array of block numbers
  * @last:      points immediately past the end of array
  *
- * We are freeing all blocks refered from that array (numbers are stored as
+ * We are freeing all blocks referred from that array (numbers are stored as
  * little-endian 32-bit) and updating @inode->i_blocks appropriately.
  *
  * We accumulate contiguous runs of blocks to free.  Conveniently, if these
@@ -4261,7 +4262,7 @@ static void ext4_free_data(handle_t *handle, struct inode *inode,
  *     @last:  pointer immediately past the end of array
  *     @depth: depth of the branches to free
  *
- *     We are freeing all blocks refered from these branches (numbers are
+ *     We are freeing all blocks referred from these branches (numbers are
  *     stored as little-endian 32-bit) and updating @inode->i_blocks
  *     appropriately.
  */
@@ -4429,8 +4430,8 @@ void ext4_truncate(struct inode *inode)
        Indirect chain[4];
        Indirect *partial;
        __le32 nr = 0;
-       int n;
-       ext4_lblk_t last_block;
+       int n = 0;
+       ext4_lblk_t last_block, max_block;
        unsigned blocksize = inode->i_sb->s_blocksize;
 
        trace_ext4_truncate_enter(inode);
@@ -4455,14 +4456,18 @@ void ext4_truncate(struct inode *inode)
 
        last_block = (inode->i_size + blocksize-1)
                                        >> EXT4_BLOCK_SIZE_BITS(inode->i_sb);
+       max_block = (EXT4_SB(inode->i_sb)->s_bitmap_maxbytes + blocksize-1)
+                                       >> EXT4_BLOCK_SIZE_BITS(inode->i_sb);
 
        if (inode->i_size & (blocksize - 1))
                if (ext4_block_truncate_page(handle, mapping, inode->i_size))
                        goto out_stop;
 
-       n = ext4_block_to_path(inode, last_block, offsets, NULL);
-       if (n == 0)
-               goto out_stop;  /* error */
+       if (last_block != max_block) {
+               n = ext4_block_to_path(inode, last_block, offsets, NULL);
+               if (n == 0)
+                       goto out_stop;  /* error */
+       }
 
        /*
         * OK.  This truncate is going to happen.  We add the inode to the
@@ -4493,7 +4498,13 @@ void ext4_truncate(struct inode *inode)
         */
        ei->i_disksize = inode->i_size;
 
-       if (n == 1) {           /* direct blocks */
+       if (last_block == max_block) {
+               /*
+                * It is unnecessary to free any data blocks if last_block is
+                * equal to the indirect block limit.
+                */
+               goto out_unlock;
+       } else if (n == 1) {            /* direct blocks */
                ext4_free_data(handle, inode, NULL, i_data+offsets[0],
                               i_data + EXT4_NDIR_BLOCKS);
                goto do_indirects;
@@ -4553,6 +4564,7 @@ do_indirects:
                ;
        }
 
+out_unlock:
        up_write(&ei->i_data_sem);
        inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
        ext4_mark_inode_dirty(handle, inode);
@@ -5398,13 +5410,12 @@ static int ext4_indirect_trans_blocks(struct inode *inode, int nrblocks,
        /* if nrblocks are contiguous */
        if (chunk) {
                /*
-                * With N contiguous data blocks, it need at most
-                * N/EXT4_ADDR_PER_BLOCK(inode->i_sb) indirect blocks
-                * 2 dindirect blocks
-                * 1 tindirect block
+                * With N contiguous data blocks, we need at most
+                * N/EXT4_ADDR_PER_BLOCK(inode->i_sb) + 1 indirect blocks,
+                * 2 dindirect blocks, and 1 tindirect block
                 */
-               indirects = nrblocks / EXT4_ADDR_PER_BLOCK(inode->i_sb);
-               return indirects + 3;
+               return DIV_ROUND_UP(nrblocks,
+                                   EXT4_ADDR_PER_BLOCK(inode->i_sb)) + 4;
        }
        /*
         * if nrblocks are not contiguous, worse case, each block touch
@@ -5478,7 +5489,7 @@ static int ext4_meta_trans_blocks(struct inode *inode, int nrblocks, int chunk)
 }
 
 /*
- * Calulate the total number of credits to reserve to fit
+ * Calculate the total number of credits to reserve to fit
  * the modification of a single pages into a single transaction,
  * which may include multiple chunks of block allocations.
  *
index a5837a837a8bfea8e835563054c99b6fde0897e4..d8a16eecf1d55748f59c6b66efe8cdf46b589803 100644 (file)
@@ -92,7 +92,7 @@
  * between CPUs. It is possible to get scheduled at this point.
  *
  * The locality group prealloc space is used looking at whether we have
- * enough free space (pa_free) withing the prealloc space.
+ * enough free space (pa_free) within the prealloc space.
  *
  * If we can't allocate blocks via inode prealloc or/and locality group
  * prealloc then we look at the buddy cache. The buddy cache is represented
index d1bafa57f48367d7403ba4ef74734ece57349778..92816b4e0f16a143f555d539cb9cb47abc7e1d48 100644 (file)
@@ -517,7 +517,7 @@ int ext4_ext_migrate(struct inode *inode)
         * start with one credit accounted for
         * superblock modification.
         *
-        * For the tmp_inode we already have commited the
+        * For the tmp_inode we already have committed the
         * trascation that created the inode. Later as and
         * when we add extents we extent the journal
         */
index 22546ad7f0aea7d2e5b6215c89eb9f24f1537c14..8553dfb310afd7ac2209d186125287e99a867f61 100644 (file)
@@ -242,27 +242,44 @@ static void ext4_put_nojournal(handle_t *handle)
  * journal_end calls result in the superblock being marked dirty, so
  * that sync() will call the filesystem's write_super callback if
  * appropriate.
+ *
+ * To avoid j_barrier hold in userspace when a user calls freeze(),
+ * ext4 prevents a new handle from being started by s_frozen, which
+ * is in an upper layer.
  */
 handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
 {
        journal_t *journal;
+       handle_t  *handle;
 
        if (sb->s_flags & MS_RDONLY)
                return ERR_PTR(-EROFS);
 
-       vfs_check_frozen(sb, SB_FREEZE_TRANS);
-       /* Special case here: if the journal has aborted behind our
-        * backs (eg. EIO in the commit thread), then we still need to
-        * take the FS itself readonly cleanly. */
        journal = EXT4_SB(sb)->s_journal;
-       if (journal) {
-               if (is_journal_aborted(journal)) {
-                       ext4_abort(sb, "Detected aborted journal");
-                       return ERR_PTR(-EROFS);
-               }
-               return jbd2_journal_start(journal, nblocks);
+       handle = ext4_journal_current_handle();
+
+       /*
+        * If a handle has been started, it should be allowed to
+        * finish, otherwise deadlock could happen between freeze
+        * and others(e.g. truncate) due to the restart of the
+        * journal handle if the filesystem is forzen and active
+        * handles are not stopped.
+        */
+       if (!handle)
+               vfs_check_frozen(sb, SB_FREEZE_TRANS);
+
+       if (!journal)
+               return ext4_get_nojournal();
+       /*
+        * Special case here: if the journal has aborted behind our
+        * backs (eg. EIO in the commit thread), then we still need to
+        * take the FS itself readonly cleanly.
+        */
+       if (is_journal_aborted(journal)) {
+               ext4_abort(sb, "Detected aborted journal");
+               return ERR_PTR(-EROFS);
        }
-       return ext4_get_nojournal();
+       return jbd2_journal_start(journal, nblocks);
 }
 
 /*
@@ -617,7 +634,7 @@ __acquires(bitlock)
         * filesystem will have already been marked read/only and the
         * journal has been aborted.  We return 1 as a hint to callers
         * who might what to use the return value from
-        * ext4_grp_locked_error() to distinguish beween the
+        * ext4_grp_locked_error() to distinguish between the
         * ERRORS_CONT and ERRORS_RO case, and perhaps return more
         * aggressively from the ext4 function in question, with a
         * more appropriate error code.
@@ -2975,6 +2992,12 @@ static int ext4_register_li_request(struct super_block *sb,
        mutex_unlock(&ext4_li_info->li_list_mtx);
 
        sbi->s_li_request = elr;
+       /*
+        * set elr to NULL here since it has been inserted to
+        * the request_list and the removal and free of it is
+        * handled by ext4_clear_request_list from now on.
+        */
+       elr = NULL;
 
        if (!(ext4_li_info->li_state & EXT4_LAZYINIT_RUNNING)) {
                ret = ext4_run_lazyinit_thread();
@@ -3385,6 +3408,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
        get_random_bytes(&sbi->s_next_generation, sizeof(u32));
        spin_lock_init(&sbi->s_next_gen_lock);
 
+       init_timer(&sbi->s_err_report);
+       sbi->s_err_report.function = print_daily_error_info;
+       sbi->s_err_report.data = (unsigned long) sb;
+
        err = percpu_counter_init(&sbi->s_freeblocks_counter,
                        ext4_count_free_blocks(sb));
        if (!err) {
@@ -3646,9 +3673,6 @@ no_journal:
                 "Opts: %s%s%s", descr, sbi->s_es->s_mount_opts,
                 *sbi->s_es->s_mount_opts ? "; " : "", orig_data);
 
-       init_timer(&sbi->s_err_report);
-       sbi->s_err_report.function = print_daily_error_info;
-       sbi->s_err_report.data = (unsigned long) sb;
        if (es->s_error_count)
                mod_timer(&sbi->s_err_report, jiffies + 300*HZ); /* 5 minutes */
 
@@ -3672,6 +3696,7 @@ failed_mount_wq:
                sbi->s_journal = NULL;
        }
 failed_mount3:
+       del_timer(&sbi->s_err_report);
        if (sbi->s_flex_groups) {
                if (is_vmalloc_addr(sbi->s_flex_groups))
                        vfree(sbi->s_flex_groups);
@@ -4138,6 +4163,11 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
 /*
  * LVM calls this function before a (read-only) snapshot is created.  This
  * gives us a chance to flush the journal completely and mark the fs clean.
+ *
+ * Note that only this function cannot bring a filesystem to be in a clean
+ * state independently, because ext4 prevents a new handle from being started
+ * by @sb->s_frozen, which stays in an upper layer.  It thus needs help from
+ * the upper layer.
  */
 static int ext4_freeze(struct super_block *sb)
 {
@@ -4614,17 +4644,30 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
 
 static int ext4_quota_off(struct super_block *sb, int type)
 {
+       struct inode *inode = sb_dqopt(sb)->files[type];
+       handle_t *handle;
+
        /* Force all delayed allocation blocks to be allocated.
         * Caller already holds s_umount sem */
        if (test_opt(sb, DELALLOC))
                sync_filesystem(sb);
 
+       /* Update modification times of quota files when userspace can
+        * start looking at them */
+       handle = ext4_journal_start(inode, 1);
+       if (IS_ERR(handle))
+               goto out;
+       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       ext4_mark_inode_dirty(handle, inode);
+       ext4_journal_stop(handle);
+
+out:
        return dquot_quota_off(sb, type);
 }
 
 /* Read data from quotafile - avoid pagecache and such because we cannot afford
  * acquiring the locks... As quota files are never truncated and quota code
- * itself serializes the operations (and noone else should touch the files)
+ * itself serializes the operations (and no one else should touch the files)
  * we don't have to be afraid of races */
 static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data,
                               size_t len, loff_t off)
@@ -4714,9 +4757,8 @@ out:
        if (inode->i_size < off + len) {
                i_size_write(inode, off + len);
                EXT4_I(inode)->i_disksize = inode->i_size;
+               ext4_mark_inode_dirty(handle, inode);
        }
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-       ext4_mark_inode_dirty(handle, inode);
        mutex_unlock(&inode->i_mutex);
        return len;
 }
index bf93ad2bee07fb9e8d0c6475a029bf740f0f6d6c..6b088641f5bf24ce72311a3b8073ce44516b8624 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/exportfs.h>
 #include <linux/fs_struct.h>
 #include <linux/fsnotify.h>
+#include <linux/personality.h>
 #include <asm/uaccess.h>
 #include "internal.h"
 
index 0be344755c020e8de53d26ff89f60d8a4778cf91..4c6992d8f3ba1e3056645e805ddcb4c879d82f93 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -9,6 +9,7 @@
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/mm.h>
+#include <linux/mmzone.h>
 #include <linux/time.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
@@ -39,14 +40,17 @@ int sysctl_nr_open_max = 1024 * 1024; /* raised later */
  */
 static DEFINE_PER_CPU(struct fdtable_defer, fdtable_defer_list);
 
-static inline void *alloc_fdmem(unsigned int size)
+static void *alloc_fdmem(unsigned int size)
 {
-       void *data;
-
-       data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN);
-       if (data != NULL)
-               return data;
-
+       /*
+        * Very large allocations can stress page reclaim, so fall back to
+        * vmalloc() if the allocation size will be considered "large" by the VM.
+        */
+       if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) {
+               void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN);
+               if (data != NULL)
+                       return data;
+       }
        return vmalloc(size);
 }
 
index 751d6b255a12ab1abcf71e817f80f4ce11bbd647..0845f84f2a5fe2b8eaf95aaac05a06cfe21f79e0 100644 (file)
@@ -110,14 +110,13 @@ int unregister_filesystem(struct file_system_type * fs)
                        *tmp = fs->next;
                        fs->next = NULL;
                        write_unlock(&file_systems_lock);
+                       synchronize_rcu();
                        return 0;
                }
                tmp = &(*tmp)->next;
        }
        write_unlock(&file_systems_lock);
 
-       synchronize_rcu();
-
        return -EINVAL;
 }
 
index 78948b4b189471df13f6fce9501f3bf352fd532c..c9a6a94e58e9cd289ea14a689d9344c7e291bdd4 100644 (file)
@@ -164,7 +164,7 @@ vxfs_read_fshead(struct super_block *sbp)
                goto out_free_pfp;
        }
        if (!VXFS_ISILT(VXFS_INO(infp->vsi_stilist))) {
-               printk(KERN_ERR "vxfs: structual list inode is of wrong type (%x)\n",
+               printk(KERN_ERR "vxfs: structural list inode is of wrong type (%x)\n",
                                VXFS_INO(infp->vsi_stilist)->vii_mode & VXFS_TYPE_MASK); 
                goto out_iput_stilist;
        }
index 6c5131d592f0ae2fbeba8b4c2d227c603bb544c3..3360f1e678ad1c0eef52994f4b44342854ef621e 100644 (file)
@@ -162,7 +162,7 @@ vxfs_find_entry(struct inode *ip, struct dentry *dp, struct page **ppp)
 /**
  * vxfs_inode_by_name - find inode number for dentry
  * @dip:       directory to search in
- * @dp:                dentry we seach for
+ * @dp:                dentry we search for
  *
  * Description:
  *   vxfs_inode_by_name finds out the inode number of
index d8324296486f21a0cd6a8b979e94eca5ac95ff6a..b7b3af50261583f3c0f86b7fdc4328a0f833bd11 100644 (file)
@@ -60,7 +60,7 @@ enum {
  *
  * The Object Location Table header is placed at the beginning of each
  * OLT extent.  It is used to fing certain filesystem-wide metadata, e.g.
- * the inital inode list, the fileset header or the device configuration.
+ * the initial inode list, the fileset header or the device configuration.
  */
 struct vxfs_olt {
        u_int32_t       olt_magic;      /* magic number                 */
index b5ed541fb13773e0df9f2b09f87e71faaf4f82d9..34591ee804b58ad8e81ee04b3754dba1bcf77f8c 100644 (file)
@@ -144,7 +144,7 @@ __bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages,
  *
  * Description:
  *   This does WB_SYNC_NONE opportunistic writeback. The IO is only
- *   started when this function returns, we make no guarentees on
+ *   started when this function returns, we make no guarantees on
  *   completion. Caller need not hold sb s_umount semaphore.
  *
  */
index 6ea00734984e1e32fd28bce98b75eb794446361e..82a66466a24c5a0c47661ac9effc6ce3b2a5df1b 100644 (file)
@@ -523,7 +523,7 @@ static int fuse_readpage(struct file *file, struct page *page)
                goto out;
 
        /*
-        * Page writeback can extend beyond the liftime of the
+        * Page writeback can extend beyond the lifetime of the
         * page-cache page, so make sure we read a properly synced
         * page.
         */
index c71995b111bf6f4347ffb313692c4ee66ff6f74e..0f5c4f9d5d62beee06937a8d0c98bd015f7dc5ee 100644 (file)
@@ -884,8 +884,8 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,
        }
 
        brelse(dibh);
-       gfs2_trans_end(sdp);
 failed:
+       gfs2_trans_end(sdp);
        if (al) {
                gfs2_inplace_release(ip);
                gfs2_quota_unlock(ip);
index ef3dc4b9fae2d64edbc9a9ed99a9613282e7d0f8..74add2ddcc3fbf05a8a4210e13589f34e1dfc49e 100644 (file)
@@ -1136,7 +1136,7 @@ void gfs2_trim_blocks(struct inode *inode)
  * earlier versions of GFS2 have a bug in the stuffed file reading
  * code which will result in a buffer overrun if the size is larger
  * than the max stuffed file size. In order to prevent this from
- * occuring, such files are unstuffed, but in other cases we can
+ * occurring, such files are unstuffed, but in other cases we can
  * just update the inode size directly.
  *
  * Returns: 0 on success, or -ve on error
index 5c356d09c321c10133afc7cf93aba2eddd1cb3c1..f789c5732b7c5fc695c7fdb97183402613dfd3c5 100644 (file)
@@ -1506,7 +1506,7 @@ struct inode *gfs2_dir_search(struct inode *dir, const struct qstr *name)
                inode = gfs2_inode_lookup(dir->i_sb, 
                                be16_to_cpu(dent->de_type),
                                be64_to_cpu(dent->de_inum.no_addr),
-                               be64_to_cpu(dent->de_inum.no_formal_ino));
+                               be64_to_cpu(dent->de_inum.no_formal_ino), 0);
                brelse(bh);
                return inode;
        }
index b2682e073eee0a593b1ab43c74291aa08e6af674..e48310885c48e8866c35647f7ea242e702df4ab2 100644 (file)
@@ -617,18 +617,51 @@ static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
        return generic_file_aio_write(iocb, iov, nr_segs, pos);
 }
 
-static void empty_write_end(struct page *page, unsigned from,
-                          unsigned to)
+static int empty_write_end(struct page *page, unsigned from,
+                          unsigned to, int mode)
 {
-       struct gfs2_inode *ip = GFS2_I(page->mapping->host);
+       struct inode *inode = page->mapping->host;
+       struct gfs2_inode *ip = GFS2_I(inode);
+       struct buffer_head *bh;
+       unsigned offset, blksize = 1 << inode->i_blkbits;
+       pgoff_t end_index = i_size_read(inode) >> PAGE_CACHE_SHIFT;
 
        zero_user(page, from, to-from);
        mark_page_accessed(page);
 
-       if (!gfs2_is_writeback(ip))
-               gfs2_page_add_databufs(ip, page, from, to);
+       if (page->index < end_index || !(mode & FALLOC_FL_KEEP_SIZE)) {
+               if (!gfs2_is_writeback(ip))
+                       gfs2_page_add_databufs(ip, page, from, to);
+
+               block_commit_write(page, from, to);
+               return 0;
+       }
+
+       offset = 0;
+       bh = page_buffers(page);
+       while (offset < to) {
+               if (offset >= from) {
+                       set_buffer_uptodate(bh);
+                       mark_buffer_dirty(bh);
+                       clear_buffer_new(bh);
+                       write_dirty_buffer(bh, WRITE);
+               }
+               offset += blksize;
+               bh = bh->b_this_page;
+       }
 
-       block_commit_write(page, from, to);
+       offset = 0;
+       bh = page_buffers(page);
+       while (offset < to) {
+               if (offset >= from) {
+                       wait_on_buffer(bh);
+                       if (!buffer_uptodate(bh))
+                               return -EIO;
+               }
+               offset += blksize;
+               bh = bh->b_this_page;
+       }
+       return 0;
 }
 
 static int needs_empty_write(sector_t block, struct inode *inode)
@@ -643,7 +676,8 @@ static int needs_empty_write(sector_t block, struct inode *inode)
        return !buffer_mapped(&bh_map);
 }
 
-static int write_empty_blocks(struct page *page, unsigned from, unsigned to)
+static int write_empty_blocks(struct page *page, unsigned from, unsigned to,
+                             int mode)
 {
        struct inode *inode = page->mapping->host;
        unsigned start, end, next, blksize;
@@ -668,7 +702,9 @@ static int write_empty_blocks(struct page *page, unsigned from, unsigned to)
                                                          gfs2_block_map);
                                if (unlikely(ret))
                                        return ret;
-                               empty_write_end(page, start, end);
+                               ret = empty_write_end(page, start, end, mode);
+                               if (unlikely(ret))
+                                       return ret;
                                end = 0;
                        }
                        start = next;
@@ -682,7 +718,9 @@ static int write_empty_blocks(struct page *page, unsigned from, unsigned to)
                ret = __block_write_begin(page, start, end - start, gfs2_block_map);
                if (unlikely(ret))
                        return ret;
-               empty_write_end(page, start, end);
+               ret = empty_write_end(page, start, end, mode);
+               if (unlikely(ret))
+                       return ret;
        }
 
        return 0;
@@ -731,7 +769,7 @@ static int fallocate_chunk(struct inode *inode, loff_t offset, loff_t len,
 
                if (curr == end)
                        to = end_offset;
-               error = write_empty_blocks(page, from, to);
+               error = write_empty_blocks(page, from, to, mode);
                if (!error && offset + to > inode->i_size &&
                    !(mode & FALLOC_FL_KEEP_SIZE)) {
                        i_size_write(inode, offset + to);
index e2431313491f1e54e136be64dcc3b0c3ba1033bc..7a4fb630a320ef2f4aea4816ecbceefee07ad96d 100644 (file)
@@ -93,14 +93,12 @@ static unsigned int gl_hash(const struct gfs2_sbd *sdp,
 
 static inline void spin_lock_bucket(unsigned int hash)
 {
-       struct hlist_bl_head *bl = &gl_hash_table[hash];
-       bit_spin_lock(0, (unsigned long *)bl);
+       hlist_bl_lock(&gl_hash_table[hash]);
 }
 
 static inline void spin_unlock_bucket(unsigned int hash)
 {
-       struct hlist_bl_head *bl = &gl_hash_table[hash];
-       __bit_spin_unlock(0, (unsigned long *)bl);
+       hlist_bl_unlock(&gl_hash_table[hash]);
 }
 
 static void gfs2_glock_dealloc(struct rcu_head *rcu)
@@ -1123,7 +1121,7 @@ void gfs2_glock_dq_uninit(struct gfs2_holder *gh)
  * @number: the lock number
  * @glops: the glock operations for the type of glock
  * @state: the state to acquire the glock in
- * @flags: modifier flags for the aquisition
+ * @flags: modifier flags for the acquisition
  * @gh: the struct gfs2_holder
  *
  * Returns: errno
index 3754e3cbf02bce2bf04b683bc9d36d48ec6a8bbe..25eeb2bcee47e4e10d289510718d7c08539a3acb 100644 (file)
@@ -385,6 +385,10 @@ static int trans_go_demote_ok(const struct gfs2_glock *gl)
 static void iopen_go_callback(struct gfs2_glock *gl)
 {
        struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object;
+       struct gfs2_sbd *sdp = gl->gl_sbd;
+
+       if (sdp->sd_vfs->s_flags & MS_RDONLY)
+               return;
 
        if (gl->gl_demote_state == LM_ST_UNLOCKED &&
            gl->gl_state == LM_ST_SHARED && ip) {
index 97d54a28776a1851a004b62a7b7ecc41a84d0e04..9134dcb894790adfd487101565703e4e24a37075 100644 (file)
@@ -40,37 +40,61 @@ struct gfs2_inum_range_host {
        u64 ir_length;
 };
 
+struct gfs2_skip_data {
+       u64 no_addr;
+       int skipped;
+       int non_block;
+};
+
 static int iget_test(struct inode *inode, void *opaque)
 {
        struct gfs2_inode *ip = GFS2_I(inode);
-       u64 *no_addr = opaque;
+       struct gfs2_skip_data *data = opaque;
 
-       if (ip->i_no_addr == *no_addr)
+       if (ip->i_no_addr == data->no_addr) {
+               if (data->non_block &&
+                   inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)) {
+                       data->skipped = 1;
+                       return 0;
+               }
                return 1;
-
+       }
        return 0;
 }
 
 static int iget_set(struct inode *inode, void *opaque)
 {
        struct gfs2_inode *ip = GFS2_I(inode);
-       u64 *no_addr = opaque;
+       struct gfs2_skip_data *data = opaque;
 
-       inode->i_ino = (unsigned long)*no_addr;
-       ip->i_no_addr = *no_addr;
+       if (data->skipped)
+               return -ENOENT;
+       inode->i_ino = (unsigned long)(data->no_addr);
+       ip->i_no_addr = data->no_addr;
        return 0;
 }
 
 struct inode *gfs2_ilookup(struct super_block *sb, u64 no_addr)
 {
        unsigned long hash = (unsigned long)no_addr;
-       return ilookup5(sb, hash, iget_test, &no_addr);
+       struct gfs2_skip_data data;
+
+       data.no_addr = no_addr;
+       data.skipped = 0;
+       data.non_block = 0;
+       return ilookup5(sb, hash, iget_test, &data);
 }
 
-static struct inode *gfs2_iget(struct super_block *sb, u64 no_addr)
+static struct inode *gfs2_iget(struct super_block *sb, u64 no_addr,
+                              int non_block)
 {
+       struct gfs2_skip_data data;
        unsigned long hash = (unsigned long)no_addr;
-       return iget5_locked(sb, hash, iget_test, iget_set, &no_addr);
+
+       data.no_addr = no_addr;
+       data.skipped = 0;
+       data.non_block = non_block;
+       return iget5_locked(sb, hash, iget_test, iget_set, &data);
 }
 
 /**
@@ -111,19 +135,20 @@ static void gfs2_set_iop(struct inode *inode)
  * @sb: The super block
  * @no_addr: The inode number
  * @type: The type of the inode
+ * non_block: Can we block on inodes that are being freed?
  *
  * Returns: A VFS inode, or an error
  */
 
 struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type,
-                               u64 no_addr, u64 no_formal_ino)
+                               u64 no_addr, u64 no_formal_ino, int non_block)
 {
        struct inode *inode;
        struct gfs2_inode *ip;
        struct gfs2_glock *io_gl = NULL;
        int error;
 
-       inode = gfs2_iget(sb, no_addr);
+       inode = gfs2_iget(sb, no_addr, non_block);
        ip = GFS2_I(inode);
 
        if (!inode)
@@ -185,11 +210,12 @@ struct inode *gfs2_lookup_by_inum(struct gfs2_sbd *sdp, u64 no_addr,
 {
        struct super_block *sb = sdp->sd_vfs;
        struct gfs2_holder i_gh;
-       struct inode *inode;
+       struct inode *inode = NULL;
        int error;
 
+       /* Must not read in block until block type is verified */
        error = gfs2_glock_nq_num(sdp, no_addr, &gfs2_inode_glops,
-                                 LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
+                                 LM_ST_EXCLUSIVE, GL_SKIP, &i_gh);
        if (error)
                return ERR_PTR(error);
 
@@ -197,7 +223,7 @@ struct inode *gfs2_lookup_by_inum(struct gfs2_sbd *sdp, u64 no_addr,
        if (error)
                goto fail;
 
-       inode = gfs2_inode_lookup(sb, DT_UNKNOWN, no_addr, 0);
+       inode = gfs2_inode_lookup(sb, DT_UNKNOWN, no_addr, 0, 1);
        if (IS_ERR(inode))
                goto fail;
 
@@ -843,7 +869,7 @@ struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
                goto fail_gunlock2;
 
        inode = gfs2_inode_lookup(dir->i_sb, IF2DT(mode), inum.no_addr,
-                                 inum.no_formal_ino);
+                                 inum.no_formal_ino, 0);
        if (IS_ERR(inode))
                goto fail_gunlock2;
 
index 3e00a66e7cbd04c707ce22686647e5800c7621a4..099ca305e518d25c8251e5163456635087b26828 100644 (file)
@@ -97,7 +97,8 @@ err:
 }
 
 extern struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned type, 
-                                      u64 no_addr, u64 no_formal_ino);
+                                      u64 no_addr, u64 no_formal_ino,
+                                      int non_block);
 extern struct inode *gfs2_lookup_by_inum(struct gfs2_sbd *sdp, u64 no_addr,
                                         u64 *no_formal_ino,
                                         unsigned int blktype);
index 42ef24355afbdb112e366269d3835cc40b37cff6..d3c69eb91c74e29c05af120f3938bffb9ebb1d75 100644 (file)
@@ -430,7 +430,7 @@ static int gfs2_lookup_root(struct super_block *sb, struct dentry **dptr,
        struct dentry *dentry;
        struct inode *inode;
 
-       inode = gfs2_inode_lookup(sb, DT_DIR, no_addr, 0);
+       inode = gfs2_inode_lookup(sb, DT_DIR, no_addr, 0, 0);
        if (IS_ERR(inode)) {
                fs_err(sdp, "can't read in %s inode: %ld\n", name, PTR_ERR(inode));
                return PTR_ERR(inode);
index cf930cd9664af9ca0c351e08c0d852f52c52417d..6fcae8469f6d76a178710ee2ece82108c8ec2ba1 100644 (file)
@@ -945,7 +945,7 @@ static void try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked, u64 skip
                /* rgblk_search can return a block < goal, so we need to
                   keep it marching forward. */
                no_addr = block + rgd->rd_data0;
-               goal++;
+               goal = max(block + 1, goal + 1);
                if (*last_unlinked != NO_BLOCK && no_addr <= *last_unlinked)
                        continue;
                if (no_addr == skip)
@@ -971,7 +971,7 @@ static void try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked, u64 skip
                        found++;
 
                /* Limit reclaim to sensible number of tasks */
-               if (found > 2*NR_CPUS)
+               if (found > NR_CPUS)
                        return;
        }
 
index ec73ed70bae1afc669b69e1cdbc162d93acec7d8..b9f28e66dad190af29b389b2830f1ff66efff024 100644 (file)
@@ -657,7 +657,7 @@ out:
  * @sdp: the file system
  *
  * This function flushes data and meta data for all machines by
- * aquiring the transaction log exclusively.  All journals are
+ * acquiring the transaction log exclusively.  All journals are
  * ensured to be in a clean state as well.
  *
  * Returns: errno
@@ -1318,15 +1318,17 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
 
 static void gfs2_evict_inode(struct inode *inode)
 {
-       struct gfs2_sbd *sdp = inode->i_sb->s_fs_info;
+       struct super_block *sb = inode->i_sb;
+       struct gfs2_sbd *sdp = sb->s_fs_info;
        struct gfs2_inode *ip = GFS2_I(inode);
        struct gfs2_holder gh;
        int error;
 
-       if (inode->i_nlink)
+       if (inode->i_nlink || (sb->s_flags & MS_RDONLY))
                goto out;
 
-       error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
+       /* Must not read inode block until block type has been verified */
+       error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_SKIP, &gh);
        if (unlikely(error)) {
                gfs2_glock_dq_uninit(&ip->i_iopen_gh);
                goto out;
@@ -1336,6 +1338,12 @@ static void gfs2_evict_inode(struct inode *inode)
        if (error)
                goto out_truncate;
 
+       if (test_bit(GIF_INVALID, &ip->i_flags)) {
+               error = gfs2_inode_refresh(ip);
+               if (error)
+                       goto out_truncate;
+       }
+
        ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
        gfs2_glock_dq_wait(&ip->i_iopen_gh);
        gfs2_holder_reinit(LM_ST_EXCLUSIVE, LM_FLAG_TRY_1CB | GL_NOCACHE, &ip->i_iopen_gh);
index 5f4e11aaeb5c6b7cb0bf045b3dd5b9a53fbcfc87..33c963d08ab49ecc4244a5e817db4af525794ce5 100644 (file)
@@ -124,6 +124,14 @@ __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_wb_list_lock);
  */
 static DECLARE_RWSEM(iprune_sem);
 
+/*
+ * Empty aops. Can be used for the cases where the user does not
+ * define any of the address_space operations.
+ */
+const struct address_space_operations empty_aops = {
+};
+EXPORT_SYMBOL(empty_aops);
+
 /*
  * Statistics gathering..
  */
@@ -176,7 +184,6 @@ int proc_nr_inodes(ctl_table *table, int write,
  */
 int inode_init_always(struct super_block *sb, struct inode *inode)
 {
-       static const struct address_space_operations empty_aops;
        static const struct inode_operations empty_iops;
        static const struct file_operations empty_fops;
        struct address_space *const mapping = &inode->i_data;
index da871ee084d365780f8a3f78078550e48d3f12ea..69b18045946330a5a35c54226094ca0dc657a903 100644 (file)
@@ -362,7 +362,7 @@ void journal_commit_transaction(journal_t *journal)
         * we do not require it to remember exactly which old buffers it
         * has reserved.  This is consistent with the existing behaviour
         * that multiple journal_get_write_access() calls to the same
-        * buffer are perfectly permissable.
+        * buffer are perfectly permissible.
         */
        while (commit_transaction->t_reserved_list) {
                jh = commit_transaction->t_reserved_list;
index eb11601f2e00f5c3c5d242fc0d571d80c0d0953c..b3713afaaa9e698337b40c7e1fecac6afbebc1bf 100644 (file)
@@ -770,7 +770,7 @@ journal_t * journal_init_dev(struct block_device *bdev,
        journal->j_wbufsize = n;
        journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
        if (!journal->j_wbuf) {
-               printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n",
+               printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n",
                        __func__);
                goto out_err;
        }
@@ -831,7 +831,7 @@ journal_t * journal_init_inode (struct inode *inode)
        journal->j_wbufsize = n;
        journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
        if (!journal->j_wbuf) {
-               printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n",
+               printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n",
                        __func__);
                goto out_err;
        }
index d29018307e2e9cca4b97409036d18f4b9421bcac..305a9076315466f27b2afea67c358cd27d74a3b6 100644 (file)
@@ -71,7 +71,7 @@
  * switching hash tables under them. For operations on the lists of entries in
  * the hash table j_revoke_lock is used.
  *
- * Finally, also replay code uses the hash tables but at this moment noone else
+ * Finally, also replay code uses the hash tables but at this moment no one else
  * can touch them (filesystem isn't mounted yet) and hence no locking is
  * needed.
  */
index 5b2e4c30a2a18b81626ee90f31c6fb6f81940acf..60d2319651b2c2b0f80d346d53a439f3f2513cc6 100644 (file)
@@ -1392,7 +1392,7 @@ int journal_stop(handle_t *handle)
         * by 30x or more...
         *
         * We try and optimize the sleep time against what the underlying disk
-        * can do, instead of having a static sleep time.  This is usefull for
+        * can do, instead of having a static sleep time.  This is useful for
         * the case where our storage is so fast that it is more optimal to go
         * ahead and force a flush and wait for the transaction to be committed
         * than it is to wait for an arbitrary amount of time for new writers to
index fa36d7662b217455a99a83f93e35899dbf950e4a..6e28000a4b2168c36d1cee255058ac41b72f34eb 100644 (file)
@@ -105,6 +105,8 @@ static int journal_submit_commit_record(journal_t *journal,
        int ret;
        struct timespec now = current_kernel_time();
 
+       *cbh = NULL;
+
        if (is_journal_aborted(journal))
                return 0;
 
@@ -403,7 +405,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
         * we do not require it to remember exactly which old buffers it
         * has reserved.  This is consistent with the existing behaviour
         * that multiple jbd2_journal_get_write_access() calls to the same
-        * buffer are perfectly permissable.
+        * buffer are perfectly permissible.
         */
        while (commit_transaction->t_reserved_list) {
                jh = commit_transaction->t_reserved_list;
@@ -806,7 +808,7 @@ wait_for_iobuf:
                if (err)
                        __jbd2_journal_abort_hard(journal);
        }
-       if (!err && !is_journal_aborted(journal))
+       if (cbh)
                err = journal_wait_on_commit_record(journal, cbh);
        if (JBD2_HAS_INCOMPAT_FEATURE(journal,
                                      JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) &&
index 90407b8fece7475b9d733e51047464fa94f209fd..e0ec3db1c395b6c338acc6f7c14af6a2c11eb067 100644 (file)
@@ -917,7 +917,7 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
        journal->j_wbufsize = n;
        journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
        if (!journal->j_wbuf) {
-               printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n",
+               printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n",
                        __func__);
                goto out_err;
        }
@@ -983,7 +983,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode)
        journal->j_wbufsize = n;
        journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
        if (!journal->j_wbuf) {
-               printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n",
+               printk(KERN_ERR "%s: Can't allocate bhs for commit thread\n",
                        __func__);
                goto out_err;
        }
@@ -2413,10 +2413,12 @@ const char *jbd2_dev_to_name(dev_t device)
        new_dev = kmalloc(sizeof(struct devname_cache), GFP_KERNEL);
        if (!new_dev)
                return "NODEV-ALLOCFAILURE"; /* Something non-NULL */
+       bd = bdget(device);
        spin_lock(&devname_cache_lock);
        if (devcache[i]) {
                if (devcache[i]->device == device) {
                        kfree(new_dev);
+                       bdput(bd);
                        ret = devcache[i]->devname;
                        spin_unlock(&devname_cache_lock);
                        return ret;
@@ -2425,7 +2427,6 @@ const char *jbd2_dev_to_name(dev_t device)
        }
        devcache[i] = new_dev;
        devcache[i]->device = device;
-       bd = bdget(device);
        if (bd) {
                bdevname(bd, devcache[i]->devname);
                bdput(bd);
index 9ad321fd63fdf73b4d7aa99ee5c78c6edbad9da4..69fd93588118027961923d26685b8edecfe3c268 100644 (file)
@@ -71,7 +71,7 @@
  * switching hash tables under them. For operations on the lists of entries in
  * the hash table j_revoke_lock is used.
  *
- * Finally, also replay code uses the hash tables but at this moment noone else
+ * Finally, also replay code uses the hash tables but at this moment no one else
  * can touch them (filesystem isn't mounted yet) and hence no locking is
  * needed.
  */
index 1d1191050f99aaae5f0807149b47e699f29b12cf..05fa77a23711f8db041cac46984452451daae70c 100644 (file)
@@ -1403,7 +1403,7 @@ int jbd2_journal_stop(handle_t *handle)
 
        /*
         * Once we drop t_updates, if it goes to zero the transaction
-        * could start commiting on us and eventually disappear.  So
+        * could start committing on us and eventually disappear.  So
         * once we do this, we must not dereference transaction
         * pointer again.
         */
index 5d3ea4070f01712396b74ddd57868e0150ff3f9c..ca28964abd4bdcd7a574642cfd0b1efb38bee2dd 100644 (file)
@@ -11,7 +11,7 @@
  - checkpointing (do we need this? scan is quite fast)
  - make the scan code populate real inodes so read_inode just after 
        mount doesn't have to read the flash twice for large files.
-       Make this a per-inode option, changable with chattr, so you can
+       Make this a per-inode option, changeable with chattr, so you can
        decide which inodes should be in-core immediately after mount.
  - test, test, test
 
index d32ee9412cb991a82ba04b0d1eb1abcec98d570d..2ab1a0d91210b4903a976cd58cae63f06ad58f6e 100644 (file)
@@ -24,7 +24,7 @@
  *
  * Returns: 0 if the data CRC is correct;
  *         1 - if incorrect;
- *         error code if an error occured.
+ *         error code if an error occurred.
  */
 static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info *tn)
 {
index 800171dca53b2b24c00ce803686e38e72f6a931c..e537fb0e0184e97eae8907a97c34d46920d9f129 100644 (file)
@@ -121,7 +121,7 @@ int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri,
        temp->nodetype = ri->nodetype;
        temp->inode = ri->ino;
        temp->version = ri->version;
-       temp->offset = cpu_to_je32(ofs); /* relative offset from the begining of the jeb */
+       temp->offset = cpu_to_je32(ofs); /* relative offset from the beginning of the jeb */
        temp->totlen = ri->totlen;
        temp->next = NULL;
 
@@ -139,7 +139,7 @@ int jffs2_sum_add_dirent_mem(struct jffs2_summary *s, struct jffs2_raw_dirent *r
 
        temp->nodetype = rd->nodetype;
        temp->totlen = rd->totlen;
-       temp->offset = cpu_to_je32(ofs);        /* relative from the begining of the jeb */
+       temp->offset = cpu_to_je32(ofs);        /* relative from the beginning of the jeb */
        temp->pino = rd->pino;
        temp->version = rd->version;
        temp->ino = rd->ino;
index 07ee1546b2fa66122940ef39d1a677f0e88b729f..4515bea0268fa6ac17f8b2d61bd818bea42b6674 100644 (file)
@@ -1116,7 +1116,7 @@ int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c,
 
 /*
  * On NAND we try to mark this block bad. If the block was erased more
- * than MAX_ERASE_FAILURES we mark it finaly bad.
+ * than MAX_ERASE_FAILURES we mark it finally bad.
  * Don't care about failures. This block remains on the erase-pending
  * or badblock list as long as nobody manipulates the flash with
  * a bootloader or something like that.
index c92ea3b3ea5e1a29c9d5028590d38d815266a921..4496872cf4e7884b8f6d6b756c8854ed2e23991c 100644 (file)
@@ -1649,7 +1649,7 @@ static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno)
                }
 
                /* search the tree within the dmap control page for
-                * sufficent free space.  if sufficient free space is found,
+                * sufficient free space.  if sufficient free space is found,
                 * dbFindLeaf() returns the index of the leaf at which
                 * free space was found.
                 */
@@ -2744,7 +2744,7 @@ static int dbJoin(dmtree_t * tp, int leafno, int newval)
                        /* check which (leafno or buddy) is the left buddy.
                         * the left buddy gets to claim the blocks resulting
                         * from the join while the right gets to claim none.
-                        * the left buddy is also eligable to participate in
+                        * the left buddy is also eligible to participate in
                         * a join at the next higher level while the right
                         * is not.
                         *
index 5d3bbd10f8db11784ed2ed18e34e13ec64c57551..e5fe8506ed16a5305f9c69db5dfbf111ecd085ba 100644 (file)
@@ -126,7 +126,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr)
 
        /* allocate the disk blocks for the extent.  initially, extBalloc()
         * will try to allocate disk blocks for the requested size (xlen).
-        * if this fails (xlen contiguous free blocks not avaliable), it'll
+        * if this fails (xlen contiguous free blocks not available), it'll
         * try to allocate a smaller number of blocks (producing a smaller
         * extent), with this smaller number of blocks consisting of the
         * requested number of blocks rounded down to the next smaller
@@ -481,7 +481,7 @@ int extFill(struct inode *ip, xad_t * xp)
  *
  *             initially, we will try to allocate disk blocks for the
  *             requested size (nblocks).  if this fails (nblocks
- *             contiguous free blocks not avaliable), we'll try to allocate
+ *             contiguous free blocks not available), we'll try to allocate
  *             a smaller number of blocks (producing a smaller extent), with
  *             this smaller number of blocks consisting of the requested
  *             number of blocks rounded down to the next smaller power of 2
@@ -575,7 +575,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno)
  *             to a new set of blocks.  If moving the extent, we initially
  *             will try to allocate disk blocks for the requested size
  *             (newnblks).  if this fails (new contiguous free blocks not
- *             avaliable), we'll try to allocate a smaller number of
+ *             available), we'll try to allocate a smaller number of
  *             blocks (producing a smaller extent), with this smaller
  *             number of blocks consisting of the requested number of
  *             blocks rounded down to the next smaller power of 2
index 3a09423b6c22c6bf0d1635ddd572ef4620c146b2..ed53a4740168bc2d7692ea07531663049d991dfe 100644 (file)
@@ -1069,7 +1069,7 @@ int diFree(struct inode *ip)
                 */
                if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG - 1)) {
                        /* in preparation for removing the iag from the
-                        * ag extent free list, read the iags preceeding
+                        * ag extent free list, read the iags preceding
                         * and following the iag on the ag extent free
                         * list.
                         */
@@ -1095,7 +1095,7 @@ int diFree(struct inode *ip)
                int inofreefwd = le32_to_cpu(iagp->inofreefwd);
 
                /* in preparation for removing the iag from the
-                * ag inode free list, read the iags preceeding
+                * ag inode free list, read the iags preceding
                 * and following the iag on the ag inode free
                 * list.  before reading these iags, we must make
                 * sure that we already don't have them in hand
@@ -1681,7 +1681,7 @@ diAllocAG(struct inomap * imap, int agno, bool dir, struct inode *ip)
         * try to allocate a new extent of free inodes.
         */
        if (addext) {
-               /* if free space is not avaliable for this new extent, try
+               /* if free space is not available for this new extent, try
                 * below to allocate a free and existing (already backed)
                 * inode from the ag.
                 */
@@ -2036,7 +2036,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino)
 
        /* check if this is the last free inode within the iag.
         * if so, it will have to be removed from the ag free
-        * inode list, so get the iags preceeding and following
+        * inode list, so get the iags preceding and following
         * it on the list.
         */
        if (iagp->nfreeinos == cpu_to_le32(1)) {
@@ -2208,7 +2208,7 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
 
        /* check if this is the last free extent within the
         * iag.  if so, the iag must be removed from the ag
-        * free extent list, so get the iags preceeding and
+        * free extent list, so get the iags preceding and
         * following the iag on this list.
         */
        if (iagp->nfreeexts == cpu_to_le32(1)) {
@@ -2504,7 +2504,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
                }
 
 
-               /* get the next avaliable iag number */
+               /* get the next available iag number */
                iagno = imap->im_nextiag;
 
                /* make sure that we have not exceeded the maximum inode
@@ -2615,7 +2615,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
 
                duplicateIXtree(sb, blkno, xlen, &xaddr);
 
-               /* update the next avaliable iag number */
+               /* update the next available iag number */
                imap->im_nextiag += 1;
 
                /* Add the iag to the iag free list so we don't lose the iag
index 9236bc49ae7ff1aed9cad81a2b22c2c54e433ba0..e38c21598850cfa7d7c7102d3c1db2f8eb4345bb 100644 (file)
@@ -288,7 +288,7 @@ struct lrd {
                /*
                 *      SYNCPT: log sync point
                 *
-                * replay log upto syncpt address specified;
+                * replay log up to syncpt address specified;
                 */
                struct {
                        __le32 sync;    /* 4: syncpt address (0 = here) */
index d94f8d9e87d79daf92e639c791a3b81742eadb57..a78beda85f68e27348c5c501ec6ac33d2bb53532 100644 (file)
@@ -75,7 +75,7 @@ extern void grab_metapage(struct metapage *);
 extern void force_metapage(struct metapage *);
 
 /*
- * hold_metapage and put_metapage are used in conjuction.  The page lock
+ * hold_metapage and put_metapage are used in conjunction.  The page lock
  * is not dropped between the two, so no other threads can get or release
  * the metapage
  */
index 9466957ec84173f56707bd591e97b007c7bba57c..f6cc0c09ec637274404af7eb6419112a8203acbe 100644 (file)
@@ -636,7 +636,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
         * the inode of the page and available to all anonymous
         * transactions until txCommit() time at which point
         * they are transferred to the transaction tlock list of
-        * the commiting transaction of the inode)
+        * the committing transaction of the inode)
         */
        if (xtid == 0) {
                tlck->tid = tid;
index 1aba0039f1c995ab0909664cc325a917ee5d8c0b..8ea5efb5a34e3c5ccc01d24d4764469b20a71ddc 100644 (file)
@@ -57,7 +57,7 @@
  * 2. compute new FSCKSize from new LVSize;
  * 3. set new FSSize as MIN(FSSize, LVSize-(LogSize+FSCKSize)) where
  *    assert(new FSSize >= old FSSize),
- *    i.e., file system must not be shrinked;
+ *    i.e., file system must not be shrunk;
  */
 int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
 {
@@ -182,7 +182,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
         */
        newFSSize = newLVSize - newLogSize - newFSCKSize;
 
-       /* file system cannot be shrinked */
+       /* file system cannot be shrunk */
        if (newFSSize < bmp->db_mapsize) {
                rc = -EINVAL;
                goto out;
index eeca48a031abfaa75063422a93aae235427b3ac4..06c8a67cbe762ed29a801f79d2ed40c2ccd59c12 100644 (file)
@@ -644,7 +644,7 @@ static int jfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
 
 /* Read data from quotafile - avoid pagecache and such because we cannot afford
  * acquiring the locks... As quota files are never truncated and quota code
- * itself serializes the operations (and noone else should touch the files)
+ * itself serializes the operations (and no one else should touch the files)
  * we don't have to be afraid of races */
 static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data,
                              size_t len, loff_t off)
index 7466e9dcc8c537c532b92241bd9684bfd3b26481..339e17e9133d0a87f3f8306062d016ea9d328500 100644 (file)
@@ -60,7 +60,7 @@ static int mtd_write(struct super_block *sb, loff_t ofs, size_t len, void *buf)
  * asynchronous properties.  So just to prevent the first implementor of such
  * a thing from breaking logfs in 2350, we do the usual pointless dance to
  * declare a completion variable and wait for completion before returning
- * from mtd_erase().  What an excercise in futility!
+ * from mtd_erase().  What an exercise in futility!
  */
 static void logfs_erase_callback(struct erase_info *ei)
 {
index f9ddf0c388c8b83c50faf148b3b5b1dcc1c7194b..9ed89d1663f839c86b84e133617a47f4d855ee25 100644 (file)
@@ -92,7 +92,7 @@ static int beyond_eof(struct inode *inode, loff_t bix)
  * so short names (len <= 9) don't even occupy the complete 32bit name
  * space.  A prime >256 ensures short names quickly spread the 32bit
  * name space.  Add about 26 for the estimated amount of information
- * of each character and pick a prime nearby, preferrably a bit-sparse
+ * of each character and pick a prime nearby, preferably a bit-sparse
  * one.
  */
 static u32 hash_32(const char *s, int len, u32 seed)
index ee99a9f5dfd3ac251b6b824a1032ce45b68b6ed7..9e22085231b30e5f45d41efbf7101d5340344231 100644 (file)
@@ -1616,7 +1616,7 @@ int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs,
                err = logfs_write_buf(inode, page, flags);
                if (!err && shrink_level(gc_level) == 0) {
                        /* Rewrite cannot mark the inode dirty but has to
-                        * write it immediatly.
+                        * write it immediately.
                         * Q: Can't we just create an alias for the inode
                         * instead?  And if not, why not?
                         */
index 33435e4b14d24aaad89bfab57da526870bbfa797..ce03a182c771c42e39e90c0f7b3737b897d02215 100644 (file)
@@ -480,10 +480,6 @@ static int logfs_read_sb(struct super_block *sb, int read_only)
                        !read_only)
                return -EIO;
 
-       mutex_init(&super->s_dirop_mutex);
-       mutex_init(&super->s_object_alias_mutex);
-       INIT_LIST_HEAD(&super->s_freeing_list);
-
        ret = logfs_init_rw(sb);
        if (ret)
                return ret;
@@ -601,6 +597,10 @@ static struct dentry *logfs_mount(struct file_system_type *type, int flags,
        if (!super)
                return ERR_PTR(-ENOMEM);
 
+       mutex_init(&super->s_dirop_mutex);
+       mutex_init(&super->s_object_alias_mutex);
+       INIT_LIST_HEAD(&super->s_freeing_list);
+
        if (!devname)
                err = logfs_get_sb_bdev(super, type, devname);
        else if (strncmp(devname, "mtd", 3))
index a25444ab2baf8562a2a0d73da30c7ba4cfd41d39..2f174be065558500c1192cf401dbd6cc0e13c046 100644 (file)
@@ -542,7 +542,7 @@ __mb_cache_entry_find(struct list_head *l, struct list_head *head,
  * mb_cache_entry_find_first()
  *
  * Find the first cache entry on a given device with a certain key in
- * an additional index. Additonal matches can be found with
+ * an additional index. Additional matches can be found with
  * mb_cache_entry_find_next(). Returns NULL if no match was found. The
  * returned cache entry is locked for shared access ("multiple readers").
  *
index 3cb616d38d9cf616f3b381c34b988f5d37f6fac2..54fc993e3027d4dff98dcf4f14ebbb4d817cdb0f 100644 (file)
@@ -70,7 +70,7 @@
  * name indicated by the symlink. The old code always complained that the
  * name already exists, due to not following the symlink even if its target
  * is nonexistent.  The new semantics affects also mknod() and link() when
- * the name is a symlink pointing to a non-existant name.
+ * the name is a symlink pointing to a non-existent name.
  *
  * I don't know which semantics is the right one, since I have no access
  * to standards. But I found by trial that HP-UX 9.0 has the full "new"
@@ -697,6 +697,7 @@ static __always_inline void set_root_rcu(struct nameidata *nd)
                do {
                        seq = read_seqcount_begin(&fs->seq);
                        nd->root = fs->root;
+                       nd->seq = __read_seqcount_begin(&nd->root.dentry->d_seq);
                } while (read_seqcount_retry(&fs->seq, seq));
        }
 }
index 7dba2ed03429460f27aba058955208ed5dd929ec..d99bcf59e4c2fd23b2c03d2c9ed7471f7b2b230e 100644 (file)
@@ -1030,18 +1030,6 @@ const struct seq_operations mounts_op = {
        .show   = show_vfsmnt
 };
 
-static int uuid_is_nil(u8 *uuid)
-{
-       int i;
-       u8  *cp = (u8 *)uuid;
-
-       for (i = 0; i < 16; i++) {
-               if (*cp++)
-                       return 0;
-       }
-       return 1;
-}
-
 static int show_mountinfo(struct seq_file *m, void *v)
 {
        struct proc_mounts *p = m->private;
@@ -1085,10 +1073,6 @@ static int show_mountinfo(struct seq_file *m, void *v)
        if (IS_MNT_UNBINDABLE(mnt))
                seq_puts(m, " unbindable");
 
-       if (!uuid_is_nil(mnt->mnt_sb->s_uuid))
-               /* print the uuid */
-               seq_printf(m, " uuid:%pU", mnt->mnt_sb->s_uuid);
-
        /* Filesystem specific data */
        seq_puts(m, " - ");
        show_type(m, sb);
index 00a1d1c3d3a494c34dc02230509ffa88485a37ae..0250e4ce489347f0a23fdbd551cd216a7abe208a 100644 (file)
@@ -596,7 +596,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
 /*     server->priv.data = NULL;               */
 
        server->m = data;
-       /* Althought anything producing this is buggy, it happens
+       /* Although anything producing this is buggy, it happens
           now because of PATH_MAX changes.. */
        if (server->m.time_out < 1) {
                server->m.time_out = 10;
index 14e0f9371d1463900258ef60c361c3079f55c707..00ecf62ce7c19023ee3abaedbe480478121524cc 100644 (file)
@@ -241,7 +241,7 @@ static __be32 decode_layoutrecall_args(struct svc_rqst *rqstp,
 
        args->cbl_layout_type = ntohl(*p++);
        /* Depite the spec's xdr, iomode really belongs in the FILE switch,
-        * as it is unuseable and ignored with the other types.
+        * as it is unusable and ignored with the other types.
         */
        iomode = ntohl(*p++);
        args->cbl_layoutchanged = ntohl(*p++);
index 3ac5bd695e5e9554ceb2c5ceda9411dbe13d7c7b..2f093ed16980016cff7d3ece166b23d99de2e790 100644 (file)
@@ -301,7 +301,7 @@ nfs_file_mmap(struct file * file, struct vm_area_struct * vma)
  * disk, but it retrieves and clears ctx->error after synching, despite
  * the two being set at the same time in nfs_context_set_write_error().
  * This is because the former is used to notify the _next_ call to
- * nfs_file_write() that a write error occured, and hence cause it to
+ * nfs_file_write() that a write error occurred, and hence cause it to
  * fall back to doing a synchronous write.
  */
 static int
index 9166fcb66da219f4b9d2a8dc4445b5b945627b16..1f063bacd2857caa119f4dce1bf429402b0be909 100644 (file)
@@ -119,7 +119,7 @@ Elong:
 }
 
 #ifdef CONFIG_NFS_V4
-static rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors, struct inode *inode)
+static rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors)
 {
        struct gss_api_mech *mech;
        struct xdr_netobj oid;
@@ -148,67 +148,64 @@ static rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors,
        return pseudoflavor;
 }
 
-static rpc_authflavor_t nfs_negotiate_security(const struct dentry *parent, const struct dentry *dentry)
+static int nfs_negotiate_security(const struct dentry *parent,
+                                 const struct dentry *dentry,
+                                 rpc_authflavor_t *flavor)
 {
-       int status = 0;
        struct page *page;
        struct nfs4_secinfo_flavors *flavors;
        int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
-       rpc_authflavor_t flavor = RPC_AUTH_UNIX;
+       int ret = -EPERM;
 
        secinfo = NFS_PROTO(parent->d_inode)->secinfo;
        if (secinfo != NULL) {
                page = alloc_page(GFP_KERNEL);
                if (!page) {
-                       status = -ENOMEM;
+                       ret = -ENOMEM;
                        goto out;
                }
                flavors = page_address(page);
-               status = secinfo(parent->d_inode, &dentry->d_name, flavors);
-               flavor = nfs_find_best_sec(flavors, dentry->d_inode);
+               ret = secinfo(parent->d_inode, &dentry->d_name, flavors);
+               *flavor = nfs_find_best_sec(flavors);
                put_page(page);
        }
 
-       return flavor;
-
 out:
-       status = -ENOMEM;
-       return status;
+       return ret;
 }
 
-static rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent,
-                                    struct dentry *dentry, struct path *path,
-                                    struct nfs_fh *fh, struct nfs_fattr *fattr)
+static int nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent,
+                              struct dentry *dentry, struct path *path,
+                              struct nfs_fh *fh, struct nfs_fattr *fattr,
+                              rpc_authflavor_t *flavor)
 {
-       rpc_authflavor_t flavor;
        struct rpc_clnt *clone;
        struct rpc_auth *auth;
        int err;
 
-       flavor = nfs_negotiate_security(parent, path->dentry);
-       if (flavor < 0)
+       err = nfs_negotiate_security(parent, path->dentry, flavor);
+       if (err < 0)
                goto out;
        clone  = rpc_clone_client(server->client);
-       auth   = rpcauth_create(flavor, clone);
+       auth   = rpcauth_create(*flavor, clone);
        if (!auth) {
-               flavor = -EIO;
+               err = -EIO;
                goto out_shutdown;
        }
        err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode,
                                                  &path->dentry->d_name,
                                                  fh, fattr);
-       if (err < 0)
-               flavor = err;
 out_shutdown:
        rpc_shutdown_client(clone);
 out:
-       return flavor;
+       return err;
 }
 #else /* CONFIG_NFS_V4 */
-static inline rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server,
-                                    struct dentry *parent, struct dentry *dentry,
-                                    struct path *path, struct nfs_fh *fh,
-                                    struct nfs_fattr *fattr)
+static inline int nfs_lookup_with_sec(struct nfs_server *server,
+                                     struct dentry *parent, struct dentry *dentry,
+                                     struct path *path, struct nfs_fh *fh,
+                                     struct nfs_fattr *fattr,
+                                     rpc_authflavor_t *flavor)
 {
        return -EPERM;
 }
@@ -234,7 +231,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
        struct nfs_fh *fh = NULL;
        struct nfs_fattr *fattr = NULL;
        int err;
-       rpc_authflavor_t flavor = 1;
+       rpc_authflavor_t flavor = RPC_AUTH_UNIX;
 
        dprintk("--> nfs_d_automount()\n");
 
@@ -255,13 +252,8 @@ struct vfsmount *nfs_d_automount(struct path *path)
        err = server->nfs_client->rpc_ops->lookup(server->client, parent->d_inode,
                                                  &path->dentry->d_name,
                                                  fh, fattr);
-       if (err == -EPERM) {
-               flavor = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr);
-               if (flavor < 0)
-                       err = flavor;
-               else
-                       err = 0;
-       }
+       if (err == -EPERM && NFS_PROTO(parent->d_inode)->secinfo != NULL)
+               err = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr, &flavor);
        dput(parent);
        if (err != 0) {
                mnt = ERR_PTR(err);
index e1c261ddd65dc591408633469e5e90ec176f476c..c4a69833dd0d5b1abf3223e6e63f2153606ef9c5 100644 (file)
@@ -47,6 +47,7 @@ enum nfs4_client_state {
        NFS4CLNT_LAYOUTRECALL,
        NFS4CLNT_SESSION_RESET,
        NFS4CLNT_RECALL_SLOT,
+       NFS4CLNT_LEASE_CONFIRM,
 };
 
 enum nfs4_session_state {
index 085a354e0f0895d721082c9236b21fcbcf5cda98..7c44579f583250a34c97d622023ec335a70a0cca 100644 (file)
@@ -33,7 +33,7 @@
 #include "pnfs.h"
 
 /*
- * Field testing shows we need to support upto 4096 stripe indices.
+ * Field testing shows we need to support up to 4096 stripe indices.
  * We store each index as a u8 (u32 on the wire) to keep the memory footprint
  * reasonable. This in turn means we support a maximum of 256
  * RFC 5661 multipath_list4 structures.
index dfd1e6d7e6c3c645886424f2858d27874233566f..69c0f3c5ee7a9c1bfa6374ea3aad7ed7421cf2fa 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/nfs4.h>
 #include <linux/nfs_fs.h>
 #include <linux/nfs_page.h>
+#include <linux/nfs_mount.h>
 #include <linux/namei.h>
 #include <linux/mount.h>
 #include <linux/module.h>
@@ -443,8 +444,8 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
        if (res->sr_status == 1)
                res->sr_status = NFS_OK;
 
-       /* -ERESTARTSYS can result in skipping nfs41_sequence_setup */
-       if (!res->sr_slot)
+       /* don't increment the sequence number if the task wasn't sent */
+       if (!RPC_WAS_SENT(task))
                goto out;
 
        /* Check the SEQUENCE operation status */
@@ -2185,9 +2186,14 @@ static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
        struct nfs4_exception exception = { };
        int err;
        do {
-               err = nfs4_handle_exception(server,
-                               _nfs4_lookup_root(server, fhandle, info),
-                               &exception);
+               err = _nfs4_lookup_root(server, fhandle, info);
+               switch (err) {
+               case 0:
+               case -NFS4ERR_WRONGSEC:
+                       break;
+               default:
+                       err = nfs4_handle_exception(server, err, &exception);
+               }
        } while (exception.retry);
        return err;
 }
@@ -2204,31 +2210,51 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl
                goto out;
        }
        ret = nfs4_lookup_root(server, fhandle, info);
-       if (ret < 0)
-               ret = -EAGAIN;
 out:
        return ret;
 }
 
-/*
- * get the file handle for the "/" directory on the server
- */
-static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
+static int nfs4_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
                              struct nfs_fsinfo *info)
 {
        int i, len, status = 0;
-       rpc_authflavor_t flav_array[NFS_MAX_SECFLAVORS + 2];
+       rpc_authflavor_t flav_array[NFS_MAX_SECFLAVORS];
 
-       flav_array[0] = RPC_AUTH_UNIX;
-       len = gss_mech_list_pseudoflavors(&flav_array[1]);
-       flav_array[1+len] = RPC_AUTH_NULL;
-       len += 2;
+       len = gss_mech_list_pseudoflavors(&flav_array[0]);
+       flav_array[len] = RPC_AUTH_NULL;
+       len += 1;
 
        for (i = 0; i < len; i++) {
                status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]);
-               if (status == 0)
-                       break;
+               if (status == -NFS4ERR_WRONGSEC || status == -EACCES)
+                       continue;
+               break;
        }
+       /*
+        * -EACCESS could mean that the user doesn't have correct permissions
+        * to access the mount.  It could also mean that we tried to mount
+        * with a gss auth flavor, but rpc.gssd isn't running.  Either way,
+        * existing mount programs don't handle -EACCES very well so it should
+        * be mapped to -EPERM instead.
+        */
+       if (status == -EACCES)
+               status = -EPERM;
+       return status;
+}
+
+/*
+ * get the file handle for the "/" directory on the server
+ */
+static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
+                             struct nfs_fsinfo *info)
+{
+       int status = nfs4_lookup_root(server, fhandle, info);
+       if ((status == -NFS4ERR_WRONGSEC) && !(server->flags & NFS_MOUNT_SECFLAVOUR))
+               /*
+                * A status of -NFS4ERR_WRONGSEC will be mapped to -EPERM
+                * by nfs4_map_errors() as this function exits.
+                */
+               status = nfs4_find_root_sec(server, fhandle, info);
        if (status == 0)
                status = nfs4_server_capabilities(server, fhandle);
        if (status == 0)
@@ -3725,21 +3751,20 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program,
                                sizeof(setclientid.sc_uaddr), "%s.%u.%u",
                                clp->cl_ipaddr, port >> 8, port & 255);
 
-               status = rpc_call_sync(clp->cl_rpcclient, &msg, 0);
+               status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
                if (status != -NFS4ERR_CLID_INUSE)
                        break;
-               if (signalled())
+               if (loop != 0) {
+                       ++clp->cl_id_uniquifier;
                        break;
-               if (loop++ & 1)
-                       ssleep(clp->cl_lease_time / HZ + 1);
-               else
-                       if (++clp->cl_id_uniquifier == 0)
-                               break;
+               }
+               ++loop;
+               ssleep(clp->cl_lease_time / HZ + 1);
        }
        return status;
 }
 
-static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp,
+int nfs4_proc_setclientid_confirm(struct nfs_client *clp,
                struct nfs4_setclientid_res *arg,
                struct rpc_cred *cred)
 {
@@ -3754,7 +3779,7 @@ static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp,
        int status;
 
        now = jiffies;
-       status = rpc_call_sync(clp->cl_rpcclient, &msg, 0);
+       status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
        if (status == 0) {
                spin_lock(&clp->cl_lock);
                clp->cl_lease_time = fsinfo.lease_time * HZ;
@@ -3764,26 +3789,6 @@ static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp,
        return status;
 }
 
-int nfs4_proc_setclientid_confirm(struct nfs_client *clp,
-               struct nfs4_setclientid_res *arg,
-               struct rpc_cred *cred)
-{
-       long timeout = 0;
-       int err;
-       do {
-               err = _nfs4_proc_setclientid_confirm(clp, arg, cred);
-               switch (err) {
-                       case 0:
-                               return err;
-                       case -NFS4ERR_RESOURCE:
-                               /* The IBM lawyers misread another document! */
-                       case -NFS4ERR_DELAY:
-                               err = nfs4_delay(clp->cl_rpcclient, &timeout);
-               }
-       } while (err == 0);
-       return err;
-}
-
 struct nfs4_delegreturndata {
        struct nfs4_delegreturnargs args;
        struct nfs4_delegreturnres res;
@@ -4788,7 +4793,7 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
                                init_utsname()->domainname,
                                clp->cl_rpcclient->cl_auth->au_flavor);
 
-       status = rpc_call_sync(clp->cl_rpcclient, &msg, 0);
+       status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
        if (!status)
                status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags);
        dprintk("<-- %s status= %d\n", __func__, status);
@@ -4871,7 +4876,8 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)
                .rpc_client = clp->cl_rpcclient,
                .rpc_message = &msg,
                .callback_ops = &nfs4_get_lease_time_ops,
-               .callback_data = &data
+               .callback_data = &data,
+               .flags = RPC_TASK_TIMEOUT,
        };
        int status;
 
@@ -5173,7 +5179,7 @@ static int _nfs4_proc_create_session(struct nfs_client *clp)
        nfs4_init_channel_attrs(&args);
        args.flags = (SESSION4_PERSIST | SESSION4_BACK_CHAN);
 
-       status = rpc_call_sync(session->clp->cl_rpcclient, &msg, 0);
+       status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
 
        if (!status)
                /* Verify the session's negotiated channel_attrs values */
@@ -5196,20 +5202,10 @@ int nfs4_proc_create_session(struct nfs_client *clp)
        int status;
        unsigned *ptr;
        struct nfs4_session *session = clp->cl_session;
-       long timeout = 0;
-       int err;
 
        dprintk("--> %s clp=%p session=%p\n", __func__, clp, session);
 
-       do {
-               status = _nfs4_proc_create_session(clp);
-               if (status == -NFS4ERR_DELAY) {
-                       err = nfs4_delay(clp->cl_rpcclient, &timeout);
-                       if (err)
-                               status = err;
-               }
-       } while (status == -NFS4ERR_DELAY);
-
+       status = _nfs4_proc_create_session(clp);
        if (status)
                goto out;
 
@@ -5250,7 +5246,7 @@ int nfs4_proc_destroy_session(struct nfs4_session *session)
        msg.rpc_argp = session;
        msg.rpc_resp = NULL;
        msg.rpc_cred = NULL;
-       status = rpc_call_sync(session->clp->cl_rpcclient, &msg, 0);
+       status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
 
        if (status)
                printk(KERN_WARNING
index a6804f704d9d8656868b6492c66232020132fe6d..036f5adc9e1fad417eb13c2b8687e6ea56abb613 100644 (file)
@@ -64,10 +64,15 @@ static LIST_HEAD(nfs4_clientid_list);
 
 int nfs4_init_clientid(struct nfs_client *clp, struct rpc_cred *cred)
 {
-       struct nfs4_setclientid_res clid;
+       struct nfs4_setclientid_res clid = {
+               .clientid = clp->cl_clientid,
+               .confirm = clp->cl_confirm,
+       };
        unsigned short port;
        int status;
 
+       if (test_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state))
+               goto do_confirm;
        port = nfs_callback_tcpport;
        if (clp->cl_addr.ss_family == AF_INET6)
                port = nfs_callback_tcpport6;
@@ -75,10 +80,14 @@ int nfs4_init_clientid(struct nfs_client *clp, struct rpc_cred *cred)
        status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid);
        if (status != 0)
                goto out;
+       clp->cl_clientid = clid.clientid;
+       clp->cl_confirm = clid.confirm;
+       set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
+do_confirm:
        status = nfs4_proc_setclientid_confirm(clp, &clid, cred);
        if (status != 0)
                goto out;
-       clp->cl_clientid = clid.clientid;
+       clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
        nfs4_schedule_state_renewal(clp);
 out:
        return status;
@@ -230,13 +239,18 @@ int nfs41_init_clientid(struct nfs_client *clp, struct rpc_cred *cred)
 {
        int status;
 
+       if (test_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state))
+               goto do_confirm;
        nfs4_begin_drain_session(clp);
        status = nfs4_proc_exchange_id(clp, cred);
        if (status != 0)
                goto out;
+       set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
+do_confirm:
        status = nfs4_proc_create_session(clp);
        if (status != 0)
                goto out;
+       clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
        nfs41_setup_state_renewal(clp);
        nfs_mark_client_ready(clp, NFS_CS_READY);
 out:
@@ -1584,20 +1598,23 @@ static int nfs4_recall_slot(struct nfs_client *clp) { return 0; }
  */
 static void nfs4_set_lease_expired(struct nfs_client *clp, int status)
 {
-       if (nfs4_has_session(clp)) {
-               switch (status) {
-               case -NFS4ERR_DELAY:
-               case -NFS4ERR_CLID_INUSE:
-               case -EAGAIN:
-                       break;
+       switch (status) {
+       case -NFS4ERR_CLID_INUSE:
+       case -NFS4ERR_STALE_CLIENTID:
+               clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
+               break;
+       case -NFS4ERR_DELAY:
+       case -ETIMEDOUT:
+       case -EAGAIN:
+               ssleep(1);
+               break;
 
-               case -EKEYEXPIRED:
-                       nfs4_warn_keyexpired(clp->cl_hostname);
-               case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
-                                        * in nfs4_exchange_id */
-               default:
-                       return;
-               }
+       case -EKEYEXPIRED:
+               nfs4_warn_keyexpired(clp->cl_hostname);
+       case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
+                                * in nfs4_exchange_id */
+       default:
+               return;
        }
        set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
 }
@@ -1607,7 +1624,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
        int status = 0;
 
        /* Ensure exclusive access to NFSv4 state */
-       for(;;) {
+       do {
                if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) {
                        /* We're going to have to re-establish a clientid */
                        status = nfs4_reclaim_lease(clp);
@@ -1691,7 +1708,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
                        break;
                if (test_and_set_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) != 0)
                        break;
-       }
+       } while (atomic_read(&clp->cl_count) > 1);
        return;
 out_error:
        printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
index dddfb5795d7b8c67999ebfc819b5cd8021e36cd8..c3ccd2c468344fab9076214fec8d99fc1eee9036 100644 (file)
@@ -1452,26 +1452,25 @@ static void encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args,
 
 static void encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg *readdir, struct rpc_rqst *req, struct compound_hdr *hdr)
 {
-       uint32_t attrs[2] = {0, 0};
+       uint32_t attrs[2] = {
+               FATTR4_WORD0_RDATTR_ERROR,
+               FATTR4_WORD1_MOUNTED_ON_FILEID,
+       };
        uint32_t dircount = readdir->count >> 1;
        __be32 *p;
 
        if (readdir->plus) {
                attrs[0] |= FATTR4_WORD0_TYPE|FATTR4_WORD0_CHANGE|FATTR4_WORD0_SIZE|
-                       FATTR4_WORD0_FSID|FATTR4_WORD0_FILEHANDLE;
+                       FATTR4_WORD0_FSID|FATTR4_WORD0_FILEHANDLE|FATTR4_WORD0_FILEID;
                attrs[1] |= FATTR4_WORD1_MODE|FATTR4_WORD1_NUMLINKS|FATTR4_WORD1_OWNER|
                        FATTR4_WORD1_OWNER_GROUP|FATTR4_WORD1_RAWDEV|
                        FATTR4_WORD1_SPACE_USED|FATTR4_WORD1_TIME_ACCESS|
                        FATTR4_WORD1_TIME_METADATA|FATTR4_WORD1_TIME_MODIFY;
                dircount >>= 1;
        }
-       attrs[0] |= FATTR4_WORD0_RDATTR_ERROR|FATTR4_WORD0_FILEID;
-       attrs[1] |= FATTR4_WORD1_MOUNTED_ON_FILEID;
-       /* Switch to mounted_on_fileid if the server supports it */
-       if (readdir->bitmask[1] & FATTR4_WORD1_MOUNTED_ON_FILEID)
-               attrs[0] &= ~FATTR4_WORD0_FILEID;
-       else
-               attrs[1] &= ~FATTR4_WORD1_MOUNTED_ON_FILEID;
+       /* Use mounted_on_fileid only if the server supports it */
+       if (!(readdir->bitmask[1] & FATTR4_WORD1_MOUNTED_ON_FILEID))
+               attrs[0] |= FATTR4_WORD0_FILEID;
 
        p = reserve_space(xdr, 12+NFS4_VERIFIER_SIZE+20);
        *p++ = cpu_to_be32(OP_READDIR);
@@ -3140,7 +3139,7 @@ static int decode_attr_mounted_on_fileid(struct xdr_stream *xdr, uint32_t *bitma
                        goto out_overflow;
                xdr_decode_hyper(p, fileid);
                bitmap[1] &= ~FATTR4_WORD1_MOUNTED_ON_FILEID;
-               ret = NFS_ATTR_FATTR_FILEID;
+               ret = NFS_ATTR_FATTR_MOUNTED_ON_FILEID;
        }
        dprintk("%s: fileid=%Lu\n", __func__, (unsigned long long)*fileid);
        return ret;
@@ -4002,7 +4001,6 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
 {
        int status;
        umode_t fmode = 0;
-       uint64_t fileid;
        uint32_t type;
 
        status = decode_attr_type(xdr, bitmap, &type);
@@ -4101,13 +4099,10 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
                goto xdr_error;
        fattr->valid |= status;
 
-       status = decode_attr_mounted_on_fileid(xdr, bitmap, &fileid);
+       status = decode_attr_mounted_on_fileid(xdr, bitmap, &fattr->mounted_on_fileid);
        if (status < 0)
                goto xdr_error;
-       if (status != 0 && !(fattr->valid & status)) {
-               fattr->fileid = fileid;
-               fattr->valid |= status;
-       }
+       fattr->valid |= status;
 
 xdr_error:
        dprintk("%s: xdr returned %d\n", __func__, -status);
@@ -4838,17 +4833,21 @@ static int decode_secinfo(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
        struct nfs4_secinfo_flavor *sec_flavor;
        int status;
        __be32 *p;
-       int i;
+       int i, num_flavors;
 
        status = decode_op_hdr(xdr, OP_SECINFO);
+       if (status)
+               goto out;
        p = xdr_inline_decode(xdr, 4);
        if (unlikely(!p))
                goto out_overflow;
-       res->flavors->num_flavors = be32_to_cpup(p);
 
-       for (i = 0; i < res->flavors->num_flavors; i++) {
+       res->flavors->num_flavors = 0;
+       num_flavors = be32_to_cpup(p);
+
+       for (i = 0; i < num_flavors; i++) {
                sec_flavor = &res->flavors->flavors[i];
-               if ((char *)&sec_flavor[1] - (char *)res > PAGE_SIZE)
+               if ((char *)&sec_flavor[1] - (char *)res->flavors > PAGE_SIZE)
                        break;
 
                p = xdr_inline_decode(xdr, 4);
@@ -4857,13 +4856,15 @@ static int decode_secinfo(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
                sec_flavor->flavor = be32_to_cpup(p);
 
                if (sec_flavor->flavor == RPC_AUTH_GSS) {
-                       if (decode_secinfo_gss(xdr, sec_flavor))
-                               break;
+                       status = decode_secinfo_gss(xdr, sec_flavor);
+                       if (status)
+                               goto out;
                }
+               res->flavors->num_flavors++;
        }
 
-       return 0;
-
+out:
+       return status;
 out_overflow:
        print_overflow_msg(__func__, xdr);
        return -EIO;
@@ -6408,7 +6409,9 @@ int nfs4_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry,
        if (decode_getfattr_attrs(xdr, bitmap, entry->fattr, entry->fh,
                                        entry->server, 1) < 0)
                goto out_overflow;
-       if (entry->fattr->valid & NFS_ATTR_FATTR_FILEID)
+       if (entry->fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID)
+               entry->ino = entry->fattr->mounted_on_fileid;
+       else if (entry->fattr->valid & NFS_ATTR_FATTR_FILEID)
                entry->ino = entry->fattr->fileid;
 
        entry->d_type = DT_UNKNOWN;
index d9ab97269ce6e83c2fbd652fddebb789f761a271..ff681ab65d31f54654521e560b9cd5780db8318f 100644 (file)
@@ -1004,6 +1004,7 @@ pnfs_set_layoutcommit(struct nfs_write_data *wdata)
 {
        struct nfs_inode *nfsi = NFS_I(wdata->inode);
        loff_t end_pos = wdata->args.offset + wdata->res.count;
+       bool mark_as_dirty = false;
 
        spin_lock(&nfsi->vfs_inode.i_lock);
        if (!test_and_set_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags)) {
@@ -1011,13 +1012,18 @@ pnfs_set_layoutcommit(struct nfs_write_data *wdata)
                get_lseg(wdata->lseg);
                wdata->lseg->pls_lc_cred =
                        get_rpccred(wdata->args.context->state->owner->so_cred);
-               mark_inode_dirty_sync(wdata->inode);
+               mark_as_dirty = true;
                dprintk("%s: Set layoutcommit for inode %lu ",
                        __func__, wdata->inode->i_ino);
        }
        if (end_pos > wdata->lseg->pls_end_pos)
                wdata->lseg->pls_end_pos = end_pos;
        spin_unlock(&nfsi->vfs_inode.i_lock);
+
+       /* if pnfs_layoutcommit_inode() runs between inode locks, the next one
+        * will be a noop because NFS_INO_LAYOUTCOMMIT will not be set */
+       if (mark_as_dirty)
+               mark_inode_dirty_sync(wdata->inode);
 }
 EXPORT_SYMBOL_GPL(pnfs_set_layoutcommit);
 
index 2b8e9a5e366a67a7eb6ce228d14df6ed69f51fb9..e288f06d3fa7de5f6d06e134b1854230aa9b7611 100644 (file)
@@ -1004,6 +1004,7 @@ static int nfs_parse_security_flavors(char *value,
                return 0;
        }
 
+       mnt->flags |= NFS_MOUNT_SECFLAVOUR;
        mnt->auth_flavor_len = 1;
        return 1;
 }
@@ -1976,6 +1977,15 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
        if (error < 0)
                goto out;
 
+       /*
+        * noac is a special case. It implies -o sync, but that's not
+        * necessarily reflected in the mtab options. do_remount_sb
+        * will clear MS_SYNCHRONOUS if -o sync wasn't specified in the
+        * remount options, so we have to explicitly reset it.
+        */
+       if (data->flags & NFS_MOUNT_NOAC)
+               *flags |= MS_SYNCHRONOUS;
+
        /* compare new mount options with old ones */
        error = nfs_compare_remount_data(nfss, data);
 out:
@@ -2235,8 +2245,7 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
        if (!s->s_root) {
                /* initial superblock/root creation */
                nfs_fill_super(s, data);
-               nfs_fscache_get_super_cookie(
-                       s, data ? data->fscache_uniq : NULL, NULL);
+               nfs_fscache_get_super_cookie(s, data->fscache_uniq, NULL);
        }
 
        mntroot = nfs_get_root(s, mntfh, dev_name);
index af0c6279a4a7c131cd9c2a80e0764ba8ea50a6c9..3bd5d7e80f6cc60fbd7f46a68c8abd60c126eb54 100644 (file)
@@ -542,11 +542,15 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, u
        if (!nfs_need_commit(nfsi))
                return 0;
 
+       spin_lock(&inode->i_lock);
        ret = nfs_scan_list(nfsi, dst, idx_start, npages, NFS_PAGE_TAG_COMMIT);
        if (ret > 0)
                nfsi->ncommit -= ret;
+       spin_unlock(&inode->i_lock);
+
        if (nfs_need_commit(NFS_I(inode)))
                __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
+
        return ret;
 }
 #else
@@ -676,7 +680,6 @@ static int nfs_writepage_setup(struct nfs_open_context *ctx, struct page *page,
        req = nfs_setup_write_request(ctx, page, offset, count);
        if (IS_ERR(req))
                return PTR_ERR(req);
-       nfs_mark_request_dirty(req);
        /* Update file length */
        nfs_grow_file(page, offset, count);
        nfs_mark_uptodate(page, req->wb_pgbase, req->wb_bytes);
@@ -1414,8 +1417,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
                                 task->tk_pid, task->tk_status);
 
        /* Call the NFS version-specific code */
-       if (NFS_PROTO(data->inode)->commit_done(task, data) != 0)
-               return;
+       NFS_PROTO(data->inode)->commit_done(task, data);
 }
 
 void nfs_commit_release_pages(struct nfs_write_data *data)
@@ -1483,9 +1485,7 @@ int nfs_commit_inode(struct inode *inode, int how)
        res = nfs_commit_set_lock(NFS_I(inode), may_wait);
        if (res <= 0)
                goto out_mark_dirty;
-       spin_lock(&inode->i_lock);
        res = nfs_scan_commit(inode, &head, 0, 0);
-       spin_unlock(&inode->i_lock);
        if (res) {
                int error;
 
index ec0f277be7f5d4162bc4f12f6e84de17025b0935..6940439bd6090a7ad09954b0cbd721ae34538e65 100644 (file)
@@ -173,7 +173,7 @@ xdr_nfsace_decode(struct xdr_array2_desc *desc, void *elem)
                                return -EINVAL;
                        break;
                case ACL_MASK:
-                       /* Solaris sometimes sets additonal bits in the mask */
+                       /* Solaris sometimes sets additional bits in the mask */
                        entry->e_perm &= S_IRWXO;
                        break;
                default:
index 0c6d8167013749dce9028af641315dac7c3e4fa2..7c831a2731fa1210cf7b909113e12cfffc472c25 100644 (file)
@@ -38,7 +38,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)
        exp_readlock();
        nfserr = nfsd_open(rqstp, &fh, S_IFREG, NFSD_MAY_LOCK, filp);
        fh_put(&fh);
-       rqstp->rq_client = NULL;
        exp_readunlock();
        /* We return nlm error codes as nlm doesn't know
         * about nfsd, but nfsd does know about nlm..
index 7e84a852cdae8117334fec6ee00d085fc29c0c66..ad48faca20fc7f777dfcd76dbd35b7e62a197eca 100644 (file)
@@ -702,7 +702,7 @@ nfs3svc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
                *p++ = htonl(resp->eof);
                *p++ = htonl(resp->count);      /* xdr opaque count */
                xdr_ressize_check(rqstp, p);
-               /* now update rqstp->rq_res to reflect data aswell */
+               /* now update rqstp->rq_res to reflect data as well */
                rqstp->rq_res.page_len = resp->count;
                if (resp->count & 3) {
                        /* need to pad the tail */
index fbde6f79922ed0ce13ee9b97074ffcfce9555508..4cf04e11c66ca39c80dc6b54b6854842de246826 100644 (file)
@@ -258,6 +258,7 @@ static void nfs4_put_deleg_lease(struct nfs4_file *fp)
        if (atomic_dec_and_test(&fp->fi_delegees)) {
                vfs_setlease(fp->fi_deleg_file, F_UNLCK, &fp->fi_lease);
                fp->fi_lease = NULL;
+               fput(fp->fi_deleg_file);
                fp->fi_deleg_file = NULL;
        }
 }
@@ -397,9 +398,12 @@ static void unhash_generic_stateid(struct nfs4_stateid *stp)
 
 static void free_generic_stateid(struct nfs4_stateid *stp)
 {
-       int oflag = nfs4_access_bmap_to_omode(stp);
+       int oflag;
 
-       nfs4_file_put_access(stp->st_file, oflag);
+       if (stp->st_access_bmap) {
+               oflag = nfs4_access_bmap_to_omode(stp);
+               nfs4_file_put_access(stp->st_file, oflag);
+       }
        put_nfs4_file(stp->st_file);
        kmem_cache_free(stateid_slab, stp);
 }
@@ -3055,7 +3059,7 @@ check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags)
        if (ONE_STATEID(stateid) && (flags & RD_STATE))
                return nfs_ok;
        else if (locks_in_grace()) {
-               /* Answer in remaining cases depends on existance of
+               /* Answer in remaining cases depends on existence of
                 * conflicting state; so we must wait out the grace period. */
                return nfserr_grace;
        } else if (flags & WR_STATE)
@@ -3675,7 +3679,7 @@ find_lockstateowner_str(struct inode *inode, clientid_t *clid,
 /*
  * Alloc a lock owner structure.
  * Called in nfsd4_lock - therefore, OPEN and OPEN_CONFIRM (if needed) has 
- * occured. 
+ * occurred. 
  *
  * strhashval = lock_ownerstr_hashval 
  */
index 4ce005dbf3e66b9df71ce3d2009a2d249cc3555e..65ec595e2226c0aa4e1f051abef5ef995f1d9fce 100644 (file)
@@ -451,7 +451,7 @@ nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
        *p++ = htonl(resp->count);
        xdr_ressize_check(rqstp, p);
 
-       /* now update rqstp->rq_res to reflect data aswell */
+       /* now update rqstp->rq_res to reflect data as well */
        rqstp->rq_res.page_len = resp->count;
        if (resp->count & 3) {
                /* need to pad the tail */
index 2e1cebde90df4c69baa21635e959f9d81c9809f1..129f3c9f62d589f44b947fccd04c8f745cdfb485 100644 (file)
@@ -1363,7 +1363,7 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp,
                goto out;
        if (!(iap->ia_valid & ATTR_MODE))
                iap->ia_mode = 0;
-       err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE);
+       err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC);
        if (err)
                goto out;
 
@@ -1385,6 +1385,13 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp,
        if (IS_ERR(dchild))
                goto out_nfserr;
 
+       /* If file doesn't exist, check for permissions to create one */
+       if (!dchild->d_inode) {
+               err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE);
+               if (err)
+                       goto out;
+       }
+
        err = fh_compose(resfhp, fhp->fh_export, dchild, fhp);
        if (err)
                goto out;
index 9d2dc6b4348e989a2caf7a08af7505e62bacd858..1168059c7efd5ae923c1e374a00b4813b13ec7b1 100644 (file)
@@ -495,8 +495,6 @@ unsigned nilfs_page_count_clean_buffers(struct page *page,
 void nilfs_mapping_init(struct address_space *mapping,
                        struct backing_dev_info *bdi)
 {
-       static const struct address_space_operations empty_aops;
-
        mapping->host = NULL;
        mapping->flags = 0;
        mapping_set_gfp_mask(mapping, GFP_NOFS);
index 6b1305dc26c0846d78f28afab7e20b52e148239e..9fde1c00a29627b88f3023441a8fc840d2f415c6 100644 (file)
@@ -164,7 +164,7 @@ static int process_access_response(struct fsnotify_group *group,
                 fd, response);
        /*
         * make sure the response is valid, if invalid we do nothing and either
-        * userspace can send a valid responce or we will clean it up after the
+        * userspace can send a valid response or we will clean it up after the
         * timeout
         */
        switch (response) {
index a91b69a6a291be3e29082a69c8697cb049d5992c..e3cbd746f64a5eb4ac9359cf8a3f271a6da8a332 100644 (file)
@@ -194,10 +194,11 @@ static int idr_callback(int id, void *p, void *data)
 
 static void inotify_free_group_priv(struct fsnotify_group *group)
 {
-       /* ideally the idr is empty and we won't hit the BUG in teh callback */
+       /* ideally the idr is empty and we won't hit the BUG in the callback */
        idr_for_each(&group->inotify_data.idr, idr_callback, group);
        idr_remove_all(&group->inotify_data.idr);
        idr_destroy(&group->inotify_data.idr);
+       atomic_dec(&group->inotify_data.user->inotify_devs);
        free_uid(group->inotify_data.user);
 }
 
index bd46e7c8a0ef25cb7118f94f3753b49fb4325b6e..8445fbc8985cae9c7357f59f97fface6e482815b 100644 (file)
@@ -290,7 +290,6 @@ static int inotify_fasync(int fd, struct file *file, int on)
 static int inotify_release(struct inode *ignored, struct file *file)
 {
        struct fsnotify_group *group = file->private_data;
-       struct user_struct *user = group->inotify_data.user;
 
        pr_debug("%s: group=%p\n", __func__, group);
 
@@ -299,8 +298,6 @@ static int inotify_release(struct inode *ignored, struct file *file)
        /* free this group, matching get was inotify_init->fsnotify_obtain_group */
        fsnotify_put_group(group);
 
-       atomic_dec(&user->inotify_devs);
-
        return 0;
 }
 
@@ -697,7 +694,7 @@ retry:
        return ret;
 }
 
-static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsigned int max_events)
+static struct fsnotify_group *inotify_new_group(unsigned int max_events)
 {
        struct fsnotify_group *group;
 
@@ -710,8 +707,14 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign
        spin_lock_init(&group->inotify_data.idr_lock);
        idr_init(&group->inotify_data.idr);
        group->inotify_data.last_wd = 0;
-       group->inotify_data.user = user;
        group->inotify_data.fa = NULL;
+       group->inotify_data.user = get_current_user();
+
+       if (atomic_inc_return(&group->inotify_data.user->inotify_devs) >
+           inotify_max_user_instances) {
+               fsnotify_put_group(group);
+               return ERR_PTR(-EMFILE);
+       }
 
        return group;
 }
@@ -721,7 +724,6 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign
 SYSCALL_DEFINE1(inotify_init1, int, flags)
 {
        struct fsnotify_group *group;
-       struct user_struct *user;
        int ret;
 
        /* Check the IN_* constants for consistency.  */
@@ -731,31 +733,16 @@ SYSCALL_DEFINE1(inotify_init1, int, flags)
        if (flags & ~(IN_CLOEXEC | IN_NONBLOCK))
                return -EINVAL;
 
-       user = get_current_user();
-       if (unlikely(atomic_read(&user->inotify_devs) >=
-                       inotify_max_user_instances)) {
-               ret = -EMFILE;
-               goto out_free_uid;
-       }
-
        /* fsnotify_obtain_group took a reference to group, we put this when we kill the file in the end */
-       group = inotify_new_group(user, inotify_max_queued_events);
-       if (IS_ERR(group)) {
-               ret = PTR_ERR(group);
-               goto out_free_uid;
-       }
-
-       atomic_inc(&user->inotify_devs);
+       group = inotify_new_group(inotify_max_queued_events);
+       if (IS_ERR(group))
+               return PTR_ERR(group);
 
        ret = anon_inode_getfd("inotify", &inotify_fops, group,
                                  O_RDONLY | flags);
-       if (ret >= 0)
-               return ret;
+       if (ret < 0)
+               fsnotify_put_group(group);
 
-       fsnotify_put_group(group);
-       atomic_dec(&user->inotify_devs);
-out_free_uid:
-       free_uid(user);
        return ret;
 }
 
index 50c00856f7308daf2237baba41c659f1d495e119..252ab1f6452b3344608839daa925f6c8382354b8 100644 (file)
@@ -24,7 +24,7 @@
  * referencing this object.  The object typically will live inside the kernel
  * with a refcnt of 2, one for each list it is on (i_list, g_list).  Any task
  * which can find this object holding the appropriete locks, can take a reference
- * and the object itself is guarenteed to survive until the reference is dropped.
+ * and the object itself is guaranteed to survive until the reference is dropped.
  *
  * LOCKING:
  * There are 3 spinlocks involved with fsnotify inode marks and they MUST
index f5094ee224c1fc1fbba40c4eddcb6f9480eea819..f14fde2b03d68f03e38b1aa62580227a5243cc91 100644 (file)
@@ -197,7 +197,7 @@ err_out:
        } else if (ctx_needs_reset) {
                /*
                 * If there is no attribute list, restoring the search context
-                * is acomplished simply by copying the saved context back over
+                * is accomplished simply by copying the saved context back over
                 * the caller supplied context.  If there is an attribute list,
                 * things are more complicated as we need to deal with mapping
                 * of mft records and resulting potential changes in pointers.
@@ -1181,7 +1181,7 @@ not_found:
  * for, i.e. if one wants to add the attribute to the mft record this is the
  * correct place to insert its attribute list entry into.
  *
- * When -errno != -ENOENT, an error occured during the lookup.  @ctx->attr is
+ * When -errno != -ENOENT, an error occurred during the lookup.  @ctx->attr is
  * then undefined and in particular you should not rely on it not changing.
  */
 int ntfs_attr_lookup(const ATTR_TYPE type, const ntfschar *name,
index ef9ed854255c8d2c8b15bdaf0e99545004f05aed..ee4144ce5d7cab3ac400a0fe39f0120e3df6d15b 100644 (file)
@@ -501,7 +501,7 @@ int ntfs_read_compressed_block(struct page *page)
        VCN start_vcn = (((s64)index << PAGE_CACHE_SHIFT) & ~cb_size_mask) >>
                        vol->cluster_size_bits;
        /*
-        * The first vcn after the last wanted vcn (minumum alignment is again
+        * The first vcn after the last wanted vcn (minimum alignment is again
         * PAGE_CACHE_SIZE.
         */
        VCN end_vcn = ((((s64)(index + 1UL) << PAGE_CACHE_SHIFT) + cb_size - 1)
index 0b56c6b7ec01feeb06359516f863598a3330621e..c05d6dcf77a460e1af2c677f3766aee379f54a72 100644 (file)
@@ -622,7 +622,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
         */
        /* Everyone gets all permissions. */
        vi->i_mode |= S_IRWXUGO;
-       /* If read-only, noone gets write permissions. */
+       /* If read-only, no one gets write permissions. */
        if (IS_RDONLY(vi))
                vi->i_mode &= ~S_IWUGO;
        if (m->flags & MFT_RECORD_IS_DIRECTORY) {
@@ -2529,7 +2529,7 @@ retry_truncate:
                 * specifies that the behaviour is unspecified thus we do not
                 * have to do anything.  This means that in our implementation
                 * in the rare case that the file is mmap()ped and a write
-                * occured into the mmap()ped region just beyond the file size
+                * occurred into the mmap()ped region just beyond the file size
                 * and writepage has not yet been called to write out the page
                 * (which would clear the area beyond the file size) and we now
                 * extend the file size to incorporate this dirty region
index 8b2549f672bf85f94427f24294635017b0c805be..faece7190866ff9298d64479ee9d98048f6b4ff3 100644 (file)
@@ -286,7 +286,7 @@ typedef le16 MFT_RECORD_FLAGS;
  * fragmented. Volume free space includes the empty part of the mft zone and
  * when the volume's free 88% are used up, the mft zone is shrunk by a factor
  * of 2, thus making more space available for more files/data. This process is
- * repeated everytime there is no more free space except for the mft zone until
+ * repeated every time there is no more free space except for the mft zone until
  * there really is no more free space.
  */
 
@@ -1657,13 +1657,13 @@ typedef enum {
  *     pointed to by the Owner field was provided by a defaulting mechanism
  *     rather than explicitly provided by the original provider of the
  *     security descriptor.  This may affect the treatment of the SID with
- *     respect to inheritence of an owner.
+ *     respect to inheritance of an owner.
  *
  * SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the SID in
  *     the Group field was provided by a defaulting mechanism rather than
  *     explicitly provided by the original provider of the security
  *     descriptor.  This may affect the treatment of the SID with respect to
- *     inheritence of a primary group.
+ *     inheritance of a primary group.
  *
  * SE_DACL_PRESENT - This boolean flag, when set, indicates that the security
  *     descriptor contains a discretionary ACL.  If this flag is set and the
@@ -1674,7 +1674,7 @@ typedef enum {
  *     pointed to by the Dacl field was provided by a defaulting mechanism
  *     rather than explicitly provided by the original provider of the
  *     security descriptor.  This may affect the treatment of the ACL with
- *     respect to inheritence of an ACL.  This flag is ignored if the
+ *     respect to inheritance of an ACL.  This flag is ignored if the
  *     DaclPresent flag is not set.
  *
  * SE_SACL_PRESENT - This boolean flag, when set,  indicates that the security
@@ -1686,7 +1686,7 @@ typedef enum {
  *     pointed to by the Sacl field was provided by a defaulting mechanism
  *     rather than explicitly provided by the original provider of the
  *     security descriptor.  This may affect the treatment of the ACL with
- *     respect to inheritence of an ACL.  This flag is ignored if the
+ *     respect to inheritance of an ACL.  This flag is ignored if the
  *     SaclPresent flag is not set.
  *
  * SE_SELF_RELATIVE - This boolean flag, when set, indicates that the security
@@ -2283,7 +2283,7 @@ typedef struct {
        //                 the key_length is zero, then the vcn immediately
        //                 follows the INDEX_ENTRY_HEADER. Regardless of
        //                 key_length, the address of the 8-byte boundary
-       //                 alligned vcn of INDEX_ENTRY{_HEADER} *ie is given by
+       //                 aligned vcn of INDEX_ENTRY{_HEADER} *ie is given by
        //                 (char*)ie + le16_to_cpu(ie*)->length) - sizeof(VCN),
        //                 where sizeof(VCN) can be hardcoded as 8 if wanted. */
 } __attribute__ ((__packed__)) INDEX_ENTRY;
index 4dadcdf3d4516511dfa21636a98c525ab6c71c50..c71de292c5ade3b5103a68e692aea28f540d0246 100644 (file)
@@ -669,7 +669,7 @@ err_out:
  * of cases where we think that a volume is dirty when in fact it is clean.
  * This should only affect volumes that have not been shutdown cleanly but did
  * not have any pending, non-check-pointed i/o, i.e. they were completely idle
- * at least for the five seconds preceeding the unclean shutdown.
+ * at least for the five seconds preceding the unclean shutdown.
  *
  * This function assumes that the $LogFile journal has already been consistency
  * checked by a call to ntfs_check_logfile() and in particular if the $LogFile
index b5a6f08bd35c8b9010f75cce7358cb723e108c6c..aa2b6ac3f0a43777a16d44683a55e2a7fe271f32 100644 (file)
@@ -222,7 +222,7 @@ typedef struct {
 /* 24*/        sle64 file_size;        /* Usable byte size of the log file.  If the
                                   restart_area_offset + the offset of the
                                   file_size are > 510 then corruption has
-                                  occured.  This is the very first check when
+                                  occurred.  This is the very first check when
                                   starting with the restart_area as if it
                                   fails it means that some of the above values
                                   will be corrupted by the multi sector
index 326e7475a22a40d1323be1786ffa089ffb3182e7..382857f9c7db34c0edd3957f9beb65355e02f2a1 100644 (file)
@@ -73,7 +73,7 @@ static inline MFT_RECORD *map_mft_record_page(ntfs_inode *ni)
                if (index > end_index || (i_size & ~PAGE_CACHE_MASK) < ofs +
                                vol->mft_record_size) {
                        page = ERR_PTR(-ENOENT);
-                       ntfs_error(vol->sb, "Attemt to read mft record 0x%lx, "
+                       ntfs_error(vol->sb, "Attempt to read mft record 0x%lx, "
                                        "which is beyond the end of the mft.  "
                                        "This is probably a bug in the ntfs "
                                        "driver.", ni->mft_no);
@@ -1442,7 +1442,7 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol)
                // Note: It will need to be a special mft record and if none of
                // those are available it gets rather complicated...
                ntfs_error(vol->sb, "Not enough space in this mft record to "
-                               "accomodate extended mft bitmap attribute "
+                               "accommodate extended mft bitmap attribute "
                                "extent.  Cannot handle this yet.");
                ret = -EOPNOTSUPP;
                goto undo_alloc;
@@ -1879,7 +1879,7 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol)
                // and we would then need to update all references to this mft
                // record appropriately.  This is rather complicated...
                ntfs_error(vol->sb, "Not enough space in this mft record to "
-                               "accomodate extended mft data attribute "
+                               "accommodate extended mft data attribute "
                                "extent.  Cannot handle this yet.");
                ret = -EOPNOTSUPP;
                goto undo_alloc;
@@ -2357,7 +2357,7 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode,
        }
 #ifdef DEBUG
        read_lock_irqsave(&mftbmp_ni->size_lock, flags);
-       ntfs_debug("Status of mftbmp after initialized extention: "
+       ntfs_debug("Status of mftbmp after initialized extension: "
                        "allocated_size 0x%llx, data_size 0x%llx, "
                        "initialized_size 0x%llx.",
                        (long long)mftbmp_ni->allocated_size,
index 56a9a6d25a2a8cddde3776a408bbd5b7535aa89c..eac7d6788a10b26e1a415465ff109ece1bdf43ce 100644 (file)
@@ -1243,7 +1243,7 @@ err_out:
  * write.
  *
  * This is used when building the mapping pairs array of a runlist to compress
- * a given logical cluster number (lcn) or a specific run length to the minumum
+ * a given logical cluster number (lcn) or a specific run length to the minimum
  * size possible.
  *
  * Return the number of bytes written on success.  On error, i.e. the
index 29099a07b9fedc94200dbad9f8e1ddb06c01e8f1..b52706da4645267675241e8fc6a69cc80c48ace1 100644 (file)
@@ -458,7 +458,7 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt)
         * the volume on boot and updates them.
         *
         * When remounting read-only, mark the volume clean if no volume errors
-        * have occured.
+        * have occurred.
         */
        if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) {
                static const char *es = ".  Cannot remount read-write.";
@@ -1269,7 +1269,7 @@ static int check_windows_hibernation_status(ntfs_volume *vol)
                                        "hibernated on the volume.");
                        return 0;
                }
-               /* A real error occured. */
+               /* A real error occurred. */
                ntfs_error(vol->sb, "Failed to find inode number for "
                                "hiberfil.sys.");
                return ret;
@@ -1370,7 +1370,7 @@ static bool load_and_init_quota(ntfs_volume *vol)
                        NVolSetQuotaOutOfDate(vol);
                        return true;
                }
-               /* A real error occured. */
+               /* A real error occurred. */
                ntfs_error(vol->sb, "Failed to find inode number for $Quota.");
                return false;
        }
@@ -1454,7 +1454,7 @@ not_enabled:
                        NVolSetUsnJrnlStamped(vol);
                        return true;
                }
-               /* A real error occured. */
+               /* A real error occurred. */
                ntfs_error(vol->sb, "Failed to find inode number for "
                                "$UsnJrnl.");
                return false;
@@ -2292,7 +2292,7 @@ static void ntfs_put_super(struct super_block *sb)
        ntfs_commit_inode(vol->mft_ino);
 
        /*
-        * If a read-write mount and no volume errors have occured, mark the
+        * If a read-write mount and no volume errors have occurred, mark the
         * volume clean.  Also, re-commit all affected inodes.
         */
        if (!(sb->s_flags & MS_RDONLY)) {
@@ -2496,7 +2496,7 @@ static s64 get_nr_free_clusters(ntfs_volume *vol)
        if (vol->nr_clusters & 63)
                nr_free += 64 - (vol->nr_clusters & 63);
        up_read(&vol->lcnbmp_lock);
-       /* If errors occured we may well have gone below zero, fix this. */
+       /* If errors occurred we may well have gone below zero, fix this. */
        if (nr_free < 0)
                nr_free = 0;
        ntfs_debug("Exiting.");
@@ -2561,7 +2561,7 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol,
        }
        ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.",
                        index - 1);
-       /* If errors occured we may well have gone below zero, fix this. */
+       /* If errors occurred we may well have gone below zero, fix this. */
        if (nr_free < 0)
                nr_free = 0;
        ntfs_debug("Exiting.");
index b27a0d86f8c584fd9f15aff29a4ceb3032d8910a..48aa9c7401c77aa5487fbc2fb1c472efa6217faa 100644 (file)
@@ -4519,7 +4519,7 @@ set_tail_append:
 }
 
 /*
- * Helper function called at the begining of an insert.
+ * Helper function called at the beginning of an insert.
  *
  * This computes a few things that are commonly used in the process of
  * inserting into the btree:
index eceb456037c11c7a2e68cc2d510908ef781cfdbf..75cf3ad987a66d911c15234a803243185ccc5a94 100644 (file)
@@ -71,7 +71,7 @@ static inline void ocfs2_iocb_set_rw_locked(struct kiocb *iocb, int level)
 
 /*
  * Using a named enum representing lock types in terms of #N bit stored in
- * iocb->private, which is going to be used for communication bewteen
+ * iocb->private, which is going to be used for communication between
  * ocfs2_dio_end_io() and ocfs2_file_aio_write/read().
  */
 enum ocfs2_iocb_lock_bits {
index 2461eb3272edfab9c6c4949cb435252181938b72..643720209a9899506b9a1c477b458b91b5070d4c 100644 (file)
@@ -2275,7 +2275,7 @@ void o2hb_free_hb_set(struct config_group *group)
        kfree(hs);
 }
 
-/* hb callback registration and issueing */
+/* hb callback registration and issuing */
 
 static struct o2hb_callback *hbcall_from_type(enum o2hb_callback_type type)
 {
index a87366750f23ae1f97719661e067acaa1b077604..8f9cea1597af0994d4dfac6994159a870cdcd76c 100644 (file)
@@ -89,7 +89,7 @@ static void o2quo_fence_self(void)
        };
 }
 
-/* Indicate that a timeout occured on a hearbeat region write. The
+/* Indicate that a timeout occurred on a hearbeat region write. The
  * other nodes in the cluster may consider us dead at that time so we
  * want to "fence" ourselves so that we don't scribble on the disk
  * after they think they've recovered us. This can't solve all
@@ -261,7 +261,7 @@ void o2quo_hb_still_up(u8 node)
        spin_unlock(&qs->qs_lock);
 }
 
-/* This is analagous to hb_up.  as a node's connection comes up we delay the
+/* This is analogous to hb_up.  as a node's connection comes up we delay the
  * quorum decision until we see it heartbeating.  the hold will be droped in
  * hb_up or hb_down.  it might be perpetuated by con_err until hb_down.  if
  * it's already heartbeating we we might be dropping a hold that conn_up got.
index ee04ff5ee60334106fca7ce4c94bd23f86b05f31..db5ee4b4f47aaf36f698a004fbc99b0f3e722380 100644 (file)
@@ -565,7 +565,7 @@ static void o2net_set_nn_state(struct o2net_node *nn,
         * the work queue actually being up. */
        if (!valid && o2net_wq) {
                unsigned long delay;
-               /* delay if we're withing a RECONNECT_DELAY of the
+               /* delay if we're within a RECONNECT_DELAY of the
                 * last attempt */
                delay = (nn->nn_last_connect_attempt +
                         msecs_to_jiffies(o2net_reconnect_delay()))
index 9d67610dfc74fc77854e668fef72baa72034d684..fede57ed005ff417b80b5c3bc9c1d25fe3aaa526 100644 (file)
@@ -808,7 +808,7 @@ lookup:
                                dlm_mle_detach_hb_events(dlm, mle);
                        dlm_put_mle(mle);
                        mle = NULL;
-                       /* this is lame, but we cant wait on either
+                       /* this is lame, but we can't wait on either
                         * the mle or lockres waitqueue here */
                        if (mig)
                                msleep(100);
@@ -843,7 +843,7 @@ lookup:
 
        /* finally add the lockres to its hash bucket */
        __dlm_insert_lockres(dlm, res);
-       /* since this lockres is new it doesnt not require the spinlock */
+       /* since this lockres is new it doesn't not require the spinlock */
        dlm_lockres_grab_inflight_ref_new(dlm, res);
 
        /* if this node does not become the master make sure to drop
index 177d3a6c2a5f4fdfc301ed3c9bb626a84594b93b..b4c8bb6b8d281f74feb175580696eb1169819677 100644 (file)
@@ -835,7 +835,7 @@ static int ocfs2_inode_is_valid_to_delete(struct inode *inode)
 
        /* If we have allowd wipe of this inode for another node, it
         * will be marked here so we can safely skip it. Recovery will
-        * cleanup any inodes we might inadvertantly skip here. */
+        * cleanup any inodes we might inadvertently skip here. */
        if (oi->ip_flags & OCFS2_INODE_SKIP_DELETE)
                goto bail_unlock;
 
@@ -917,7 +917,7 @@ static int ocfs2_query_inode_wipe(struct inode *inode,
         * the inode open lock in ocfs2_read_locked_inode(). When we
         * get to ->delete_inode(), each node tries to convert it's
         * lock to an exclusive. Trylocks are serialized by the inode
-        * meta data lock. If the upconvert suceeds, we know the inode
+        * meta data lock. If the upconvert succeeds, we know the inode
         * is no longer live and can be deleted.
         *
         * Though we call this with the meta data lock held, the
index dcc2d9327150a7285af56b4bf9645a1bd46bf9a3..b141a44605ca076132cd704e22226ac8ce263fa7 100644 (file)
@@ -1368,7 +1368,7 @@ skip_recovery:
                mlog_errno(status);
 
        /* Now it is right time to recover quotas... We have to do this under
-        * superblock lock so that noone can start using the slot (and crash)
+        * superblock lock so that no one can start using the slot (and crash)
         * before we recover it */
        for (i = 0; i < rm_quota_used; i++) {
                qrec = ocfs2_begin_quota_recovery(osb, rm_quota[i]);
index 6180da1e37e65df216bf5856600e07a93bc96104..68cf2f6d3c6a40b22dda3e2d4f7e2d44349167fa 100644 (file)
@@ -215,7 +215,7 @@ static inline void ocfs2_checkpoint_inode(struct inode *inode)
                /* WARNING: This only kicks off a single
                 * checkpoint. If someone races you and adds more
                 * metadata to the journal, you won't know, and will
-                * wind up waiting *alot* longer than necessary. Right
+                * wind up waiting *a lot* longer than necessary. Right
                 * now we only use this in clear_inode so that's
                 * OK. */
                ocfs2_start_checkpoint(osb);
index 28f2cc1080d8b16da36e4dee718d44f3690943c0..e5d738cd9cc0540d508873818bd0b6035f2c1f20 100644 (file)
@@ -2128,7 +2128,7 @@ leave:
 }
 
 /**
- * ocfs2_prep_new_orphaned_file() - Prepare the orphan dir to recieve a newly
+ * ocfs2_prep_new_orphaned_file() - Prepare the orphan dir to receive a newly
  * allocated file. This is different from the typical 'add to orphan dir'
  * operation in that the inode does not yet exist. This is a problem because
  * the orphan dir stringifies the inode block number to come up with it's
index bf2e7764920e92e3d621a94caac7124b3fa15914..938387a10d5d7c2caa65ee5faeb1649d5fbc578d 100644 (file)
@@ -441,7 +441,7 @@ static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = {
 struct ocfs2_block_check {
 /*00*/ __le32 bc_crc32e;       /* 802.3 Ethernet II CRC32 */
        __le16 bc_ecc;          /* Single-error-correction parity vector.
-                                  This is a simple Hamming code dependant
+                                  This is a simple Hamming code dependent
                                   on the blocksize.  OCFS2's maximum
                                   blocksize, 4K, requires 16 parity bits,
                                   so we fit in __le16. */
@@ -750,7 +750,7 @@ struct ocfs2_dinode {
                                                          after an unclean
                                                          shutdown */
                } journal1;
-       } id1;                          /* Inode type dependant 1 */
+       } id1;                          /* Inode type dependent 1 */
 /*C0*/ union {
                struct ocfs2_super_block        i_super;
                struct ocfs2_local_alloc        i_lab;
@@ -1019,7 +1019,7 @@ struct ocfs2_xattr_entry {
        __le16  xe_name_offset;  /* byte offset from the 1st entry in the
                                    local xattr storage(inode, xattr block or
                                    xattr bucket). */
-       __u8    xe_name_len;     /* xattr name len, does't include prefix. */
+       __u8    xe_name_len;     /* xattr name len, doesn't include prefix. */
        __u8    xe_type;         /* the low 7 bits indicate the name prefix
                                  * type and the highest bit indicates whether
                                  * the EA is stored in the local storage. */
index 279aef68025b3155f7e9efccd5b63409927deae3..92fcd575775a0d1123e902b8499cd1b26cd52aab 100644 (file)
@@ -556,7 +556,7 @@ int __ocfs2_sync_dquot(struct dquot *dquot, int freeing)
        spin_unlock(&dq_data_lock);
        err = ocfs2_qinfo_lock(info, freeing);
        if (err < 0) {
-               mlog(ML_ERROR, "Failed to lock quota info, loosing quota write"
+               mlog(ML_ERROR, "Failed to lock quota info, losing quota write"
                               " (type=%d, id=%u)\n", dquot->dq_type,
                               (unsigned)dquot->dq_id);
                goto out;
index 1e49cc29d06cd08d96454990702e6ca8ca35cbfd..42c2b804f3fdd1be89aa37cc0ba967fefe98eca6 100644 (file)
@@ -29,7 +29,7 @@
 struct ocfs2_alloc_reservation {
        struct rb_node  r_node;
 
-       unsigned int    r_start;        /* Begining of current window */
+       unsigned int    r_start;        /* Beginning of current window */
        unsigned int    r_len;          /* Length of the window */
 
        unsigned int    r_last_len;     /* Length of most recent alloc */
index 8ce7398ae1d2dbac2041a7389ea41e4e8cd2acd3..1ec56fdb8d0d91752682bc532132dc6ae9cc029b 100644 (file)
@@ -126,7 +126,7 @@ struct ocfs2_stack_operations {
         *
         * ->connect() must not return until it is guaranteed that
         *
-        *  - Node down notifications for the filesystem will be recieved
+        *  - Node down notifications for the filesystem will be received
         *    and passed to conn->cc_recovery_handler().
         *  - Locking requests for the filesystem will be processed.
         */
index ab6e2061074fafba4bdc9bf0b9cc7f911cb15dfd..ba5d97e4a73e8a43e64fc3cfa55fb9b97d4ec6a5 100644 (file)
@@ -1511,7 +1511,7 @@ static int ocfs2_cluster_group_search(struct inode *inode,
                max_bits = le16_to_cpu(gd->bg_bits);
 
                /* Tail groups in cluster bitmaps which aren't cpg
-                * aligned are prone to partial extention by a failed
+                * aligned are prone to partial extension by a failed
                 * fs resize. If the file system resize never got to
                 * update the dinode cluster count, then we don't want
                 * to trust any clusters past it, regardless of what
@@ -2459,7 +2459,7 @@ static int _ocfs2_free_suballoc_bits(handle_t *handle,
        /* The alloc_bh comes from ocfs2_free_dinode() or
         * ocfs2_free_clusters().  The callers have all locked the
         * allocator and gotten alloc_bh from the lock call.  This
-        * validates the dinode buffer.  Any corruption that has happended
+        * validates the dinode buffer.  Any corruption that has happened
         * is a code bug. */
        BUG_ON(!OCFS2_IS_VALID_DINODE(fe));
        BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl));
index 69fa11b35aa4ccd821729a0460d68d7b1ee72d83..5a521c748859945c76299e93fe01127c76408d8f 100644 (file)
@@ -78,7 +78,7 @@ static struct kmem_cache *ocfs2_inode_cachep = NULL;
 struct kmem_cache *ocfs2_dquot_cachep;
 struct kmem_cache *ocfs2_qf_chunk_cachep;
 
-/* OCFS2 needs to schedule several differnt types of work which
+/* OCFS2 needs to schedule several different types of work which
  * require cluster locking, disk I/O, recovery waits, etc. Since these
  * types of work tend to be heavy we avoid using the kernel events
  * workqueue and schedule on our own. */
index 57a215dc2d9b73039fe376a49fdc5bc01ea44359..81ecf9c0bf0ad41e0ac2fd523b1538afc3f57a07 100644 (file)
@@ -3554,7 +3554,7 @@ int ocfs2_xattr_set(struct inode *inode,
        down_write(&OCFS2_I(inode)->ip_xattr_sem);
        /*
         * Scan inode and external block to find the same name
-        * extended attribute and collect search infomation.
+        * extended attribute and collect search information.
         */
        ret = ocfs2_xattr_ibody_find(inode, name_index, name, &xis);
        if (ret)
@@ -3578,7 +3578,7 @@ int ocfs2_xattr_set(struct inode *inode,
                        goto cleanup;
        }
 
-       /* Check whether the value is refcounted and do some prepartion. */
+       /* Check whether the value is refcounted and do some preparation. */
        if (OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL &&
            (!xis.not_found || !xbs.not_found)) {
                ret = ocfs2_prepare_refcount_xattr(inode, di, &xi,
index ac546975031f7dd9a0f110f9a4479c6e34cef15c..d545e97d99c3390706894ff1b030c2491a2c0a38 100644 (file)
@@ -500,7 +500,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
        /* everything is up and running, commence */
        rcu_assign_pointer(ptbl->part[partno], p);
 
-       /* suppress uevent if the disk supresses it */
+       /* suppress uevent if the disk suppresses it */
        if (!dev_get_uevent_suppress(ddev))
                kobject_uevent(&pdev->kobj, KOBJ_ADD);
 
@@ -585,7 +585,7 @@ rescan:
        /*
         * If any partition code tried to read beyond EOD, try
         * unlocking native capacity even if partition table is
-        * sucessfully read as we could be missing some partitions.
+        * successfully read as we could be missing some partitions.
         */
        if (state->access_beyond_eod) {
                printk(KERN_WARNING
index b10e3540d5b711e3077d44b9ad1a5b44f210c19a..ce4f624404255f899e1b10262abf3b862aec6be4 100644 (file)
@@ -1299,6 +1299,11 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
 
        BUG_ON (!data || !frags);
 
+       if (size < 2 * VBLK_SIZE_HEAD) {
+               ldm_error("Value of size is to small.");
+               return false;
+       }
+
        group = get_unaligned_be32(data + 0x08);
        rec   = get_unaligned_be16(data + 0x0C);
        num   = get_unaligned_be16(data + 0x0E);
@@ -1306,6 +1311,10 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
                ldm_error ("A VBLK claims to have %d parts.", num);
                return false;
        }
+       if (rec >= num) {
+               ldm_error("REC value (%d) exceeds NUM value (%d)", rec, num);
+               return false;
+       }
 
        list_for_each (item, frags) {
                f = list_entry (item, struct frag, list);
@@ -1334,10 +1343,9 @@ found:
 
        f->map |= (1 << rec);
 
-       if (num > 0) {
-               data += VBLK_SIZE_HEAD;
-               size -= VBLK_SIZE_HEAD;
-       }
+       data += VBLK_SIZE_HEAD;
+       size -= VBLK_SIZE_HEAD;
+
        memcpy (f->data+rec*(size-VBLK_SIZE_HEAD)+VBLK_SIZE_HEAD, data, size);
 
        return true;
index 5a670c11aeacc85fd767a8383f45d39d6ac6ea7e..dfa532730e55788a7459095ca9c788dbb58d6af9 100644 (file)
@@ -220,7 +220,7 @@ static struct mm_struct *__check_mem_permission(struct task_struct *task)
        }
 
        /*
-        * Noone else is allowed.
+        * No one else is allowed.
         */
        mmput(mm);
        return ERR_PTR(-EPERM);
@@ -3124,11 +3124,16 @@ static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldi
 /* for the /proc/ directory itself, after non-process stuff has been done */
 int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
 {
-       unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY;
-       struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode);
+       unsigned int nr;
+       struct task_struct *reaper;
        struct tgid_iter iter;
        struct pid_namespace *ns;
 
+       if (filp->f_pos >= PID_MAX_LIMIT + TGID_OFFSET)
+               goto out_no_task;
+       nr = filp->f_pos - FIRST_PROCESS_ENTRY;
+
+       reaper = get_proc_task(filp->f_path.dentry->d_inode);
        if (!reaper)
                goto out_no_task;
 
index 867d0ac026ceab0efc86ebcfd4a51d1b020a5cd5..8007ae7c0d8c40c0be9bba7f5f62cfc83390f69c 100644 (file)
@@ -1,5 +1,5 @@
 config PSTORE
-       bool "Persistant store support"
+       bool "Persistent store support"
        default n
        help
           This option enables generic access to platform level
index fcc8ae75d8743383c8a3436a867bb8c12b1b08b9..d3c032f5fa0aeb600e3d8801fb6fe80f89ad39df 100644 (file)
@@ -442,7 +442,7 @@ EXPORT_SYMBOL(dquot_acquire);
  */
 int dquot_commit(struct dquot *dquot)
 {
-       int ret = 0, ret2 = 0;
+       int ret = 0;
        struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
 
        mutex_lock(&dqopt->dqio_mutex);
@@ -454,15 +454,10 @@ int dquot_commit(struct dquot *dquot)
        spin_unlock(&dq_list_lock);
        /* Inactive dquot can be only if there was error during read/init
         * => we have better not writing it */
-       if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) {
+       if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
                ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
-               if (info_dirty(&dqopt->info[dquot->dq_type])) {
-                       ret2 = dqopt->ops[dquot->dq_type]->write_file_info(
-                                               dquot->dq_sb, dquot->dq_type);
-               }
-               if (ret >= 0)
-                       ret = ret2;
-       }
+       else
+               ret = -EIO;
 out_sem:
        mutex_unlock(&dqopt->dqio_mutex);
        return ret;
@@ -956,7 +951,7 @@ static inline int dqput_blocks(struct dquot *dquot)
 
 /*
  * Remove references to dquots from inode and add dquot to list for freeing
- * if we have the last referece to dquot
+ * if we have the last reference to dquot
  * We can't race with anybody because we hold dqptr_sem for writing...
  */
 static int remove_inode_dquot_ref(struct inode *inode, int type,
index 9eead2c796b7f5a77d242e0e7eda702f16ec297a..fbb0b478a346fbc77c854696c5e0e508760125ad 100644 (file)
@@ -112,6 +112,7 @@ int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
                SetPageDirty(page);
 
                unlock_page(page);
+               put_page(page);
        }
 
        return 0;
index c77514bd57765b7472f8bb460ecc4667dd5328da..c5e82ece7c6c7d7afd2002d15c4293a99662bb4c 100644 (file)
@@ -1,7 +1,7 @@
 /*
 ** Write ahead logging implementation copyright Chris Mason 2000
 **
-** The background commits make this code very interelated, and
+** The background commits make this code very interrelated, and
 ** overly complex.  I need to rethink things a bit....The major players:
 **
 ** journal_begin -- call with the number of blocks you expect to log.
@@ -2725,7 +2725,7 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
                                                 REISERFS_DISK_OFFSET_IN_BYTES /
                                                 sb->s_blocksize + 2);
 
-       /* Sanity check to see is the standard journal fitting withing first bitmap
+       /* Sanity check to see is the standard journal fitting within first bitmap
           (actual for small blocksizes) */
        if (!SB_ONDISK_JOURNAL_DEVICE(sb) &&
            (SB_JOURNAL_1st_RESERVED_BLOCK(sb) +
index b87aa2c1afc14fc9165c6f3a4a42c1c06063c0fa..7df1ce48203ac8d0b70e50e08946cd84d7a0efcb 100644 (file)
@@ -15,7 +15,7 @@
  * for this mutex, no need for a system wide mutex facility.
  *
  * Also this lock is often released before a call that could block because
- * reiserfs performances were partialy based on the release while schedule()
+ * reiserfs performances were partially based on the release while schedule()
  * property of the Bkl.
  */
 void reiserfs_write_lock(struct super_block *s)
index 0aab04f46827def240b7d5468de229e91a9770f5..b216ff6be1c9db1e22e768828beaf6def35d8c75 100644 (file)
@@ -393,7 +393,7 @@ void add_save_link(struct reiserfs_transaction_handle *th,
        /* body of "save" link */
        link = INODE_PKEY(inode)->k_dir_id;
 
-       /* put "save" link inot tree, don't charge quota to anyone */
+       /* put "save" link into tree, don't charge quota to anyone */
        retval =
            reiserfs_insert_item(th, &path, &key, &ih, NULL, (char *)&link);
        if (retval) {
@@ -2104,7 +2104,7 @@ out:
 
 /* Read data from quotafile - avoid pagecache and such because we cannot afford
  * acquiring the locks... As quota files are never truncated and quota code
- * itself serializes the operations (and noone else should touch the files)
+ * itself serializes the operations (and no one else should touch the files)
  * we don't have to be afraid of races */
 static ssize_t reiserfs_quota_read(struct super_block *sb, int type, char *data,
                                   size_t len, loff_t off)
index 5c11ca82b7821c55050f0032f55e81d8cdacdcdf..47d2a4498b039cc0fa6c397ec1defd4f65c0db11 100644 (file)
@@ -396,7 +396,7 @@ static struct page *reiserfs_get_page(struct inode *dir, size_t n)
        struct address_space *mapping = dir->i_mapping;
        struct page *page;
        /* We can deadlock if we try to free dentries,
-          and an unlink/rmdir has just occured - GFP_NOFS avoids this */
+          and an unlink/rmdir has just occurred - GFP_NOFS avoids this */
        mapping_set_gfp_mask(mapping, GFP_NOFS);
        page = read_mapping_page(mapping, n >> PAGE_CACHE_SHIFT, NULL);
        if (!IS_ERR(page)) {
index 26b15ae34d6ff8a9bdd1a3646a70af357155991d..c37b520132fff1328e30355cef188ff031ec3cbf 100644 (file)
@@ -104,7 +104,7 @@ struct squashfs_cache_entry *squashfs_cache_get(struct super_block *sb,
                        entry = &cache->entry[i];
 
                        /*
-                        * Initialise choosen cache entry, and fill it in from
+                        * Initialise chosen cache entry, and fill it in from
                         * disk.
                         */
                        cache->unused--;
@@ -286,7 +286,7 @@ cleanup:
 
 
 /*
- * Copy upto length bytes from cache entry to buffer starting at offset bytes
+ * Copy up to length bytes from cache entry to buffer starting at offset bytes
  * into the cache entry.  If there's not length bytes then copy the number of
  * bytes available.  In all cases return the number of bytes copied.
  */
index d7440904be170871c473cb09229de0e11b48fa16..f8b0160da2da8be993d8fe93c246c9bdd1dd35aa 100644 (file)
@@ -47,7 +47,7 @@ config UBIFS_FS_DEBUG
        bool "Enable debugging support"
        depends on UBIFS_FS
        select DEBUG_FS
-       select KALLSYMS_ALL
+       select KALLSYMS
        help
          This option enables UBIFS debugging support. It makes sure various
          assertions, self-checks, debugging messages and test modes are compiled
index c8ff0d1ae5d3e04f7f14d8a8b63df33a87b16a35..8b3a7da531ebc10c38cad6b73d937e7a29095699 100644 (file)
@@ -147,7 +147,7 @@ static int make_free_space(struct ubifs_info *c)
                if (liab2 < liab1)
                        return -EAGAIN;
 
-               dbg_budg("new liability %lld (not shrinked)", liab2);
+               dbg_budg("new liability %lld (not shrunk)", liab2);
 
                /* Liability did not shrink again, try GC */
                dbg_budg("Run GC");
index b148fbc80f8d1eb71ccc3a9b0f6a52b761fedab2..1bd01ded7123913f28574261811f73a43a6d4e70 100644 (file)
@@ -577,7 +577,7 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot)
        size_t sz;
 
        if (!(ubifs_chk_flags & UBIFS_CHK_OLD_IDX))
-               goto out;
+               return 0;
 
        INIT_LIST_HEAD(&list);
 
index f25a7339f80028427f5ca8208f0839facbe6a25b..004d3745dc453a1dcdb6f9eb32cd0a0499d85923 100644 (file)
@@ -972,11 +972,39 @@ void dbg_dump_index(struct ubifs_info *c)
 void dbg_save_space_info(struct ubifs_info *c)
 {
        struct ubifs_debug_info *d = c->dbg;
-
-       ubifs_get_lp_stats(c, &d->saved_lst);
+       int freeable_cnt;
 
        spin_lock(&c->space_lock);
+       memcpy(&d->saved_lst, &c->lst, sizeof(struct ubifs_lp_stats));
+
+       /*
+        * We use a dirty hack here and zero out @c->freeable_cnt, because it
+        * affects the free space calculations, and UBIFS might not know about
+        * all freeable eraseblocks. Indeed, we know about freeable eraseblocks
+        * only when we read their lprops, and we do this only lazily, upon the
+        * need. So at any given point of time @c->freeable_cnt might be not
+        * exactly accurate.
+        *
+        * Just one example about the issue we hit when we did not zero
+        * @c->freeable_cnt.
+        * 1. The file-system is mounted R/O, c->freeable_cnt is %0. We save the
+        *    amount of free space in @d->saved_free
+        * 2. We re-mount R/W, which makes UBIFS to read the "lsave"
+        *    information from flash, where we cache LEBs from various
+        *    categories ('ubifs_remount_fs()' -> 'ubifs_lpt_init()'
+        *    -> 'lpt_init_wr()' -> 'read_lsave()' -> 'ubifs_lpt_lookup()'
+        *    -> 'ubifs_get_pnode()' -> 'update_cats()'
+        *    -> 'ubifs_add_to_cat()').
+        * 3. Lsave contains a freeable eraseblock, and @c->freeable_cnt
+        *    becomes %1.
+        * 4. We calculate the amount of free space when the re-mount is
+        *    finished in 'dbg_check_space_info()' and it does not match
+        *    @d->saved_free.
+        */
+       freeable_cnt = c->freeable_cnt;
+       c->freeable_cnt = 0;
        d->saved_free = ubifs_get_free_space_nolock(c);
+       c->freeable_cnt = freeable_cnt;
        spin_unlock(&c->space_lock);
 }
 
@@ -993,12 +1021,15 @@ int dbg_check_space_info(struct ubifs_info *c)
 {
        struct ubifs_debug_info *d = c->dbg;
        struct ubifs_lp_stats lst;
-       long long avail, free;
+       long long free;
+       int freeable_cnt;
 
        spin_lock(&c->space_lock);
-       avail = ubifs_calc_available(c, c->min_idx_lebs);
+       freeable_cnt = c->freeable_cnt;
+       c->freeable_cnt = 0;
+       free = ubifs_get_free_space_nolock(c);
+       c->freeable_cnt = freeable_cnt;
        spin_unlock(&c->space_lock);
-       free = ubifs_get_free_space(c);
 
        if (free != d->saved_free) {
                ubifs_err("free space changed from %lld to %lld",
@@ -2806,40 +2837,38 @@ int dbg_debugfs_init_fs(struct ubifs_info *c)
        struct ubifs_debug_info *d = c->dbg;
 
        sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id);
-       d->dfs_dir = debugfs_create_dir(d->dfs_dir_name, dfs_rootdir);
-       if (IS_ERR(d->dfs_dir)) {
-               err = PTR_ERR(d->dfs_dir);
-               ubifs_err("cannot create \"%s\" debugfs directory, error %d\n",
-                         d->dfs_dir_name, err);
+       fname = d->dfs_dir_name;
+       dent = debugfs_create_dir(fname, dfs_rootdir);
+       if (IS_ERR_OR_NULL(dent))
                goto out;
-       }
+       d->dfs_dir = dent;
 
        fname = "dump_lprops";
        dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
-       if (IS_ERR(dent))
+       if (IS_ERR_OR_NULL(dent))
                goto out_remove;
        d->dfs_dump_lprops = dent;
 
        fname = "dump_budg";
        dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
-       if (IS_ERR(dent))
+       if (IS_ERR_OR_NULL(dent))
                goto out_remove;
        d->dfs_dump_budg = dent;
 
        fname = "dump_tnc";
        dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
-       if (IS_ERR(dent))
+       if (IS_ERR_OR_NULL(dent))
                goto out_remove;
        d->dfs_dump_tnc = dent;
 
        return 0;
 
 out_remove:
-       err = PTR_ERR(dent);
-       ubifs_err("cannot create \"%s\" debugfs directory, error %d\n",
-                 fname, err);
        debugfs_remove_recursive(d->dfs_dir);
 out:
+       err = dent ? PTR_ERR(dent) : -ENODEV;
+       ubifs_err("cannot create \"%s\" debugfs directory, error %d\n",
+                 fname, err);
        return err;
 }
 
index 919f0de29d8f378cee69bb3c035d53eea6ddb312..e6493cac193d60d92c6e3e72d743d03f46a5796d 100644 (file)
 #ifndef __UBIFS_DEBUG_H__
 #define __UBIFS_DEBUG_H__
 
+/* Checking helper functions */
+typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
+                                struct ubifs_zbranch *zbr, void *priv);
+typedef int (*dbg_znode_callback)(struct ubifs_info *c,
+                                 struct ubifs_znode *znode, void *priv);
+
 #ifdef CONFIG_UBIFS_FS_DEBUG
 
 /**
@@ -270,11 +276,6 @@ void dbg_dump_tnc(struct ubifs_info *c);
 void dbg_dump_index(struct ubifs_info *c);
 void dbg_dump_lpt_lebs(const struct ubifs_info *c);
 
-/* Checking helper functions */
-typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
-                                struct ubifs_zbranch *zbr, void *priv);
-typedef int (*dbg_znode_callback)(struct ubifs_info *c,
-                                 struct ubifs_znode *znode, void *priv);
 int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb,
                   dbg_znode_callback znode_cb, void *priv);
 
@@ -295,7 +296,6 @@ int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
 int dbg_check_filesystem(struct ubifs_info *c);
 void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
                    int add_pos);
-int dbg_check_lprops(struct ubifs_info *c);
 int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode,
                        int row, int col);
 int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode,
@@ -401,58 +401,94 @@ void dbg_debugfs_exit_fs(struct ubifs_info *c);
 #define DBGKEY(key)  ((char *)(key))
 #define DBGKEY1(key) ((char *)(key))
 
-#define ubifs_debugging_init(c)                0
-#define ubifs_debugging_exit(c)                ({})
-
-#define dbg_ntype(type)                        ""
-#define dbg_cstate(cmt_state)                  ""
-#define dbg_jhead(jhead)                       ""
-#define dbg_get_key_dump(c, key)               ({})
-#define dbg_dump_inode(c, inode)               ({})
-#define dbg_dump_node(c, node)                 ({})
-#define dbg_dump_lpt_node(c, node, lnum, offs) ({})
-#define dbg_dump_budget_req(req)               ({})
-#define dbg_dump_lstats(lst)                   ({})
-#define dbg_dump_budg(c)                       ({})
-#define dbg_dump_lprop(c, lp)                  ({})
-#define dbg_dump_lprops(c)                     ({})
-#define dbg_dump_lpt_info(c)                   ({})
-#define dbg_dump_leb(c, lnum)                  ({})
-#define dbg_dump_znode(c, znode)               ({})
-#define dbg_dump_heap(c, heap, cat)            ({})
-#define dbg_dump_pnode(c, pnode, parent, iip)  ({})
-#define dbg_dump_tnc(c)                        ({})
-#define dbg_dump_index(c)                      ({})
-#define dbg_dump_lpt_lebs(c)                   ({})
-
-#define dbg_walk_index(c, leaf_cb, znode_cb, priv) 0
-#define dbg_old_index_check_init(c, zroot)         0
-#define dbg_save_space_info(c)                     ({})
-#define dbg_check_space_info(c)                    0
-#define dbg_check_old_index(c, zroot)              0
-#define dbg_check_cats(c)                          0
-#define dbg_check_ltab(c)                          0
-#define dbg_chk_lpt_free_spc(c)                    0
-#define dbg_chk_lpt_sz(c, action, len)             0
-#define dbg_check_synced_i_size(inode)             0
-#define dbg_check_dir_size(c, dir)                 0
-#define dbg_check_tnc(c, x)                        0
-#define dbg_check_idx_size(c, idx_size)            0
-#define dbg_check_filesystem(c)                    0
-#define dbg_check_heap(c, heap, cat, add_pos)      ({})
-#define dbg_check_lprops(c)                        0
-#define dbg_check_lpt_nodes(c, cnode, row, col)    0
-#define dbg_check_inode_size(c, inode, size)       0
-#define dbg_check_data_nodes_order(c, head)        0
-#define dbg_check_nondata_nodes_order(c, head)     0
-#define dbg_force_in_the_gaps_enabled              0
-#define dbg_force_in_the_gaps()                    0
-#define dbg_failure_mode                           0
-
-#define dbg_debugfs_init()                         0
-#define dbg_debugfs_exit()
-#define dbg_debugfs_init_fs(c)                     0
-#define dbg_debugfs_exit_fs(c)                     0
+static inline int ubifs_debugging_init(struct ubifs_info *c)      { return 0; }
+static inline void ubifs_debugging_exit(struct ubifs_info *c)     { return; }
+static inline const char *dbg_ntype(int type)                     { return ""; }
+static inline const char *dbg_cstate(int cmt_state)               { return ""; }
+static inline const char *dbg_jhead(int jhead)                    { return ""; }
+static inline const char *
+dbg_get_key_dump(const struct ubifs_info *c,
+                const union ubifs_key *key)                      { return ""; }
+static inline void dbg_dump_inode(const struct ubifs_info *c,
+                                 const struct inode *inode)      { return; }
+static inline void dbg_dump_node(const struct ubifs_info *c,
+                                const void *node)                { return; }
+static inline void dbg_dump_lpt_node(const struct ubifs_info *c,
+                                    void *node, int lnum,
+                                    int offs)                    { return; }
+static inline void
+dbg_dump_budget_req(const struct ubifs_budget_req *req)           { return; }
+static inline void
+dbg_dump_lstats(const struct ubifs_lp_stats *lst)                 { return; }
+static inline void dbg_dump_budg(struct ubifs_info *c)            { return; }
+static inline void dbg_dump_lprop(const struct ubifs_info *c,
+                                 const struct ubifs_lprops *lp)  { return; }
+static inline void dbg_dump_lprops(struct ubifs_info *c)          { return; }
+static inline void dbg_dump_lpt_info(struct ubifs_info *c)        { return; }
+static inline void dbg_dump_leb(const struct ubifs_info *c,
+                               int lnum)                         { return; }
+static inline void
+dbg_dump_znode(const struct ubifs_info *c,
+              const struct ubifs_znode *znode)                   { return; }
+static inline void dbg_dump_heap(struct ubifs_info *c,
+                                struct ubifs_lpt_heap *heap,
+                                int cat)                         { return; }
+static inline void dbg_dump_pnode(struct ubifs_info *c,
+                                 struct ubifs_pnode *pnode,
+                                 struct ubifs_nnode *parent,
+                                 int iip)                        { return; }
+static inline void dbg_dump_tnc(struct ubifs_info *c)             { return; }
+static inline void dbg_dump_index(struct ubifs_info *c)           { return; }
+static inline void dbg_dump_lpt_lebs(const struct ubifs_info *c)  { return; }
+
+static inline int dbg_walk_index(struct ubifs_info *c,
+                                dbg_leaf_callback leaf_cb,
+                                dbg_znode_callback znode_cb,
+                                void *priv)                      { return 0; }
+static inline void dbg_save_space_info(struct ubifs_info *c)      { return; }
+static inline int dbg_check_space_info(struct ubifs_info *c)      { return 0; }
+static inline int dbg_check_lprops(struct ubifs_info *c)          { return 0; }
+static inline int
+dbg_old_index_check_init(struct ubifs_info *c,
+                        struct ubifs_zbranch *zroot)             { return 0; }
+static inline int
+dbg_check_old_index(struct ubifs_info *c,
+                   struct ubifs_zbranch *zroot)                  { return 0; }
+static inline int dbg_check_cats(struct ubifs_info *c)            { return 0; }
+static inline int dbg_check_ltab(struct ubifs_info *c)            { return 0; }
+static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c)      { return 0; }
+static inline int dbg_chk_lpt_sz(struct ubifs_info *c,
+                                int action, int len)             { return 0; }
+static inline int dbg_check_synced_i_size(struct inode *inode)    { return 0; }
+static inline int dbg_check_dir_size(struct ubifs_info *c,
+                                    const struct inode *dir)     { return 0; }
+static inline int dbg_check_tnc(struct ubifs_info *c, int extra)  { return 0; }
+static inline int dbg_check_idx_size(struct ubifs_info *c,
+                                    long long idx_size)          { return 0; }
+static inline int dbg_check_filesystem(struct ubifs_info *c)      { return 0; }
+static inline void dbg_check_heap(struct ubifs_info *c,
+                                 struct ubifs_lpt_heap *heap,
+                                 int cat, int add_pos)           { return; }
+static inline int dbg_check_lpt_nodes(struct ubifs_info *c,
+       struct ubifs_cnode *cnode, int row, int col)              { return 0; }
+static inline int dbg_check_inode_size(struct ubifs_info *c,
+                                      const struct inode *inode,
+                                      loff_t size)               { return 0; }
+static inline int
+dbg_check_data_nodes_order(struct ubifs_info *c,
+                          struct list_head *head)                { return 0; }
+static inline int
+dbg_check_nondata_nodes_order(struct ubifs_info *c,
+                             struct list_head *head)             { return 0; }
+
+static inline int dbg_force_in_the_gaps(void)                     { return 0; }
+#define dbg_force_in_the_gaps_enabled 0
+#define dbg_failure_mode              0
+
+static inline int dbg_debugfs_init(void)                          { return 0; }
+static inline void dbg_debugfs_exit(void)                         { return; }
+static inline int dbg_debugfs_init_fs(struct ubifs_info *c)       { return 0; }
+static inline int dbg_debugfs_exit_fs(struct ubifs_info *c)       { return 0; }
 
 #endif /* !CONFIG_UBIFS_FS_DEBUG */
 #endif /* !__UBIFS_DEBUG_H__ */
index 28be1e6a65e8c1af71fc754cb3ecf7dd6eaf2ca2..b286db79c686597bb593208ff577905d2663f7bf 100644 (file)
@@ -1312,6 +1312,9 @@ int ubifs_fsync(struct file *file, int datasync)
 
        dbg_gen("syncing inode %lu", inode->i_ino);
 
+       if (inode->i_sb->s_flags & MS_RDONLY)
+               return 0;
+
        /*
         * VFS has already synchronized dirty pages for this inode. Synchronize
         * the inode unless this is a 'datasync()' call.
index 4d0cb1241460fbc2eacd709188293d5782b1dd3b..40fa780ebea7d6280cc83f30ca4db9b0a0052b98 100644 (file)
@@ -174,26 +174,6 @@ void ubifs_add_bud(struct ubifs_info *c, struct ubifs_bud *bud)
        spin_unlock(&c->buds_lock);
 }
 
-/**
- * ubifs_create_buds_lists - create journal head buds lists for remount rw.
- * @c: UBIFS file-system description object
- */
-void ubifs_create_buds_lists(struct ubifs_info *c)
-{
-       struct rb_node *p;
-
-       spin_lock(&c->buds_lock);
-       p = rb_first(&c->buds);
-       while (p) {
-               struct ubifs_bud *bud = rb_entry(p, struct ubifs_bud, rb);
-               struct ubifs_jhead *jhead = &c->jheads[bud->jhead];
-
-               list_add_tail(&bud->list, &jhead->buds_list);
-               p = rb_next(p);
-       }
-       spin_unlock(&c->buds_lock);
-}
-
 /**
  * ubifs_add_bud_to_log - add a new bud to the log.
  * @c: UBIFS file-system description object
index 72775d35b99e55308b1ad963cc9c13487b5412fc..ef5155e109a2744dc0c493945adb41511e632680 100644 (file)
@@ -1270,10 +1270,9 @@ static int read_pnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip)
        lnum = branch->lnum;
        offs = branch->offs;
        pnode = kzalloc(sizeof(struct ubifs_pnode), GFP_NOFS);
-       if (!pnode) {
-               err = -ENOMEM;
-               goto out;
-       }
+       if (!pnode)
+               return -ENOMEM;
+
        if (lnum == 0) {
                /*
                 * This pnode was not written which just means that the LEB
index 936f2cbfe6b672437aec08219ad017f0fc6f3074..3dbad6fbd1eba528661e458ae56e97c03c43b609 100644 (file)
@@ -317,6 +317,32 @@ int ubifs_recover_master_node(struct ubifs_info *c)
                        goto out_free;
                }
                memcpy(c->rcvrd_mst_node, c->mst_node, UBIFS_MST_NODE_SZ);
+
+               /*
+                * We had to recover the master node, which means there was an
+                * unclean reboot. However, it is possible that the master node
+                * is clean at this point, i.e., %UBIFS_MST_DIRTY is not set.
+                * E.g., consider the following chain of events:
+                *
+                * 1. UBIFS was cleanly unmounted, so the master node is clean
+                * 2. UBIFS is being mounted R/W and starts changing the master
+                *    node in the first (%UBIFS_MST_LNUM). A power cut happens,
+                *    so this LEB ends up with some amount of garbage at the
+                *    end.
+                * 3. UBIFS is being mounted R/O. We reach this place and
+                *    recover the master node from the second LEB
+                *    (%UBIFS_MST_LNUM + 1). But we cannot update the media
+                *    because we are being mounted R/O. We have to defer the
+                *    operation.
+                * 4. However, this master node (@c->mst_node) is marked as
+                *    clean (since the step 1). And if we just return, the
+                *    mount code will be confused and won't recover the master
+                *    node when it is re-mounter R/W later.
+                *
+                *    Thus, to force the recovery by marking the master node as
+                *    dirty.
+                */
+               c->mst_node->flags |= cpu_to_le32(UBIFS_MST_DIRTY);
        } else {
                /* Write the recovered master node */
                c->max_sqnum = le64_to_cpu(mst->ch.sqnum) - 1;
index eed0fcff8d731710dc7723d25b1adb10ecbe6805..d3d6d365bfc11345d49e3a6bbdc33dd97c476ea9 100644 (file)
@@ -59,6 +59,7 @@ enum {
  * @new_size: truncation new size
  * @free: amount of free space in a bud
  * @dirty: amount of dirty space in a bud from padding and deletion nodes
+ * @jhead: journal head number of the bud
  *
  * UBIFS journal replay must compare node sequence numbers, which means it must
  * build a tree of node information to insert into the TNC.
@@ -80,6 +81,7 @@ struct replay_entry {
                struct {
                        int free;
                        int dirty;
+                       int jhead;
                };
        };
 };
@@ -159,6 +161,11 @@ static int set_bud_lprops(struct ubifs_info *c, struct replay_entry *r)
                err = PTR_ERR(lp);
                goto out;
        }
+
+       /* Make sure the journal head points to the latest bud */
+       err = ubifs_wbuf_seek_nolock(&c->jheads[r->jhead].wbuf, r->lnum,
+                                    c->leb_size - r->free, UBI_SHORTTERM);
+
 out:
        ubifs_release_lprops(c);
        return err;
@@ -627,10 +634,6 @@ static int replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead,
        ubifs_assert(sleb->endpt - offs >= used);
        ubifs_assert(sleb->endpt % c->min_io_size == 0);
 
-       if (sleb->endpt + c->min_io_size <= c->leb_size && !c->ro_mount)
-               err = ubifs_wbuf_seek_nolock(&c->jheads[jhead].wbuf, lnum,
-                                            sleb->endpt, UBI_SHORTTERM);
-
        *dirty = sleb->endpt - offs - used;
        *free = c->leb_size - sleb->endpt;
 
@@ -653,12 +656,14 @@ out_dump:
  * @sqnum: sequence number
  * @free: amount of free space in bud
  * @dirty: amount of dirty space from padding and deletion nodes
+ * @jhead: journal head number for the bud
  *
  * This function inserts a reference node to the replay tree and returns zero
  * in case of success or a negative error code in case of failure.
  */
 static int insert_ref_node(struct ubifs_info *c, int lnum, int offs,
-                          unsigned long long sqnum, int free, int dirty)
+                          unsigned long long sqnum, int free, int dirty,
+                          int jhead)
 {
        struct rb_node **p = &c->replay_tree.rb_node, *parent = NULL;
        struct replay_entry *r;
@@ -688,6 +693,7 @@ static int insert_ref_node(struct ubifs_info *c, int lnum, int offs,
        r->flags = REPLAY_REF;
        r->free = free;
        r->dirty = dirty;
+       r->jhead = jhead;
 
        rb_link_node(&r->rb, parent, p);
        rb_insert_color(&r->rb, &c->replay_tree);
@@ -712,7 +718,7 @@ static int replay_buds(struct ubifs_info *c)
                if (err)
                        return err;
                err = insert_ref_node(c, b->bud->lnum, b->bud->start, b->sqnum,
-                                     free, dirty);
+                                     free, dirty, b->bud->jhead);
                if (err)
                        return err;
        }
index 6ddd9973e68175da389451831852fc7bb6874029..04ad07f4fcc3da11b05e868442ed6f3bc7ad7729 100644 (file)
@@ -1257,12 +1257,12 @@ static int mount_ubifs(struct ubifs_info *c)
                goto out_free;
        }
 
+       err = alloc_wbufs(c);
+       if (err)
+               goto out_cbuf;
+
        sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, c->vi.vol_id);
        if (!c->ro_mount) {
-               err = alloc_wbufs(c);
-               if (err)
-                       goto out_cbuf;
-
                /* Create background thread */
                c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
                if (IS_ERR(c->bgt)) {
@@ -1568,6 +1568,7 @@ static int ubifs_remount_rw(struct ubifs_info *c)
        mutex_lock(&c->umount_mutex);
        dbg_save_space_info(c);
        c->remounting_rw = 1;
+       c->ro_mount = 0;
 
        err = check_free_space(c);
        if (err)
@@ -1630,12 +1631,6 @@ static int ubifs_remount_rw(struct ubifs_info *c)
        if (err)
                goto out;
 
-       err = alloc_wbufs(c);
-       if (err)
-               goto out;
-
-       ubifs_create_buds_lists(c);
-
        /* Create background thread */
        c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
        if (IS_ERR(c->bgt)) {
@@ -1670,19 +1665,30 @@ static int ubifs_remount_rw(struct ubifs_info *c)
        if (err)
                goto out;
 
+       dbg_gen("re-mounted read-write");
+       c->remounting_rw = 0;
+
        if (c->need_recovery) {
                c->need_recovery = 0;
                ubifs_msg("deferred recovery completed");
+       } else {
+               /*
+                * Do not run the debugging space check if the were doing
+                * recovery, because when we saved the information we had the
+                * file-system in a state where the TNC and lprops has been
+                * modified in memory, but all the I/O operations (including a
+                * commit) were deferred. So the file-system was in
+                * "non-committed" state. Now the file-system is in committed
+                * state, and of course the amount of free space will change
+                * because, for example, the old index size was imprecise.
+                */
+               err = dbg_check_space_info(c);
        }
-
-       dbg_gen("re-mounted read-write");
-       c->ro_mount = 0;
-       c->remounting_rw = 0;
-       err = dbg_check_space_info(c);
        mutex_unlock(&c->umount_mutex);
        return err;
 
 out:
+       c->ro_mount = 1;
        vfree(c->orph_buf);
        c->orph_buf = NULL;
        if (c->bgt) {
@@ -1732,7 +1738,6 @@ static void ubifs_remount_ro(struct ubifs_info *c)
        if (err)
                ubifs_ro_mode(c, err);
 
-       free_wbufs(c);
        vfree(c->orph_buf);
        c->orph_buf = NULL;
        kfree(c->write_reserve_buf);
@@ -1760,10 +1765,12 @@ static void ubifs_put_super(struct super_block *sb)
         * of the media. For example, there will be dirty inodes if we failed
         * to write them back because of I/O errors.
         */
-       ubifs_assert(atomic_long_read(&c->dirty_pg_cnt) == 0);
-       ubifs_assert(c->budg_idx_growth == 0);
-       ubifs_assert(c->budg_dd_growth == 0);
-       ubifs_assert(c->budg_data_growth == 0);
+       if (!c->ro_error) {
+               ubifs_assert(atomic_long_read(&c->dirty_pg_cnt) == 0);
+               ubifs_assert(c->budg_idx_growth == 0);
+               ubifs_assert(c->budg_dd_growth == 0);
+               ubifs_assert(c->budg_data_growth == 0);
+       }
 
        /*
         * The 'c->umount_lock' prevents races between UBIFS memory shrinker
index c74400f88fe0eb4882c79586fe09922bf8bd15b4..3299f469e7126a004d2b3a37c5c2661b3c6a127d 100644 (file)
@@ -56,6 +56,7 @@
  */
 
 #include "ubifs.h"
+#include <linux/fs.h>
 #include <linux/slab.h>
 #include <linux/xattr.h>
 #include <linux/posix_acl_xattr.h>
@@ -80,7 +81,6 @@ enum {
 };
 
 static const struct inode_operations none_inode_operations;
-static const struct address_space_operations none_address_operations;
 static const struct file_operations none_file_operations;
 
 /**
@@ -130,7 +130,7 @@ static int create_xattr(struct ubifs_info *c, struct inode *host,
        }
 
        /* Re-define all operations to be "nothing" */
-       inode->i_mapping->a_ops = &none_address_operations;
+       inode->i_mapping->a_ops = &empty_aops;
        inode->i_op = &none_inode_operations;
        inode->i_fop = &none_file_operations;
 
index 27a4babe7df0bcaf406e260631d86e44abb5ba51..e765743cf9f3c91153f9c369acaf85a36ea83ae8 100644 (file)
@@ -78,7 +78,7 @@ static int ufs_block_to_path(struct inode *inode, sector_t i_block, sector_t off
 
 /*
  * Returns the location of the fragment from
- * the begining of the filesystem.
+ * the beginning of the filesystem.
  */
 
 static u64 ufs_frag_map(struct inode *inode, sector_t frag, bool needs_lock)
index 7693d62934044b6adeec14d857a3d7702906e4db..3915ade6f9a8f53eec2ccbc7d0a845e294872d01 100644 (file)
@@ -483,9 +483,9 @@ static int ufs_parse_options (char * options, unsigned * mount_options)
 }
 
 /*
- * Diffrent types of UFS hold fs_cstotal in different
- * places, and use diffrent data structure for it.
- * To make things simplier we just copy fs_cstotal to ufs_sb_private_info
+ * Different types of UFS hold fs_cstotal in different
+ * places, and use different data structure for it.
+ * To make things simpler we just copy fs_cstotal to ufs_sb_private_info
  */
 static void ufs_setup_cstotal(struct super_block *sb)
 {
index 11014302c9ca63959ea29310a8173c74f48bd3ea..5f821dbc057905c379df686dfbb2f2ff67609c9a 100644 (file)
@@ -479,7 +479,6 @@ int ufs_truncate(struct inode *inode, loff_t old_i_size)
                        break;
                if (IS_SYNC(inode) && (inode->i_state & I_DIRTY))
                        ufs_sync_inode (inode);
-               blk_flush_plug(current);
                yield();
        }
 
index a19acdb81cd1270c174711c851b17013edb9ca80..f1ef94974dea12f10beceff4a12899851ba7aeab 100644 (file)
@@ -666,7 +666,7 @@ generic_setxattr(struct dentry *dentry, const char *name, const void *value, siz
        handler = xattr_resolve_name(dentry->d_sb->s_xattr, &name);
        if (!handler)
                return -EOPNOTSUPP;
-       return handler->set(dentry, name, value, size, 0, handler->flags);
+       return handler->set(dentry, name, value, size, flags, handler->flags);
 }
 
 /*
index 52dbd14260ba691fdbf9cc46b1e46d13fc461e9e..79ce38be15a14c97fdcfd09c4615452d6c9875bd 100644 (file)
@@ -1295,7 +1295,7 @@ xfs_get_blocks_direct(
  * If the private argument is non-NULL __xfs_get_blocks signals us that we
  * need to issue a transaction to convert the range from unwritten to written
  * extents.  In case this is regular synchronous I/O we just call xfs_end_io
- * to do this and we are done.  But in case this was a successfull AIO
+ * to do this and we are done.  But in case this was a successful AIO
  * request this handler is called from interrupt context, from which we
  * can't start transactions.  In that case offload the I/O completion to
  * the workqueues we also use for buffered I/O completion.
index 596bb2c9de429f76e5c1642aa545906a673956a2..9ef9ed2cfe2efee9aa3d9ed1de1d3e47fc9bc4df 100644 (file)
@@ -120,7 +120,7 @@ xfs_buf_lru_add(
  * The unlocked check is safe here because it only occurs when there are not
  * b_lru_ref counts left on the inode under the pag->pag_buf_lock. it is there
  * to optimise the shrinker removing the buffer from the LRU and calling
- * xfs_buf_free(). i.e. it removes an unneccessary round trip on the
+ * xfs_buf_free(). i.e. it removes an unnecessary round trip on the
  * bt_lru_lock.
  */
 STATIC void
@@ -293,7 +293,6 @@ xfs_buf_allocate_memory(
        size_t                  nbytes, offset;
        gfp_t                   gfp_mask = xb_to_gfp(flags);
        unsigned short          page_count, i;
-       pgoff_t                 first;
        xfs_off_t               end;
        int                     error;
 
@@ -333,7 +332,6 @@ use_alloc_page:
                return error;
 
        offset = bp->b_offset;
-       first = bp->b_file_offset >> PAGE_SHIFT;
        bp->b_flags |= _XBF_PAGES;
 
        for (i = 0; i < bp->b_page_count; i++) {
@@ -380,7 +378,7 @@ out_free_pages:
 }
 
 /*
- *     Map buffer into kernel address-space if nessecary.
+ *     Map buffer into kernel address-space if necessary.
  */
 STATIC int
 _xfs_buf_map_pages(
@@ -657,8 +655,6 @@ xfs_buf_readahead(
        xfs_off_t               ioff,
        size_t                  isize)
 {
-       struct backing_dev_info *bdi;
-
        if (bdi_read_congested(target->bt_bdi))
                return;
 
@@ -919,8 +915,6 @@ xfs_buf_lock(
 
        if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE))
                xfs_log_force(bp->b_target->bt_mount, 0);
-       if (atomic_read(&bp->b_io_remaining))
-               blk_flush_plug(current);
        down(&bp->b_sema);
        XB_SET_OWNER(bp);
 
@@ -1309,8 +1303,6 @@ xfs_buf_iowait(
 {
        trace_xfs_buf_iowait(bp, _RET_IP_);
 
-       if (atomic_read(&bp->b_io_remaining))
-               blk_flush_plug(current);
        wait_for_completion(&bp->b_iowait);
 
        trace_xfs_buf_iowait_done(bp, _RET_IP_);
@@ -1747,8 +1739,8 @@ xfsbufd(
        do {
                long    age = xfs_buf_age_centisecs * msecs_to_jiffies(10);
                long    tout = xfs_buf_timer_centisecs * msecs_to_jiffies(10);
-               int     count = 0;
                struct list_head tmp;
+               struct blk_plug plug;
 
                if (unlikely(freezing(current))) {
                        set_bit(XBT_FORCE_SLEEP, &target->bt_flags);
@@ -1764,16 +1756,15 @@ xfsbufd(
 
                xfs_buf_delwri_split(target, &tmp, age);
                list_sort(NULL, &tmp, xfs_buf_cmp);
+
+               blk_start_plug(&plug);
                while (!list_empty(&tmp)) {
                        struct xfs_buf *bp;
                        bp = list_first_entry(&tmp, struct xfs_buf, b_list);
                        list_del_init(&bp->b_list);
                        xfs_bdstrat_cb(bp);
-                       count++;
                }
-               if (count)
-                       blk_flush_plug(current);
-
+               blk_finish_plug(&plug);
        } while (!kthread_should_stop());
 
        return 0;
@@ -1793,6 +1784,7 @@ xfs_flush_buftarg(
        int             pincount = 0;
        LIST_HEAD(tmp_list);
        LIST_HEAD(wait_list);
+       struct blk_plug plug;
 
        xfs_buf_runall_queues(xfsconvertd_workqueue);
        xfs_buf_runall_queues(xfsdatad_workqueue);
@@ -1807,6 +1799,8 @@ xfs_flush_buftarg(
         * we do that after issuing all the IO.
         */
        list_sort(NULL, &tmp_list, xfs_buf_cmp);
+
+       blk_start_plug(&plug);
        while (!list_empty(&tmp_list)) {
                bp = list_first_entry(&tmp_list, struct xfs_buf, b_list);
                ASSERT(target == bp->b_target);
@@ -1817,10 +1811,10 @@ xfs_flush_buftarg(
                }
                xfs_bdstrat_cb(bp);
        }
+       blk_finish_plug(&plug);
 
        if (wait) {
-               /* Expedite and wait for IO to complete. */
-               blk_flush_plug(current);
+               /* Wait for IO to complete. */
                while (!list_empty(&wait_list)) {
                        bp = list_first_entry(&wait_list, struct xfs_buf, b_list);
 
index 52aadfbed13229b2f28202088958b12fe1a24fe5..f4213ba1ff853dad53d16d27b6cd713f01784ea7 100644 (file)
@@ -381,7 +381,7 @@ xfs_aio_write_isize_update(
 
 /*
  * If this was a direct or synchronous I/O that failed (such as ENOSPC) then
- * part of the I/O may have been written to disk before the error occured.  In
+ * part of the I/O may have been written to disk before the error occurred.  In
  * this case the on-disk file size may have been adjusted beyond the in-memory
  * file size and now needs to be truncated back.
  */
index 9ff7fc603d2f4325c550303d2f6295c731b65e82..dd21784525a8096ef76f6d6cd14c80a319918839 100644 (file)
@@ -70,7 +70,7 @@ xfs_synchronize_times(
 
 /*
  * If the linux inode is valid, mark it dirty.
- * Used when commiting a dirty inode into a transaction so that
+ * Used when committing a dirty inode into a transaction so that
  * the inode will get written back by the linux code
  */
 void
index 508e06fd7d1e67451402424eb4251408c04e6010..9f76cceb678d8aec6db86a53863c7c6fc0f36c19 100644 (file)
 /*
  * XFS logging functions
  */
-static int
+static void
 __xfs_printk(
        const char              *level,
        const struct xfs_mount  *mp,
        struct va_format        *vaf)
 {
-       if (mp && mp->m_fsname)
-               return printk("%sXFS (%s): %pV\n", level, mp->m_fsname, vaf);
-       return printk("%sXFS: %pV\n", level, vaf);
+       if (mp && mp->m_fsname) {
+               printk("%sXFS (%s): %pV\n", level, mp->m_fsname, vaf);
+               return;
+       }
+       printk("%sXFS: %pV\n", level, vaf);
 }
 
-int xfs_printk(
+void xfs_printk(
        const char              *level,
        const struct xfs_mount  *mp,
        const char              *fmt, ...)
 {
        struct va_format        vaf;
        va_list                 args;
-       int                      r;
 
        va_start(args, fmt);
 
        vaf.fmt = fmt;
        vaf.va = &args;
 
-       r = __xfs_printk(level, mp, &vaf);
+       __xfs_printk(level, mp, &vaf);
        va_end(args);
-
-       return r;
 }
 
 #define define_xfs_printk_level(func, kern_level)              \
-int func(const struct xfs_mount *mp, const char *fmt, ...)     \
+void func(const struct xfs_mount *mp, const char *fmt, ...)    \
 {                                                              \
        struct va_format        vaf;                            \
        va_list                 args;                           \
-       int                     r;                              \
                                                                \
        va_start(args, fmt);                                    \
                                                                \
        vaf.fmt = fmt;                                          \
        vaf.va = &args;                                         \
                                                                \
-       r = __xfs_printk(kern_level, mp, &vaf);                 \
+       __xfs_printk(kern_level, mp, &vaf);                     \
        va_end(args);                                           \
-                                                               \
-       return r;                                               \
 }                                                              \
 
 define_xfs_printk_level(xfs_emerg, KERN_EMERG);
@@ -88,7 +84,7 @@ define_xfs_printk_level(xfs_info, KERN_INFO);
 define_xfs_printk_level(xfs_debug, KERN_DEBUG);
 #endif
 
-int
+void
 xfs_alert_tag(
        const struct xfs_mount  *mp,
        int                     panic_tag,
@@ -97,7 +93,6 @@ xfs_alert_tag(
        struct va_format        vaf;
        va_list                 args;
        int                     do_panic = 0;
-       int                     r;
 
        if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) {
                xfs_printk(KERN_ALERT, mp,
@@ -110,12 +105,10 @@ xfs_alert_tag(
        vaf.fmt = fmt;
        vaf.va = &args;
 
-       r = __xfs_printk(KERN_ALERT, mp, &vaf);
+       __xfs_printk(KERN_ALERT, mp, &vaf);
        va_end(args);
 
        BUG_ON(do_panic);
-
-       return r;
 }
 
 void
index e77ffa16745b2a58f9c60953a80b7dadf88b171e..f1b3fc1b6c4ec9d4ecb09b075d6b336ce430ec40 100644 (file)
@@ -3,32 +3,34 @@
 
 struct xfs_mount;
 
-extern int xfs_printk(const char *level, const struct xfs_mount *mp,
+extern void xfs_printk(const char *level, const struct xfs_mount *mp,
                       const char *fmt, ...)
         __attribute__ ((format (printf, 3, 4)));
-extern int xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
-extern int xfs_alert(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
-extern int xfs_alert_tag(const struct xfs_mount *mp, int tag,
+extern void xfs_alert_tag(const struct xfs_mount *mp, int tag,
                         const char *fmt, ...)
         __attribute__ ((format (printf, 3, 4)));
-extern int xfs_crit(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
-extern int xfs_err(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_err(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
-extern int xfs_warn(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
-extern int xfs_notice(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
-extern int xfs_info(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_info(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
 
 #ifdef DEBUG
-extern int xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
+extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
         __attribute__ ((format (printf, 2, 3)));
 #else
-#define xfs_debug(mp, fmt, ...)        (0)
+static inline void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
+{
+}
 #endif
 
 extern void assfail(char *expr, char *f, int l);
index 1ba5c451da36a094629f6130815a70a8ee047bb8..b38e58d02299b40571c6350f3b040907f6853f14 100644 (file)
@@ -816,75 +816,6 @@ xfs_setup_devices(
        return 0;
 }
 
-/*
- * XFS AIL push thread support
- */
-void
-xfsaild_wakeup(
-       struct xfs_ail          *ailp,
-       xfs_lsn_t               threshold_lsn)
-{
-       /* only ever move the target forwards */
-       if (XFS_LSN_CMP(threshold_lsn, ailp->xa_target) > 0) {
-               ailp->xa_target = threshold_lsn;
-               wake_up_process(ailp->xa_task);
-       }
-}
-
-STATIC int
-xfsaild(
-       void    *data)
-{
-       struct xfs_ail  *ailp = data;
-       xfs_lsn_t       last_pushed_lsn = 0;
-       long            tout = 0; /* milliseconds */
-
-       while (!kthread_should_stop()) {
-               /*
-                * for short sleeps indicating congestion, don't allow us to
-                * get woken early. Otherwise all we do is bang on the AIL lock
-                * without making progress.
-                */
-               if (tout && tout <= 20)
-                       __set_current_state(TASK_KILLABLE);
-               else
-                       __set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(tout ?
-                                msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT);
-
-               /* swsusp */
-               try_to_freeze();
-
-               ASSERT(ailp->xa_mount->m_log);
-               if (XFS_FORCED_SHUTDOWN(ailp->xa_mount))
-                       continue;
-
-               tout = xfsaild_push(ailp, &last_pushed_lsn);
-       }
-
-       return 0;
-}      /* xfsaild */
-
-int
-xfsaild_start(
-       struct xfs_ail  *ailp)
-{
-       ailp->xa_target = 0;
-       ailp->xa_task = kthread_run(xfsaild, ailp, "xfsaild/%s",
-                                   ailp->xa_mount->m_fsname);
-       if (IS_ERR(ailp->xa_task))
-               return -PTR_ERR(ailp->xa_task);
-       return 0;
-}
-
-void
-xfsaild_stop(
-       struct xfs_ail  *ailp)
-{
-       kthread_stop(ailp->xa_task);
-}
-
-
 /* Catch misguided souls that try to use this interface on XFS */
 STATIC struct inode *
 xfs_fs_alloc_inode(
@@ -1191,22 +1122,12 @@ xfs_fs_sync_fs(
                return -error;
 
        if (laptop_mode) {
-               int     prev_sync_seq = mp->m_sync_seq;
-
                /*
                 * The disk must be active because we're syncing.
                 * We schedule xfssyncd now (now that the disk is
                 * active) instead of later (when it might not be).
                 */
-               wake_up_process(mp->m_sync_task);
-               /*
-                * We have to wait for the sync iteration to complete.
-                * If we don't, the disk activity caused by the sync
-                * will come after the sync is completed, and that
-                * triggers another sync from laptop mode.
-                */
-               wait_event(mp->m_wait_single_sync_task,
-                               mp->m_sync_seq != prev_sync_seq);
+               flush_delayed_work_sync(&mp->m_sync_work);
        }
 
        return 0;
@@ -1490,9 +1411,6 @@ xfs_fs_fill_super(
        spin_lock_init(&mp->m_sb_lock);
        mutex_init(&mp->m_growlock);
        atomic_set(&mp->m_active_trans, 0);
-       INIT_LIST_HEAD(&mp->m_sync_list);
-       spin_lock_init(&mp->m_sync_lock);
-       init_waitqueue_head(&mp->m_wait_single_sync_task);
 
        mp->m_super = sb;
        sb->s_fs_info = mp;
@@ -1798,6 +1716,38 @@ xfs_destroy_zones(void)
 
 }
 
+STATIC int __init
+xfs_init_workqueues(void)
+{
+       /*
+        * max_active is set to 8 to give enough concurency to allow
+        * multiple work operations on each CPU to run. This allows multiple
+        * filesystems to be running sync work concurrently, and scales with
+        * the number of CPUs in the system.
+        */
+       xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_CPU_INTENSIVE, 8);
+       if (!xfs_syncd_wq)
+               goto out;
+
+       xfs_ail_wq = alloc_workqueue("xfsail", WQ_CPU_INTENSIVE, 8);
+       if (!xfs_ail_wq)
+               goto out_destroy_syncd;
+
+       return 0;
+
+out_destroy_syncd:
+       destroy_workqueue(xfs_syncd_wq);
+out:
+       return -ENOMEM;
+}
+
+STATIC void
+xfs_destroy_workqueues(void)
+{
+       destroy_workqueue(xfs_ail_wq);
+       destroy_workqueue(xfs_syncd_wq);
+}
+
 STATIC int __init
 init_xfs_fs(void)
 {
@@ -1813,10 +1763,14 @@ init_xfs_fs(void)
        if (error)
                goto out;
 
-       error = xfs_mru_cache_init();
+       error = xfs_init_workqueues();
        if (error)
                goto out_destroy_zones;
 
+       error = xfs_mru_cache_init();
+       if (error)
+               goto out_destroy_wq;
+
        error = xfs_filestream_init();
        if (error)
                goto out_mru_cache_uninit;
@@ -1833,6 +1787,10 @@ init_xfs_fs(void)
        if (error)
                goto out_cleanup_procfs;
 
+       error = xfs_init_workqueues();
+       if (error)
+               goto out_sysctl_unregister;
+
        vfs_initquota();
 
        error = register_filesystem(&xfs_fs_type);
@@ -1850,6 +1808,8 @@ init_xfs_fs(void)
        xfs_filestream_uninit();
  out_mru_cache_uninit:
        xfs_mru_cache_uninit();
+ out_destroy_wq:
+       xfs_destroy_workqueues();
  out_destroy_zones:
        xfs_destroy_zones();
  out:
@@ -1866,6 +1826,7 @@ exit_xfs_fs(void)
        xfs_buf_terminate();
        xfs_filestream_uninit();
        xfs_mru_cache_uninit();
+       xfs_destroy_workqueues();
        xfs_destroy_zones();
 }
 
index 594cd822d84de225755006321e5b97ebfe35cf70..e4f9c1b0836c9ef8ef9feb3515d2f29a97565004 100644 (file)
@@ -22,6 +22,7 @@
 #include "xfs_log.h"
 #include "xfs_inum.h"
 #include "xfs_trans.h"
+#include "xfs_trans_priv.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_mount.h"
@@ -39,6 +40,8 @@
 #include <linux/kthread.h>
 #include <linux/freezer.h>
 
+struct workqueue_struct        *xfs_syncd_wq;  /* sync workqueue */
+
 /*
  * The inode lookup is done in batches to keep the amount of lock traffic and
  * radix tree lookups to a minimum. The batch size is a trade off between
@@ -401,7 +404,7 @@ xfs_quiesce_fs(
 /*
  * Second stage of a quiesce. The data is already synced, now we have to take
  * care of the metadata. New transactions are already blocked, so we need to
- * wait for any remaining transactions to drain out before proceding.
+ * wait for any remaining transactions to drain out before proceeding.
  */
 void
 xfs_quiesce_attr(
@@ -431,62 +434,12 @@ xfs_quiesce_attr(
        xfs_unmountfs_writesb(mp);
 }
 
-/*
- * Enqueue a work item to be picked up by the vfs xfssyncd thread.
- * Doing this has two advantages:
- * - It saves on stack space, which is tight in certain situations
- * - It can be used (with care) as a mechanism to avoid deadlocks.
- * Flushing while allocating in a full filesystem requires both.
- */
-STATIC void
-xfs_syncd_queue_work(
-       struct xfs_mount *mp,
-       void            *data,
-       void            (*syncer)(struct xfs_mount *, void *),
-       struct completion *completion)
-{
-       struct xfs_sync_work *work;
-
-       work = kmem_alloc(sizeof(struct xfs_sync_work), KM_SLEEP);
-       INIT_LIST_HEAD(&work->w_list);
-       work->w_syncer = syncer;
-       work->w_data = data;
-       work->w_mount = mp;
-       work->w_completion = completion;
-       spin_lock(&mp->m_sync_lock);
-       list_add_tail(&work->w_list, &mp->m_sync_list);
-       spin_unlock(&mp->m_sync_lock);
-       wake_up_process(mp->m_sync_task);
-}
-
-/*
- * Flush delayed allocate data, attempting to free up reserved space
- * from existing allocations.  At this point a new allocation attempt
- * has failed with ENOSPC and we are in the process of scratching our
- * heads, looking about for more room...
- */
-STATIC void
-xfs_flush_inodes_work(
-       struct xfs_mount *mp,
-       void            *arg)
-{
-       struct inode    *inode = arg;
-       xfs_sync_data(mp, SYNC_TRYLOCK);
-       xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT);
-       iput(inode);
-}
-
-void
-xfs_flush_inodes(
-       xfs_inode_t     *ip)
+static void
+xfs_syncd_queue_sync(
+       struct xfs_mount        *mp)
 {
-       struct inode    *inode = VFS_I(ip);
-       DECLARE_COMPLETION_ONSTACK(completion);
-
-       igrab(inode);
-       xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inodes_work, &completion);
-       wait_for_completion(&completion);
-       xfs_log_force(ip->i_mount, XFS_LOG_SYNC);
+       queue_delayed_work(xfs_syncd_wq, &mp->m_sync_work,
+                               msecs_to_jiffies(xfs_syncd_centisecs * 10));
 }
 
 /*
@@ -496,9 +449,10 @@ xfs_flush_inodes(
  */
 STATIC void
 xfs_sync_worker(
-       struct xfs_mount *mp,
-       void            *unused)
+       struct work_struct *work)
 {
+       struct xfs_mount *mp = container_of(to_delayed_work(work),
+                                       struct xfs_mount, m_sync_work);
        int             error;
 
        if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
@@ -508,73 +462,106 @@ xfs_sync_worker(
                        error = xfs_fs_log_dummy(mp);
                else
                        xfs_log_force(mp, 0);
-               xfs_reclaim_inodes(mp, 0);
                error = xfs_qm_sync(mp, SYNC_TRYLOCK);
+
+               /* start pushing all the metadata that is currently dirty */
+               xfs_ail_push_all(mp->m_ail);
        }
-       mp->m_sync_seq++;
-       wake_up(&mp->m_wait_single_sync_task);
+
+       /* queue us up again */
+       xfs_syncd_queue_sync(mp);
 }
 
-STATIC int
-xfssyncd(
-       void                    *arg)
+/*
+ * Queue a new inode reclaim pass if there are reclaimable inodes and there
+ * isn't a reclaim pass already in progress. By default it runs every 5s based
+ * on the xfs syncd work default of 30s. Perhaps this should have it's own
+ * tunable, but that can be done if this method proves to be ineffective or too
+ * aggressive.
+ */
+static void
+xfs_syncd_queue_reclaim(
+       struct xfs_mount        *mp)
 {
-       struct xfs_mount        *mp = arg;
-       long                    timeleft;
-       xfs_sync_work_t         *work, *n;
-       LIST_HEAD               (tmp);
-
-       set_freezable();
-       timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10);
-       for (;;) {
-               if (list_empty(&mp->m_sync_list))
-                       timeleft = schedule_timeout_interruptible(timeleft);
-               /* swsusp */
-               try_to_freeze();
-               if (kthread_should_stop() && list_empty(&mp->m_sync_list))
-                       break;
 
-               spin_lock(&mp->m_sync_lock);
-               /*
-                * We can get woken by laptop mode, to do a sync -
-                * that's the (only!) case where the list would be
-                * empty with time remaining.
-                */
-               if (!timeleft || list_empty(&mp->m_sync_list)) {
-                       if (!timeleft)
-                               timeleft = xfs_syncd_centisecs *
-                                                       msecs_to_jiffies(10);
-                       INIT_LIST_HEAD(&mp->m_sync_work.w_list);
-                       list_add_tail(&mp->m_sync_work.w_list,
-                                       &mp->m_sync_list);
-               }
-               list_splice_init(&mp->m_sync_list, &tmp);
-               spin_unlock(&mp->m_sync_lock);
+       /*
+        * We can have inodes enter reclaim after we've shut down the syncd
+        * workqueue during unmount, so don't allow reclaim work to be queued
+        * during unmount.
+        */
+       if (!(mp->m_super->s_flags & MS_ACTIVE))
+               return;
 
-               list_for_each_entry_safe(work, n, &tmp, w_list) {
-                       (*work->w_syncer)(mp, work->w_data);
-                       list_del(&work->w_list);
-                       if (work == &mp->m_sync_work)
-                               continue;
-                       if (work->w_completion)
-                               complete(work->w_completion);
-                       kmem_free(work);
-               }
+       rcu_read_lock();
+       if (radix_tree_tagged(&mp->m_perag_tree, XFS_ICI_RECLAIM_TAG)) {
+               queue_delayed_work(xfs_syncd_wq, &mp->m_reclaim_work,
+                       msecs_to_jiffies(xfs_syncd_centisecs / 6 * 10));
        }
+       rcu_read_unlock();
+}
 
-       return 0;
+/*
+ * This is a fast pass over the inode cache to try to get reclaim moving on as
+ * many inodes as possible in a short period of time. It kicks itself every few
+ * seconds, as well as being kicked by the inode cache shrinker when memory
+ * goes low. It scans as quickly as possible avoiding locked inodes or those
+ * already being flushed, and once done schedules a future pass.
+ */
+STATIC void
+xfs_reclaim_worker(
+       struct work_struct *work)
+{
+       struct xfs_mount *mp = container_of(to_delayed_work(work),
+                                       struct xfs_mount, m_reclaim_work);
+
+       xfs_reclaim_inodes(mp, SYNC_TRYLOCK);
+       xfs_syncd_queue_reclaim(mp);
+}
+
+/*
+ * Flush delayed allocate data, attempting to free up reserved space
+ * from existing allocations.  At this point a new allocation attempt
+ * has failed with ENOSPC and we are in the process of scratching our
+ * heads, looking about for more room.
+ *
+ * Queue a new data flush if there isn't one already in progress and
+ * wait for completion of the flush. This means that we only ever have one
+ * inode flush in progress no matter how many ENOSPC events are occurring and
+ * so will prevent the system from bogging down due to every concurrent
+ * ENOSPC event scanning all the active inodes in the system for writeback.
+ */
+void
+xfs_flush_inodes(
+       struct xfs_inode        *ip)
+{
+       struct xfs_mount        *mp = ip->i_mount;
+
+       queue_work(xfs_syncd_wq, &mp->m_flush_work);
+       flush_work_sync(&mp->m_flush_work);
+}
+
+STATIC void
+xfs_flush_worker(
+       struct work_struct *work)
+{
+       struct xfs_mount *mp = container_of(work,
+                                       struct xfs_mount, m_flush_work);
+
+       xfs_sync_data(mp, SYNC_TRYLOCK);
+       xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT);
 }
 
 int
 xfs_syncd_init(
        struct xfs_mount        *mp)
 {
-       mp->m_sync_work.w_syncer = xfs_sync_worker;
-       mp->m_sync_work.w_mount = mp;
-       mp->m_sync_work.w_completion = NULL;
-       mp->m_sync_task = kthread_run(xfssyncd, mp, "xfssyncd/%s", mp->m_fsname);
-       if (IS_ERR(mp->m_sync_task))
-               return -PTR_ERR(mp->m_sync_task);
+       INIT_WORK(&mp->m_flush_work, xfs_flush_worker);
+       INIT_DELAYED_WORK(&mp->m_sync_work, xfs_sync_worker);
+       INIT_DELAYED_WORK(&mp->m_reclaim_work, xfs_reclaim_worker);
+
+       xfs_syncd_queue_sync(mp);
+       xfs_syncd_queue_reclaim(mp);
+
        return 0;
 }
 
@@ -582,7 +569,9 @@ void
 xfs_syncd_stop(
        struct xfs_mount        *mp)
 {
-       kthread_stop(mp->m_sync_task);
+       cancel_delayed_work_sync(&mp->m_sync_work);
+       cancel_delayed_work_sync(&mp->m_reclaim_work);
+       cancel_work_sync(&mp->m_flush_work);
 }
 
 void
@@ -601,6 +590,10 @@ __xfs_inode_set_reclaim_tag(
                                XFS_INO_TO_AGNO(ip->i_mount, ip->i_ino),
                                XFS_ICI_RECLAIM_TAG);
                spin_unlock(&ip->i_mount->m_perag_lock);
+
+               /* schedule periodic background inode reclaim */
+               xfs_syncd_queue_reclaim(ip->i_mount);
+
                trace_xfs_perag_set_reclaim(ip->i_mount, pag->pag_agno,
                                                        -1, _RET_IP_);
        }
@@ -1017,7 +1010,13 @@ xfs_reclaim_inodes(
 }
 
 /*
- * Shrinker infrastructure.
+ * Inode cache shrinker.
+ *
+ * When called we make sure that there is a background (fast) inode reclaim in
+ * progress, while we will throttle the speed of reclaim via doiing synchronous
+ * reclaim of inodes. That means if we come across dirty inodes, we wait for
+ * them to be cleaned, which we hope will not be very long due to the
+ * background walker having already kicked the IO off on those dirty inodes.
  */
 static int
 xfs_reclaim_inode_shrink(
@@ -1032,10 +1031,15 @@ xfs_reclaim_inode_shrink(
 
        mp = container_of(shrink, struct xfs_mount, m_inode_shrink);
        if (nr_to_scan) {
+               /* kick background reclaimer and push the AIL */
+               xfs_syncd_queue_reclaim(mp);
+               xfs_ail_push_all(mp->m_ail);
+
                if (!(gfp_mask & __GFP_FS))
                        return -1;
 
-               xfs_reclaim_inodes_ag(mp, SYNC_TRYLOCK, &nr_to_scan);
+               xfs_reclaim_inodes_ag(mp, SYNC_TRYLOCK | SYNC_WAIT,
+                                       &nr_to_scan);
                /* terminate if we don't exhaust the scan */
                if (nr_to_scan > 0)
                        return -1;
index 32ba6628290ce4f14162d28c20eba63a23db1ffb..e3a6ad27415f77c07484941e1b6a79b07d2a3a34 100644 (file)
@@ -32,6 +32,8 @@ typedef struct xfs_sync_work {
 #define SYNC_WAIT              0x0001  /* wait for i/o to complete */
 #define SYNC_TRYLOCK           0x0002  /* only try to lock inodes */
 
+extern struct workqueue_struct *xfs_syncd_wq;  /* sync workqueue */
+
 int xfs_syncd_init(struct xfs_mount *mp);
 void xfs_syncd_stop(struct xfs_mount *mp);
 
index 7e241647850335967262b8763ff14bdb5dd86a5b..6fa214603819d759f8fbbd8e588a1a306ac78420 100644 (file)
@@ -600,7 +600,7 @@ xfs_qm_dqread(
 
        /*
         * Reservation counters are defined as reservation plus current usage
-        * to avoid having to add everytime.
+        * to avoid having to add every time.
         */
        dqp->q_res_bcount = be64_to_cpu(ddqp->d_bcount);
        dqp->q_res_icount = be64_to_cpu(ddqp->d_icount);
index 254ee062bd7dde135e0c238ca3696fe180ec78fe..69228aa8605a9f6e07d1f66845c0e4c0c7beff2c 100644 (file)
@@ -461,12 +461,10 @@ xfs_qm_dqflush_all(
        struct xfs_quotainfo    *q = mp->m_quotainfo;
        int                     recl;
        struct xfs_dquot        *dqp;
-       int                     niters;
        int                     error;
 
        if (!q)
                return 0;
-       niters = 0;
 again:
        mutex_lock(&q->qi_dqlist_lock);
        list_for_each_entry(dqp, &q->qi_dqlist, q_mplist) {
@@ -1314,14 +1312,9 @@ xfs_qm_dqiter_bufs(
 {
        xfs_buf_t       *bp;
        int             error;
-       int             notcommitted;
-       int             incr;
        int             type;
 
        ASSERT(blkcnt > 0);
-       notcommitted = 0;
-       incr = (blkcnt > XFS_QM_MAX_DQCLUSTER_LOGSZ) ?
-               XFS_QM_MAX_DQCLUSTER_LOGSZ : blkcnt;
        type = flags & XFS_QMOPT_UQUOTA ? XFS_DQ_USER :
                (flags & XFS_QMOPT_PQUOTA ? XFS_DQ_PROJ : XFS_DQ_GROUP);
        error = 0;
index c9446f1c726d89e7cdaf78a08bb02e42a1752e72..567b29b9f1b390048e61e32c2168b8db05fdbb24 100644 (file)
@@ -65,11 +65,6 @@ extern kmem_zone_t   *qm_dqtrxzone;
  * block in the dquot/xqm code.
  */
 #define XFS_DQUOT_CLUSTER_SIZE_FSB     (xfs_filblks_t)1
-/*
- * When doing a quotacheck, we log dquot clusters of this many FSBs at most
- * in a single transaction. We don't want to ask for too huge a log reservation.
- */
-#define XFS_QM_MAX_DQCLUSTER_LOGSZ     3
 
 typedef xfs_dqhash_t   xfs_dqlist_t;
 
index 774d7ec6df8e800e43c484916fbcec7d920de1e1..a0a829addca9d3c79c649201cf3f9d76432847c1 100644 (file)
@@ -134,7 +134,7 @@ xfs_qm_newmount(
                 */
                if (quotaondisk && !XFS_QM_NEED_QUOTACHECK(mp)) {
                        /*
-                        * If an error occured, qm_mount_quotas code
+                        * If an error occurred, qm_mount_quotas code
                         * has already disabled quotas. So, just finish
                         * mounting, and get on with the boring life
                         * without disk quotas.
index c82f06778a27d4388f9bdf61ac6c1193c1b373eb..2dadb15d5ca90d3b15b485241427c4b739e4b8ec 100644 (file)
@@ -172,7 +172,7 @@ xfs_qm_scall_quotaoff(
        /*
         * Next we make the changes in the quota flag in the mount struct.
         * This isn't protected by a particular lock directly, because we
-        * don't want to take a mrlock everytime we depend on quotas being on.
+        * don't want to take a mrlock every time we depend on quotas being on.
         */
        mp->m_qflags &= ~(flags);
 
@@ -313,14 +313,12 @@ xfs_qm_scall_quotaon(
 {
        int             error;
        uint            qf;
-       uint            accflags;
        __int64_t       sbflags;
 
        flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
        /*
         * Switching on quota accounting must be done at mount time.
         */
-       accflags = flags & XFS_ALL_QUOTA_ACCT;
        flags &= ~(XFS_ALL_QUOTA_ACCT);
 
        sbflags = 0;
@@ -354,7 +352,7 @@ xfs_qm_scall_quotaon(
                return XFS_ERROR(EINVAL);
        }
        /*
-        * If everything's upto-date incore, then don't waste time.
+        * If everything's up to-date incore, then don't waste time.
         */
        if ((mp->m_qflags & flags) == flags)
                return XFS_ERROR(EEXIST);
index 4bc3c649aee4bb35a6c7ebaa790ef8b73d264073..27d64d752eab70afa92187a8f35a6d736a37e14d 100644 (file)
@@ -2395,17 +2395,33 @@ xfs_free_extent(
        memset(&args, 0, sizeof(xfs_alloc_arg_t));
        args.tp = tp;
        args.mp = tp->t_mountp;
+
+       /*
+        * validate that the block number is legal - the enables us to detect
+        * and handle a silent filesystem corruption rather than crashing.
+        */
        args.agno = XFS_FSB_TO_AGNO(args.mp, bno);
-       ASSERT(args.agno < args.mp->m_sb.sb_agcount);
+       if (args.agno >= args.mp->m_sb.sb_agcount)
+               return EFSCORRUPTED;
+
        args.agbno = XFS_FSB_TO_AGBNO(args.mp, bno);
+       if (args.agbno >= args.mp->m_sb.sb_agblocks)
+               return EFSCORRUPTED;
+
        args.pag = xfs_perag_get(args.mp, args.agno);
-       if ((error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING)))
+       ASSERT(args.pag);
+
+       error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING);
+       if (error)
                goto error0;
-#ifdef DEBUG
-       ASSERT(args.agbp != NULL);
-       ASSERT((args.agbno + len) <=
-               be32_to_cpu(XFS_BUF_TO_AGF(args.agbp)->agf_length));
-#endif
+
+       /* validate the extent size is legal now we have the agf locked */
+       if (args.agbno + len >
+                       be32_to_cpu(XFS_BUF_TO_AGF(args.agbp)->agf_length)) {
+               error = EFSCORRUPTED;
+               goto error0;
+       }
+
        error = xfs_free_ag_extent(tp, args.agbp, args.agno, args.agbno, len, 0);
 error0:
        xfs_perag_put(args.pag);
index e5413d96f1af90a67831dc2498e8d5fbdd8e42ed..7b7e005e3dccd3620ddf66ff334dfe4f6e94bc03 100644 (file)
@@ -992,7 +992,7 @@ xfs_buf_iodone_callbacks(
        lasttarg = XFS_BUF_TARGET(bp);
 
        /*
-        * If the write was asynchronous then noone will be looking for the
+        * If the write was asynchronous then no one will be looking for the
         * error.  Clear the error state and write the buffer out again.
         *
         * During sync or umount we'll write all pending buffers again
index 742c8330994a82ff09bbc22f68695743751bc3eb..a37480a6e023c2f5481cd8befb1265f904c0268d 100644 (file)
@@ -2789,7 +2789,7 @@ xfs_iflush(
 
        /*
         * We can't flush the inode until it is unpinned, so wait for it if we
-        * are allowed to block.  We know noone new can pin it, because we are
+        * are allowed to block.  We know no one new can pin it, because we are
         * holding the inode lock shared and you need to hold it exclusively to
         * pin the inode.
         *
index f753200cef8d365593e9a0c1c1b155e968f3f8f8..ff4e2a30227dcb4b86dd69b784a8bb94cca4b5d7 100644 (file)
@@ -111,7 +111,7 @@ struct xfs_imap {
  * Generally, we do not want to hold the i_rlock while holding the
  * i_ilock. Hierarchy is i_iolock followed by i_rlock.
  *
- * xfs_iptr_t contains all the inode fields upto and including the
+ * xfs_iptr_t contains all the inode fields up to and including the
  * i_mnext and i_mprev fields, it is used as a marker in the inode
  * chain off the mount structure by xfs_sync calls.
  */
@@ -336,7 +336,7 @@ xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags)
 
 /*
  * Project quota id helpers (previously projid was 16bit only
- * and using two 16bit values to hold new 32bit projid was choosen
+ * and using two 16bit values to hold new 32bit projid was chosen
  * to retain compatibility with "old" filesystems).
  */
 static inline prid_t
index 46cc40131d4a43c91ec5eb1d188c46e967c5193c..576fdfe81d603176abb31cf35c1b90901ca1ca5c 100644 (file)
@@ -197,6 +197,41 @@ xfs_inode_item_size(
        return nvecs;
 }
 
+/*
+ * xfs_inode_item_format_extents - convert in-core extents to on-disk form
+ *
+ * For either the data or attr fork in extent format, we need to endian convert
+ * the in-core extent as we place them into the on-disk inode. In this case, we
+ * need to do this conversion before we write the extents into the log. Because
+ * we don't have the disk inode to write into here, we allocate a buffer and
+ * format the extents into it via xfs_iextents_copy(). We free the buffer in
+ * the unlock routine after the copy for the log has been made.
+ *
+ * In the case of the data fork, the in-core and on-disk fork sizes can be
+ * different due to delayed allocation extents. We only log on-disk extents
+ * here, so always use the physical fork size to determine the size of the
+ * buffer we need to allocate.
+ */
+STATIC void
+xfs_inode_item_format_extents(
+       struct xfs_inode        *ip,
+       struct xfs_log_iovec    *vecp,
+       int                     whichfork,
+       int                     type)
+{
+       xfs_bmbt_rec_t          *ext_buffer;
+
+       ext_buffer = kmem_alloc(XFS_IFORK_SIZE(ip, whichfork), KM_SLEEP);
+       if (whichfork == XFS_DATA_FORK)
+               ip->i_itemp->ili_extents_buf = ext_buffer;
+       else
+               ip->i_itemp->ili_aextents_buf = ext_buffer;
+
+       vecp->i_addr = ext_buffer;
+       vecp->i_len = xfs_iextents_copy(ip, ext_buffer, whichfork);
+       vecp->i_type = type;
+}
+
 /*
  * This is called to fill in the vector of log iovecs for the
  * given inode log item.  It fills the first item with an inode
@@ -213,7 +248,6 @@ xfs_inode_item_format(
        struct xfs_inode        *ip = iip->ili_inode;
        uint                    nvecs;
        size_t                  data_bytes;
-       xfs_bmbt_rec_t          *ext_buffer;
        xfs_mount_t             *mp;
 
        vecp->i_addr = &iip->ili_format;
@@ -320,22 +354,8 @@ xfs_inode_item_format(
                        } else
 #endif
                        {
-                               /*
-                                * There are delayed allocation extents
-                                * in the inode, or we need to convert
-                                * the extents to on disk format.
-                                * Use xfs_iextents_copy()
-                                * to copy only the real extents into
-                                * a separate buffer.  We'll free the
-                                * buffer in the unlock routine.
-                                */
-                               ext_buffer = kmem_alloc(ip->i_df.if_bytes,
-                                       KM_SLEEP);
-                               iip->ili_extents_buf = ext_buffer;
-                               vecp->i_addr = ext_buffer;
-                               vecp->i_len = xfs_iextents_copy(ip, ext_buffer,
-                                               XFS_DATA_FORK);
-                               vecp->i_type = XLOG_REG_TYPE_IEXT;
+                               xfs_inode_item_format_extents(ip, vecp,
+                                       XFS_DATA_FORK, XLOG_REG_TYPE_IEXT);
                        }
                        ASSERT(vecp->i_len <= ip->i_df.if_bytes);
                        iip->ili_format.ilf_dsize = vecp->i_len;
@@ -445,19 +465,12 @@ xfs_inode_item_format(
                         */
                        vecp->i_addr = ip->i_afp->if_u1.if_extents;
                        vecp->i_len = ip->i_afp->if_bytes;
+                       vecp->i_type = XLOG_REG_TYPE_IATTR_EXT;
 #else
                        ASSERT(iip->ili_aextents_buf == NULL);
-                       /*
-                        * Need to endian flip before logging
-                        */
-                       ext_buffer = kmem_alloc(ip->i_afp->if_bytes,
-                               KM_SLEEP);
-                       iip->ili_aextents_buf = ext_buffer;
-                       vecp->i_addr = ext_buffer;
-                       vecp->i_len = xfs_iextents_copy(ip, ext_buffer,
-                                       XFS_ATTR_FORK);
+                       xfs_inode_item_format_extents(ip, vecp,
+                                       XFS_ATTR_FORK, XLOG_REG_TYPE_IATTR_EXT);
 #endif
-                       vecp->i_type = XLOG_REG_TYPE_IATTR_EXT;
                        iip->ili_format.ilf_asize = vecp->i_len;
                        vecp++;
                        nvecs++;
index dc1882adaf54e1da714eed5aefe095875fbd102a..751e94fe1f77e2694790da48952cf03f30a554e4 100644 (file)
@@ -204,7 +204,6 @@ xfs_bulkstat(
        xfs_agi_t               *agi;   /* agi header data */
        xfs_agino_t             agino;  /* inode # in allocation group */
        xfs_agnumber_t          agno;   /* allocation group number */
-       xfs_daddr_t             bno;    /* inode cluster start daddr */
        int                     chunkidx; /* current index into inode chunk */
        int                     clustidx; /* current index into inode cluster */
        xfs_btree_cur_t         *cur;   /* btree cursor for ialloc btree */
@@ -463,7 +462,6 @@ xfs_bulkstat(
                                                 mp->m_sb.sb_inopblog);
                                }
                                ino = XFS_AGINO_TO_INO(mp, agno, agino);
-                               bno = XFS_AGB_TO_DADDR(mp, agno, agbno);
                                /*
                                 * Skip if this inode is free.
                                 */
index 25efa9b8a6029ac35df73942459132abd71dc228..b612ce4520aebef7cbc38a066b48133d37f2636d 100644 (file)
@@ -761,7 +761,7 @@ xfs_log_need_covered(xfs_mount_t *mp)
                break;
        case XLOG_STATE_COVER_NEED:
        case XLOG_STATE_COVER_NEED2:
-               if (!xfs_trans_ail_tail(log->l_ailp) &&
+               if (!xfs_ail_min_lsn(log->l_ailp) &&
                    xlog_iclogs_empty(log)) {
                        if (log->l_covered_state == XLOG_STATE_COVER_NEED)
                                log->l_covered_state = XLOG_STATE_COVER_DONE;
@@ -801,7 +801,7 @@ xlog_assign_tail_lsn(
        xfs_lsn_t               tail_lsn;
        struct log              *log = mp->m_log;
 
-       tail_lsn = xfs_trans_ail_tail(mp->m_ail);
+       tail_lsn = xfs_ail_min_lsn(mp->m_ail);
        if (!tail_lsn)
                tail_lsn = atomic64_read(&log->l_last_sync_lsn);
 
@@ -1239,7 +1239,7 @@ xlog_grant_push_ail(
         * the filesystem is shutting down.
         */
        if (!XLOG_FORCED_SHUTDOWN(log))
-               xfs_trans_ail_push(log->l_ailp, threshold_lsn);
+               xfs_ail_push(log->l_ailp, threshold_lsn);
 }
 
 /*
@@ -3407,6 +3407,17 @@ xlog_verify_dest_ptr(
                xfs_emerg(log->l_mp, "%s: invalid ptr", __func__);
 }
 
+/*
+ * Check to make sure the grant write head didn't just over lap the tail.  If
+ * the cycles are the same, we can't be overlapping.  Otherwise, make sure that
+ * the cycles differ by exactly one and check the byte count.
+ *
+ * This check is run unlocked, so can give false positives. Rather than assert
+ * on failures, use a warn-once flag and a panic tag to allow the admin to
+ * determine if they want to panic the machine when such an error occurs. For
+ * debug kernels this will have the same effect as using an assert but, unlinke
+ * an assert, it can be turned off at runtime.
+ */
 STATIC void
 xlog_verify_grant_tail(
        struct log      *log)
@@ -3414,17 +3425,22 @@ xlog_verify_grant_tail(
        int             tail_cycle, tail_blocks;
        int             cycle, space;
 
-       /*
-        * Check to make sure the grant write head didn't just over lap the
-        * tail.  If the cycles are the same, we can't be overlapping.
-        * Otherwise, make sure that the cycles differ by exactly one and
-        * check the byte count.
-        */
        xlog_crack_grant_head(&log->l_grant_write_head, &cycle, &space);
        xlog_crack_atomic_lsn(&log->l_tail_lsn, &tail_cycle, &tail_blocks);
        if (tail_cycle != cycle) {
-               ASSERT(cycle - 1 == tail_cycle);
-               ASSERT(space <= BBTOB(tail_blocks));
+               if (cycle - 1 != tail_cycle &&
+                   !(log->l_flags & XLOG_TAIL_WARN)) {
+                       xfs_alert_tag(log->l_mp, XFS_PTAG_LOGRES,
+                               "%s: cycle - 1 != tail_cycle", __func__);
+                       log->l_flags |= XLOG_TAIL_WARN;
+               }
+
+               if (space > BBTOB(tail_blocks) &&
+                   !(log->l_flags & XLOG_TAIL_WARN)) {
+                       xfs_alert_tag(log->l_mp, XFS_PTAG_LOGRES,
+                               "%s: space > BBTOB(tail_blocks)", __func__);
+                       log->l_flags |= XLOG_TAIL_WARN;
+               }
        }
 }
 
index 15dbf1f9c2be6c962655a84f6a254cc191723cee..5864850e9e34039507b003ff3e8570a500701bc3 100644 (file)
@@ -144,6 +144,7 @@ static inline uint xlog_get_client_id(__be32 i)
 #define        XLOG_RECOVERY_NEEDED    0x4     /* log was recovered */
 #define XLOG_IO_ERROR          0x8     /* log hit an I/O error, and being
                                           shutdown */
+#define XLOG_TAIL_WARN         0x10    /* log tail verify warning issued */
 
 #ifdef __KERNEL__
 /*
@@ -570,7 +571,7 @@ int xlog_write(struct log *log, struct xfs_log_vec *log_vector,
  * When we crack an atomic LSN, we sample it first so that the value will not
  * change while we are cracking it into the component values. This means we
  * will always get consistent component values to work from. This should always
- * be used to smaple and crack LSNs taht are stored and updated in atomic
+ * be used to sample and crack LSNs that are stored and updated in atomic
  * variables.
  */
 static inline void
index 0c4a5618e7af769c051da1337f4f338457b14866..5cc464a17c93592f5d707552603d6b16705de333 100644 (file)
@@ -101,7 +101,7 @@ xlog_get_bp(
        /*
         * We do log I/O in units of log sectors (a power-of-2
         * multiple of the basic block size), so we round up the
-        * requested size to acommodate the basic blocks required
+        * requested size to accommodate the basic blocks required
         * for complete log sectors.
         *
         * In addition, the buffer may be used for a non-sector-
@@ -112,7 +112,7 @@ xlog_get_bp(
         * an issue.  Nor will this be a problem if the log I/O is
         * done in basic blocks (sector size 1).  But otherwise we
         * extend the buffer by one extra log sector to ensure
-        * there's space to accomodate this possiblility.
+        * there's space to accommodate this possibility.
         */
        if (nbblks > 1 && log->l_sectBBsize > 1)
                nbblks += log->l_sectBBsize;
index a62e8971539da79743e47b0a7429c14443c4effb..19af0ab0d0c6c6c1cab862016dbe258263e39d31 100644 (file)
@@ -203,12 +203,9 @@ typedef struct xfs_mount {
        struct mutex            m_icsb_mutex;   /* balancer sync lock */
 #endif
        struct xfs_mru_cache    *m_filestream;  /* per-mount filestream data */
-       struct task_struct      *m_sync_task;   /* generalised sync thread */
-       xfs_sync_work_t         m_sync_work;    /* work item for VFS_SYNC */
-       struct list_head        m_sync_list;    /* sync thread work item list */
-       spinlock_t              m_sync_lock;    /* work item list lock */
-       int                     m_sync_seq;     /* sync thread generation no. */
-       wait_queue_head_t       m_wait_single_sync_task;
+       struct delayed_work     m_sync_work;    /* background sync work */
+       struct delayed_work     m_reclaim_work; /* background inode reclaim */
+       struct work_struct      m_flush_work;   /* background inode flush */
        __int64_t               m_update_flags; /* sb flags we need to update
                                                   on the next remount,rw */
        struct shrinker         m_inode_shrink; /* inode reclaim shrinker */
index 12aff9584e299a2d026a84f1871c669f0fdb9a4c..acdb92f14d518fe43ac9c0be62d67ae49831ca1d 100644 (file)
 #include "xfs_trans_priv.h"
 #include "xfs_error.h"
 
-STATIC void xfs_ail_splice(struct xfs_ail *, struct list_head *, xfs_lsn_t);
-STATIC void xfs_ail_delete(struct xfs_ail *, xfs_log_item_t *);
-STATIC xfs_log_item_t * xfs_ail_min(struct xfs_ail *);
-STATIC xfs_log_item_t * xfs_ail_next(struct xfs_ail *, xfs_log_item_t *);
+struct workqueue_struct        *xfs_ail_wq;    /* AIL workqueue */
 
 #ifdef DEBUG
-STATIC void xfs_ail_check(struct xfs_ail *, xfs_log_item_t *);
-#else
+/*
+ * Check that the list is sorted as it should be.
+ */
+STATIC void
+xfs_ail_check(
+       struct xfs_ail  *ailp,
+       xfs_log_item_t  *lip)
+{
+       xfs_log_item_t  *prev_lip;
+
+       if (list_empty(&ailp->xa_ail))
+               return;
+
+       /*
+        * Check the next and previous entries are valid.
+        */
+       ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0);
+       prev_lip = list_entry(lip->li_ail.prev, xfs_log_item_t, li_ail);
+       if (&prev_lip->li_ail != &ailp->xa_ail)
+               ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0);
+
+       prev_lip = list_entry(lip->li_ail.next, xfs_log_item_t, li_ail);
+       if (&prev_lip->li_ail != &ailp->xa_ail)
+               ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) >= 0);
+
+
+#ifdef XFS_TRANS_DEBUG
+       /*
+        * Walk the list checking lsn ordering, and that every entry has the
+        * XFS_LI_IN_AIL flag set. This is really expensive, so only do it
+        * when specifically debugging the transaction subsystem.
+        */
+       prev_lip = list_entry(&ailp->xa_ail, xfs_log_item_t, li_ail);
+       list_for_each_entry(lip, &ailp->xa_ail, li_ail) {
+               if (&prev_lip->li_ail != &ailp->xa_ail)
+                       ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0);
+               ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0);
+               prev_lip = lip;
+       }
+#endif /* XFS_TRANS_DEBUG */
+}
+#else /* !DEBUG */
 #define        xfs_ail_check(a,l)
 #endif /* DEBUG */
 
+/*
+ * Return a pointer to the first item in the AIL.  If the AIL is empty, then
+ * return NULL.
+ */
+static xfs_log_item_t *
+xfs_ail_min(
+       struct xfs_ail  *ailp)
+{
+       if (list_empty(&ailp->xa_ail))
+               return NULL;
+
+       return list_first_entry(&ailp->xa_ail, xfs_log_item_t, li_ail);
+}
+
+ /*
+ * Return a pointer to the last item in the AIL.  If the AIL is empty, then
+ * return NULL.
+ */
+static xfs_log_item_t *
+xfs_ail_max(
+       struct xfs_ail  *ailp)
+{
+       if (list_empty(&ailp->xa_ail))
+               return NULL;
+
+       return list_entry(ailp->xa_ail.prev, xfs_log_item_t, li_ail);
+}
+
+/*
+ * Return a pointer to the item which follows the given item in the AIL.  If
+ * the given item is the last item in the list, then return NULL.
+ */
+static xfs_log_item_t *
+xfs_ail_next(
+       struct xfs_ail  *ailp,
+       xfs_log_item_t  *lip)
+{
+       if (lip->li_ail.next == &ailp->xa_ail)
+               return NULL;
+
+       return list_first_entry(&lip->li_ail, xfs_log_item_t, li_ail);
+}
 
 /*
- * This is called by the log manager code to determine the LSN
- * of the tail of the log.  This is exactly the LSN of the first
- * item in the AIL.  If the AIL is empty, then this function
- * returns 0.
+ * This is called by the log manager code to determine the LSN of the tail of
+ * the log.  This is exactly the LSN of the first item in the AIL.  If the AIL
+ * is empty, then this function returns 0.
  *
- * We need the AIL lock in order to get a coherent read of the
- * lsn of the last item in the AIL.
+ * We need the AIL lock in order to get a coherent read of the lsn of the last
+ * item in the AIL.
  */
 xfs_lsn_t
-xfs_trans_ail_tail(
+xfs_ail_min_lsn(
        struct xfs_ail  *ailp)
 {
-       xfs_lsn_t       lsn;
+       xfs_lsn_t       lsn = 0;
        xfs_log_item_t  *lip;
 
        spin_lock(&ailp->xa_lock);
        lip = xfs_ail_min(ailp);
-       if (lip == NULL) {
-               lsn = (xfs_lsn_t)0;
-       } else {
+       if (lip)
                lsn = lip->li_lsn;
-       }
        spin_unlock(&ailp->xa_lock);
 
        return lsn;
 }
 
 /*
- * xfs_trans_push_ail
- *
- * This routine is called to move the tail of the AIL forward.  It does this by
- * trying to flush items in the AIL whose lsns are below the given
- * threshold_lsn.
- *
- * the push is run asynchronously in a separate thread, so we return the tail
- * of the log right now instead of the tail after the push. This means we will
- * either continue right away, or we will sleep waiting on the async thread to
- * do its work.
- *
- * We do this unlocked - we only need to know whether there is anything in the
- * AIL at the time we are called. We don't need to access the contents of
- * any of the objects, so the lock is not needed.
+ * Return the maximum lsn held in the AIL, or zero if the AIL is empty.
  */
-void
-xfs_trans_ail_push(
-       struct xfs_ail  *ailp,
-       xfs_lsn_t       threshold_lsn)
+static xfs_lsn_t
+xfs_ail_max_lsn(
+       struct xfs_ail  *ailp)
 {
-       xfs_log_item_t  *lip;
+       xfs_lsn_t       lsn = 0;
+       xfs_log_item_t  *lip;
 
-       lip = xfs_ail_min(ailp);
-       if (lip && !XFS_FORCED_SHUTDOWN(ailp->xa_mount)) {
-               if (XFS_LSN_CMP(threshold_lsn, ailp->xa_target) > 0)
-                       xfsaild_wakeup(ailp, threshold_lsn);
-       }
+       spin_lock(&ailp->xa_lock);
+       lip = xfs_ail_max(ailp);
+       if (lip)
+               lsn = lip->li_lsn;
+       spin_unlock(&ailp->xa_lock);
+
+       return lsn;
 }
 
 /*
@@ -236,16 +300,57 @@ out:
 }
 
 /*
- * xfsaild_push does the work of pushing on the AIL.  Returning a timeout of
- * zero indicates that the caller should sleep until woken.
+ * splice the log item list into the AIL at the given LSN.
  */
-long
-xfsaild_push(
-       struct xfs_ail  *ailp,
-       xfs_lsn_t       *last_lsn)
+static void
+xfs_ail_splice(
+       struct xfs_ail  *ailp,
+       struct list_head *list,
+       xfs_lsn_t       lsn)
 {
-       long            tout = 0;
-       xfs_lsn_t       last_pushed_lsn = *last_lsn;
+       xfs_log_item_t  *next_lip;
+
+       /* If the list is empty, just insert the item.  */
+       if (list_empty(&ailp->xa_ail)) {
+               list_splice(list, &ailp->xa_ail);
+               return;
+       }
+
+       list_for_each_entry_reverse(next_lip, &ailp->xa_ail, li_ail) {
+               if (XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0)
+                       break;
+       }
+
+       ASSERT(&next_lip->li_ail == &ailp->xa_ail ||
+              XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0);
+
+       list_splice_init(list, &next_lip->li_ail);
+}
+
+/*
+ * Delete the given item from the AIL.  Return a pointer to the item.
+ */
+static void
+xfs_ail_delete(
+       struct xfs_ail  *ailp,
+       xfs_log_item_t  *lip)
+{
+       xfs_ail_check(ailp, lip);
+       list_del(&lip->li_ail);
+       xfs_trans_ail_cursor_clear(ailp, lip);
+}
+
+/*
+ * xfs_ail_worker does the work of pushing on the AIL. It will requeue itself
+ * to run at a later time if there is more work to do to complete the push.
+ */
+STATIC void
+xfs_ail_worker(
+       struct work_struct *work)
+{
+       struct xfs_ail  *ailp = container_of(to_delayed_work(work),
+                                       struct xfs_ail, xa_work);
+       long            tout;
        xfs_lsn_t       target =  ailp->xa_target;
        xfs_lsn_t       lsn;
        xfs_log_item_t  *lip;
@@ -256,15 +361,15 @@ xfsaild_push(
 
        spin_lock(&ailp->xa_lock);
        xfs_trans_ail_cursor_init(ailp, cur);
-       lip = xfs_trans_ail_cursor_first(ailp, cur, *last_lsn);
+       lip = xfs_trans_ail_cursor_first(ailp, cur, ailp->xa_last_pushed_lsn);
        if (!lip || XFS_FORCED_SHUTDOWN(mp)) {
                /*
                 * AIL is empty or our push has reached the end.
                 */
                xfs_trans_ail_cursor_done(ailp, cur);
                spin_unlock(&ailp->xa_lock);
-               *last_lsn = 0;
-               return tout;
+               ailp->xa_last_pushed_lsn = 0;
+               return;
        }
 
        XFS_STATS_INC(xs_push_ail);
@@ -301,13 +406,13 @@ xfsaild_push(
                case XFS_ITEM_SUCCESS:
                        XFS_STATS_INC(xs_push_ail_success);
                        IOP_PUSH(lip);
-                       last_pushed_lsn = lsn;
+                       ailp->xa_last_pushed_lsn = lsn;
                        break;
 
                case XFS_ITEM_PUSHBUF:
                        XFS_STATS_INC(xs_push_ail_pushbuf);
                        IOP_PUSHBUF(lip);
-                       last_pushed_lsn = lsn;
+                       ailp->xa_last_pushed_lsn = lsn;
                        push_xfsbufd = 1;
                        break;
 
@@ -319,7 +424,7 @@ xfsaild_push(
 
                case XFS_ITEM_LOCKED:
                        XFS_STATS_INC(xs_push_ail_locked);
-                       last_pushed_lsn = lsn;
+                       ailp->xa_last_pushed_lsn = lsn;
                        stuck++;
                        break;
 
@@ -374,9 +479,23 @@ xfsaild_push(
                wake_up_process(mp->m_ddev_targp->bt_task);
        }
 
+       /* assume we have more work to do in a short while */
+       tout = 10;
        if (!count) {
                /* We're past our target or empty, so idle */
-               last_pushed_lsn = 0;
+               ailp->xa_last_pushed_lsn = 0;
+
+               /*
+                * Check for an updated push target before clearing the
+                * XFS_AIL_PUSHING_BIT. If the target changed, we've got more
+                * work to do. Wait a bit longer before starting that work.
+                */
+               smp_rmb();
+               if (ailp->xa_target == target) {
+                       clear_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags);
+                       return;
+               }
+               tout = 50;
        } else if (XFS_LSN_CMP(lsn, target) >= 0) {
                /*
                 * We reached the target so wait a bit longer for I/O to
@@ -384,7 +503,7 @@ xfsaild_push(
                 * start the next scan from the start of the AIL.
                 */
                tout = 50;
-               last_pushed_lsn = 0;
+               ailp->xa_last_pushed_lsn = 0;
        } else if ((stuck * 100) / count > 90) {
                /*
                 * Either there is a lot of contention on the AIL or we
@@ -396,14 +515,61 @@ xfsaild_push(
                 * continuing from where we were.
                 */
                tout = 20;
-       } else {
-               /* more to do, but wait a short while before continuing */
-               tout = 10;
        }
-       *last_lsn = last_pushed_lsn;
-       return tout;
+
+       /* There is more to do, requeue us.  */
+       queue_delayed_work(xfs_syncd_wq, &ailp->xa_work,
+                                       msecs_to_jiffies(tout));
+}
+
+/*
+ * This routine is called to move the tail of the AIL forward.  It does this by
+ * trying to flush items in the AIL whose lsns are below the given
+ * threshold_lsn.
+ *
+ * The push is run asynchronously in a workqueue, which means the caller needs
+ * to handle waiting on the async flush for space to become available.
+ * We don't want to interrupt any push that is in progress, hence we only queue
+ * work if we set the pushing bit approriately.
+ *
+ * We do this unlocked - we only need to know whether there is anything in the
+ * AIL at the time we are called. We don't need to access the contents of
+ * any of the objects, so the lock is not needed.
+ */
+void
+xfs_ail_push(
+       struct xfs_ail  *ailp,
+       xfs_lsn_t       threshold_lsn)
+{
+       xfs_log_item_t  *lip;
+
+       lip = xfs_ail_min(ailp);
+       if (!lip || XFS_FORCED_SHUTDOWN(ailp->xa_mount) ||
+           XFS_LSN_CMP(threshold_lsn, ailp->xa_target) <= 0)
+               return;
+
+       /*
+        * Ensure that the new target is noticed in push code before it clears
+        * the XFS_AIL_PUSHING_BIT.
+        */
+       smp_wmb();
+       ailp->xa_target = threshold_lsn;
+       if (!test_and_set_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags))
+               queue_delayed_work(xfs_syncd_wq, &ailp->xa_work, 0);
 }
 
+/*
+ * Push out all items in the AIL immediately
+ */
+void
+xfs_ail_push_all(
+       struct xfs_ail  *ailp)
+{
+       xfs_lsn_t       threshold_lsn = xfs_ail_max_lsn(ailp);
+
+       if (threshold_lsn)
+               xfs_ail_push(ailp, threshold_lsn);
+}
 
 /*
  * This is to be called when an item is unlocked that may have
@@ -615,7 +781,6 @@ xfs_trans_ail_init(
        xfs_mount_t     *mp)
 {
        struct xfs_ail  *ailp;
-       int             error;
 
        ailp = kmem_zalloc(sizeof(struct xfs_ail), KM_MAYFAIL);
        if (!ailp)
@@ -624,15 +789,9 @@ xfs_trans_ail_init(
        ailp->xa_mount = mp;
        INIT_LIST_HEAD(&ailp->xa_ail);
        spin_lock_init(&ailp->xa_lock);
-       error = xfsaild_start(ailp);
-       if (error)
-               goto out_free_ailp;
+       INIT_DELAYED_WORK(&ailp->xa_work, xfs_ail_worker);
        mp->m_ail = ailp;
        return 0;
-
-out_free_ailp:
-       kmem_free(ailp);
-       return error;
 }
 
 void
@@ -641,124 +800,6 @@ xfs_trans_ail_destroy(
 {
        struct xfs_ail  *ailp = mp->m_ail;
 
-       xfsaild_stop(ailp);
+       cancel_delayed_work_sync(&ailp->xa_work);
        kmem_free(ailp);
 }
-
-/*
- * splice the log item list into the AIL at the given LSN.
- */
-STATIC void
-xfs_ail_splice(
-       struct xfs_ail  *ailp,
-       struct list_head *list,
-       xfs_lsn_t       lsn)
-{
-       xfs_log_item_t  *next_lip;
-
-       /*
-        * If the list is empty, just insert the item.
-        */
-       if (list_empty(&ailp->xa_ail)) {
-               list_splice(list, &ailp->xa_ail);
-               return;
-       }
-
-       list_for_each_entry_reverse(next_lip, &ailp->xa_ail, li_ail) {
-               if (XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0)
-                       break;
-       }
-
-       ASSERT((&next_lip->li_ail == &ailp->xa_ail) ||
-              (XFS_LSN_CMP(next_lip->li_lsn, lsn) <= 0));
-
-       list_splice_init(list, &next_lip->li_ail);
-       return;
-}
-
-/*
- * Delete the given item from the AIL.  Return a pointer to the item.
- */
-STATIC void
-xfs_ail_delete(
-       struct xfs_ail  *ailp,
-       xfs_log_item_t  *lip)
-{
-       xfs_ail_check(ailp, lip);
-       list_del(&lip->li_ail);
-       xfs_trans_ail_cursor_clear(ailp, lip);
-}
-
-/*
- * Return a pointer to the first item in the AIL.
- * If the AIL is empty, then return NULL.
- */
-STATIC xfs_log_item_t *
-xfs_ail_min(
-       struct xfs_ail  *ailp)
-{
-       if (list_empty(&ailp->xa_ail))
-               return NULL;
-
-       return list_first_entry(&ailp->xa_ail, xfs_log_item_t, li_ail);
-}
-
-/*
- * Return a pointer to the item which follows
- * the given item in the AIL.  If the given item
- * is the last item in the list, then return NULL.
- */
-STATIC xfs_log_item_t *
-xfs_ail_next(
-       struct xfs_ail  *ailp,
-       xfs_log_item_t  *lip)
-{
-       if (lip->li_ail.next == &ailp->xa_ail)
-               return NULL;
-
-       return list_first_entry(&lip->li_ail, xfs_log_item_t, li_ail);
-}
-
-#ifdef DEBUG
-/*
- * Check that the list is sorted as it should be.
- */
-STATIC void
-xfs_ail_check(
-       struct xfs_ail  *ailp,
-       xfs_log_item_t  *lip)
-{
-       xfs_log_item_t  *prev_lip;
-
-       if (list_empty(&ailp->xa_ail))
-               return;
-
-       /*
-        * Check the next and previous entries are valid.
-        */
-       ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0);
-       prev_lip = list_entry(lip->li_ail.prev, xfs_log_item_t, li_ail);
-       if (&prev_lip->li_ail != &ailp->xa_ail)
-               ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0);
-
-       prev_lip = list_entry(lip->li_ail.next, xfs_log_item_t, li_ail);
-       if (&prev_lip->li_ail != &ailp->xa_ail)
-               ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) >= 0);
-
-
-#ifdef XFS_TRANS_DEBUG
-       /*
-        * Walk the list checking lsn ordering, and that every entry has the
-        * XFS_LI_IN_AIL flag set. This is really expensive, so only do it
-        * when specifically debugging the transaction subsystem.
-        */
-       prev_lip = list_entry(&ailp->xa_ail, xfs_log_item_t, li_ail);
-       list_for_each_entry(lip, &ailp->xa_ail, li_ail) {
-               if (&prev_lip->li_ail != &ailp->xa_ail)
-                       ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0);
-               ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0);
-               prev_lip = lip;
-       }
-#endif /* XFS_TRANS_DEBUG */
-}
-#endif /* DEBUG */
index 16084d8ea231a0434823ef3c9007333fdbd675f7..048b0c689d3eec49ffd0ae45b52a4d606cda9b44 100644 (file)
@@ -81,7 +81,7 @@ xfs_trans_ijoin(
  *
  *
  * Grabs a reference to the inode which will be dropped when the transaction
- * is commited.  The inode will also be unlocked at that point.  The inode
+ * is committed.  The inode will also be unlocked at that point.  The inode
  * must be locked, and it cannot be associated with any transaction.
  */
 void
index 35162c238fa380e8ec4464392f2b45c617730551..6b164e9e9a1f50499be0a216d36706193b97d646 100644 (file)
@@ -65,16 +65,22 @@ struct xfs_ail_cursor {
 struct xfs_ail {
        struct xfs_mount        *xa_mount;
        struct list_head        xa_ail;
-       uint                    xa_gen;
-       struct task_struct      *xa_task;
        xfs_lsn_t               xa_target;
        struct xfs_ail_cursor   xa_cursors;
        spinlock_t              xa_lock;
+       struct delayed_work     xa_work;
+       xfs_lsn_t               xa_last_pushed_lsn;
+       unsigned long           xa_flags;
 };
 
+#define XFS_AIL_PUSHING_BIT    0
+
 /*
  * From xfs_trans_ail.c
  */
+
+extern struct workqueue_struct *xfs_ail_wq;    /* AIL workqueue */
+
 void   xfs_trans_ail_update_bulk(struct xfs_ail *ailp,
                                struct xfs_log_item **log_items, int nr_items,
                                xfs_lsn_t lsn) __releases(ailp->xa_lock);
@@ -98,12 +104,13 @@ xfs_trans_ail_delete(
        xfs_trans_ail_delete_bulk(ailp, &lip, 1);
 }
 
-void                   xfs_trans_ail_push(struct xfs_ail *, xfs_lsn_t);
+void                   xfs_ail_push(struct xfs_ail *, xfs_lsn_t);
+void                   xfs_ail_push_all(struct xfs_ail *);
+xfs_lsn_t              xfs_ail_min_lsn(struct xfs_ail *ailp);
+
 void                   xfs_trans_unlocked_item(struct xfs_ail *,
                                        xfs_log_item_t *);
 
-xfs_lsn_t              xfs_trans_ail_tail(struct xfs_ail *ailp);
-
 struct xfs_log_item    *xfs_trans_ail_cursor_first(struct xfs_ail *ailp,
                                        struct xfs_ail_cursor *cur,
                                        xfs_lsn_t lsn);
@@ -112,11 +119,6 @@ struct xfs_log_item        *xfs_trans_ail_cursor_next(struct xfs_ail *ailp,
 void                   xfs_trans_ail_cursor_done(struct xfs_ail *ailp,
                                        struct xfs_ail_cursor *cur);
 
-long   xfsaild_push(struct xfs_ail *, xfs_lsn_t *);
-void   xfsaild_wakeup(struct xfs_ail *, xfs_lsn_t);
-int    xfsaild_start(struct xfs_ail *);
-void   xfsaild_stop(struct xfs_ail *);
-
 #if BITS_PER_LONG != 64
 static inline void
 xfs_trans_ail_copy_lsn(
index c48b4217ec47f652b3769ce912969a46a2924101..b7a5fe7c52c895776f125d53851d40c48795dce7 100644 (file)
@@ -953,7 +953,7 @@ xfs_release(
                 * If we previously truncated this file and removed old data
                 * in the process, we want to initiate "early" writeout on
                 * the last close.  This is an attempt to combat the notorious
-                * NULL files problem which is particularly noticable from a
+                * NULL files problem which is particularly noticeable from a
                 * truncate down, buffered (re-)write (delalloc), followed by
                 * a crash.  What we are effectively doing here is
                 * significantly reducing the time window where we'd otherwise
@@ -982,7 +982,7 @@ xfs_release(
                 *
                 * Further, check if the inode is being opened, written and
                 * closed frequently and we have delayed allocation blocks
-                * oustanding (e.g. streaming writes from the NFS server),
+                * outstanding (e.g. streaming writes from the NFS server),
                 * truncating the blocks past EOF will cause fragmentation to
                 * occur.
                 *
index d41c94885211c351f33c724cf523dacacd5e4b6f..f1380287ed4d821474f58a39c372fca6cb5909a1 100644 (file)
@@ -290,7 +290,7 @@ struct acpi_table_fadt {
 #define ACPI_FADT_APIC_CLUSTER      (1<<18)    /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */
 #define ACPI_FADT_APIC_PHYSICAL     (1<<19)    /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */
 
-/* Values for preferred_profile (Prefered Power Management Profiles) */
+/* Values for preferred_profile (Preferred Power Management Profiles) */
 
 enum acpi_prefered_pm_profiles {
        PM_UNSPECIFIED = 0,
index f2d2faf4d9ae9379b420d65113d4f9c366d0a9da..e5a3f588000173d8e9da0f8ae00c98dc275d63b1 100644 (file)
@@ -194,6 +194,13 @@ extern void warn_slowpath_null(const char *file, const int line);
 #ifdef CONFIG_SMP
 # define WARN_ON_SMP(x)                        WARN_ON(x)
 #else
+/*
+ * Use of ({0;}) because WARN_ON_SMP(x) may be used either as
+ * a stand alone line statement or as a condition in an if ()
+ * statement.
+ * A simple "0" would cause gcc to give a "statement has no effect"
+ * warning.
+ */
 # define WARN_ON_SMP(x)                        ({0;})
 #endif
 
index 942d30b5aab15186cef7ca2709f362b4ea393176..0dd4e87f6fba9bb85dade657f99aa1fbafa2712f 100644 (file)
@@ -192,7 +192,7 @@ typedef struct siginfo {
  * SIGBUS si_codes
  */
 #define BUS_ADRALN     (__SI_FAULT|1)  /* invalid address alignment */
-#define BUS_ADRERR     (__SI_FAULT|2)  /* non-existant physical address */
+#define BUS_ADRERR     (__SI_FAULT|2)  /* non-existent physical address */
 #define BUS_OBJERR     (__SI_FAULT|3)  /* object specific hardware error */
 /* hardware memory error consumed on a machine check: action required */
 #define BUS_MCEERR_AR  (__SI_FAULT|4)
index 32c45e5fe0abfa4516fb3b56103b68b134b1d70c..bd297a20ab98786b4d2a1d08e3cbb53d87103351 100644 (file)
  * the sections that has this restriction (or similar)
  * is located before the ones requiring PAGE_SIZE alignment.
  * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which
- * matches the requirment of PAGE_ALIGNED_DATA.
+ * matches the requirement of PAGE_ALIGNED_DATA.
  *
  * use 0 as page_align if page_aligned data is not used */
 #define RW_DATA_SECTION(cacheline, pagealigned, inittask)              \
index ad5770f2315c73192aad0021df5cdbc8ac7269c1..202424d17ed7c1924ae5d26936369dc110564e44 100644 (file)
@@ -95,7 +95,7 @@ struct drm_device;
  * drm_core, drm_driver, drm_kms
  * drm_core level can be used in the generic drm code. For example:
  *     drm_ioctl, drm_mm, drm_memory
- * The macro definiton of DRM_DEBUG is used.
+ * The macro definition of DRM_DEBUG is used.
  *     DRM_DEBUG(fmt, args...)
  *     The debug info by using the DRM_DEBUG can be obtained by adding
  *     the boot option of "drm.debug=1".
@@ -808,7 +808,7 @@ struct drm_driver {
         *
         * \return Flags, or'ed together as follows:
         *
-        * DRM_SCANOUTPOS_VALID = Query successfull.
+        * DRM_SCANOUTPOS_VALID = Query successful.
         * DRM_SCANOUTPOS_INVBL = Inside vblank.
         * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of
         * this flag means that returned position may be offset by a constant
index 60edf9be31e57083c56d95484a0a2f3149e858db..d94684b7ba3462ab8e62a0460b3ca06bd3fe9662 100644 (file)
@@ -65,7 +65,7 @@ enum drm_mode_status {
     MODE_H_ILLEGAL,    /* mode has illegal horizontal timings */
     MODE_V_ILLEGAL,    /* mode has illegal horizontal timings */
     MODE_BAD_WIDTH,    /* requires an unsupported linepitch */
-    MODE_NOMODE,       /* no mode with a maching name */
+    MODE_NOMODE,       /* no mode with a matching name */
     MODE_NO_INTERLACE, /* interlaced mode not supported */
     MODE_NO_DBLESCAN,  /* doublescan mode not supported */
     MODE_NO_VSCAN,     /* multiscan mode not supported */
@@ -321,7 +321,7 @@ struct drm_crtc_funcs {
 
        /*
         * Flip to the given framebuffer.  This implements the page
-        * flip ioctl descibed in drm_mode.h, specifically, the
+        * flip ioctl described in drm_mode.h, specifically, the
         * implementation must return immediately and block all
         * rendering to the current fb until the flip has completed.
         * If userspace set the event flag in the ioctl, the event
@@ -778,6 +778,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
                                    void *data, struct drm_file *file_priv);
 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
                                    void *data, struct drm_file *file_priv);
+extern u8 *drm_find_cea_extension(struct edid *edid);
 extern bool drm_detect_hdmi_monitor(struct edid *edid);
 extern bool drm_detect_monitor_audio(struct edid *edid);
 extern int drm_mode_page_flip_ioctl(struct drm_device *dev,
index f22e7fe4b6dbf25815580ad3625fd09f5aed3946..ade09d7b427100da6057cb04c7e43d484c84ac25 100644 (file)
@@ -118,6 +118,7 @@ int drm_fb_helper_setcolreg(unsigned regno,
                            unsigned transp,
                            struct fb_info *info);
 
+bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper);
 void drm_fb_helper_restore(void);
 void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
                            uint32_t fb_width, uint32_t fb_height);
index b1e7809e5e15a856546cf8236568a80ddc7a26c4..c2f93a8ae2e14b414bc6976c811f92406f7c4557 100644 (file)
@@ -56,7 +56,7 @@ struct drm_mm_node {
 };
 
 struct drm_mm {
-       /* List of all memory nodes that immediatly preceed a free hole. */
+       /* List of all memory nodes that immediately precede a free hole. */
        struct list_head hole_stack;
        /* head_node.node_list is the list of all memory nodes, ordered
         * according to the (increasing) start address of the memory node. */
index ae6b7a3dbec7d4dee58bd32181487c9776de07d2..c4961ea50a494b69d996873e09e8e509956660c0 100644 (file)
@@ -277,7 +277,7 @@ struct drm_mode_mode_cmd {
 #define DRM_MODE_CURSOR_MOVE   (1<<1)
 
 /*
- * depending on the value in flags diffrent members are used.
+ * depending on the value in flags different members are used.
  *
  * CURSOR_BO uses
  *    crtc
index 820ee9029482125ca6fbb8c25348a0fc19e7240a..f04b2a3b0f49b7117cb74163af0997a7a6fd4742 100644 (file)
        {0x1002, 0x6719, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x671c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x671d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x671f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAYMAN|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6721, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6722, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6729, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6739, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x673e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BARTS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6740, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6741, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6742, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x688D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x689b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x689d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x689e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x68b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x68b8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x68b9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x68ba, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x68bf, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x68c7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
        {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
        {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+       {0x1002, 0x9806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+       {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
        {0, 0, 0}
 
 #define r128_PCI_IDS \
index c16097f99be090f557d21405f8eeee1446be0324..fca817009e13f7f4da7898a7834d4613d3a9138c 100644 (file)
  */
 #define MGA_NR_SAREA_CLIPRECTS 8
 
-/* 2 heaps (1 for card, 1 for agp), each divided into upto 128
+/* 2 heaps (1 for card, 1 for agp), each divided into up to 128
  * regions, subject to a minimum region size of (1<<16) == 64k.
  *
  * Clients may subdivide regions internally, but when sharing between
index 3dec41cf834251cab5b12d6337431894c2da21c6..787f7b6fd62237683eb5dad3ecbd77958128f3f1 100644 (file)
@@ -641,7 +641,7 @@ typedef struct drm_radeon_vertex2 {
 } drm_radeon_vertex2_t;
 
 /* v1.3 - obsoletes drm_radeon_vertex2
- *      - allows arbitarily large cliprect list
+ *      - allows arbitrarily large cliprect list
  *      - allows updating of tcl packet, vector and scalar state
  *      - allows memory-efficient description of state updates
  *      - allows state to be emitted without a primitive
@@ -909,6 +909,8 @@ struct drm_radeon_cs {
 #define RADEON_INFO_WANT_CMASK         0x08 /* get access to CMASK on r300 */
 #define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */
 #define RADEON_INFO_NUM_BACKENDS       0x0a /* DB/backends for r600+ - need for OQ */
+#define RADEON_INFO_NUM_TILE_PIPES     0x0b /* tile pipes for r600+ */
+#define RADEON_INFO_FUSION_GART_WORKING        0x0c /* fusion writes to GTT were broken before this */
 
 struct drm_radeon_info {
        uint32_t                request;
index 4863cf6bf96fb23c96d3eab9d7cde5d794fe89bc..818d49be2e6e40f3a0c81ec11118563299294ff1 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef __SAVAGE_SAREA_DEFINES__
 #define __SAVAGE_SAREA_DEFINES__
 
-/* 2 heaps (1 for card, 1 for agp), each divided into upto 128
+/* 2 heaps (1 for card, 1 for agp), each divided into up to 128
  * regions, subject to a minimum region size of (1<<16) == 64k.
  *
  * Clients may subdivide regions internally, but when sharing between
index 50852aad260a2854a9e5bd0f9e9daffb1fc4ae7b..62a0e4c4ceee3354ca322900944ea21c6f027563 100644 (file)
@@ -50,10 +50,10 @@ struct drm_mm_node;
  *
  * @fpfn:              first valid page frame number to put the object
  * @lpfn:              last valid page frame number to put the object
- * @num_placement:     number of prefered placements
- * @placement:         prefered placements
- * @num_busy_placement:        number of prefered placements when need to evict buffer
- * @busy_placement:    prefered placements when need to evict buffer
+ * @num_placement:     number of preferred placements
+ * @placement:         preferred placements
+ * @num_busy_placement:        number of preferred placements when need to evict buffer
+ * @busy_placement:    preferred placements when need to evict buffer
  *
  * Structure indicating the placement you request for an object.
  */
@@ -158,9 +158,9 @@ struct ttm_tt;
  * the object is destroyed.
  * @event_queue: Queue for processes waiting on buffer object status change.
  * @mem: structure describing current placement.
- * @persistant_swap_storage: Usually the swap storage is deleted for buffers
+ * @persistent_swap_storage: Usually the swap storage is deleted for buffers
  * pinned in physical memory. If this behaviour is not desired, this member
- * holds a pointer to a persistant shmem object.
+ * holds a pointer to a persistent shmem object.
  * @ttm: TTM structure holding system pages.
  * @evicted: Whether the object was evicted without user-space knowing.
  * @cpu_writes: For synchronization. Number of cpu writers.
@@ -221,7 +221,7 @@ struct ttm_buffer_object {
         */
 
        struct ttm_mem_reg mem;
-       struct file *persistant_swap_storage;
+       struct file *persistent_swap_storage;
        struct ttm_tt *ttm;
        bool evicted;
 
@@ -459,9 +459,9 @@ extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo);
  * user buffer object.
  * @interruptible: If needing to sleep to wait for GPU resources,
  * sleep interruptible.
- * @persistant_swap_storage: Usually the swap storage is deleted for buffers
+ * @persistent_swap_storage: Usually the swap storage is deleted for buffers
  * pinned in physical memory. If this behaviour is not desired, this member
- * holds a pointer to a persistant shmem object. Typically, this would
+ * holds a pointer to a persistent shmem object. Typically, this would
  * point to the shmem object backing a GEM object if TTM is used to back a
  * GEM user interface.
  * @acc_size: Accounted size for this object.
@@ -490,7 +490,7 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev,
                        uint32_t page_alignment,
                        unsigned long buffer_start,
                        bool interrubtible,
-                       struct file *persistant_swap_storage,
+                       struct file *persistent_swap_storage,
                        size_t acc_size,
                        void (*destroy) (struct ttm_buffer_object *));
 /**
@@ -506,9 +506,9 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev,
  * user buffer object.
  * @interruptible: If needing to sleep while waiting for GPU resources,
  * sleep interruptible.
- * @persistant_swap_storage: Usually the swap storage is deleted for buffers
+ * @persistent_swap_storage: Usually the swap storage is deleted for buffers
  * pinned in physical memory. If this behaviour is not desired, this member
- * holds a pointer to a persistant shmem object. Typically, this would
+ * holds a pointer to a persistent shmem object. Typically, this would
  * point to the shmem object backing a GEM object if TTM is used to back a
  * GEM user interface.
  * @p_bo: On successful completion *p_bo points to the created object.
@@ -528,7 +528,7 @@ extern int ttm_bo_create(struct ttm_bo_device *bdev,
                                uint32_t page_alignment,
                                unsigned long buffer_start,
                                bool interruptible,
-                               struct file *persistant_swap_storage,
+                               struct file *persistent_swap_storage,
                                struct ttm_buffer_object **p_bo);
 
 /**
index efed0820d9fa8458671745699f44b732616baa8d..09af2d746d1c0fbf5a38555c9447f153e630c30c 100644 (file)
@@ -122,7 +122,7 @@ struct ttm_backend {
 #define TTM_PAGE_FLAG_USER_DIRTY      (1 << 2)
 #define TTM_PAGE_FLAG_WRITE           (1 << 3)
 #define TTM_PAGE_FLAG_SWAPPED         (1 << 4)
-#define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5)
+#define TTM_PAGE_FLAG_PERSISTENT_SWAP (1 << 5)
 #define TTM_PAGE_FLAG_ZERO_ALLOC      (1 << 6)
 #define TTM_PAGE_FLAG_DMA32           (1 << 7)
 
@@ -223,9 +223,9 @@ struct ttm_mem_type_manager_func {
         * @mem::mm_node should be set to a non-null value, and
         * @mem::start should be set to a value identifying the beginning
         * of the range allocated, and the function should return zero.
-        * If the memory region accomodate the buffer object, @mem::mm_node
+        * If the memory region accommodate the buffer object, @mem::mm_node
         * should be set to NULL, and the function should return 0.
-        * If a system error occured, preventing the request to be fulfilled,
+        * If a system error occurred, preventing the request to be fulfilled,
         * the function should return a negative error code.
         *
         * Note that @mem::mm_node will only be dereferenced by
@@ -714,7 +714,7 @@ extern void ttm_tt_cache_flush(struct page *pages[], unsigned long num_pages);
  */
 extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement);
 extern int ttm_tt_swapout(struct ttm_tt *ttm,
-                         struct file *persistant_swap_storage);
+                         struct file *persistent_swap_storage);
 
 /*
  * ttm_bo.c
@@ -841,7 +841,7 @@ extern void ttm_mem_io_unlock(struct ttm_mem_type_manager *man);
  * different order, either by will or as a result of a buffer being evicted
  * to make room for a buffer already reserved. (Buffers are reserved before
  * they are evicted). The following algorithm prevents such deadlocks from
- * occuring:
+ * occurring:
  * 1) Buffers are reserved with the lru spinlock held. Upon successful
  * reservation they are removed from the lru list. This stops a reserved buffer
  * from being evicted. However the lru spinlock is released between the time
index 650e6bf6f69f101999d0294497458c3d5100e55f..5c36432d9ce5639f2105f52be5b911cd2ab29819 100644 (file)
@@ -592,7 +592,7 @@ struct drm_vmw_stream_arg {
 /**
  * DRM_VMW_UPDATE_LAYOUT - Update layout
  *
- * Updates the prefered modes and connection status for connectors. The
+ * Updates the preferred modes and connection status for connectors. The
  * command conisits of one drm_vmw_update_layout_arg pointing out a array
  * of num_outputs drm_vmw_rect's.
  */
index 24d26efd1432606813b969d2ecd3dbfcb7ee0cda..e82e3ee2c54abf368f3e3d5cd30908156c863479 100644 (file)
@@ -136,7 +136,7 @@ struct clcd_board {
        int     (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var);
 
        /*
-        * Compulsary.  Decode fb->fb.var into regs->*.  In the case of
+        * Compulsory.  Decode fb->fb.var into regs->*.  In the case of
         * fixed timing, set regs->* to the register values required.
         */
        void    (*decode)(struct clcd_fb *fb, struct clcd_regs *regs);
index f60227088b7b88f273a9f84a25c06e0e303a4a15..21114810c7c0b687afa01f188e50d99bdbdafecb 100644 (file)
@@ -30,15 +30,15 @@ struct dma_chan;
  * @cd_invert: true if the gpio_cd pin value is active low
  * @capabilities: the capabilities of the block as implemented in
  * this platform, signify anything MMC_CAP_* from mmc/host.h
- * @dma_filter: function used to select an apropriate RX and TX
+ * @dma_filter: function used to select an appropriate RX and TX
  * DMA channel to be used for DMA, if and only if you're deploying the
  * generic DMA engine
  * @dma_rx_param: parameter passed to the DMA allocation
- * filter in order to select an apropriate RX channel. If
+ * filter in order to select an appropriate RX channel. If
  * there is a bidirectional RX+TX channel, then just specify
  * this and leave dma_tx_param set to NULL
  * @dma_tx_param: parameter passed to the DMA allocation
- * filter in order to select an apropriate TX channel. If this
+ * filter in order to select an appropriate TX channel. If this
  * is NULL the driver will attempt to use the RX channel as a
  * bidirectional channel
  */
index e612575a259683c2429cd2d1b46a1cc9671d8141..b4326bfa684f24c3ad147de3cb7d63a9f066da80 100644 (file)
@@ -23,11 +23,11 @@ static inline void bit_spin_lock(int bitnum, unsigned long *addr)
        preempt_disable();
 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
        while (unlikely(test_and_set_bit_lock(bitnum, addr))) {
-               while (test_bit(bitnum, addr)) {
-                       preempt_enable();
+               preempt_enable();
+               do {
                        cpu_relax();
-                       preempt_disable();
-               }
+               } while (test_bit(bitnum, addr));
+               preempt_disable();
        }
 #endif
        __acquire(bitlock);
index 16a902f099ac0ee7b1f64c4322c6255a82aa0e09..2ad95fa1d130f8c8f5cfd68e5fe7a0108aec31d9 100644 (file)
@@ -388,20 +388,19 @@ struct request_queue
 #define        QUEUE_FLAG_SYNCFULL     3       /* read queue has been filled */
 #define QUEUE_FLAG_ASYNCFULL   4       /* write queue has been filled */
 #define QUEUE_FLAG_DEAD                5       /* queue being torn down */
-#define QUEUE_FLAG_REENTER     6       /* Re-entrancy avoidance */
-#define QUEUE_FLAG_ELVSWITCH   7       /* don't use elevator, just do FIFO */
-#define QUEUE_FLAG_BIDI                8       /* queue supports bidi requests */
-#define QUEUE_FLAG_NOMERGES     9      /* disable merge attempts */
-#define QUEUE_FLAG_SAME_COMP   10      /* force complete on same CPU */
-#define QUEUE_FLAG_FAIL_IO     11      /* fake timeout */
-#define QUEUE_FLAG_STACKABLE   12      /* supports request stacking */
-#define QUEUE_FLAG_NONROT      13      /* non-rotational device (SSD) */
+#define QUEUE_FLAG_ELVSWITCH   6       /* don't use elevator, just do FIFO */
+#define QUEUE_FLAG_BIDI                7       /* queue supports bidi requests */
+#define QUEUE_FLAG_NOMERGES     8      /* disable merge attempts */
+#define QUEUE_FLAG_SAME_COMP   9       /* force complete on same CPU */
+#define QUEUE_FLAG_FAIL_IO     10      /* fake timeout */
+#define QUEUE_FLAG_STACKABLE   11      /* supports request stacking */
+#define QUEUE_FLAG_NONROT      12      /* non-rotational device (SSD) */
 #define QUEUE_FLAG_VIRT        QUEUE_FLAG_NONROT /* paravirt device */
-#define QUEUE_FLAG_IO_STAT     15      /* do IO stats */
-#define QUEUE_FLAG_DISCARD     16      /* supports DISCARD */
-#define QUEUE_FLAG_NOXMERGES   17      /* No extended merges */
-#define QUEUE_FLAG_ADD_RANDOM  18      /* Contributes to random pool */
-#define QUEUE_FLAG_SECDISCARD  19      /* supports SECDISCARD */
+#define QUEUE_FLAG_IO_STAT     13      /* do IO stats */
+#define QUEUE_FLAG_DISCARD     14      /* supports DISCARD */
+#define QUEUE_FLAG_NOXMERGES   15      /* No extended merges */
+#define QUEUE_FLAG_ADD_RANDOM  16      /* Contributes to random pool */
+#define QUEUE_FLAG_SECDISCARD  17      /* supports SECDISCARD */
 
 #define QUEUE_FLAG_DEFAULT     ((1 << QUEUE_FLAG_IO_STAT) |            \
                                 (1 << QUEUE_FLAG_STACKABLE)    |       \
@@ -697,8 +696,9 @@ extern void blk_start_queue(struct request_queue *q);
 extern void blk_stop_queue(struct request_queue *q);
 extern void blk_sync_queue(struct request_queue *q);
 extern void __blk_stop_queue(struct request_queue *q);
-extern void __blk_run_queue(struct request_queue *q, bool force_kblockd);
+extern void __blk_run_queue(struct request_queue *q);
 extern void blk_run_queue(struct request_queue *);
+extern void blk_run_queue_async(struct request_queue *q);
 extern int blk_rq_map_user(struct request_queue *, struct request *,
                           struct rq_map_data *, void __user *, unsigned long,
                           gfp_t);
@@ -857,26 +857,39 @@ extern void blk_put_queue(struct request_queue *);
 struct blk_plug {
        unsigned long magic;
        struct list_head list;
+       struct list_head cb_list;
        unsigned int should_sort;
 };
+struct blk_plug_cb {
+       struct list_head list;
+       void (*callback)(struct blk_plug_cb *);
+};
 
 extern void blk_start_plug(struct blk_plug *);
 extern void blk_finish_plug(struct blk_plug *);
-extern void __blk_flush_plug(struct task_struct *, struct blk_plug *);
+extern void blk_flush_plug_list(struct blk_plug *, bool);
 
 static inline void blk_flush_plug(struct task_struct *tsk)
 {
        struct blk_plug *plug = tsk->plug;
 
-       if (unlikely(plug))
-               __blk_flush_plug(tsk, plug);
+       if (plug)
+               blk_flush_plug_list(plug, false);
+}
+
+static inline void blk_schedule_flush_plug(struct task_struct *tsk)
+{
+       struct blk_plug *plug = tsk->plug;
+
+       if (plug)
+               blk_flush_plug_list(plug, true);
 }
 
 static inline bool blk_needs_flush_plug(struct task_struct *tsk)
 {
        struct blk_plug *plug = tsk->plug;
 
-       return plug && !list_empty(&plug->list);
+       return plug && (!list_empty(&plug->list) || !list_empty(&plug->cb_list));
 }
 
 /*
@@ -1206,6 +1219,7 @@ struct blk_integrity {
        struct kobject          kobj;
 };
 
+extern bool blk_integrity_is_initialized(struct gendisk *);
 extern int blk_integrity_register(struct gendisk *, struct blk_integrity *);
 extern void blk_integrity_unregister(struct gendisk *);
 extern int blk_integrity_compare(struct gendisk *, struct gendisk *);
@@ -1262,6 +1276,7 @@ queue_max_integrity_segments(struct request_queue *q)
 #define queue_max_integrity_segments(a)                (0)
 #define blk_integrity_merge_rq(a, b, c)                (0)
 #define blk_integrity_merge_bio(a, b, c)       (0)
+#define blk_integrity_is_initialized(a)                (0)
 
 #endif /* CONFIG_BLK_DEV_INTEGRITY */
 
@@ -1312,6 +1327,11 @@ static inline void blk_flush_plug(struct task_struct *task)
 {
 }
 
+static inline void blk_schedule_flush_plug(struct task_struct *task)
+{
+}
+
+
 static inline bool blk_needs_flush_plug(struct task_struct *tsk)
 {
        return false;
index d4127fd9e6810c5005197488d12112ff4e4afb46..5958074302a4cc62323becf016222ddeeb17d40b 100644 (file)
@@ -51,7 +51,7 @@
 #define CAN_ERR_PROT_BIT1        0x10 /* unable to send recessive bit */
 #define CAN_ERR_PROT_OVERLOAD    0x20 /* bus overload */
 #define CAN_ERR_PROT_ACTIVE      0x40 /* active error announcement */
-#define CAN_ERR_PROT_TX          0x80 /* error occured on transmission */
+#define CAN_ERR_PROT_TX          0x80 /* error occurred on transmission */
 
 /* error in CAN protocol (location) / data[3] */
 #define CAN_ERR_PROT_LOC_UNSPEC  0x00 /* unspecified */
index 3250de935e1a95522c48c4f48e9f753dc37fc72e..34542d374dd8609b0e9f893b44ac368d025d7253 100644 (file)
@@ -17,7 +17,7 @@
 /*
  * CAN bit-timing parameters
  *
- * For futher information, please read chapter "8 BIT TIMING
+ * For further information, please read chapter "8 BIT TIMING
  * REQUIREMENTS" of the "Bosch CAN Specification version 2.0"
  * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf.
  */
index 8e20540043f55dfffc4b2096ceee6ca817e994df..089fe43211a492ec8258256b63a07a90ca2660b7 100644 (file)
@@ -12,6 +12,7 @@
 /**
  * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
  * @oscillator_frequency:       - oscillator frequency in Hz
+ * @irq_flags:                  - IRQF configuration flags
  * @board_specific_setup:       - called before probing the chip (power,reset)
  * @transceiver_enable:         - called to power on/off the transceiver
  * @power_enable:               - called to power on/off the mcp *and* the
@@ -24,6 +25,7 @@
 
 struct mcp251x_platform_data {
        unsigned long oscillator_frequency;
+       unsigned long irq_flags;
        int (*board_specific_setup)(struct spi_device *spi);
        int (*transceiver_enable)(int enable);
        int (*power_enable) (int enable);
index 0908daf7bf56ffe63ec0bbe3e731b79e11d8bd8a..80093a8d4f64e51fb191295830001b414fec2fb4 100644 (file)
@@ -149,7 +149,7 @@ typedef struct cdkhdr {
 /*
  *     Define the memory mapping structure. This structure is pointed to by
  *     the memp field in the stlcdkhdr struct. As many as these structures
- *     as required are layed out in shared memory to define how the rest of
+ *     as required are laid out in shared memory to define how the rest of
  *     shared memory is divided up. There will be one for each port.
  */
 typedef struct cdkmem {
index 6f9f19d665910e86a4732e2c581fee53b016cc96..b454dfce60d9070b7ddc0d286820738c42fcafe3 100644 (file)
@@ -44,7 +44,7 @@ extern unsigned char * cfag12864b_buffer;
 /*
  * Get the refresh rate of the LCD
  *
- * Returns the refresh rate (hertzs).
+ * Returns the refresh rate (hertz).
  */
 extern unsigned int cfag12864b_getrate(void);
 
index e654fa239916e691c24317d43fc88aea5fef571a..5ac7ebc36dbb335604acfa74007a325fc0c7d658 100644 (file)
@@ -240,7 +240,7 @@ struct cgroup {
        /* For RCU-protected deletion */
        struct rcu_head rcu_head;
 
-       /* List of events which userspace want to recieve */
+       /* List of events which userspace want to receive */
        struct list_head event_list;
        spinlock_t event_list_lock;
 };
index 72bfefdbd7677e32c546b66a72b638c1558729a1..3c4aac406175d6d21438643be35dcc78a2a23e49 100644 (file)
@@ -20,7 +20,7 @@ typedef struct atreq {
 } atreq_t;
 
 
-/* what is particularly stupid in the original driver is the arch-dependant
+/* what is particularly stupid in the original driver is the arch-dependent
  * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace
  * will lay out the structure members differently than the 64bit kernel.
  *
index ddb7a97c78c25c1cf93a8302d79aa7f00d5e67a2..645778ad899b275977c84702a1adf991e0459e1a 100644 (file)
@@ -218,7 +218,7 @@ static ssize_t _item##_attr_store(struct config_item *item,         \
  * group children.  default_groups may coexist alongsize make_group() or
  * make_item(), but if the group wishes to have only default_groups
  * children (disallowing mkdir(2)), it need not provide either function.
- * If the group has commit(), it supports pending and commited (active)
+ * If the group has commit(), it supports pending and committed (active)
  * items.
  */
 struct configfs_item_operations {
index 372a25839fd181be11b631849ffc627b37bb93ec..c23049496531c2670a07c101c0a6c60c3dc572f7 100644 (file)
@@ -310,7 +310,7 @@ struct cper_sec_proc_ia {
        __u8    cpuid[48];
 };
 
-/* IA32/X64 Processor Error Infomation Structure */
+/* IA32/X64 Processor Error Information Structure */
 struct cper_ia_err_info {
        uuid_le err_type;
        __u64   validation_bits;
index f2afed4fa9454776c79611d52755121dff749342..19d90a55541d99c37ea6d6c78040b9979dc38116 100644 (file)
@@ -197,7 +197,7 @@ struct dentry_operations {
       * typically using d_splice_alias. */
 
 #define DCACHE_REFERENCED      0x0008  /* Recently used, don't discard. */
-#define DCACHE_UNHASHED                0x0010  
+#define DCACHE_RCUACCESS       0x0010  /* Entry has ever been RCU-visible */
 #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020
      /* Parent inode is watched by inotify */
 
@@ -384,7 +384,7 @@ extern struct dentry *dget_parent(struct dentry *dentry);
  
 static inline int d_unhashed(struct dentry *dentry)
 {
-       return (dentry->d_flags & DCACHE_UNHASHED);
+       return hlist_bl_unhashed(&dentry->d_hash);
 }
 
 static inline int d_unlinked(struct dentry *dentry)
index 4cb72b920c74d39ed5a480e6d7a40dfac8266242..7925bf0ee83627e8b58fb7bc895c04f27e858772 100644 (file)
@@ -16,7 +16,7 @@
 
 /*
  * Some architectures want to ensure there is no local data in their
- * pre-boot environment, so that data can arbitarily relocated (via
+ * pre-boot environment, so that data can arbitrarily relocated (via
  * GOT references).  This is achieved by defining STATIC_RW_DATA to
  * be null.
  */
index e2768834f39775f4baeae6e5e9316b64184a823c..32a4423710f51e54045413415a53b6b8cd0afd56 100644 (file)
@@ -197,7 +197,6 @@ struct dm_target {
 struct dm_target_callbacks {
        struct list_head list;
        int (*congested_fn) (struct dm_target_callbacks *, int);
-       void (*unplug_fn)(struct dm_target_callbacks *);
 };
 
 int dm_register_target(struct target_type *t);
index 9bebd7f16ef1468f36438047f2ef58f8beb363dd..eee7addec28269c2dabd3d6901941bcc7eeeecc4 100644 (file)
@@ -434,7 +434,7 @@ struct dma_tx_state {
  *     zero or error code
  * @device_tx_status: poll for transaction completion, the optional
  *     txstate parameter can be supplied with a pointer to get a
- *     struct with auxilary transfer status information, otherwise the call
+ *     struct with auxiliary transfer status information, otherwise the call
  *     will just return a simple status code
  * @device_issue_pending: push pending transactions to hardware
  */
index d18d673ebc78e90a617670c80ca93e0f854ed70f..cec467f5d6768ae92f958058ab93f20edba28ec6 100644 (file)
@@ -36,7 +36,7 @@
 #include <sys/wait.h>
 #include <limits.h>
 
-/* Altough the Linux source code makes a difference between
+/* Although the Linux source code makes a difference between
    generic endianness and the bitfields' endianness, there is no
    architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness
    does not match the generic endianness. */
@@ -184,7 +184,7 @@ enum drbd_conns {
        /* These temporal states are all used on the way
         * from >= C_CONNECTED to Unconnected.
         * The 'disconnect reason' states
-        * I do not allow to change beween them. */
+        * I do not allow to change between them. */
        C_TIMEOUT,
        C_BROKEN_PIPE,
        C_NETWORK_FAILURE,
index bb264a5732de7257727d66caeea01c13927e4790..246f576c981d67c2d5430d036c0f39bab88b12f4 100644 (file)
@@ -43,7 +43,7 @@
 
 /* net { */
   /* timeout, unit centi seconds
-   * more than one minute timeout is not usefull */
+   * more than one minute timeout is not useful */
 #define DRBD_TIMEOUT_MIN 1
 #define DRBD_TIMEOUT_MAX 600
 #define DRBD_TIMEOUT_DEF 60       /* 6 seconds */
@@ -68,7 +68,7 @@
 #define DRBD_MAX_EPOCH_SIZE_MAX 20000
 #define DRBD_MAX_EPOCH_SIZE_DEF 2048
 
-  /* I don't think that a tcp send buffer of more than 10M is usefull */
+  /* I don't think that a tcp send buffer of more than 10M is useful */
 #define DRBD_SNDBUF_SIZE_MIN  0
 #define DRBD_SNDBUF_SIZE_MAX  (10<<20)
 #define DRBD_SNDBUF_SIZE_DEF  0
 #define DRBD_RATE_MAX (4 << 20)
 #define DRBD_RATE_DEF 250  /* kb/second */
 
-  /* less than 7 would hit performance unneccessarily.
+  /* less than 7 would hit performance unnecessarily.
    * 3833 is the largest prime that still does fit
    * into 64 sectors of activity log */
 #define DRBD_AL_EXTENTS_MIN  7
index d93efcc4457050ffa1e511a825c273f60796ed69..21a8ebf2dc3a2ab5a899077beaad61aa3e6e4f80 100644 (file)
@@ -101,7 +101,6 @@ extern void elv_dispatch_sort(struct request_queue *, struct request *);
 extern void elv_dispatch_add_tail(struct request_queue *, struct request *);
 extern void elv_add_request(struct request_queue *, struct request *, int);
 extern void __elv_add_request(struct request_queue *, struct request *, int);
-extern void elv_insert(struct request_queue *, struct request *, int);
 extern int elv_merge(struct request_queue *, struct request **, struct bio *);
 extern int elv_try_merge(struct request *, struct bio *);
 extern void elv_merge_requests(struct request_queue *, struct request *,
index c8fcbdd2b0e77a8f88b34711dab9703a7d160ecb..dc80d8294247753d6a2b134effd1b014398549c5 100644 (file)
@@ -614,7 +614,7 @@ struct ethtool_sfeatures {
  * values of corresponding bits in features[].requested. Bits in .requested
  * not set in .valid or not changeable are ignored.
  *
- * Returns %EINVAL when .valid contains undefined or never-changable bits
+ * Returns %EINVAL when .valid contains undefined or never-changeable bits
  * or size is not equal to required number of features words (32-bit blocks).
  * Returns >= 0 if request was completed; bits set in the value mean:
  *   %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not
index f6856a5a1d4bfded1dd4deff2828b6c9082815b8..f362733186a5a6f4a1657b0a85ee32e158095ed2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  include/linux/eventpoll.h ( Efficent event polling implementation )
+ *  include/linux/eventpoll.h ( Efficient event polling implementation )
  *  Copyright (C) 2001,...,2006         Davide Libenzi
  *
  *  This program is free software; you can redistribute it and/or modify
index 33a42f24b2757a6da1b11a10cd50040bc583473f..3a4cef5322dcab4d6b50b96243fa7187b2da1ebd 100644 (file)
@@ -120,7 +120,7 @@ struct fid {
  * encode_fh:
  *    @encode_fh should store in the file handle fragment @fh (using at most
  *    @max_len bytes) information that can be used by @decode_fh to recover the
- *    file refered to by the &struct dentry @de.  If the @connectable flag is
+ *    file referred to by the &struct dentry @de.  If the @connectable flag is
  *    set, the encode_fh() should store sufficient information so that a good
  *    attempt can be made to find not only the file but also it's place in the
  *    filesystem.   This typically means storing a reference to de->d_parent in
index b2a36391d2a1ef5373791322c1fa9bf30b7e020c..df728c1c29ed39c0b25a8ead2fcc0f89696c911f 100644 (file)
@@ -534,14 +534,14 @@ struct fb_cursor_user {
 #define FB_EVENT_GET_CONSOLE_MAP        0x07
 /*      CONSOLE-SPECIFIC: set console to framebuffer mapping */
 #define FB_EVENT_SET_CONSOLE_MAP        0x08
-/*      A hardware display blank change occured */
+/*      A hardware display blank change occurred */
 #define FB_EVENT_BLANK                  0x09
 /*      Private modelist is to be replaced */
 #define FB_EVENT_NEW_MODELIST           0x0A
 /*     The resolution of the passed in fb_info about to change and
         all vc's should be changed         */
 #define FB_EVENT_MODE_CHANGE_ALL       0x0B
-/*     A software display blank change occured */
+/*     A software display blank change occurred */
 #define FB_EVENT_CONBLANK               0x0C
 /*      Get drawing requirements        */
 #define FB_EVENT_GET_REQ                0x0D
@@ -805,7 +805,7 @@ struct fb_tile_ops {
 /* A driver may set this flag to indicate that it does want a set_par to be
  * called every time when fbcon_switch is executed. The advantage is that with
  * this flag set you can really be sure that set_par is always called before
- * any of the functions dependant on the correct hardware state or altering
+ * any of the functions dependent on the correct hardware state or altering
  * that state, even if you are using some broken X releases. The disadvantage
  * is that it introduces unwanted delays to every console switch if set_par
  * is slow. It is a good idea to try this flag in the drivers initialization
@@ -877,7 +877,7 @@ struct fb_info {
        void *fbcon_par;                /* fbcon use-only private area */
        /* From here on everything is device dependent */
        void *par;
-       /* we need the PCI or similiar aperture base/size not
+       /* we need the PCI or similar aperture base/size not
           smem_start/size as smem_start may just be an object
           allocated inside the aperture so may not actually overlap */
        struct apertures_struct {
index 59ea406be7f687f752d2626ab7082d9e9d26a579..4ff09889c5c0a5db673e607cacd732c8b891762d 100644 (file)
@@ -900,7 +900,7 @@ struct fw_cdev_get_cycle_timer2 {
 
 /**
  * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth
- * @closure:   Passed back to userspace in correponding iso resource events
+ * @closure:   Passed back to userspace in corresponding iso resource events
  * @channels:  Isochronous channels of which one is to be (de)allocated
  * @bandwidth: Isochronous bandwidth units to be (de)allocated
  * @handle:    Handle to the allocation, written by the kernel (only valid in
index 70e4efabe0fb6983ed9524f4ade4e5d91e2ce2d0..ebeb2f3ad068db1ec6d8cee92a1bcfb6cd097630 100644 (file)
@@ -61,7 +61,7 @@ struct flex_array {
 struct flex_array *flex_array_alloc(int element_size, unsigned int total,
                gfp_t flags);
 int flex_array_prealloc(struct flex_array *fa, unsigned int start,
-               unsigned int end, gfp_t flags);
+               unsigned int nr_elements, gfp_t flags);
 void flex_array_free(struct flex_array *fa);
 void flex_array_free_parts(struct flex_array *fa);
 int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src,
index 52f283c1edb294c2457fd449a26004db09953753..dbd860af08041bbaa5e333104aaa3ab0849cb676 100644 (file)
@@ -465,7 +465,7 @@ struct iattr {
        struct timespec ia_ctime;
 
        /*
-        * Not an attribute, but an auxilary info for filesystems wanting to
+        * Not an attribute, but an auxiliary info for filesystems wanting to
         * implement an ftruncate() like method.  NOTE: filesystem should
         * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL).
         */
@@ -613,6 +613,8 @@ struct address_space_operations {
        int (*error_remove_page)(struct address_space *, struct page *);
 };
 
+extern const struct address_space_operations empty_aops;
+
 /*
  * pagecache_write_begin/pagecache_write_end must be used by general code
  * to write into the pagecache.
@@ -647,7 +649,7 @@ struct address_space {
 } __attribute__((aligned(sizeof(long))));
        /*
         * On most architectures that alignment is already the case; but
-        * must be enforced here for CRIS, to let the least signficant bit
+        * must be enforced here for CRIS, to let the least significant bit
         * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON.
         */
 
index b8581c09d19f96a5551d0b60a96ac3ee9004df3e..76427e688d1581f590478fcf8447a4443223901f 100644 (file)
@@ -236,7 +236,7 @@ struct fscache_cache_ops {
        /* unpin an object in the cache */
        void (*unpin_object)(struct fscache_object *object);
 
-       /* store the updated auxilliary data on an object */
+       /* store the updated auxiliary data on an object */
        void (*update_object)(struct fscache_object *object);
 
        /* discard the resources pinned by an object and effect retirement if
index ec0dad5ab90f13f527db648e2fef41d6481d97e2..7c4d72f5581f34ec81580edf108810e4319285e5 100644 (file)
@@ -102,9 +102,9 @@ struct fscache_cookie_def {
         */
        void (*get_attr)(const void *cookie_netfs_data, uint64_t *size);
 
-       /* get the auxilliary data from netfs data
+       /* get the auxiliary data from netfs data
         * - this function can be absent if the index carries no state data
-        * - should store the auxilliary data in the buffer
+        * - should store the auxiliary data in the buffer
         * - should return the amount of amount stored
         * - not permitted to return an error
         * - the netfs data from the cookie being used as the source is
@@ -117,7 +117,7 @@ struct fscache_cookie_def {
        /* consult the netfs about the state of an object
         * - this function can be absent if the index carries no state data
         * - the netfs data from the cookie being used as the target is
-        *   presented, as is the auxilliary data
+        *   presented, as is the auxiliary data
         */
        enum fscache_checkaux (*check_aux)(void *cookie_netfs_data,
                                           const void *data,
index bb29bb1dbd2fd0542a8bdd909c604cfeaf06b764..42f7e2fb501ffd5f85e39d4275491039d30a12ee 100644 (file)
@@ -799,7 +799,7 @@ static inline int __must_check hid_parse(struct hid_device *hdev)
  *
  * Call this in probe function *after* hid_parse. This will setup HW buffers
  * and start the device (if not deffered to device open). hid_hw_stop must be
- * called if this was successfull.
+ * called if this was successful.
  */
 static inline int __must_check hid_hw_start(struct hid_device *hdev,
                unsigned int connect_mask)
index 9db3d454887f1b14be3492fd0a0fae18e678a22f..d392975d888704b4c6854f1ebea948d436736265 100644 (file)
@@ -101,7 +101,7 @@ int hp_sdc_dequeue_transaction(hp_sdc_transaction *this);
 #define HP_SDC_STATUS_REG      0x40    /* Data from an i8042 register */
 #define HP_SDC_STATUS_HILCMD    0x50   /* Command from HIL MLC */
 #define HP_SDC_STATUS_HILDATA   0x60   /* Data from HIL MLC */
-#define HP_SDC_STATUS_PUP      0x70    /* Sucessful power-up self test */
+#define HP_SDC_STATUS_PUP      0x70    /* Successful power-up self test */
 #define HP_SDC_STATUS_KCOOKED  0x80    /* Key from cooked kbd */
 #define HP_SDC_STATUS_KRPG     0xc0    /* Key from Repeat Gen */
 #define HP_SDC_STATUS_KMOD_SUP 0x10    /* Shift key is up */
index df29c8fde36be8b7b9e0e13771d8ad4bb1fd6444..8847c8c29791c8c078dedaf0db9ff6dce85faa23 100644 (file)
@@ -117,7 +117,7 @@ static inline void vma_adjust_trans_huge(struct vm_area_struct *vma,
                                         unsigned long end,
                                         long adjust_next)
 {
-       if (!vma->anon_vma || vma->vm_ops || vma->vm_file)
+       if (!vma->anon_vma || vma->vm_ops)
                return;
        __vma_adjust_trans_huge(vma, start, end, adjust_next);
 }
index 9e7a12d6385d73f4115bc7528aa30926bdc2005b..a6deef4f4f67abd63f39d5b8ab96fdf91e9f98c8 100644 (file)
@@ -826,7 +826,7 @@ static inline struct i2o_message __iomem *i2o_msg_in_to_virt(struct
  *     @c: I2O controller
  *
  *     This function tries to get a message frame. If no message frame is
- *     available do not wait until one is availabe (see also i2o_msg_get_wait).
+ *     available do not wait until one is available (see also i2o_msg_get_wait).
  *     The returned pointer to the message frame is not in I/O memory, it is
  *     allocated from a mempool. But because a MFA is allocated from the
  *     controller too it is guaranteed that i2o_msg_post() will never fail.
index f3a7794a18c4d6de24065f797baf4ba97c34694b..771d6d85667d68a17c24c452979f8d37cc628082 100644 (file)
@@ -167,6 +167,7 @@ struct input_keymap_entry {
 #define SYN_REPORT             0
 #define SYN_CONFIG             1
 #define SYN_MT_REPORT          2
+#define SYN_DROPPED            3
 
 /*
  * Keys and buttons
@@ -553,8 +554,8 @@ struct input_keymap_entry {
 #define KEY_DVD                        0x185   /* Media Select DVD */
 #define KEY_AUX                        0x186
 #define KEY_MP3                        0x187
-#define KEY_AUDIO              0x188
-#define KEY_VIDEO              0x189
+#define KEY_AUDIO              0x188   /* AL Audio Browser */
+#define KEY_VIDEO              0x189   /* AL Movie Browser */
 #define KEY_DIRECTORY          0x18a
 #define KEY_LIST               0x18b
 #define KEY_MEMO               0x18c   /* Media Select Messages */
@@ -603,8 +604,9 @@ struct input_keymap_entry {
 #define KEY_FRAMEFORWARD       0x1b5
 #define KEY_CONTEXT_MENU       0x1b6   /* GenDesc - system context menu */
 #define KEY_MEDIA_REPEAT       0x1b7   /* Consumer - transport control */
-#define KEY_10CHANNELSUP        0x1b8   /* 10 channels up (10+) */
-#define KEY_10CHANNELSDOWN      0x1b9   /* 10 channels down (10-) */
+#define KEY_10CHANNELSUP       0x1b8   /* 10 channels up (10+) */
+#define KEY_10CHANNELSDOWN     0x1b9   /* 10 channels down (10-) */
+#define KEY_IMAGES             0x1ba   /* AL Image Browser */
 
 #define KEY_DEL_EOL            0x1c0
 #define KEY_DEL_EOS            0x1c1
index b3ac06a4435d1114fde8fad1bbd548874641915b..318bb82325a6fa59e4b3d9a13a17a99152dc5674 100644 (file)
@@ -48,6 +48,12 @@ static inline void input_mt_slot(struct input_dev *dev, int slot)
        input_event(dev, EV_ABS, ABS_MT_SLOT, slot);
 }
 
+static inline bool input_is_mt_axis(int axis)
+{
+       return axis == ABS_MT_SLOT ||
+               (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST);
+}
+
 void input_mt_report_slot_state(struct input_dev *dev,
                                unsigned int tool_type, bool active);
 
index 943c9b53695cde098c7aba1c45a7321484465c89..bea0ac750712855bcfdd94289f4514ca57d4efb6 100644 (file)
@@ -98,7 +98,7 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
  * @next:      pointer to the next irqaction for shared interrupts
  * @irq:       interrupt number
  * @dir:       pointer to the proc/irq/NN/name entry
- * @thread_fn: interupt handler function for threaded interrupts
+ * @thread_fn: interrupt handler function for threaded interrupts
  * @thread:    thread pointer for threaded interrupts
  * @thread_flags:      flags related to @thread
  * @thread_mask:       bitmask for keeping track of @thread activity
@@ -484,7 +484,7 @@ extern void __send_remote_softirq(struct call_single_data *cp, int cpu,
    Properties:
    * If tasklet_schedule() is called, then tasklet is guaranteed
      to be executed on some cpu at least once after this.
-   * If the tasklet is already scheduled, but its excecution is still not
+   * If the tasklet is already scheduled, but its execution is still not
      started, it will be executed only once.
    * If this tasklet is already running on another CPU (or schedule is called
      from tasklet itself), it is rescheduled for later.
index 045f2f275cd0dec03b6cd769bf8e73b8bd28870c..ca85cf894e33fb4a89653aebcf8c10642a346a8e 100644 (file)
@@ -111,7 +111,7 @@ struct ipmi_ipmb_addr {
  * A LAN Address.  This is an address to/from a LAN interface bridged
  * by the BMC, not an address actually out on the LAN.
  *
- * A concious decision was made here to deviate slightly from the IPMI
+ * A conscious decision was made here to deviate slightly from the IPMI
  * spec.  We do not use rqSWID and rsSWID like it shows in the
  * message.  Instead, we use remote_SWID and local_SWID.  This means
  * that any message (a request or response) from another device will
@@ -259,7 +259,7 @@ struct ipmi_recv_msg {
        void (*done)(struct ipmi_recv_msg *msg);
 
        /* Place-holder for the data, don't make any assumptions about
-          the size or existance of this, since it may change. */
+          the size or existence of this, since it may change. */
        unsigned char   msg_data[IPMI_MAX_MSG_LENGTH];
 };
 
index 4b3ecc40889a450c36b49d9eea167f0ae9a9cef3..96521370c782a5e916ef50fea59a07aaab960e3a 100644 (file)
@@ -2,7 +2,7 @@
  * hdlc.h  --  General purpose ISDN HDLC decoder.
  *
  * Implementation of a HDLC decoder/encoder in software.
- * Neccessary because some ISDN devices don't have HDLC
+ * Necessary because some ISDN devices don't have HDLC
  * controllers.
  *
  * Copyright (C)
index 88b45895746d654a6dc1ca3332c72c7990f60110..94ab5e942e53d3c258600d69a4f28b868b72875d 100644 (file)
@@ -50,7 +50,7 @@
 * IOCTL's used for the Quicknet Telephony Cards
 *
 * If you use the IXJCTL_TESTRAM command, the card must be power cycled to
-* reset the SRAM values before futher use.
+* reset the SRAM values before further use.
 *
 ******************************************************************************/
 
index 922aa313c9f93ce4b55e65ebdc7690376f03052e..f97672a36fa8d740c16751a0dc2e0753b5092b30 100644 (file)
@@ -42,7 +42,7 @@
 /* LATCH is used in the interval timer and ftape setup. */
 #define LATCH  ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
 
-/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, then we can
+/* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can
  * improve accuracy by shifting LSH bits, hence calculating:
  *     (NOM << LSH) / DEN
  * This however means trouble for large NOM, because (NOM << LSH) may no
index e1ceaa9b36bbaa5e975450c30d9311c8af946be8..603bec2913b00ca40086149828f3fcddab32a435 100644 (file)
@@ -35,7 +35,7 @@
  *
  * On 32-bit CPUs an optimized representation of the timespec structure
  * is used to avoid expensive conversions from and to timespecs. The
- * endian-aware order of the tv struct members is choosen to allow
+ * endian-aware order of the tv struct members is chosen to allow
  * mathematical operations on the tv64 member of the union too, which
  * for certain operations produces better code.
  *
@@ -158,7 +158,7 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
  * @lhs:       minuend
  * @rhs:       subtrahend
  *
- * Returns the remainder of the substraction
+ * Returns the remainder of the subtraction
  */
 static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
 {
index bb69d20da0dcaba523b6e7b345ea8a2248693edd..58592fa67d24ae23ba7ba18d364ae2c7e206a3b2 100644 (file)
@@ -41,7 +41,7 @@
 #define LM3530_RAMP_TIME_8s            (7)
 
 /* ALS Resistor Select */
-#define LM3530_ALS_IMPD_Z              (0x00) /* ALS Impedence */
+#define LM3530_ALS_IMPD_Z              (0x00) /* ALS Impedance */
 #define LM3530_ALS_IMPD_13_53kOhm      (0x01)
 #define LM3530_ALS_IMPD_9_01kOhm       (0x02)
 #define LM3530_ALS_IMPD_5_41kOhm       (0x03)
index c71f46960f3961e873b0d357401df766bcc5357c..04f32a3eb26b85dd9ea0b0e786f282c0c799f30d 100644 (file)
@@ -137,8 +137,6 @@ enum {
        ATA_DFLAG_ACPI_PENDING  = (1 << 5), /* ACPI resume action pending */
        ATA_DFLAG_ACPI_FAILED   = (1 << 6), /* ACPI on devcfg has failed */
        ATA_DFLAG_AN            = (1 << 7), /* AN configured */
-       ATA_DFLAG_HIPM          = (1 << 8), /* device supports HIPM */
-       ATA_DFLAG_DIPM          = (1 << 9), /* device supports DIPM */
        ATA_DFLAG_DMADIR        = (1 << 10), /* device requires DMADIR */
        ATA_DFLAG_CFG_MASK      = (1 << 12) - 1,
 
@@ -198,6 +196,7 @@ enum {
                                              * management */
        ATA_FLAG_SW_ACTIVITY    = (1 << 22), /* driver supports sw activity
                                              * led */
+       ATA_FLAG_NO_DIPM        = (1 << 23), /* host not happy with DIPM */
 
        /* bits 24:31 of ap->flags are reserved for LLD specific flags */
 
@@ -364,7 +363,7 @@ enum {
        ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6,
 
        /* Horkage types. May be set by libata or controller on drives
-          (some horkage may be drive/controller pair dependant */
+          (some horkage may be drive/controller pair dependent */
 
        ATA_HORKAGE_DIAGNOSTIC  = (1 << 0),     /* Failed boot diag */
        ATA_HORKAGE_NODMA       = (1 << 1),     /* DMA problems */
index 5bad17d1acdec6d386f6bf3d236c6900abb15ce8..31f9d75adc5bfaf4489d94473500cc01f74b2973 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_LIST_BL_H
 
 #include <linux/list.h>
+#include <linux/bit_spinlock.h>
 
 /*
  * Special version of lists, where head of the list has a lock in the lowest
@@ -114,6 +115,16 @@ static inline void hlist_bl_del_init(struct hlist_bl_node *n)
        }
 }
 
+static inline void hlist_bl_lock(struct hlist_bl_head *b)
+{
+       bit_spin_lock(0, (unsigned long *)b);
+}
+
+static inline void hlist_bl_unlock(struct hlist_bl_head *b)
+{
+       __bit_spin_unlock(0, (unsigned long *)b);
+}
+
 /**
  * hlist_bl_for_each_entry     - iterate over list of given type
  * @tpos:      the type * to use as a loop cursor.
index 78fbf24f357a1efbe56ee567d0d58696cfabc88e..6a4fab7c6e0902e261c3decc4b725cda0589b5d8 100644 (file)
@@ -148,7 +148,7 @@ write intent log information, three of which are mentioned here.
  *
  * DRBD currently (May 2009) only uses 61 elements on the resync lru_cache
  * (total memory usage 2 pages), and up to 3833 elements on the act_log
- * lru_cache, totalling ~215 kB for 64bit architechture, ~53 pages.
+ * lru_cache, totalling ~215 kB for 64bit architecture, ~53 pages.
  *
  * We usually do not actually free these objects again, but only "recycle"
  * them, as the change "index: -old_label, +LC_FREE" would need a transaction
index 5a5ce7055839b607ed688ba4c19c595b4686f875..5e9840f509804df5e49224a12bbbd079177ee4f6 100644 (file)
@@ -216,7 +216,7 @@ static inline void mem_cgroup_del_lru_list(struct page *page, int lru)
        return ;
 }
 
-static inline inline void mem_cgroup_rotate_reclaimable_page(struct page *page)
+static inline void mem_cgroup_rotate_reclaimable_page(struct page *page)
 {
        return ;
 }
index ad1b19aa6508eb58af14a64535dcdcd05d454eb9..aef23309a742334d9f3fb33d3f3b5af38b7f024d 100644 (file)
@@ -86,16 +86,25 @@ extern int mfd_clone_cell(const char *cell, const char **clones,
  */
 static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
 {
-       return pdev->dev.platform_data;
+       return pdev->mfd_cell;
 }
 
 /*
  * Given a platform device that's been created by mfd_add_devices(), fetch
  * the .mfd_data entry from the mfd_cell that created it.
+ * Otherwise just return the platform_data pointer.
+ * This maintains compatibility with platform drivers whose devices aren't
+ * created by the mfd layer, and expect platform_data to contain what would've
+ * otherwise been in mfd_data.
  */
 static inline void *mfd_get_data(struct platform_device *pdev)
 {
-       return mfd_get_cell(pdev)->mfd_data;
+       const struct mfd_cell *cell = mfd_get_cell(pdev);
+
+       if (cell)
+               return cell->mfd_data;
+       else
+               return pdev->dev.platform_data;
 }
 
 extern int mfd_add_devices(struct device *parent, int id,
index afe4db49402d142036761855cd9c9b6714bfec8d..632d1567a1b676f4c74dfeec798951081fed108c 100644 (file)
@@ -81,7 +81,9 @@ struct wm831x_touch_pdata {
        int rpu;               /** Pen down sensitivity resistor divider */
        int pressure;          /** Report pressure (boolean) */
        unsigned int data_irq; /** Touch data ready IRQ */
+       int data_irqf;         /** IRQ flags for data ready IRQ */
        unsigned int pd_irq;   /** Touch pendown detect IRQ */
+       int pd_irqf;           /** IRQ flags for pen down IRQ */
 };
 
 enum wm831x_watchdog_action {
index e786fe9841ef41aa44e497fea46e837c611ace3d..579b50ca2e026b783f48759b099ff51ca5d219ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * pmic.h  --  Power Managment Driver for Wolfson WM8350 PMIC
+ * pmic.h  --  Power Management Driver for Wolfson WM8350 PMIC
  *
  * Copyright 2007 Wolfson Microelectronics PLC
  *
index 7606d7db96c90be584687bf478e416dae1d535ec..2348db26bc3d969d58b18253b975ef8042d8d278 100644 (file)
@@ -137,7 +137,8 @@ extern unsigned int kobjsize(const void *objp);
 #define VM_RandomReadHint(v)           ((v)->vm_flags & VM_RAND_READ)
 
 /*
- * special vmas that are non-mergable, non-mlock()able
+ * Special vmas that are non-mergable, non-mlock()able.
+ * Note: mm/huge_memory.c VM_NO_THP depends on this definition.
  */
 #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP)
 
@@ -608,7 +609,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
 #endif
 
 /*
- * Define the bit shifts to access each section.  For non-existant
+ * Define the bit shifts to access each section.  For non-existent
  * sections we define the shift as 0; that plus a 0 mask ensures
  * the compiler will optimise away reference to them.
  */
index c0207a770476fbaa5c25db5f1045293c7409c4c2..bdd7ceeb99e4dfa21af598c9286b6b5baa040dba 100644 (file)
@@ -98,7 +98,7 @@ struct mmc_data;
  * EVENT_DATA_COMPLETE is set in @pending_events, all data-related
  * interrupts must be disabled and @data_status updated with a
  * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the
- * CMDRDY interupt must be disabled and @cmd_status updated with a
+ * CMDRDY interrupt must be disabled and @cmd_status updated with a
  * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the
  * bytes_xfered field of @data must be written. This is ensured by
  * using barriers.
@@ -172,7 +172,7 @@ struct dw_mci_dma_ops {
 #define DW_MCI_QUIRK_IDMAC_DTO                 BIT(0)
 /* delay needed between retries on some 2.11a implementations */
 #define DW_MCI_QUIRK_RETRY_DELAY               BIT(1)
-/* High Speed Capable - Supports HS cards (upto 50MHz) */
+/* High Speed Capable - Supports HS cards (up to 50MHz) */
 #define DW_MCI_QUIRK_HIGHSPEED                 BIT(2)
 /* Unreliable card detection */
 #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION     BIT(3)
index bcb793ec7374f61d2552cca43f573bdd1f100ece..eb792cb6d745a9bdc0069eba1139e1f20d33e5d6 100644 (file)
@@ -183,7 +183,6 @@ struct mmc_host {
        struct work_struct      clk_gate_work; /* delayed clock gate */
        unsigned int            clk_old;        /* old clock value cache */
        spinlock_t              clk_lock;       /* lock for clk fields */
-       struct mutex            clk_gate_mutex; /* mutex for clock gating */
 #endif
 
        /* host specific block data */
index 9d2deb200f54f8e0cb91d2adb9d7da9e4d09234b..a3759cb0ac10560bc58a30341d228041afcac8f7 100644 (file)
@@ -249,7 +249,7 @@ static inline int ip6mr_sk_done(struct sock *sk)
  * Structure used to communicate from kernel to multicast router.
  * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{}
  * used for IPv4 implementation). This is because this structure will be passed via an
- * IPv6 raw socket, on wich an application will only receiver the payload i.e the data after
+ * IPv6 raw socket, on which an application will only receiver the payload i.e the data after
  * the IPv6 header and all the extension headers. (See section 3 of RFC 3542)
  */
 
index 0d823f2dd6679a27bbf39a224f37725f6e9c6f70..d249254929722f041cb8ae78df8517790e18aec0 100644 (file)
@@ -308,7 +308,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs,
        
        addr = (cmd_ofs * type) * interleave;
 
-       /* Modify the unlock address if we are in compatiblity mode.
+       /* Modify the unlock address if we are in compatibility mode.
         * For 16bit devices on 8 bit busses
         * and 32bit devices on 16 bit busses
         * set the low bit of the alternating bit sequence of the address.
index ae67ef56a8f5a4a6639d4f352283f0a7308da5a3..d44192740f6fa44ab52ca03c1425f6659bfc8265 100644 (file)
@@ -416,9 +416,9 @@ struct nand_buffers {
  * @select_chip:       [REPLACEABLE] select chip nr
  * @block_bad:         [REPLACEABLE] check, if the block is bad
  * @block_markbad:     [REPLACEABLE] mark the block bad
- * @cmd_ctrl:          [BOARDSPECIFIC] hardwarespecific funtion for controlling
+ * @cmd_ctrl:          [BOARDSPECIFIC] hardwarespecific function for controlling
  *                     ALE/CLE/nCE. Also used to write command and address
- * @init_size:         [BOARDSPECIFIC] hardwarespecific funtion for setting
+ * @init_size:         [BOARDSPECIFIC] hardwarespecific function for setting
  *                     mtd->oobsize, mtd->writesize and so on.
  *                     @id_data contains the 8 bytes values of NAND_CMD_READID.
  *                     Return with the bus width.
@@ -437,7 +437,7 @@ struct nand_buffers {
  * @erase_cmd:         [INTERN] erase command write function, selectable due
  *                     to AND support.
  * @scan_bbt:          [REPLACEABLE] function to scan bad block table
- * @chip_delay:                [BOARDSPECIFIC] chip dependent delay for transfering
+ * @chip_delay:                [BOARDSPECIFIC] chip dependent delay for transferring
  *                     data from array to read regs (tR).
  * @state:             [INTERN] the current state of the NAND device
  * @oob_poi:           poison value buffer
index 36efcba15ecddc9a0557883b8690e1fe74bbf224..abed4dec5c2f672c4db8e8a60c81fed2df5f7bea 100644 (file)
@@ -51,7 +51,7 @@
  *     return in usecs the elapsed timebetween now and the reference x as
  *     returned by xip_currtime().
  *
- *     note 1: convertion to usec can be approximated, as long as the
+ *     note 1: conversion to usec can be approximated, as long as the
  *             returned value is <= the real elapsed time.
  *     note 2: this should be able to cope with a few seconds without
  *             overflowing.
index 5eeb2cd3631ce6f627978385608c8d2e52a48ff4..0249fe7e38721c7eb302a4a42affe34c28ace95f 100644 (file)
@@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev,
 
 static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev)
 {
-       if (dev->hw_features & NETIF_F_RXCSUM)
-               return !!(dev->features & NETIF_F_RXCSUM);
+       if (dev->features & NETIF_F_RXCSUM)
+               return 1;
        if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum)
                return 0;
        return dev->ethtool_ops->get_rx_csum(dev);
index eeec00abb6648911f2aaf2edca07b1edca99e3ba..7fa95df60146f2920cf89e2163289017230a91a6 100644 (file)
@@ -270,7 +270,8 @@ struct nf_afinfo {
                                            unsigned int dataoff,
                                            unsigned int len,
                                            u_int8_t protocol);
-       int             (*route)(struct dst_entry **dst, struct flowi *fl);
+       int             (*route)(struct net *net, struct dst_entry **dst,
+                                struct flowi *fl, bool strict);
        void            (*saveroute)(const struct sk_buff *skb,
                                     struct nf_queue_entry *entry);
        int             (*reroute)(struct sk_buff *skb,
index ec333d83f3b4abdc62e912152838fa3131987220..5a262e3ae715999d1082801cfa25cc215b301cf3 100644 (file)
@@ -293,7 +293,7 @@ struct ip_set {
        /* Lock protecting the set data */
        rwlock_t lock;
        /* References to the set */
-       atomic_t ref;
+       u32 ref;
        /* The core set type */
        struct ip_set_type *type;
        /* The type variant doing the real job */
index ec9d9bea1e370e937aaf3006c70c157bc45eb7b4..a0196ac790513b9c8dcbb8f33b04218a7fa67b01 100644 (file)
@@ -515,8 +515,7 @@ type_pf_head(struct ip_set *set, struct sk_buff *skb)
        if (h->netmask != HOST_MASK)
                NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask);
 #endif
-       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES,
-                     htonl(atomic_read(&set->ref) - 1));
+       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1));
        NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize));
        if (with_timeout(h->timeout))
                NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout));
index 2a10efda17fb467c656c042bea3b1a73aad588a6..6a0664c0c45197a7abece81ecb35fae6e638d8ae 100644 (file)
@@ -60,7 +60,7 @@ struct gre_hdr_pptp {
        __be16 payload_len;     /* size of ppp payload, not inc. gre header */
        __be16 call_id;         /* peer's call_id for this session */
        __be32 seq;             /* sequence number.  Present if S==1 */
-       __be32 ack;             /* seq number of highest packet recieved by */
+       __be32 ack;             /* seq number of highest packet received by */
                                /*  sender in this session */
 };
 
index 1c6f0c5f530ea77fda2bcdc70cfef1a85a42be31..8797ed16feb2c9ff8fec27adbd914c6f38624e0e 100644 (file)
@@ -92,7 +92,7 @@ struct ebt_entries {
 
 /* This is a hack to make a difference between an ebt_entry struct and an
  * ebt_entries struct when traversing the entries from start to end.
- * Using this simplifies the code alot, while still being able to use
+ * Using this simplifies the code a lot, while still being able to use
  * ebt_entries.
  * Contrary, iptables doesn't use something like ebt_entries and therefore uses
  * different techniques for naming the policy and such. So, iptables doesn't
index b528f6d4b860d394e2870a02022366a209abcec0..178fafe0ff9303426675f3b0134b01202de3ade1 100644 (file)
@@ -359,7 +359,7 @@ enum nfsstat4 {
                                                /* Error 10073 is unused. */
        NFS4ERR_CLIENTID_BUSY   = 10074,        /* clientid has state */
        NFS4ERR_PNFS_IO_HOLE    = 10075,        /* IO to _SPARSE file hole */
-       NFS4ERR_SEQ_FALSE_RETRY = 10076,        /* retry not origional */
+       NFS4ERR_SEQ_FALSE_RETRY = 10076,        /* retry not original */
        NFS4ERR_BAD_HIGH_SLOT   = 10077,        /* sequence arg bad */
        NFS4ERR_DEADSESSION     = 10078,        /* persistent session dead */
        NFS4ERR_ENCR_ALG_UNSUPP = 10079,        /* SSV alg mismatch */
index 216cea5db0aafbba934a9d55541c09788e10dbef..87694ca86914e379a098096fdd6989df71732a8f 100644 (file)
@@ -47,6 +47,7 @@ struct nfs_client {
 
 #ifdef CONFIG_NFS_V4
        u64                     cl_clientid;    /* constant */
+       nfs4_verifier           cl_confirm;     /* Clientid verifier */
        unsigned long           cl_state;
 
        spinlock_t              cl_lock;
index 78b101e487eac78113ea001974d7e50ebf6b6e8b..890dce2426392d632ae439e15764169276ab3611 100644 (file)
@@ -50,6 +50,7 @@ struct nfs_fattr {
        } du;
        struct nfs_fsid         fsid;
        __u64                   fileid;
+       __u64                   mounted_on_fileid;
        struct timespec         atime;
        struct timespec         mtime;
        struct timespec         ctime;
@@ -83,6 +84,7 @@ struct nfs_fattr {
 #define NFS_ATTR_FATTR_PRECHANGE       (1U << 18)
 #define NFS_ATTR_FATTR_V4_REFERRAL     (1U << 19)      /* NFSv4 referral */
 #define NFS_ATTR_FATTR_MOUNTPOINT      (1U << 20)      /* Treat as mountpoint */
+#define NFS_ATTR_FATTR_MOUNTED_ON_FILEID               (1U << 21)
 
 #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
                | NFS_ATTR_FATTR_MODE \
index bd316159278c57abdbfabe6205858c520ccf20bc..84058ec693902cc1e9037784919798e6824f9c0e 100644 (file)
@@ -80,7 +80,7 @@ struct nfsd4_fs_locations {
 
 /*
  * We keep an array of pseudoflavors with the export, in order from most
- * to least preferred.  For the forseeable future, we don't expect more
+ * to least preferred.  For the foreseeable future, we don't expect more
  * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3,
  * spkm3i, and spkm3p (and using all 8 at once should be rare).
  */
index 80d55bbc5365e83c7cbcc8a508e8dbeef370e4d9..f76d80ccec102daeeb32472f843df90dd1ebf0bf 100644 (file)
@@ -49,7 +49,7 @@ struct nfs_fhbase_old {
  *
  * The auth_type field specifies how the filehandle can be authenticated
  * This might allow a file to be confirmed to be in a writable part of a
- * filetree without checking the path from it upto the root.
+ * filetree without checking the path from it up to the root.
  * Current values:
  *     0  - No authentication.  fb_auth is 0 bytes long
  * Possible future values:
index 30022189104dad709ebfdca4b661b6b97dc4fd27..bbfa1093f606e15fa949a2a115aeab9b38f0bbf1 100644 (file)
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
 enum nl80211_commands {
-/* don't change the order or add anything inbetween, this is ABI! */
+/* don't change the order or add anything between, this is ABI! */
        NL80211_CMD_UNSPEC,
 
        NL80211_CMD_GET_WIPHY,          /* can dump */
@@ -860,7 +860,7 @@ enum nl80211_commands {
  *     This can be used to mask out antennas which are not attached or should
  *     not be used for receiving. If an antenna is not selected in this bitmap
  *     the hardware should not be configured to receive on this antenna.
- *     For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
+ *     For a more detailed description see @NL80211_ATTR_WIPHY_ANTENNA_TX.
  *
  * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available
  *     for configuration as TX antennas via the above parameters.
@@ -891,7 +891,7 @@ enum nl80211_commands {
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
 enum nl80211_attrs {
-/* don't change the order or add anything inbetween, this is ABI! */
+/* don't change the order or add anything between, this is ABI! */
        NL80211_ATTR_UNSPEC,
 
        NL80211_ATTR_WIPHY,
@@ -1419,7 +1419,7 @@ enum nl80211_bitrate_attr {
  *     802.11 country information element with regulatory information it
  *     thinks we should consider. cfg80211 only processes the country
  *     code from the IE, and relies on the regulatory domain information
- *     structure pased by userspace (CRDA) from our wireless-regdb.
+ *     structure passed by userspace (CRDA) from our wireless-regdb.
  *     If a channel is enabled but the country code indicates it should
  *     be disabled we disable the channel and re-enable it upon disassociation.
  */
@@ -1598,7 +1598,7 @@ enum nl80211_mntr_flags {
  * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in
  * millisecond units, used by the Peer Link Open message
  *
- * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in
+ * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in
  * millisecond units, used by the peer link management to close a peer link
  *
  * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in
index 2026f9e1ceb8e5cb5d6a9f3a2a1b4c4ff02d5953..621dfa16acc080076b08c58126e644b2ad45e68a 100644 (file)
@@ -237,7 +237,7 @@ static inline int notifier_to_errno(int ret)
                                        * enabling interrupts. Must not sleep,
                                        * must not fail */
 
-/* Used for CPU hotplug events occuring while tasks are frozen due to a suspend
+/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend
  * operation in progress
  */
 #define CPU_TASKS_FROZEN       0x0010
index 150822b4dbff095b5334be8104c25ac7157938a1..b6111f8cd49a0976025680a6a295e40038a47774 100644 (file)
@@ -250,7 +250,7 @@ enum omap3isp_h3a_af_rgbpos {
 /* Contains the information regarding the Horizontal Median Filter */
 struct omap3isp_h3a_af_hmf {
        __u8 enable;    /* Status of Horizontal Median Filter */
-       __u8 threshold; /* Threshhold Value for Horizontal Median Filter */
+       __u8 threshold; /* Threshold Value for Horizontal Median Filter */
 };
 
 /* Contains the information regarding the IIR Filters */
index f5de21de31dda91b54b05c199616ccf2113864b9..961ecc7d30bc2ec69b87699c39e5db63a5aff0f7 100644 (file)
@@ -138,7 +138,7 @@ static inline void move_unlock_page_cgroup(struct page_cgroup *pc,
 
 #define PCG_ARRAYID_OFFSET     (BITS_PER_LONG - PCG_ARRAYID_WIDTH)
 /*
- * Zero the shift count for non-existant fields, to prevent compiler
+ * Zero the shift count for non-existent fields, to prevent compiler
  * warnings and ensure references are optimized away.
  */
 #define PCG_ARRAYID_SHIFT      (PCG_ARRAYID_OFFSET * (PCG_ARRAYID_WIDTH != 0))
index 11fd38151cc9bda3c96c9709aa5c92249f840fee..8abe8d78c4bfad95d409b8ef74e19d9e6fad11d0 100644 (file)
 #define PCI_DEVICE_ID_AMD_11H_NB_MISC  0x1303
 #define PCI_DEVICE_ID_AMD_11H_NB_LINK  0x1304
 #define PCI_DEVICE_ID_AMD_15H_NB_F3    0x1603
-#define PCI_DEVICE_ID_AMD_15H_NB_LINK  0x1604
+#define PCI_DEVICE_ID_AMD_15H_NB_F4    0x1604
 #define PCI_DEVICE_ID_AMD_CNB17H_F3    0x1703
 #define PCI_DEVICE_ID_AMD_LANCE                0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME   0x2001
 #define PCI_DEVICE_ID_INTEL_82840_HB   0x1a21
 #define PCI_DEVICE_ID_INTEL_82845_HB   0x1a30
 #define PCI_DEVICE_ID_INTEL_IOAT       0x1a38
-#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS  0x1c22
 #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN        0x1c41
 #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX        0x1c5f
-#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS     0x1d22
 #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0     0x1d40
 #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1     0x1d41
 #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MIN   0x2310
 #define PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MAX   0x231f
-#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS     0x2330
 #define PCI_DEVICE_ID_INTEL_82801AA_0  0x2410
 #define PCI_DEVICE_ID_INTEL_82801AA_1  0x2411
 #define PCI_DEVICE_ID_INTEL_82801AA_3  0x2413
 #define PCI_DEVICE_ID_INTEL_ICH10_5    0x3a60
 #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MIN      0x3b00
 #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MAX      0x3b1f
-#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS        0x3b30
 #define PCI_DEVICE_ID_INTEL_IOAT_SNB   0x402f
 #define PCI_DEVICE_ID_INTEL_5100_16    0x65f0
 #define PCI_DEVICE_ID_INTEL_5100_21    0x65f5
index 5b7e6b1ba54f4453deffe9291a0e4ab0ec412430..be01380f798a18c9dac08b94548c9e1d37db5bab 100644 (file)
 #define  PCI_PM_CAP_PME_CLOCK  0x0008  /* PME clock required */
 #define  PCI_PM_CAP_RESERVED    0x0010  /* Reserved field */
 #define  PCI_PM_CAP_DSI                0x0020  /* Device specific initialization */
-#define  PCI_PM_CAP_AUX_POWER  0x01C0  /* Auxilliary power support mask */
+#define  PCI_PM_CAP_AUX_POWER  0x01C0  /* Auxiliary power support mask */
 #define  PCI_PM_CAP_D1         0x0200  /* D1 power state support */
 #define  PCI_PM_CAP_D2         0x0400  /* D2 power state support */
 #define  PCI_PM_CAP_PME                0x0800  /* PME pin supported */
 #define  PCI_EXP_LNKCAP_L0SEL  0x00007000 /* L0s Exit Latency */
 #define  PCI_EXP_LNKCAP_L1EL   0x00038000 /* L1 Exit Latency */
 #define  PCI_EXP_LNKCAP_CLKPM  0x00040000 /* L1 Clock Power Management */
-#define  PCI_EXP_LNKCAP_SDERC  0x00080000 /* Suprise Down Error Reporting Capable */
+#define  PCI_EXP_LNKCAP_SDERC  0x00080000 /* Surprise Down Error Reporting Capable */
 #define  PCI_EXP_LNKCAP_DLLLARC        0x00100000 /* Data Link Layer Link Active Reporting Capable */
 #define  PCI_EXP_LNKCAP_LBNC   0x00200000 /* Link Bandwidth Notification Capability */
 #define  PCI_EXP_LNKCAP_PN     0xff000000 /* Port Number */
index 3a5c4449fd36050f667ee13553924bdf44d9a3f8..8b97308e65df3ccf094d79af23266e2da5fc73af 100644 (file)
@@ -948,7 +948,7 @@ do {                                                                        \
        irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2)
 # endif
 # define irqsafe_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2)    \
-       __pcpu_double_call_return_int(irqsafe_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2))
+       __pcpu_double_call_return_bool(irqsafe_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2))
 #endif
 
 #endif /* __LINUX_PERCPU_H */
index 311b4dc785a19b5188cdd32260b50041d3403cc6..ee9f1e7828001f26a5657962040277cb6e574795 100644 (file)
@@ -662,7 +662,7 @@ struct pmu {
        int  (*commit_txn)      (struct pmu *pmu); /* optional */
        /*
         * Will cancel the transaction, assumes ->del() is called
-        * for each successfull ->add() during the transaction.
+        * for each successful ->add() during the transaction.
         */
        void (*cancel_txn)      (struct pmu *pmu); /* optional */
 };
@@ -1086,7 +1086,7 @@ void perf_event_task_sched_out(struct task_struct *task, struct task_struct *nex
 {
        perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0);
 
-       COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next));
+       __perf_event_task_sched_out(task, next);
 }
 
 extern void perf_event_mmap(struct vm_area_struct *vma);
index efceda0a51b137b3c154488a5f6d90385be064ba..cdced84261d79d125a8d6031c76638b72d259c20 100644 (file)
@@ -21,7 +21,7 @@ enum pid_type
  * quickly from the numeric pid value.  The attached processes may be
  * quickly accessed by following pointers from struct pid.
  *
- * Storing pid_t values in the kernel and refering to them later has a
+ * Storing pid_t values in the kernel and referring to them later has a
  * problem.  The process originally with that pid may have exited and the
  * pid allocator wrapped, and another process could have come along
  * and been assigned that pid.
@@ -117,7 +117,7 @@ extern struct pid *find_vpid(int nr);
  */
 extern struct pid *find_get_pid(int nr);
 extern struct pid *find_ge_pid(int nr, struct pid_namespace *);
-int next_pidmap(struct pid_namespace *pid_ns, int last);
+int next_pidmap(struct pid_namespace *pid_ns, unsigned int last);
 
 extern struct pid *alloc_pid(struct pid_namespace *ns);
 extern void free_pid(struct pid *pid);
index b1032a3fafdc2e9e49b2ce3be52262ba9ca16c3e..3a02e02085759aa2b758622f0312bd69de139a24 100644 (file)
@@ -223,7 +223,7 @@ struct tc_gred_qopt {
        __u32           limit;        /* HARD maximal queue length (bytes)    */
        __u32           qth_min;      /* Min average length threshold (bytes) */
        __u32           qth_max;      /* Max average length threshold (bytes) */
-       __u32           DP;           /* upto 2^32 DPs */
+       __u32           DP;           /* up to 2^32 DPs */
        __u32           backlog;
        __u32           qave;
        __u32           forced;
index d96db98257086cb51341af56d6f9db8615e0d462..744942c95fec478ff9b0e687e9496b9ff76a84bd 100644 (file)
@@ -14,6 +14,8 @@
 #include <linux/device.h>
 #include <linux/mod_devicetable.h>
 
+struct mfd_cell;
+
 struct platform_device {
        const char      * name;
        int             id;
@@ -23,6 +25,9 @@ struct platform_device {
 
        const struct platform_device_id *id_entry;
 
+       /* MFD cell pointer */
+       struct mfd_cell *mfd_cell;
+
        /* arch specific additions */
        struct pdev_archdata    archdata;
 };
index 1a2ccd6f38239ca938c27f4bbe28226b93ab3cb8..cf40010ce0cdf5066b70f9c26e1f951a3c6ed7fa 100644 (file)
@@ -82,7 +82,7 @@ static inline int poll_schedule(struct poll_wqueues *pwq, int state)
 }
 
 /*
- * Scaleable version of the fd_set.
+ * Scalable version of the fd_set.
  */
 
 typedef struct {
index 369e19d3750ba9ac4365cf8e778d61f6a9e239a5..7f1183dcd119e0e25dfd959827364e30f7ee291c 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/fs.h>
 #include <linux/poll.h>
 #include <linux/posix-timers.h>
+#include <linux/rwsem.h>
 
 struct posix_clock;
 
@@ -104,7 +105,7 @@ struct posix_clock_operations {
  * @ops:     Functional interface to the clock
  * @cdev:    Character device instance for this clock
  * @kref:    Reference count.
- * @mutex:   Protects the 'zombie' field from concurrent access.
+ * @rwsem:   Protects the 'zombie' field from concurrent access.
  * @zombie:  If 'zombie' is true, then the hardware has disappeared.
  * @release: A function to free the structure when the reference count reaches
  *           zero. May be NULL if structure is statically allocated.
@@ -117,7 +118,7 @@ struct posix_clock {
        struct posix_clock_operations ops;
        struct cdev cdev;
        struct kref kref;
-       struct mutex mutex;
+       struct rw_semaphore rwsem;
        bool zombie;
        void (*release)(struct posix_clock *clk);
 };
index af7c36a5a521e8048238b30521470b0b0b73e27c..a3bfbdf63d32a9da2d2b3227967303c5e87e2aba 100644 (file)
@@ -29,7 +29,7 @@
        prefetchw(x)    - prefetches the cacheline at "x" for write
        spin_lock_prefetch(x) - prefetches the spinlock *x for taking
        
-       there is also PREFETCH_STRIDE which is the architecure-prefered 
+       there is also PREFETCH_STRIDE which is the architecure-preferred 
        "lookahead" size for prefetching streamed operations.
        
 */
index 2f691e4e6222202a9968a0d10fc9f56347c2244d..44835fb39793b3263eb79b17e21575fccb12c921 100644 (file)
 #define SSCR1_TSRE             (1 << 21)       /* Transmit Service Request Enable */
 #define SSCR1_RSRE             (1 << 20)       /* Receive Service Request Enable */
 #define SSCR1_TINTE            (1 << 19)       /* Receiver Time-out Interrupt enable */
-#define SSCR1_PINTE            (1 << 18)       /* Peripheral Trailing Byte Interupt Enable */
+#define SSCR1_PINTE            (1 << 18)       /* Peripheral Trailing Byte Interrupt Enable */
 #define SSCR1_IFS              (1 << 16)       /* Invert Frame Signal */
 #define SSCR1_STRF             (1 << 15)       /* Select FIFO or EFWR */
 #define SSCR1_EFWR             (1 << 14)       /* Enable FIFO Write/Read */
index ffa2efbbe382f7d4dafab25f7e283ce7ecdf435b..75cbf4f62fe8a6bc6af1e20d99c0c3d3d0853c82 100644 (file)
@@ -251,7 +251,7 @@ struct mdp_superblock_1 {
        __le64  utime;          /* 40 bits second, 24 btes microseconds */
        __le64  events;         /* incremented when superblock updated */
        __le64  resync_offset;  /* data before this offset (from data_offset) known to be in sync */
-       __le32  sb_csum;        /* checksum upto devs[max_dev] */
+       __le32  sb_csum;        /* checksum up to devs[max_dev] */
        __le32  max_dev;        /* size of devs[] array to consider */
        __u8    pad3[64-32];    /* set to 0 when writing */
 
index af5614856285d32e0f07d3ca7e7294b03b9b27b7..ff422d2b7f9012661e36a89213159db7da309f4e 100644 (file)
@@ -339,6 +339,12 @@ extern int rcu_my_thread_group_empty(void);
                ((typeof(*p) __force __kernel *)(p)); \
        })
 
+#define __rcu_access_index(p, space) \
+       ({ \
+               typeof(p) _________p1 = ACCESS_ONCE(p); \
+               rcu_dereference_sparse(p, space); \
+               (_________p1); \
+       })
 #define __rcu_dereference_index_check(p, c) \
        ({ \
                typeof(p) _________p1 = ACCESS_ONCE(p); \
@@ -428,6 +434,20 @@ extern int rcu_my_thread_group_empty(void);
 
 #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/
 
+/**
+ * rcu_access_index() - fetch RCU index with no dereferencing
+ * @p: The index to read
+ *
+ * Return the value of the specified RCU-protected index, but omit the
+ * smp_read_barrier_depends() and keep the ACCESS_ONCE().  This is useful
+ * when the value of this index is accessed, but the index is not
+ * dereferenced, for example, when testing an RCU-protected index against
+ * -1.  Although rcu_access_index() may also be used in cases where
+ * update-side locks prevent the value of the index from changing, you
+ * should instead use rcu_dereference_index_protected() for this use case.
+ */
+#define rcu_access_index(p) __rcu_access_index((p), __rcu)
+
 /**
  * rcu_dereference_index_check() - rcu_dereference for indices with debug checking
  * @p: The pointer to read, prior to dereferencing
index 0a3842aacba998e4c776bd980d5e2eb2eacd247d..eca75df00fedd54d95b7448ab9099764519de7e8 100644 (file)
@@ -1557,7 +1557,7 @@ struct tree_balance {
 /* When inserting an item. */
 #define M_INSERT       'i'
 /* When inserting into (directories only) or appending onto an already
-   existant item. */
+   existent item. */
 #define M_PASTE                'p'
 /* When deleting an item. */
 #define M_DELETE       'd'
index 4e37a7cfa726f07dd65114c37a5ae3bc798904ab..4d50611112ba118e69df87888a81f764aee4c346 100644 (file)
@@ -396,7 +396,7 @@ union rio_pw_msg {
 };
 
 /* Architecture and hardware-specific functions */
-extern void rio_register_mport(struct rio_mport *);
+extern int rio_register_mport(struct rio_mport *);
 extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int);
 extern void rio_close_inb_mbox(struct rio_mport *, int);
 extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int);
index 7410d3365e2ad5472f28631e90397501d3fed6a4..0cee0152aca9a17c07658612f85ceec9f9986101 100644 (file)
@@ -35,6 +35,7 @@
 #define RIO_DID_IDTCPS6Q               0x035f
 #define RIO_DID_IDTCPS10Q              0x035e
 #define RIO_DID_IDTCPS1848             0x0374
+#define RIO_DID_IDTCPS1432             0x0375
 #define RIO_DID_IDTCPS1616             0x0379
 #define RIO_DID_IDTVPS1616             0x0377
 #define RIO_DID_IDTSPS1616             0x0378
index 2ca7e8a78060f24057d1c2290e05289393092e27..877ece45426f6c3eb0fa3850f0c93db0ee84468a 100644 (file)
@@ -228,6 +228,8 @@ extern int rtc_read_alarm(struct rtc_device *rtc,
                        struct rtc_wkalrm *alrm);
 extern int rtc_set_alarm(struct rtc_device *rtc,
                                struct rtc_wkalrm *alrm);
+extern int rtc_initialize_alarm(struct rtc_device *rtc,
+                               struct rtc_wkalrm *alrm);
 extern void rtc_update_irq(struct rtc_device *rtc,
                        unsigned long num, unsigned long events);
 
index 83bd2e2982fc776f9d2fcffacdae88b6c76c40ca..18d63cea28481c478906f791e384b520ad1f483b 100644 (file)
@@ -854,7 +854,7 @@ extern int __weak arch_sd_sibiling_asym_packing(void);
 
 /*
  * Optimise SD flags for power savings:
- * SD_BALANCE_NEWIDLE helps agressive task consolidation and power savings.
+ * SD_BALANCE_NEWIDLE helps aggressive task consolidation and power savings.
  * Keep default SD flags if sched_{smt,mc}_power_saving=0
  */
 
@@ -1254,6 +1254,9 @@ struct task_struct {
 #endif
 
        struct mm_struct *mm, *active_mm;
+#ifdef CONFIG_COMPAT_BRK
+       unsigned brk_randomized:1;
+#endif
 #if defined(SPLIT_RSS_COUNTING)
        struct task_rss_stat    rss_stat;
 #endif
index ca02f1716736906c0bc98227a6b11be7975af2ff..8ce59ef3e5afbec48b903e5f8d3cd4318096f709 100644 (file)
@@ -1456,7 +1456,7 @@ struct security_operations {
                             struct inode *new_dir, struct dentry *new_dentry);
        int (*inode_readlink) (struct dentry *dentry);
        int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd);
-       int (*inode_permission) (struct inode *inode, int mask);
+       int (*inode_permission) (struct inode *inode, int mask, unsigned flags);
        int (*inode_setattr)    (struct dentry *dentry, struct iattr *attr);
        int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry);
        int (*inode_setxattr) (struct dentry *dentry, const char *name,
index d9e52fa2416de21b8a9f77f574b0c48d3e021d1e..d0ae90af0b405481831839192bd51de405d85a6c 100644 (file)
@@ -474,7 +474,7 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
 extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst);
 
 /**
- * skb_dst_is_noref - Test if skb dst isnt refcounted
+ * skb_dst_is_noref - Test if skb dst isn't refcounted
  * @skb: buffer
  */
 static inline bool skb_dst_is_noref(const struct sk_buff *skb)
index bc21db598c06f867bf63924d4d7dc1befeacbb53..76199b75d5845d21cbcfb67786dfec757e30a446 100644 (file)
@@ -21,7 +21,7 @@
 #define RPC_LED_10     (0x02)  /* LED = 10Mbps link detect */
 #define RPC_LED_FD     (0x03)  /* LED = Full Duplex Mode */
 #define RPC_LED_TX_RX  (0x04)  /* LED = TX or RX packet occurred */
-#define RPC_LED_100    (0x05)  /* LED = 100Mbps link dectect */
+#define RPC_LED_100    (0x05)  /* LED = 100Mbps link detect */
 #define RPC_LED_TX     (0x06)  /* LED = TX packet occurred */
 #define RPC_LED_RX     (0x07)  /* LED = RX packet occurred */
 
index edbb1d07ddf433c12f184c622711004153b262d9..d2b5e982f0796aede07031273bbd0d7c786acf42 100644 (file)
@@ -88,7 +88,7 @@ struct cmsghdr {
 };
 
 /*
- *     Ancilliary data object information MACROS
+ *     Ancillary data object information MACROS
  *     Table 5-14 of POSIX 1003.1g
  */
 
index 1904afedb82fcdf445a8d3ee6dc985f0110edb59..fe204fe39f7cae7a76164da83cb251f2c5dee7b4 100644 (file)
@@ -1231,7 +1231,7 @@ void seqbuf_dump(void);   /* This function must be provided by programs */
 #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
 
 /*
- * Timing and syncronization macros
+ * Timing and synchronization macros
  */
 
 #define _TIMER_EVENT(ev, parm)         {_SEQ_NEEDBUF(8);\
index bf0570a84f7a4aeb83e76d8e842b9f17b89c1143..52d9ed01855fe4c67a5ab1d3b4908efc7eb66a8a 100644 (file)
@@ -66,7 +66,7 @@
  * are in a different address space (and may be of different sizes in some
  * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel).
  * Zero-initialize the structure, including currently unused fields, to
- * accomodate potential future updates.
+ * accommodate potential future updates.
  *
  * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync().
  * Pass it an array of related transfers, they'll execute together.
index 80e535897de6ce85d26627144875a4914ff2aacc..0b22d51258e6839f3a7727e38ac09a994757b446 100644 (file)
@@ -81,7 +81,7 @@
 #include <linux/spinlock_types.h>
 
 /*
- * Pull the arch_spin*() functions/declarations (UP-nondebug doesnt need them):
+ * Pull the arch_spin*() functions/declarations (UP-nondebug doesn't need them):
  */
 #ifdef CONFIG_SMP
 # include <asm/spinlock.h>
index e103529156986bf3814ca35b156dc10917bd34ae..f29197a4b227f204817696bfcf51e89029c80889 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef __STMMAC_PLATFORM_DATA
 #define __STMMAC_PLATFORM_DATA
 
-/* platfrom data for platfrom device structure's platfrom_data field */
+/* platform data for platform device structure's platform_data field */
 
 /* Private data for the STM on-board ethernet driver */
 struct plat_stmmacenet_data {
index 1808960c50595908935455ca90a80fc02e421ef0..092dc9b1ce7d2b507880b9c6e24d0415662a027c 100644 (file)
@@ -105,7 +105,7 @@ static inline int try_stop_cpus(const struct cpumask *cpumask,
  * @cpus: the cpus to run the @fn() on (NULL = any online cpu)
  *
  * Description: This causes a thread to be scheduled on every cpu,
- * each of which disables interrupts.  The result is that noone is
+ * each of which disables interrupts.  The result is that no one is
  * holding a spinlock or inside any other preempt-disabled region when
  * @fn() runs.
  *
index 7898ea13de70a2233445c7e9deec48546c492efc..8d2eef1a8582187cd6f1ec12d4c3101b240d8f91 100644 (file)
  * Each cache must be registered so that it can be cleaned regularly.
  * When the cache is unregistered, it is flushed completely.
  *
- * Entries have a ref count and a 'hashed' flag which counts the existance
+ * Entries have a ref count and a 'hashed' flag which counts the existence
  * in the hash table.
  * We only expire entries when refcount is zero.
- * Existance in the cache is counted  the refcount.
+ * Existence in the cache is counted  the refcount.
  */
 
 /* Every cache item has a common header that is used
index d81db8012c63b658158228469f89643426d9e435..f73c482ec9c6080cc5201c047546928c53c8b723 100644 (file)
@@ -127,13 +127,16 @@ struct rpc_task_setup {
 #define RPC_TASK_KILLED                0x0100          /* task was killed */
 #define RPC_TASK_SOFT          0x0200          /* Use soft timeouts */
 #define RPC_TASK_SOFTCONN      0x0400          /* Fail if can't connect */
+#define RPC_TASK_SENT          0x0800          /* message was sent */
+#define RPC_TASK_TIMEOUT       0x1000          /* fail with ETIMEDOUT on timeout */
 
 #define RPC_IS_ASYNC(t)                ((t)->tk_flags & RPC_TASK_ASYNC)
 #define RPC_IS_SWAPPER(t)      ((t)->tk_flags & RPC_TASK_SWAPPER)
 #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS)
 #define RPC_ASSASSINATED(t)    ((t)->tk_flags & RPC_TASK_KILLED)
-#define RPC_IS_SOFT(t)         ((t)->tk_flags & RPC_TASK_SOFT)
+#define RPC_IS_SOFT(t)         ((t)->tk_flags & (RPC_TASK_SOFT|RPC_TASK_TIMEOUT))
 #define RPC_IS_SOFTCONN(t)     ((t)->tk_flags & RPC_TASK_SOFTCONN)
+#define RPC_WAS_SENT(t)                ((t)->tk_flags & RPC_TASK_SENT)
 
 #define RPC_TASK_RUNNING       0
 #define RPC_TASK_QUEUED                1
index ca7d725861fc0e885e396d50a5df9b895c7465ef..83bbee3f089cd7bd4491b5dd5edadc9f5e4c5207 100644 (file)
@@ -2,7 +2,7 @@
  * linux/include/linux/sunrpc/svcauth_gss.h
  *
  * Bruce Fields <bfields@umich.edu>
- * Copyright (c) 2002 The Regents of the Unviersity of Michigan
+ * Copyright (c) 2002 The Regents of the University of Michigan
  */
 
 #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H
index 5a89e3612875b017760d365c99113a5e76c0d61f..083ffea7ba183de0251224928c67077a0c17d79f 100644 (file)
@@ -249,6 +249,8 @@ extern void hibernation_set_ops(const struct platform_hibernation_ops *ops);
 extern int hibernate(void);
 extern bool system_entering_hibernation(void);
 #else /* CONFIG_HIBERNATION */
+static inline void register_nosave_region(unsigned long b, unsigned long e) {}
+static inline void register_nosave_region_late(unsigned long b, unsigned long e) {}
 static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
 static inline void swsusp_set_page_free(struct page *p) {}
 static inline void swsusp_unset_page_free(struct page *p) {}
@@ -297,14 +299,7 @@ static inline bool pm_wakeup_pending(void) { return false; }
 
 extern struct mutex pm_mutex;
 
-#ifndef CONFIG_HIBERNATION
-static inline void register_nosave_region(unsigned long b, unsigned long e)
-{
-}
-static inline void register_nosave_region_late(unsigned long b, unsigned long e)
-{
-}
-
+#ifndef CONFIG_HIBERNATE_CALLBACKS
 static inline void lock_system_sleep(void) {}
 static inline void unlock_system_sleep(void) {}
 
index 8a75da551e4e9fb7fd3cbe95c2ae5ad0ae297cde..dfb078db8ebbaacc6528b900e5bed06ced263082 100644 (file)
@@ -7,13 +7,13 @@
  * We still have a notion of a driver for a system device, because we still
  * want to perform basic operations on these devices. 
  *
- * We also support auxillary drivers binding to devices of a certain class.
+ * We also support auxiliary drivers binding to devices of a certain class.
  * 
  * This allows configurable drivers to register themselves for devices of
  * a certain type. And, it allows class definitions to reside in generic
  * code while arch-specific code can register specific drivers.
  *
- * Auxillary drivers registered with a NULL cls are registered as drivers
+ * Auxiliary drivers registered with a NULL cls are registered as drivers
  * for all system devices, and get notification calls for each device. 
  */
 
@@ -70,7 +70,7 @@ extern int sysdev_class_create_file(struct sysdev_class *,
 extern void sysdev_class_remove_file(struct sysdev_class *,
        struct sysdev_class_attribute *);
 /**
- * Auxillary system device drivers.
+ * Auxiliary system device drivers.
  */
 
 struct sysdev_driver {
index d24aabaca4741135c9d427824a96584fd0cacd6b..a520fd70a59f371f40a34f79e883dcf7b32c23f7 100644 (file)
@@ -24,7 +24,7 @@ extern struct timerqueue_node *timerqueue_iterate_next(
                                                struct timerqueue_node *node);
 
 /**
- * timerqueue_getnext - Returns the timer with the earlies expiration time
+ * timerqueue_getnext - Returns the timer with the earliest expiration time
  *
  * @head: head of timerqueue
  *
index 3a2e66d88a32c41db9e978c700601c4c132ea54c..ebcfa4ebdbf8ddec4c48cf070882bfebf83b41b1 100644 (file)
@@ -169,7 +169,7 @@ static inline int tracehook_unsafe_exec(struct task_struct *task)
  * tracehook_tracer_task - return the task that is tracing the given task
  * @tsk:               task to consider
  *
- * Returns NULL if noone is tracing @task, or the &struct task_struct
+ * Returns NULL if no one is tracing @task, or the &struct task_struct
  * pointer to its tracer.
  *
  * Must called under rcu_read_lock().  The pointer returned might be kept
@@ -448,7 +448,7 @@ static inline int tracehook_force_sigpending(void)
  *
  * Return zero to check for a real pending signal normally.
  * Return -1 after releasing the siglock to repeat the check.
- * Return a signal number to induce an artifical signal delivery,
+ * Return a signal number to induce an artificial signal delivery,
  * setting *@info and *@return_ka to specify its details and behavior.
  *
  * The @return_ka->sa_handler value controls the disposition of the
index 1b47909110520f72f13ca44d6170a29e61b6eeed..5c75153f94414d37e64607d350f395549146881d 100644 (file)
@@ -8,7 +8,7 @@
  *  Copyright: MontaVista Software, Inc.
  *
  * Spliting done by: Marek Vasut <marek.vasut@gmail.com>
- * If something doesnt work and it worked before spliting, e-mail me,
+ * If something doesn't work and it worked before spliting, e-mail me,
  * dont bother Nicolas please ;-)
  *
  * This program is free software; you can redistribute it and/or modify
index e63efeb378e3063403871c4045a6618ac9dd095f..65f78ca5d88e44f1faef15c7a551ad51c0db24b6 100644 (file)
@@ -623,7 +623,7 @@ extern struct usb_host_interface *usb_find_alt_setting(
  * USB hubs.  That makes it stay the same until systems are physically
  * reconfigured, by re-cabling a tree of USB devices or by moving USB host
  * controllers.  Adding and removing devices, including virtual root hubs
- * in host controller driver modules, does not change these path identifers;
+ * in host controller driver modules, does not change these path identifiers;
  * neither does rebooting or re-enumerating.  These are more useful identifiers
  * than changeable ("unstable") ones like bus numbers or device addresses.
  *
@@ -793,7 +793,7 @@ struct usbdrv_wrap {
  *     usb_set_intfdata() to associate driver-specific data with the
  *     interface.  It may also use usb_set_interface() to specify the
  *     appropriate altsetting.  If unwilling to manage the interface,
- *     return -ENODEV, if genuine IO errors occured, an appropriate
+ *     return -ENODEV, if genuine IO errors occurred, an appropriate
  *     negative errno value.
  * @disconnect: Called when the interface is no longer accessible, usually
  *     because its device has been (or is being) disconnected or the
index 3d29a7dcac2d378cc80f950d06301802e1b2b1a7..882a084a8411a8413bf5651f184e4943804fa667 100644 (file)
@@ -188,7 +188,7 @@ ep_choose(struct usb_gadget *g, struct usb_endpoint_descriptor *hs,
  * @bind() method is then used to initialize all the functions and then
  * call @usb_add_function() for them.
  *
- * Those functions would normally be independant of each other, but that's
+ * Those functions would normally be independent of each other, but that's
  * not mandatory.  CDC WMC devices are an example where functions often
  * depend on other functions, with some functions subsidiary to others.
  * Such interdependency may be managed in any way, so long as all of the
index 656380245198eef90f2c7c30d166868461c877c9..e49dfd45baa468eba946060b1cb3dddda9a2e3dc 100644 (file)
@@ -159,7 +159,7 @@ struct ehci_regs {
 #define USBMODE_CM_IDLE        (0<<0)          /* idle state */
 
 /* Moorestown has some non-standard registers, partially due to the fact that
- * its EHCI controller has both TT and LPM support. HOSTPCx are extentions to
+ * its EHCI controller has both TT and LPM support. HOSTPCx are extensions to
  * PORTSCx
  */
 #define HOSTPC0                0x84            /* HOSTPC extension */
index 6f649c13193b640b3443137db8cb65cbcd89ecd5..7587ef934ba8bd22cffdb881e3b7623936ae8276 100644 (file)
@@ -45,7 +45,7 @@ struct usb_functionfs_descs_head {
  * | off | name      | type         | description                          |
  * |-----+-----------+--------------+--------------------------------------|
  * |   0 | magic     | LE32         | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC |
- * |   4 | lenght    | LE32         | length of the whole data chunk       |
+ * |   4 | length    | LE32         | length of the whole data chunk       |
  * |   8 | fs_count  | LE32         | number of full-speed descriptors     |
  * |  12 | hs_count  | LE32         | number of high-speed descriptors     |
  * |  16 | fs_descrs | Descriptor[] | list of full-speed descriptors       |
@@ -86,7 +86,7 @@ struct usb_functionfs_strings_head {
  * |   0 | lang    | LE16              | language code                      |
  * |   2 | strings | String[str_count] | array of strings in given language |
  *
- * For each string ther is one strings entry (ie. there are str_count
+ * For each string there is one strings entry (ie. there are str_count
  * string entries).  Each String is a NUL terminated string encoded in
  * UTF-8.
  */
index 006412ce2303881200e7da14446a078ddaa37f2e..e538172c0f64999e963172a547ee7ac2adddde79 100644 (file)
@@ -72,7 +72,7 @@ struct usb_ep;
  * Bulk endpoints can use any size buffers, and can also be used for interrupt
  * transfers. interrupt-only endpoints can be much less functional.
  *
- * NOTE:  this is analagous to 'struct urb' on the host side, except that
+ * NOTE:  this is analogous to 'struct urb' on the host side, except that
  * it's thinner and promotes more pre-allocation.
  */
 
@@ -269,7 +269,7 @@ static inline void usb_ep_free_request(struct usb_ep *ep,
  *
  * Control endpoints ... after getting a setup() callback, the driver queues
  * one response (even if it would be zero length).  That enables the
- * status ack, after transfering data as specified in the response.  Setup
+ * status ack, after transferring data as specified in the response.  Setup
  * functions may return negative error codes to generate protocol stalls.
  * (Note that some USB device controllers disallow protocol stall responses
  * in some cases.)  When control responses are deferred (the response is
index 1d10408656617b0657b8cba188ee6893681e688c..c8c52e3c91de7917087e855f67742110848e7dd8 100644 (file)
@@ -70,7 +70,7 @@ struct usb_midi_out_jack_descriptor {
        __u8  bJackID;
        __u8  bNrInputPins;             /* p */
        struct usb_midi_source_pin pins[]; /* [p] */
-       /*__u8  iJack;  -- ommitted due to variable-sized pins[] */
+       /*__u8  iJack;  -- omitted due to variable-sized pins[] */
 } __attribute__ ((packed));
 
 #define USB_DT_MIDI_OUT_SIZE(p)        (7 + 2 * (p))
index 201f2228f731c7e1ccd8d84a60c01647ee3bee11..605b0aa8d852f63d4d0c7a3cf18add1f518e2acd 100644 (file)
@@ -68,6 +68,7 @@ struct usbnet {
 #              define EVENT_RX_PAUSED  5
 #              define EVENT_DEV_WAKING 6
 #              define EVENT_DEV_ASLEEP 7
+#              define EVENT_DEV_OPEN   8
 };
 
 static inline struct usb_driver *driver_of(struct usb_interface *intf)
@@ -97,12 +98,14 @@ struct driver_info {
 
 #define FLAG_LINK_INTR 0x0800          /* updates link (carrier) status */
 
+#define FLAG_POINTTOPOINT 0x1000       /* possibly use "usb%d" names */
+
 /*
  * Indicates to usbnet, that USB driver accumulates multiple IP packets.
  * Affects statistic (counters) and short packet handling.
  */
-#define FLAG_MULTI_PACKET      0x1000
-#define FLAG_RX_ASSEMBLE       0x2000  /* rx packets may span >1 frames */
+#define FLAG_MULTI_PACKET      0x2000
+#define FLAG_RX_ASSEMBLE       0x4000  /* rx packets may span >1 frames */
 
        /* init device ... can sleep, or cause probe() failure */
        int     (*bind)(struct usbnet *, struct usb_interface *);
index 63ebdcc5dda65f0007b7990d18a7035b1e134d8d..0c4d4ca370ec9ba2e88c90b5d9a34b1efc9bc557 100644 (file)
@@ -126,7 +126,7 @@ enum {
 /**
  * WUSB IE: Channel Stop (WUSB1.0[7.5.8])
  *
- * Tells devices the host is going to stop sending MMCs and will dissapear.
+ * Tells devices the host is going to stop sending MMCs and will disappear.
  */
 struct wuie_channel_stop {
        struct wuie_hdr hdr;
index 7fc9746f22cd329065b1ae18f0ad3b9e46d9171f..b0c564ec21603de31bf196299cc7f972ff244e84 100644 (file)
@@ -274,7 +274,7 @@ static inline void uwb_mas_bm_copy_le(void *dst, const struct uwb_mas_bm *mas)
 
 /**
  * struct uwb_drp_avail - a radio controller's view of MAS usage
- * @global:   MAS unused by neighbors (excluding reservations targetted
+ * @global:   MAS unused by neighbors (excluding reservations targeted
  *            or owned by the local radio controller) or the beaon period
  * @local:    MAS unused by local established reservations
  * @pending:  MAS unused by local pending reservations
@@ -702,10 +702,10 @@ void edc_init(struct edc *edc)
        edc->timestart = jiffies;
 }
 
-/* Called when an error occured.
+/* Called when an error occurred.
  * This is way to determine if the number of acceptable errors per time
  * period has been exceeded. It is not accurate as there are cases in which
- * this scheme will not work, for example if there are periodic occurences
+ * this scheme will not work, for example if there are periodic occurrences
  * of errors that straddle updates to the start time. This scheme is
  * sufficient for our usage.
  *
index 4b4fc0f4385578548b70e1bb841599a387b454d9..7b4842028ca73420dde81dae18bf3ff50bbc409f 100644 (file)
@@ -132,7 +132,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc);
  *
  * FIXME: This is as dirty as it gets, but we need some way to check
  * the correct type of umc_dev->parent (so that for example, we can
- * cast to pci_dev). Casting to pci_dev is necesary because at some
+ * cast to pci_dev). Casting to pci_dev is necessary because at some
  * point we need to request resources from the device. Mapping is
  * easily over come (ioremap and stuff are bus agnostic), but hooking
  * up to some error handlers (such as pci error handlers) might need
index e9e1524b582cbde9b1988107d9c50a86a68f08ae..9c3120dca294ddc41d2a131540d8135cf001de89 100644 (file)
@@ -78,7 +78,7 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev,
  *     wether the card is doing legacy decoding for that type of resource. If
  *     yes, the lock is "converted" into a legacy resource lock.
  *     The arbiter will first look for all VGA cards that might conflict
- *     and disable their IOs and/or Memory access, inlcuding VGA forwarding
+ *     and disable their IOs and/or Memory access, including VGA forwarding
  *     on P2P bridges if necessary, so that the requested resources can
  *     be used. Then, the card is marked as locking these resources and
  *     the IO and/or Memory accesse are enabled on the card (including
@@ -187,7 +187,7 @@ extern struct pci_dev *vga_default_device(void);
  *     vga_conflicts
  *
  *     Architectures should define this if they have several
- *     independant PCI domains that can afford concurrent VGA
+ *     independent PCI domains that can afford concurrent VGA
  *     decoding
  */
 
index 461c0119664ff88d2bf8797f2541ccae74ce0698..2b3831b58aa4312a754c41b2608431db85e31887 100644 (file)
@@ -58,6 +58,13 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
                UNEVICTABLE_PGCLEARED,  /* on COW, page truncate */
                UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
                UNEVICTABLE_MLOCKFREED,
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+               THP_FAULT_ALLOC,
+               THP_FAULT_FALLBACK,
+               THP_COLLAPSE_ALLOC,
+               THP_COLLAPSE_ALLOC_FAILED,
+               THP_SPLIT,
+#endif
                NR_VM_EVENT_ITEMS
 };
 
index 4fdcc563551898fecf27193a1da3e669fd7aeae3..9f6b77af2f6ddf547cb133ca8994aab9d63c0034 100644 (file)
@@ -114,7 +114,7 @@ enum {
        WIMAX_GNL_RESET_IFIDX = 1,
 };
 
-/* Atributes for wimax_state_get() */
+/* Attributes for wimax_state_get() */
 enum {
        WIMAX_GNL_STGET_IFIDX = 1,
 };
index f2463f559fb9e7ad60b051485ee420a89916592f..5a155a9680546197459ad1922e0088d7af165e90 100644 (file)
@@ -16,7 +16,7 @@
 /* ML300/403 reference design framebuffer driver platform data struct */
 struct xilinxfb_platform_data {
        u32 rotate_screen;      /* Flag to rotate display 180 degrees */
-       u32 screen_height_mm;   /* Physical dimentions of screen in mm */
+       u32 screen_height_mm;   /* Physical dimensions of screen in mm */
        u32 screen_width_mm;
        u32 xres, yres;         /* resolution of screen in pixels */
        u32 xvirt, yvirt;       /* resolution of memory buffer */
index df8a7b107477ff5edc0dece4b634e1732badaaf9..adf2fe4bf0bb2cd37a61c45791bc10fd919b3bb4 100644 (file)
@@ -193,7 +193,7 @@ struct ccdc_dft_corr_mem_ctl {
 #define CCDC_DFT_TABLE_SIZE    16
 /*
  * Main Structure for vertical defect correction. Vertical defect
- * correction can correct upto 16 defects if defects less than 16
+ * correction can correct up to 16 defects if defects less than 16
  * then pad the rest with 0
  */
 struct ccdc_vertical_dft {
index b0b74ad618cc28038ad39185164b95d26826b63e..7f3d76a4b9e3f2749db14d48bc0812f9c655cfa2 100644 (file)
@@ -199,7 +199,7 @@ struct isif_black_clamp {
 };
 
 /*************************************************************************
-** Color Space Convertion (CSC)
+** Color Space Conversion (CSC)
 *************************************************************************/
 #define ISIF_CSC_NUM_COEFF     16
 struct isif_color_space_conv {
index 6678a169fd9e2643b814b10d0a90cc2fa1df709a..4b3ab2966b5a4a88efbde38230a1887e218f368b 100644 (file)
  */
 #define LIRC_SET_REC_FILTER_SPACE      _IOW('i', 0x0000001b, __u32)
 /*
- * if filter cannot be set independantly for pulse/space, this should
+ * if filter cannot be set independently for pulse/space, this should
  * be used
  */
 #define LIRC_SET_REC_FILTER            _IOW('i', 0x0000001c, __u32)
index 6b75a6971346a0495fca172e83edce6861a42f12..d2df55b0c2134a35044a583429ac34e01b37f065 100644 (file)
@@ -119,7 +119,7 @@ do { \
  * @P9_TREAD: request to transfer data from a file or directory
  * @P9_RREAD: response with data requested
  * @P9_TWRITE: reuqest to transfer data to a file
- * @P9_RWRITE: response with out much data was transfered to file
+ * @P9_RWRITE: response with out much data was transferred to file
  * @P9_TCLUNK: forget about a handle to an entity within the file system
  * @P9_RCLUNK: response when server has forgotten about the handle
  * @P9_TREMOVE: request to remove an entity from the hierarchy
@@ -139,8 +139,6 @@ do { \
  */
 
 enum p9_msg_t {
-       P9_TSYNCFS = 0,
-       P9_RSYNCFS,
        P9_TLERROR = 6,
        P9_RLERROR,
        P9_TSTATFS = 8,
@@ -294,7 +292,7 @@ enum p9_perm_t {
  *
  * QID types are a subset of permissions - they are primarily
  * used to differentiate semantics for a file system entity via
- * a jump-table.  Their value is also the most signifigant 16 bits
+ * a jump-table.  Their value is also the most significant 16 bits
  * of the permission_t
  *
  * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
@@ -366,8 +364,8 @@ struct p9_qid {
 /**
  * struct p9_stat - file system metadata information
  * @size: length prefix for this stat structure instance
- * @type: the type of the server (equivilent to a major number)
- * @dev: the sub-type of the server (equivilent to a minor number)
+ * @type: the type of the server (equivalent to a major number)
+ * @dev: the sub-type of the server (equivalent to a minor number)
  * @qid: unique id from the server of type &p9_qid
  * @mode: Plan 9 format permissions of type &p9_perm_t
  * @atime: Last access/read time
index 0a30977e3c1fe01aa6c7d7e8c969b39d82f61f47..051a99f79769a59021fdcb958a6f850e1f2ddc71 100644 (file)
@@ -101,7 +101,7 @@ enum p9_req_status_t {
  * Transport use an array to track outstanding requests
  * instead of a list.  While this may incurr overhead during initial
  * allocation or expansion, it makes request lookup much easier as the
- * tag id is a index into an array.  (We use tag+1 so that we can accomodate
+ * tag id is a index into an array.  (We use tag+1 so that we can accommodate
  * the -1 tag for the T_VERSION request).
  * This also has the nice effect of only having to allocate wait_queues
  * once, instead of constantly allocating and freeing them.  Its possible
@@ -218,8 +218,8 @@ void p9_client_disconnect(struct p9_client *clnt);
 void p9_client_begin_disconnect(struct p9_client *clnt);
 struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid,
                                        char *uname, u32 n_uname, char *aname);
-struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames,
-                                                               int clone);
+struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname,
+               char **wnames, int clone);
 int p9_client_open(struct p9_fid *fid, int mode);
 int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode,
                                                        char *extension);
@@ -230,7 +230,6 @@ int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode,
                gid_t gid, struct p9_qid *qid);
 int p9_client_clunk(struct p9_fid *fid);
 int p9_client_fsync(struct p9_fid *fid, int datasync);
-int p9_client_sync_fs(struct p9_fid *fid);
 int p9_client_remove(struct p9_fid *fid);
 int p9_client_read(struct p9_fid *fid, char *data, char __user *udata,
                                                        u64 offset, u32 count);
index 82868f18c57360bd7ab5710773df3f927914db3e..8f08c736c4c3c22a86988c89c9f5fec77e68ff7b 100644 (file)
@@ -30,7 +30,7 @@
 
 /* Default. Add Payload to PDU before sending it down to transport layer */
 #define P9_TRANS_PREF_PAYLOAD_DEF  0x0
-/* Send pay load seperately to transport layer along with PDU.*/
+/* Send pay load separately to transport layer along with PDU.*/
 #define P9_TRANS_PREF_PAYLOAD_SEP  0x1
 
 /**
index ec6acf2f1c0bba3dfa9b6ae7f325d1b22330b824..2c0d309c738125c3dda7c8969e7f44d9ad9b8239 100644 (file)
@@ -84,6 +84,8 @@ enum {
        HCI_SERVICE_CACHE,
        HCI_LINK_KEYS,
        HCI_DEBUG_KEYS,
+
+       HCI_RESET,
 };
 
 /* HCI ioctl defines */
index f688478bfb84a4afc62039e57e212978ab24929b..f33d3634113201257b300bc70684e48b9a921f17 100644 (file)
@@ -69,7 +69,7 @@ void cfcnfg_remove(struct cfcnfg *cfg);
  *             cfcnfg_add_adapt_layer to specify PHY for the link.
  * @pref:      The phy (link layer) preference.
  * @fcs:       Specify if checksum is used in CAIF Framing Layer.
- * @stx:       Specify if Start Of Frame eXtention is used.
+ * @stx:       Specify if Start Of Frame extension is used.
  */
 
 void
index fa157712e98277f3fdb82c8c731e564058565fe5..a79b6cfb02a8dcc252afa516e13f76f91af6eb67 100644 (file)
@@ -11,7 +11,7 @@ struct gnet_dump {
        struct sk_buff *  skb;
        struct nlattr *   tail;
 
-       /* Backward compatability */
+       /* Backward compatibility */
        int               compat_tc_stats;
        int               compat_xstats;
        void *            xstats;
index 30b49ed72f0d06bc4e1901273d6148b33d01a7c9..d516f00c8e0fc39c9aa0dc8a75aa2728df635388 100644 (file)
@@ -52,7 +52,7 @@ static inline struct net *skb_net(const struct sk_buff *skb)
         */
        if (likely(skb->dev && skb->dev->nd_net))
                return dev_net(skb->dev);
-       if (skb_dst(skb)->dev)
+       if (skb_dst(skb) && skb_dst(skb)->dev)
                return dev_net(skb_dst(skb)->dev);
        WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n",
                      __func__, __LINE__);
@@ -92,7 +92,7 @@ static inline struct net *skb_sknet(const struct sk_buff *skb)
 }
 /*
  * This one needed for single_open_net since net is stored directly in
- * private not as a struct i.e. seq_file_net cant be used.
+ * private not as a struct i.e. seq_file_net can't be used.
  */
 static inline struct net *seq_file_single_net(struct seq_file *seq)
 {
index 17fcd964f9d9ca43415a2721e94cb488016ffaa6..fb4b76d5d7f16b2983c6edf0c21ba0e6020a0dae 100644 (file)
@@ -204,7 +204,7 @@ struct irlap_cb {
 
        notify_t notify; /* Callbacks to IrLMP */
 
-       int    mtt_required;  /* Minumum turnaround time required */
+       int    mtt_required;  /* Minimum turnaround time required */
        int    xbofs_delay;   /* Nr of XBOF's used to MTT */
        int    bofs_count;    /* Negotiated extra BOFs */
        int    next_bofs;     /* Negotiated extra BOFs after next frame */
index 2942ad6ab932eb5e0f0fbbd8395803175b4592aa..eef53ebe3d76c8fad760c0a5ed2dcc9948b1be06 100644 (file)
@@ -42,7 +42,7 @@
 
 #define IRDA_TRANS 0x20    /* Asynchronous transparency modifier */       
 
-/* States for receving a frame in async mode */
+/* States for receiving a frame in async mode */
 enum {
        OUTSIDE_FRAME, 
        BEGIN_FRAME, 
index 205a3360156ed46d43a077e3cfabac1647ce236f..1121baa9f695828aa444de2b41f50b7cf0260f99 100644 (file)
@@ -173,7 +173,7 @@ struct iucv_handler {
        /*
         * The message_pending function is called after an icuv interrupt
         * type 0x06 or type 0x07 has been received. A new message is
-        * availabe and can be received with iucv_message_receive.
+        * available and can be received with iucv_message_receive.
         */
        void (*message_pending)(struct iucv_path *, struct iucv_message *);
        /*
index 3afdb21cc31d263e8e53a7de7e9ca46cde4b4b6f..5d5a6a4732effd8865918fe31c390c5067505534 100644 (file)
@@ -91,7 +91,7 @@
  * --------------------
  * The implementation goals were as follow :
  *     o Obvious : you should not need a PhD to understand what's happening,
- *             the benefit is easier maintainance.
+ *             the benefit is easier maintenance.
  *     o Flexible : it should accommodate a wide variety of driver
  *             implementations and be as flexible as the old API.
  *     o Lean : it should be efficient memory wise to minimise the impact
  *
  * Functions prototype uses union iwreq_data
  * -----------------------------------------
- * Some would have prefered functions defined this way :
+ * Some would have preferred functions defined this way :
  *     static int mydriver_ioctl_setrate(struct net_device *dev, 
  *                                       long rate, int auto)
  * 1) The kernel code doesn't "validate" the content of iwreq_data, and
index cefe1b37c493bed96ac7b2ac73f3584a07b91f74..025d4cc7bbf800c846113496bfec7a375afa07c4 100644 (file)
@@ -1294,7 +1294,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
  * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key
  * handler.
  * The update_tkip_key() call updates the driver with the new phase 1 key.
- * This happens everytime the iv16 wraps around (every 65536 packets). The
+ * This happens every time the iv16 wraps around (every 65536 packets). The
  * set_key() call will happen only once for each key (unless the AP did
  * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is
  * provided by update_tkip_key only. The trigger that makes mac80211 call this
@@ -1753,8 +1753,19 @@ enum ieee80211_ampdu_mlme_action {
  *     that TX/RX_STOP can pass NULL for this parameter.
  *     The @buf_size parameter is only valid when the action is set to
  *     %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder
- *     buffer size (number of subframes) for this session -- aggregates
- *     containing more subframes than this may not be transmitted to the peer.
+ *     buffer size (number of subframes) for this session -- the driver
+ *     may neither send aggregates containing more subframes than this
+ *     nor send aggregates in a way that lost frames would exceed the
+ *     buffer size. If just limiting the aggregate size, this would be
+ *     possible with a buf_size of 8:
+ *      - TX: 1.....7
+ *      - RX:  2....7 (lost frame #1)
+ *      - TX:        8..1...
+ *     which is invalid since #1 was now re-transmitted well past the
+ *     buffer size of 8. Correct ways to retransmit #1 would be:
+ *      - TX:       1 or 18 or 81
+ *     Even "189" would be wrong since 1 could be lost again.
+ *
  *     Returns a negative error code on failure.
  *     The callback can sleep.
  *
index d9549af6929a1d4c7567ba94a1811cd31a996ac4..65afc496620410c1fac61923f30802c367318daa 100644 (file)
@@ -32,7 +32,7 @@ static inline void *qdisc_priv(struct Qdisc *q)
    
    The result: [34]86 is not good choice for QoS router :-(
 
-   The things are not so bad, because we may use artifical
+   The things are not so bad, because we may use artificial
    clock evaluated by integration of network data flow
    in the most critical places.
  */
index f88429cad52a197a714cb138ad8d7e0473a5e9d0..8fce0621cad10a3e11a6a06dfa272f6583e65cd9 100644 (file)
@@ -64,6 +64,7 @@ struct rtable {
 
        __be32                  rt_dst; /* Path destination     */
        __be32                  rt_src; /* Path source          */
+       int                     rt_route_iif;
        int                     rt_iif;
        int                     rt_oif;
        __u32                   rt_mark;
@@ -80,12 +81,12 @@ struct rtable {
 
 static inline bool rt_is_input_route(struct rtable *rt)
 {
-       return rt->rt_iif != 0;
+       return rt->rt_route_iif != 0;
 }
 
 static inline bool rt_is_output_route(struct rtable *rt)
 {
-       return rt->rt_iif == 0;
+       return rt->rt_route_iif == 0;
 }
 
 struct ip_rt_acct {
index cc9185ca8fd13db1d64616101f2c97222fcab6fb..0f6e60a9c308a8e44c0671eb3c1134edc501e6ec 100644 (file)
@@ -422,7 +422,7 @@ struct sctp_cookie {
        __u32 adaptation_ind;
 
        __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH];
-       __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2];
+       __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2];
        __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS];
 
        /* This is a shim for my peer's INIT packet, followed by
index da0534d3401cdee0ed17ce84150365b73c3c9327..01810a3f19df7bc0dbd90ba71f5e49d597af0be9 100644 (file)
@@ -1749,7 +1749,7 @@ void sock_net_set(struct sock *sk, struct net *net)
 
 /*
  * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace.
- * They should not hold a referrence to a namespace in order to allow
+ * They should not hold a reference to a namespace in order to allow
  * to stop it.
  * Sockets after sk_change_net should be released using sk_release_kernel
  */
index eeb077dd735fa092e4a8f51ce2731b9fcee156ba..a8122dc56410c9f57039b02e6ca7f6a78c6d516d 100644 (file)
@@ -16,7 +16,7 @@ extern struct proto tcpv6_prot;
 
 struct flowi6;
 
-/* extention headers */
+/* extension headers */
 extern int                             ipv6_exthdrs_init(void);
 extern void                            ipv6_exthdrs_exit(void);
 extern int                             ipv6_frag_init(void);
index 3461aa1df1e0b6f6b6655fef2523608dee1dc33d..c799ba7b708b7d584cad819895731cfa28495a69 100644 (file)
@@ -286,7 +286,7 @@ struct wimax_dev;
  *     does not disconnect the device from the bus and return 0.
  *     If that fails, it should resort to some sort of cold or bus
  *     reset (even if it implies a bus disconnection and device
- *     dissapearance). In that case, -ENODEV should be returned to
+ *     disappearance). In that case, -ENODEV should be returned to
  *     indicate the device is gone.
  *     This operation has to be synchronous, and return only when the
  *     reset is complete. In case of having had to resort to bus/cold
index 85926231c07a519f8a14e4c7d1668fb1f80391e2..d86fffd3c03cc768189a67e775042173b508d05e 100644 (file)
@@ -28,7 +28,7 @@ struct wpan_phy {
        struct mutex pib_lock;
 
        /*
-        * This is a PIB acording to 802.15.4-2006.
+        * This is a PIB according to 802.15.4-2006.
         * We do not provide timing-related variables, as they
         * aren't used outside of driver
         */
index 9b2c30897e5037f79cb51081e8a7015258fc7918..f2902ef7ab75cdf2f81880b95db6fea4486bd461 100644 (file)
@@ -148,7 +148,7 @@ struct rxkad_challenge {
  * Kerberos security type-2 response packet
  */
 struct rxkad_response {
-       __be32          version;        /* version of this reponse type */
+       __be32          version;        /* version of this response type */
        __be32          __pad;
 
        /* encrypted bit of the response */
index 8a143ca7987877db8cb00e6e7d2422ed061dc65d..652dec23051481b143c27bc41fefc8c183f3f028 100644 (file)
@@ -75,7 +75,7 @@ struct fcp_cmnd32 {
 #define        FCP_PTA_SIMPLE      0   /* simple task attribute */
 #define        FCP_PTA_HEADQ       1   /* head of queue task attribute */
 #define        FCP_PTA_ORDERED     2   /* ordered task attribute */
-#define        FCP_PTA_ACA         4   /* auto. contigent allegiance */
+#define        FCP_PTA_ACA         4   /* auto. contingent allegiance */
 #define        FCP_PTA_MASK        7   /* mask for task attribute field */
 #define        FCP_PRI_SHIFT       3   /* priority field starts in bit 3 */
 #define        FCP_PRI_RESVD_MASK  0x80        /* reserved bits in priority field */
index c3e1cbcc2ad261448f677d4e9cb6e884708717ca..ddb04568a50976195d228b83bed743d0d44ac39c 100644 (file)
@@ -292,7 +292,7 @@ enum iscsi_param {
        ISCSI_PARAM_PERSISTENT_PORT,
        ISCSI_PARAM_SESS_RECOVERY_TMO,
 
-       /* pased in through bind conn using transport_fd */
+       /* passed in through bind conn using transport_fd */
        ISCSI_PARAM_CONN_PORT,
        ISCSI_PARAM_CONN_ADDRESS,
 
index 24193c1b0da0eaf99478c8801d00439b17378249..a3cbda4ddb5cb03078bdd965718537cce440e321 100644 (file)
@@ -260,7 +260,7 @@ struct fcoe_dev_stats {
 /**
  * struct fc_seq_els_data - ELS data used for passing ELS specific responses
  * @reason: The reason for rejection
- * @explan: The explaination of the rejection
+ * @explan: The explanation of the rejection
  *
  * Mainly used by the exchange manager layer.
  */
@@ -525,7 +525,7 @@ struct libfc_function_template {
                        struct fc_frame *);
 
        /*
-        * Send an ELS response using infomation from the received frame.
+        * Send an ELS response using information from the received frame.
         *
         * STATUS: OPTIONAL
         */
@@ -663,7 +663,7 @@ struct libfc_function_template {
        int (*rport_logoff)(struct fc_rport_priv *);
 
        /*
-        * Recieve a request from a remote port.
+        * Receive a request from a remote port.
         *
         * STATUS: OPTIONAL
         */
@@ -704,7 +704,7 @@ struct libfc_function_template {
                                         void *));
 
        /*
-        * Cleanup the FCP layer, used durring link down and reset
+        * Cleanup the FCP layer, used during link down and reset
         *
         * STATUS: OPTIONAL
         */
index e6b9fd2eea3451fa352cc8a3e24f6f7cf9fa093d..ac0cc1d925ef255eceac1d731944bad82ef7d87f 100644 (file)
@@ -52,7 +52,7 @@ struct iscsi_segment {
        iscsi_segment_done_fn_t *done;
 };
 
-/* Socket connection recieve helper */
+/* Socket connection receive helper */
 struct iscsi_tcp_recv {
        struct iscsi_hdr        *hdr;
        struct iscsi_segment    segment;
index 53a9e886612b8c30fd4b4fc3d2814a9433bb551b..0a5079974fe98ce1a0148ff6796dbf03e52c3678 100644 (file)
@@ -265,7 +265,7 @@ int osd_execute_request_async(struct osd_request *or,
  * @osi           - Recievs a more detailed error report information (optional).
  * @silent        - Do not print to dmsg (Even if enabled)
  * @bad_obj_list  - Some commands act on multiple objects. Failed objects will
- *                  be recieved here (optional)
+ *                  be received here (optional)
  * @max_obj       - Size of @bad_obj_list.
  * @bad_attr_list - List of failing attributes (optional)
  * @max_attr      - Size of @bad_attr_list.
index e7e385842a38746d348eee460af6bc3d9e1a2ab6..f1f2644137b87a1848403665ff396af423eb4398 100644 (file)
@@ -46,7 +46,7 @@ struct blk_queue_tags;
 enum {
        SCSI_QDEPTH_DEFAULT,    /* default requested change, e.g. from sysfs */
        SCSI_QDEPTH_QFULL,      /* scsi-ml requested due to queue full */
-       SCSI_QDEPTH_RAMP_UP,    /* scsi-ml requested due to threshhold event */
+       SCSI_QDEPTH_RAMP_UP,    /* scsi-ml requested due to threshold event */
 };
 
 struct scsi_host_template {
index 59816fe31e6853668458640a4a46ac586f3909fb..2a65167a8f10e80ded5aa5532e8fbdb04cf3e7dc 100644 (file)
@@ -192,9 +192,9 @@ struct fc_vport_identifiers {
  *
  * This structure exists for each FC port is a virtual FC port. Virtual
  * ports share the physical link with the Physical port. Each virtual
- * ports has a unique presense on the SAN, and may be instantiated via
+ * ports has a unique presence on the SAN, and may be instantiated via
  * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a
- * unique presense, each vport has it's own view of the fabric,
+ * unique presence, each vport has it's own view of the fabric,
  * authentication privilege, and priorities.
  *
  * A virtual port may support 1 or more FC4 roles. Typically it is a
@@ -370,7 +370,7 @@ struct fc_rport {   /* aka fc_starget_attrs */
 /*
  * FC SCSI Target Attributes
  *
- * The SCSI Target is considered an extention of a remote port (as
+ * The SCSI Target is considered an extension of a remote port (as
  * a remote port can be more than a SCSI Target). Within the scsi
  * subsystem, we leave the Target as a separate entity. Doing so
  * provides backward compatibility with prior FC transport api's,
index f1dcefe4532bce8bccaab9ca896f447888983eec..02cbb50225bb1e5c80c5b84b65de10c7c222b276 100644 (file)
 #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */
 #define AC97_SCAP_NO_SPDIF     (1<<9)  /* don't build SPDIF controls */
 #define AC97_SCAP_EAPD_LED     (1<<10) /* EAPD as mute LED */
-#define AC97_SCAP_POWER_SAVE   (1<<11) /* capable for aggresive power-saving */
+#define AC97_SCAP_POWER_SAVE   (1<<11) /* capable for aggressive power-saving */
 
 /* ac97->flags */
 #define AC97_HAS_PC_BEEP       (1<<0)  /* force PC Speaker usage */
index e67db2869360292e68b7a38dcfd2f7e6d8c5404a..404acb859cee6a560235671f7c3b808dcec3e0b1 100644 (file)
@@ -191,7 +191,7 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
  * Returns zero if successful or a negative error code.
  *
  * All slaves must be the same type (returning the same information
- * via info callback).  The fucntion doesn't check it, so it's your
+ * via info callback).  The function doesn't check it, so it's your
  * responsibility.
  *
  * Also, some additional limitations:
index 49b03c9e5e551554b71640fb3dd397beb4c28a06..8008c59288a6869efca9a2a7c5f049ae9256d5f7 100644 (file)
@@ -147,7 +147,7 @@ struct dsp_pcm_channel_descriptor {
 };
 
 struct dsp_spos_instance {
-       struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */
+       struct dsp_symbol_desc symbol_table; /* currently available loaded symbols in SP */
 
        int nmodules;
        struct dsp_module_desc * modules; /* modules loaded into SP */
index 1774ff5ff6321eb44eeaa68b51481898e3187d1f..1f59ea2a4a76b30214a907b2b7ac3199edb029ab 100644 (file)
@@ -193,7 +193,7 @@ struct hdspm_version {
  * 32768 Bytes
  */
 
-/* organisation is 64 channelfader in a continous memory block */
+/* organisation is 64 channelfader in a continuous memory block */
 /* equivalent to hardware definition, maybe for future feature of mmap of
  * them
  */
index ddc2b3d6be03dd8ce694f04fcdaf16aca8e85c7a..f72c1039a6fb6ef91fc454119eab21eff32e39a3 100644 (file)
@@ -23,7 +23,7 @@
 /*
  * SoC dynamic audio power management
  *
- * We can have upto 4 power domains
+ * We can have up to 4 power domains
  *     1. Codec domain - VREF, VMID
  *     Usually controlled at codec probe/remove, although can be set
  *     at stream time if power is not needed for sidetone, etc.
index c15ed5026fb519a746ea6038d3f1709d1dea706f..1d3b5b2f0dbcfcb51199b52383bc9fdc07cde746 100644 (file)
@@ -22,7 +22,7 @@
  * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and
  * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use
  * 16-byte CDBs by default and require an extra allocation for
- * 32-byte CDBs to becasue of legacy issues.
+ * 32-byte CDBs to because of legacy issues.
  *
  * Within TCM Core there are no such legacy limitiations, so we go ahead
  * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size()
@@ -302,7 +302,7 @@ struct t10_wwn {
 
 
 /*
- * Used by TCM Core internally to signal if >= SPC-3 peristent reservations
+ * Used by TCM Core internally to signal if >= SPC-3 persistent reservations
  * emulation is enabled or disabled, or running in with TCM/pSCSI passthrough
  * mode
  */
@@ -934,7 +934,7 @@ struct se_portal_group {
        struct list_head        acl_node_list;
        struct se_lun           *tpg_lun_list;
        struct se_lun           tpg_virt_lun0;
-       /* List of TCM sessions assoicated wth this TPG */
+       /* List of TCM sessions associated wth this TPG */
        struct list_head        tpg_sess_list;
        /* Pointer to $FABRIC_MOD dependent code */
        struct target_core_fabric_ops *se_tpg_tfo;
index 5eb8b1ae59d1ac9333c378b168c18d9fba701c41..dc78f77f9450c042c0d10bf9d0bb4f85f71cf836 100644 (file)
@@ -35,7 +35,7 @@ struct target_core_fabric_ops {
        /*
         * Optional function pointer for TCM to perform command map
         * from TCM processing thread context, for those struct se_cmd
-        * initally allocated in interrupt context.
+        * initially allocated in interrupt context.
         */
        int (*new_cmd_map)(struct se_cmd *);
        /*
index 78f18adb49c88fee50ef7a6e2bf3dabf23f851a2..bf366547da252077cf168522a1ff22735a10d3a5 100644 (file)
@@ -401,9 +401,9 @@ TRACE_EVENT(block_plug,
 
 DECLARE_EVENT_CLASS(block_unplug,
 
-       TP_PROTO(struct request_queue *q),
+       TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
 
-       TP_ARGS(q),
+       TP_ARGS(q, depth, explicit),
 
        TP_STRUCT__entry(
                __field( int,           nr_rq                   )
@@ -411,7 +411,7 @@ DECLARE_EVENT_CLASS(block_unplug,
        ),
 
        TP_fast_assign(
-               __entry->nr_rq  = q->rq.count[READ] + q->rq.count[WRITE];
+               __entry->nr_rq = depth;
                memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
        ),
 
@@ -419,31 +419,19 @@ DECLARE_EVENT_CLASS(block_unplug,
 );
 
 /**
- * block_unplug_timer - timed release of operations requests in queue to device driver
- * @q: request queue to unplug
- *
- * Unplug the request queue @q because a timer expired and allow block
- * operation requests to be sent to the device driver.
- */
-DEFINE_EVENT(block_unplug, block_unplug_timer,
-
-       TP_PROTO(struct request_queue *q),
-
-       TP_ARGS(q)
-);
-
-/**
- * block_unplug_io - release of operations requests in request queue
+ * block_unplug - release of operations requests in request queue
  * @q: request queue to unplug
+ * @depth: number of requests just added to the queue
+ * @explicit: whether this was an explicit unplug, or one from schedule()
  *
  * Unplug request queue @q because device driver is scheduled to work
  * on elements in the request queue.
  */
-DEFINE_EVENT(block_unplug, block_unplug_io,
+DEFINE_EVENT(block_unplug, block_unplug,
 
-       TP_PROTO(struct request_queue *q),
+       TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
 
-       TP_ARGS(q)
+       TP_ARGS(q, depth, explicit)
 );
 
 /**
index dba7de2ee4a86f8643807dd5bc3f31c91e30b8de..c563968e926c07a23467636abca46d422b9e47fc 100644 (file)
@@ -32,7 +32,7 @@ struct kyrofb_info {
        u32 PIXCLK;     /* Pixel Clock       */
        u32 HCLK;       /* Hor Clock         */
 
-       /* Usefull to hold depth here for Linux */
+       /* Useful to hold depth here for Linux */
        u8 PIXDEPTH;
 
 #ifdef CONFIG_MTRR
index 08b663782956a3aa3f295acc17c7bf581173ca83..bc5013e8059d562cbffd46c214c7c7e485abf76d 100644 (file)
@@ -129,7 +129,7 @@ struct neofb_par {
        unsigned char CRTC[25];         /* Crtc Controller */
        unsigned char Sequencer[5];     /* Video Sequencer */
        unsigned char Graphics[9];      /* Video Graphics */
-       unsigned char Attribute[21];    /* Video Atribute */
+       unsigned char Attribute[21];    /* Video Attribute */
 
        unsigned char GeneralLockReg;
        unsigned char ExtCRTDispAddr;
index 001b935e71c46287084b70552c0727b1b902d0fd..3d7c4b492ec61944c3af0cef9a56c30d7f23badd 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
  * 
- * Ulf Carlsson - Compability with the IRIX structures added
+ * Ulf Carlsson - Compatibility with the IRIX structures added
  */
 
 #ifndef _SGI_NEWPORT_H
index fdd74f1a67914f9c024f8268d8f5ea6af3b66cd9..6dc5df9e43f310fc0bab70ac25f51d71c43cdbab 100644 (file)
@@ -151,7 +151,7 @@ struct sisfb_cmd {
        __u32  sisfb_result[4];
 };
 
-/* Addtional IOCTLs for communication sisfb <> X driver                */
+/* Additional IOCTLs for communication sisfb <> X driver                */
 /* If changing this, vgatypes.h must also be changed (for X driver)    */
 
 /* ioctl for identifying and giving some info (esp. memory heap start) */
index b52f07381243efdcd125a1c5a6c3a8d090dbd4e5..c449eace12cda1f65535188588e25d70fc4c1161 100644 (file)
 #define DAC_READ               FBIINIT2        /* in remap mode */
 #define FBIINIT3               0x021c          /* fbi controls */
 #  define DISABLE_TEXTURE        BIT(6)
-#  define Y_SWAP_ORIGIN_SHIFT    22            /* Y swap substraction value */
+#  define Y_SWAP_ORIGIN_SHIFT    22            /* Y swap subtraction value */
 #define HSYNC                  0x0220
 #define VSYNC                  0x0224
 #define DAC_DATA               0x022c
 #  define DACREG_CR0_24BPP       0x50          /* mode 5 */
 #define        DACREG_CR1_I            0x05
 #define DACREG_CC_I            0x06
-#  define DACREG_CC_CLKA         BIT(7)        /* clk A controled by regs */
+#  define DACREG_CC_CLKA         BIT(7)        /* clk A controlled by regs */
 #  define DACREG_CC_CLKA_C       (2<<4)        /* clk A uses reg C */
-#  define DACREG_CC_CLKB         BIT(3)        /* clk B controled by regs */
+#  define DACREG_CC_CLKB         BIT(3)        /* clk B controlled by regs */
 #  define DACREG_CC_CLKB_D       3             /* clkB uses reg D */
 #define DACREG_AC0_I           0x48            /* clock A reg C */
 #define DACREG_AC1_I           0x49
index 7a8262c375cc874f29aecf800f0a6820039060df..0360b15f4883adf9aa044c5be64668d41bb15002 100644 (file)
@@ -51,7 +51,7 @@
 
 /*
  * The offset of the ELF paddr field from the acutal required
- * psuedo-physical address (numeric).
+ * pseudo-physical address (numeric).
  *
  * This is used to maintain backwards compatibility with older kernels
  * which wrote __PAGE_OFFSET into that field. This field defaults to 0
index 56240e724d9a31dc4ef43647afcf354b8a70f108..d886b1e9278e32e2fcffd5fb4005ee16a7061a33 100644 (file)
@@ -924,14 +924,6 @@ menuconfig EXPERT
           environments which can tolerate a "non-standard" kernel.
           Only use this if you really know what you are doing.
 
-config EMBEDDED
-       bool "Embedded system"
-       select EXPERT
-       help
-         This option should be enabled if compiling the kernel for
-         an embedded system so certain expert options are available
-         for configuration.
-
 config UID16
        bool "Enable 16-bit UID system calls" if EXPERT
        depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION)
@@ -1104,6 +1096,14 @@ config AIO
           by some high performance threaded applications. Disabling
           this option saves about 7k.
 
+config EMBEDDED
+       bool "Embedded system"
+       select EXPERT
+       help
+         This option should be enabled if compiling the kernel for
+         an embedded system so certain expert options are available
+         for configuration.
+
 config HAVE_PERF_EVENTS
        bool
        help
@@ -1226,6 +1226,7 @@ config SLAB
          per cpu and per node queues.
 
 config SLUB
+       depends on BROKEN || NUMA || !DISCONTIGMEM
        bool "SLUB (Unqueued Allocator)"
        help
           SLUB is a slab allocator that minimizes cache line usage
index 3e011215779563e3c739fcbc70021d601c506bc9..c0851a8e030cbcf38701f77a5d79e253d81e0327 100644 (file)
@@ -186,7 +186,7 @@ dev_t name_to_dev_t(char *name)
                goto done;
 
        /*
-        * try non-existant, but valid partition, which may only exist
+        * try non-existent, but valid partition, which may only exist
         * after revalidating the disk, like partitioned md devices
         */
        while (p > s && isdigit(p[-1]))
index 0e732e92e22fa56a3f1c89af08ecf04a06a65cc8..7385de25788a80c0d9cb51e6a9921997ae135e74 100644 (file)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -704,7 +704,7 @@ long do_msgsnd(int msqid, long mtype, void __user *mtext,
        msq->q_stime = get_seconds();
 
        if (!pipelined_send(msq, msg)) {
-               /* noone is waiting for this message, enqueue it */
+               /* no one is waiting for this message, enqueue it */
                list_add_tail(&msg->m_list, &msq->q_messages);
                msq->q_cbytes += msgsz;
                msq->q_qnum++;
@@ -842,7 +842,7 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext,
                 * Disable preemption.  We don't hold a reference to the queue
                 * and getting a reference would defeat the idea of a lockless
                 * operation, thus the code relies on rcu to guarantee the
-                * existance of msq:
+                * existence of msq:
                 * Prior to destruction, expunge_all(-EIRDM) changes r_msg.
                 * Thus if r_msg is -EAGAIN, then the queue not yet destroyed.
                 * rcu_read_lock() prevents preemption between reading r_msg
index ae040a0727c2101b0acf03c915669449aff37b90..34193ed69fbe03bcd6d5514f557e5eed5865b96f 100644 (file)
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1362,7 +1362,7 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
         * semid identifiers are not unique - find_alloc_undo may have
         * allocated an undo structure, it was invalidated by an RMID
         * and now a new array with received the same id. Check and fail.
-        * This case can be detected checking un->semid. The existance of
+        * This case can be detected checking un->semid. The existence of
         * "un" itself is guaranteed by rcu.
         */
        error = -EIDRM;
index 8644452f5c4cd687b9112b7fb19a7ebe34ef929c..729acb7e31487f67660a3202d818f1f55b4fd6e5 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1056,7 +1056,7 @@ SYSCALL_DEFINE1(shmdt, char __user *, shmaddr)
        /*
         * We need look no further than the maximum address a fragment
         * could possibly have landed at. Also cast things to loff_t to
-        * prevent overflows and make comparisions vs. equal-width types.
+        * prevent overflows and make comparisons vs. equal-width types.
         */
        size = PAGE_ALIGN(size);
        while (vma && (loff_t)(vma->vm_end - addr) <= size) {
index 37b2bea170c898986e894fdadcd4a3f282fcca13..e99dda04b1268133f796f821af148bd4ed7bf722 100644 (file)
@@ -607,7 +607,7 @@ void audit_trim_trees(void)
                spin_lock(&hash_lock);
                list_for_each_entry(node, &tree->chunks, list) {
                        struct audit_chunk *chunk = find_chunk(node);
-                       /* this could be NULL if the watch is dieing else where... */
+                       /* this could be NULL if the watch is dying else where... */
                        struct inode *inode = chunk->mark.i.inode;
                        node->index |= 1U<<31;
                        if (iterate_mounts(compare_root, inode, root_mnt))
index f49a0318c2ed750437dd3ca810ff90e119994f68..b33513a08beb9e48bdfeb5ec3037a8acd9b6a7c1 100644 (file)
@@ -1011,7 +1011,7 @@ static int audit_log_pid_context(struct audit_context *context, pid_t pid,
 /*
  * to_send and len_sent accounting are very loose estimates.  We aren't
  * really worried about a hard cap to MAX_EXECVE_AUDIT_LEN so much as being
- * within about 500 bytes (next page boundry)
+ * within about 500 bytes (next page boundary)
  *
  * why snprintf?  an int is up to 12 digits long.  if we just assumed when
  * logging that a[%d]= was going to be 16 characters long we would be wasting
index e31b220a743deda483fe4ec300254affd76f87e0..25c7eb52de1a1f62dfd0354e8e98060717a9df3f 100644 (file)
@@ -157,7 +157,7 @@ struct css_id {
 };
 
 /*
- * cgroup_event represents events which userspace want to recieve.
+ * cgroup_event represents events which userspace want to receive.
  */
 struct cgroup_event {
        /*
index c95fc4df0faad535e70165971388c09a40580b73..12b7458f23b12a2a68b30857fa913f424cb71a4c 100644 (file)
@@ -126,7 +126,7 @@ static void cpu_hotplug_done(void)
 #else /* #if CONFIG_HOTPLUG_CPU */
 static void cpu_hotplug_begin(void) {}
 static void cpu_hotplug_done(void) {}
-#endif /* #esle #if CONFIG_HOTPLUG_CPU */
+#endif /* #else #if CONFIG_HOTPLUG_CPU */
 
 /* Need to know about CPUs going up/down? */
 int __ref register_cpu_notifier(struct notifier_block *nb)
index cefd4a11f6d9e27b2ae146ef0be6bf940bf41587..bad6786dee88844d61dae27f83d82dbf1c40840f 100644 (file)
@@ -538,7 +538,7 @@ return_normal:
 
        /*
         * For single stepping, try to only enter on the processor
-        * that was single stepping.  To gaurd against a deadlock, the
+        * that was single stepping.  To guard against a deadlock, the
         * kernel will only try for the value of sstep_tries before
         * giving up and continuing on.
         */
index 6bc6e3bc4f9c309b72a34b70718ac10cd3d14d83..be14779bcef66751bbbacc020c166f90ab38ff59 100644 (file)
@@ -441,9 +441,9 @@ static int kdb_check_regs(void)
  *     symbol name, and offset to the caller.
  *
  *     The argument may consist of a numeric value (decimal or
- *     hexidecimal), a symbol name, a register name (preceeded by the
+ *     hexidecimal), a symbol name, a register name (preceded by the
  *     percent sign), an environment variable with a numeric value
- *     (preceeded by a dollar sign) or a simple arithmetic expression
+ *     (preceded by a dollar sign) or a simple arithmetic expression
  *     consisting of a symbol name, +/-, and a numeric constant value
  *     (offset).
  * Parameters:
@@ -1335,7 +1335,7 @@ void kdb_print_state(const char *text, int value)
  *     error           The hardware-defined error code
  *     reason2         kdb's current reason code.
  *                     Initially error but can change
- *                     acording to kdb state.
+ *                     according to kdb state.
  *     db_result       Result code from break or debug point.
  *     regs            The exception frame at time of fault/breakpoint.
  *                     should always be valid.
index 6b2485dcb0504ef8af79ca79a3de1e9d1f556023..5532dd37aa864e111e3005a5c523b05d864093f0 100644 (file)
@@ -545,7 +545,7 @@ int kdb_putword(unsigned long addr, unsigned long word, size_t size)
  *     Mask for process state.
  * Notes:
  *     The mask folds data from several sources into a single long value, so
- *     be carefull not to overlap the bits.  TASK_* bits are in the LSB,
+ *     be careful not to overlap the bits.  TASK_* bits are in the LSB,
  *     special cases like UNRUNNABLE are in the MSB.  As of 2.6.10-rc1 there
  *     is no overlap between TASK_* and EXIT_* but that may not always be
  *     true, so EXIT_* bits are shifted left 16 bits before being stored in
index 6a488ad2dce5bf9a1b6ba24376e1449e603687e4..f5d2f63bae0b70b2818edd92e06040906f115216 100644 (file)
@@ -841,7 +841,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
        /* Let father know we died
         *
         * Thread signals are configurable, but you aren't going to use
-        * that to send signals to arbitary processes.
+        * that to send signals to arbitrary processes.
         * That stops right now.
         *
         * If the parent exec id doesn't match the exec id we saved
index dfb924ffe65ba758627864ac45c55bb9bda290bc..fe28dc282eae43af920d2937e8f9c5dc631ffa43 100644 (file)
@@ -1886,7 +1886,7 @@ retry:
        restart->futex.val = val;
        restart->futex.time = abs_time->tv64;
        restart->futex.bitset = bitset;
-       restart->futex.flags = flags;
+       restart->futex.flags = flags | FLAGS_HAS_TIMEOUT;
 
        ret = -ERESTART_RESTARTBLOCK;
 
index 9017478c5d4c3f224cde995518976ed8d88d79d5..87fdb3f8db14c50e6238a68267834169ce6b6300 100644 (file)
@@ -81,7 +81,11 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) =
        }
 };
 
-static int hrtimer_clock_to_base_table[MAX_CLOCKS];
+static int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
+       [CLOCK_REALTIME]        = HRTIMER_BASE_REALTIME,
+       [CLOCK_MONOTONIC]       = HRTIMER_BASE_MONOTONIC,
+       [CLOCK_BOOTTIME]        = HRTIMER_BASE_BOOTTIME,
+};
 
 static inline int hrtimer_clockid_to_base(clockid_t clock_id)
 {
@@ -1722,10 +1726,6 @@ static struct notifier_block __cpuinitdata hrtimers_nb = {
 
 void __init hrtimers_init(void)
 {
-       hrtimer_clock_to_base_table[CLOCK_REALTIME] = HRTIMER_BASE_REALTIME;
-       hrtimer_clock_to_base_table[CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC;
-       hrtimer_clock_to_base_table[CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME;
-
        hrtimer_cpu_notify(&hrtimers_nb, (unsigned long)CPU_UP_PREPARE,
                          (void *)(long)smp_processor_id());
        register_cpu_notifier(&hrtimers_nb);
index 1dafc8652bd893aceef6194cfbd6e03134d21e91..4af1e2b244cb258f24ed7644b18965ac9e65bc82 100644 (file)
@@ -415,7 +415,7 @@ out:
  *     @desc:  the interrupt description structure for this irq
  *
  *     Interrupt occures on the falling and/or rising edge of a hardware
- *     signal. The occurence is latched into the irq controller hardware
+ *     signal. The occurrence is latched into the irq controller hardware
  *     and must be acked in order to be reenabled. After the ack another
  *     interrupt can happen on the same source even before the first one
  *     is handled by the associated event handler. If this happens it
index 12a80fdae11cc7c0d4d76b34d4cae37c2343d1dd..07c1611f38992ac98e5e8bb716d4d41f01290ea4 100644 (file)
@@ -1051,6 +1051,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
        register_irq_proc(irq, desc);
        new->dir = NULL;
        register_handler_proc(irq, new);
+       free_cpumask_var(mask);
 
        return 0;
 
index bc6194698dfd48edf986d5380d1d9e487ba17c4a..47420908fba0a97df65676862df84fd63fdeb839 100644 (file)
@@ -35,7 +35,7 @@ void irq_move_masked_irq(struct irq_data *idata)
         * do the disable, re-program, enable sequence.
         * This is *not* particularly important for level triggered
         * but in a edge trigger case, we might be setting rte
-        * when an active trigger is comming in. This could
+        * when an active trigger is coming in. This could
         * cause some ioapics to mal-function.
         * Being paranoid i guess!
         *
index dd201bd35103e221fc14debc1d09419529bf6f3d..834899f2500fc550d3da66306d31386eb80baf91 100644 (file)
@@ -419,7 +419,7 @@ int show_interrupts(struct seq_file *p, void *v)
        } else {
                seq_printf(p, " %8s", "None");
        }
-#ifdef CONFIG_GENIRC_IRQ_SHOW_LEVEL
+#ifdef CONFIG_GENERIC_IRQ_SHOW_LEVEL
        seq_printf(p, " %-8s", irqd_is_level_type(&desc->irq_data) ? "Level" : "Edge");
 #endif
        if (desc->name)
index 4e240a378df6d10a67b027aa924a1fb748d42e66..87b77de03dd33942b29953909aaf5727bb5e2bdd 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/vmalloc.h>
 #include <linux/swap.h>
 #include <linux/kmsg_dump.h>
+#include <linux/syscore_ops.h>
 
 #include <asm/page.h>
 #include <asm/uaccess.h>
@@ -144,7 +145,7 @@ static int do_kimage_alloc(struct kimage **rimage, unsigned long entry,
        /* Initialize the list of destination pages */
        INIT_LIST_HEAD(&image->dest_pages);
 
-       /* Initialize the list of unuseable pages */
+       /* Initialize the list of unusable pages */
        INIT_LIST_HEAD(&image->unuseable_pages);
 
        /* Read in the segments */
@@ -454,7 +455,7 @@ static struct page *kimage_alloc_normal_control_pages(struct kimage *image,
        /* Deal with the destination pages I have inadvertently allocated.
         *
         * Ideally I would convert multi-page allocations into single
-        * page allocations, and add everyting to image->dest_pages.
+        * page allocations, and add everything to image->dest_pages.
         *
         * For now it is simpler to just free the pages.
         */
@@ -602,7 +603,7 @@ static void kimage_free_extra_pages(struct kimage *image)
        /* Walk through and free any extra destination pages I may have */
        kimage_free_page_list(&image->dest_pages);
 
-       /* Walk through and free any unuseable pages I have cached */
+       /* Walk through and free any unusable pages I have cached */
        kimage_free_page_list(&image->unuseable_pages);
 
 }
@@ -1532,6 +1533,11 @@ int kernel_kexec(void)
                local_irq_disable();
                /* Suspend system devices */
                error = sysdev_suspend(PMSG_FREEZE);
+               if (!error) {
+                       error = syscore_suspend();
+                       if (error)
+                               sysdev_resume();
+               }
                if (error)
                        goto Enable_irqs;
        } else
@@ -1546,6 +1552,7 @@ int kernel_kexec(void)
 
 #ifdef CONFIG_KEXEC_JUMP
        if (kexec_image->preserve_context) {
+               syscore_resume();
                sysdev_resume();
  Enable_irqs:
                local_irq_enable();
index 684ab3f7dd72faec6e5036be77f1acd6c648327b..3b34d2732bcecb3719b67976f5b8b7bc66e68b2b 100644 (file)
@@ -139,7 +139,7 @@ static void create_kthread(struct kthread_create_info *create)
  * in @node, to get NUMA affinity for kthread stack, or else give -1.
  * When woken, the thread will run @threadfn() with @data as its
  * argument. @threadfn() can either call do_exit() directly if it is a
- * standalone thread for which noone will call kthread_stop(), or
+ * standalone thread for which no one will call kthread_stop(), or
  * return when 'kthread_should_stop()' is true (which means
  * kthread_stop() has been called).  The return value should be zero
  * or a negative error number; it will be passed to kthread_stop().
index ee74b35e528d1f6a909e29cfbe5d76a8a79fc837..376066e10413f5179c4f72ce3cbfc5c83744f5fc 100644 (file)
@@ -153,7 +153,7 @@ static inline void store_stacktrace(struct task_struct *tsk,
 }
 
 /**
- * __account_scheduler_latency - record an occured latency
+ * __account_scheduler_latency - record an occurred latency
  * @tsk - the task struct of the task hitting the latency
  * @usecs - the duration of the latency in microseconds
  * @inter - 1 if the sleep was interruptible, 0 if uninterruptible
index 0d2058da80f51888b503f4e92829bddbe884b264..53a68956f1311497568930994cf69d4031763478 100644 (file)
@@ -2309,7 +2309,7 @@ void trace_hardirqs_on_caller(unsigned long ip)
        if (unlikely(curr->hardirqs_enabled)) {
                /*
                 * Neither irq nor preemption are disabled here
-                * so this is racy by nature but loosing one hit
+                * so this is racy by nature but losing one hit
                 * in a stat is not a big deal.
                 */
                __debug_atomic_inc(redundant_hardirqs_on);
@@ -2620,7 +2620,7 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
        if (!graph_lock())
                return 0;
        /*
-        * Make sure we didnt race:
+        * Make sure we didn't race:
         */
        if (unlikely(hlock_class(this)->usage_mask & new_mask)) {
                graph_unlock();
index 1f9f7bc56ca190185270689ff801ca62354b001a..d5938a5c19c47516499ef289b2087620783e23df 100644 (file)
@@ -809,7 +809,7 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
                wait_for_zero_refcount(mod);
 
        mutex_unlock(&module_mutex);
-       /* Final destruction now noone is using it. */
+       /* Final destruction now no one is using it. */
        if (mod->exit != NULL)
                mod->exit();
        blocking_notifier_call_chain(&module_notify_list,
@@ -2777,7 +2777,7 @@ static struct module *load_module(void __user *umod,
        mod->state = MODULE_STATE_COMING;
 
        /* Now sew it into the lists so we can get lockdep and oops
-        * info during argument parsing.  Noone should access us, since
+        * info during argument parsing.  No one should access us, since
         * strong_try_module_get() will fail.
         * lockdep/oops can run asynchronous, so use the RCU list insertion
         * function to insert in a way safe to concurrent readers.
@@ -2971,7 +2971,7 @@ static const char *get_ksymbol(struct module *mod,
        else
                nextval = (unsigned long)mod->module_core+mod->core_text_size;
 
-       /* Scan for closest preceeding symbol, and next symbol. (ELF
+       /* Scan for closest preceding symbol, and next symbol. (ELF
           starts real symbols at 1). */
        for (i = 1; i < mod->num_symtab; i++) {
                if (mod->symtab[i].st_shndx == SHN_UNDEF)
index a5889fb28ecff33eaf5fae64c9d2a50ca03cb2f7..c4195fa98900b65528bf5ee2229f7eeadfa5c4d7 100644 (file)
@@ -245,7 +245,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
                }
                __set_task_state(task, state);
 
-               /* didnt get the lock, go to sleep: */
+               /* didn't get the lock, go to sleep: */
                spin_unlock_mutex(&lock->wait_lock, flags);
                preempt_enable_no_resched();
                schedule();
index 751019415d232b04f73273302ed707b39bad66df..b91941df5e631f7d0e971ef71489a616f5f2926e 100644 (file)
@@ -262,7 +262,7 @@ static void padata_reorder(struct parallel_data *pd)
                /*
                 * This cpu has to do the parallel processing of the next
                 * object. It's waiting in the cpu's parallelization queue,
-                * so exit imediately.
+                * so exit immediately.
                 */
                if (PTR_ERR(padata) == -ENODATA) {
                        del_timer(&pd->timer);
@@ -284,7 +284,7 @@ static void padata_reorder(struct parallel_data *pd)
        /*
         * The next object that needs serialization might have arrived to
         * the reorder queues in the meantime, we will be called again
-        * from the timer function if noone else cares for it.
+        * from the timer function if no one else cares for it.
         */
        if (atomic_read(&pd->reorder_objects)
                        && !(pinst->flags & PADATA_RESET))
@@ -515,7 +515,7 @@ static void __padata_stop(struct padata_instance *pinst)
        put_online_cpus();
 }
 
-/* Replace the internal control stucture with a new one. */
+/* Replace the internal control structure with a new one. */
 static void padata_replace(struct padata_instance *pinst,
                           struct parallel_data *pd_new)
 {
@@ -768,7 +768,7 @@ static int __padata_remove_cpu(struct padata_instance *pinst, int cpu)
 }
 
  /**
- * padata_remove_cpu - remove a cpu from the one or both(serial and paralell)
+ * padata_remove_cpu - remove a cpu from the one or both(serial and parallel)
  *                     padata cpumasks.
  *
  * @pinst: padata instance
index 0da1411222b9a2e11c1de4ed228e4028e8aef2b1..7ab388a48a2eb2eb60551cc8a56dc748a429dae0 100644 (file)
@@ -95,7 +95,7 @@ static int parse_one(char *param,
        /* Find parameter */
        for (i = 0; i < num_params; i++) {
                if (parameq(param, params[i].name)) {
-                       /* Noone handled NULL, so do it here. */
+                       /* No one handled NULL, so do it here. */
                        if (!val && params[i].ops->set != param_set_bool)
                                return -EINVAL;
                        DEBUGP("They are equal!  Calling %p\n",
index c75925c4d1e29a3296bed32a6f0eeb7e6c189c29..8e81a9860a0d543c436716345b2ce0871229915b 100644 (file)
@@ -145,8 +145,8 @@ static struct srcu_struct pmus_srcu;
  */
 int sysctl_perf_event_paranoid __read_mostly = 1;
 
-/* Minimum for 128 pages + 1 for the user control page */
-int sysctl_perf_event_mlock __read_mostly = 516; /* 'free' kb per user */
+/* Minimum for 512 kiB + 1 user control page */
+int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
 
 /*
  * max perf event sample rate
@@ -364,6 +364,7 @@ void perf_cgroup_switch(struct task_struct *task, int mode)
                        }
 
                        if (mode & PERF_CGROUP_SWIN) {
+                               WARN_ON_ONCE(cpuctx->cgrp);
                                /* set cgrp before ctxsw in to
                                 * allow event_filter_match() to not
                                 * have to pass task around
@@ -2423,6 +2424,14 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
        if (!ctx || !ctx->nr_events)
                goto out;
 
+       /*
+        * We must ctxsw out cgroup events to avoid conflict
+        * when invoking perf_task_event_sched_in() later on
+        * in this function. Otherwise we end up trying to
+        * ctxswin cgroup events which are already scheduled
+        * in.
+        */
+       perf_cgroup_sched_out(current);
        task_ctx_sched_out(ctx, EVENT_ALL);
 
        raw_spin_lock(&ctx->lock);
@@ -2447,6 +2456,9 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
 
        raw_spin_unlock(&ctx->lock);
 
+       /*
+        * Also calls ctxswin for cgroup events, if any:
+        */
        perf_event_context_sched_in(ctx, ctx->task);
 out:
        local_irq_restore(flags);
@@ -6531,6 +6543,11 @@ SYSCALL_DEFINE5(perf_event_open,
                goto err_alloc;
        }
 
+       if (task) {
+               put_task_struct(task);
+               task = NULL;
+       }
+
        /*
         * Look up the group leader (we will attach this event to it):
         */
index 02f221274265ead8f24d98be78d669d5888e62fe..57a8346a270e07702e21d7bab15303427bf2fce0 100644 (file)
@@ -217,11 +217,14 @@ static int alloc_pidmap(struct pid_namespace *pid_ns)
        return -1;
 }
 
-int next_pidmap(struct pid_namespace *pid_ns, int last)
+int next_pidmap(struct pid_namespace *pid_ns, unsigned int last)
 {
        int offset;
        struct pidmap *map, *end;
 
+       if (last >= PID_MAX_LIMIT)
+               return -1;
+
        offset = (last + 1) & BITS_PER_PAGE_MASK;
        map = &pid_ns->pidmap[(last + 1)/BITS_PER_PAGE];
        end = &pid_ns->pidmap[PIDMAP_ENTRIES];
index 67fea9d25d5559b1e00819bec189ea0be45c0657..0791b13df7bfee02ab5f0f86ce683639df6b84a0 100644 (file)
@@ -1347,7 +1347,7 @@ void run_posix_cpu_timers(struct task_struct *tsk)
 
        /*
         * Now that all the timers on our list have the firing flag,
-        * noone will touch their list entries but us.  We'll take
+        * no one will touch their list entries but us.  We'll take
         * each timer's lock before clearing its firing flag, so no
         * timer call will interfere.
         */
index 4c0124919f9a36fa905cc1266fa132de27f01550..e5498d7405c31ff8d9f5afd85b85ed8038ad691d 100644 (file)
@@ -313,7 +313,7 @@ static void schedule_next_timer(struct k_itimer *timr)
  * restarted (i.e. we have flagged this in the sys_private entry of the
  * info block).
  *
- * To protect aginst the timer going away while the interrupt is queued,
+ * To protect against the timer going away while the interrupt is queued,
  * we require that the it_requeue_pending flag be set.
  */
 void do_schedule_next_timer(struct siginfo *info)
index 4603f08dc47b1e7687b09ca51e31b3e7c48b4c55..6de9a8fc34179448c0768a1c4a12ad4849cb1ce6 100644 (file)
@@ -18,9 +18,13 @@ config SUSPEND_FREEZER
 
          Turning OFF this setting is NOT recommended! If in doubt, say Y.
 
+config HIBERNATE_CALLBACKS
+       bool
+
 config HIBERNATION
        bool "Hibernation (aka 'suspend to disk')"
        depends on SWAP && ARCH_HIBERNATION_POSSIBLE
+       select HIBERNATE_CALLBACKS
        select LZO_COMPRESS
        select LZO_DECOMPRESS
        ---help---
@@ -85,7 +89,7 @@ config PM_STD_PARTITION
 
 config PM_SLEEP
        def_bool y
-       depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE
+       depends on SUSPEND || HIBERNATE_CALLBACKS
 
 config PM_SLEEP_SMP
        def_bool y
index aeabd26e3342788e4330cfb4e8e2a5ba40b348d0..50aae660174d6bd0b0697b6a70e4e31b2e1535f3 100644 (file)
@@ -273,8 +273,11 @@ static int create_image(int platform_mode)
        local_irq_disable();
 
        error = sysdev_suspend(PMSG_FREEZE);
-       if (!error)
+       if (!error) {
                error = syscore_suspend();
+               if (error)
+                       sysdev_resume();
+       }
        if (error) {
                printk(KERN_ERR "PM: Some system devices failed to power down, "
                        "aborting hibernation\n");
@@ -407,8 +410,11 @@ static int resume_target_kernel(bool platform_mode)
        local_irq_disable();
 
        error = sysdev_suspend(PMSG_QUIESCE);
-       if (!error)
+       if (!error) {
                error = syscore_suspend();
+               if (error)
+                       sysdev_resume();
+       }
        if (error)
                goto Enable_irqs;
 
index 8eaba5f27b1017f62456e1dc40bae5e73804ee9e..de9aef8742f400df8f8cd696e6c977565fe21917 100644 (file)
@@ -224,7 +224,7 @@ power_attr(state);
  * writing to 'state'.  It first should read from 'wakeup_count' and store
  * the read value.  Then, after carrying out its own preparations for the system
  * transition to a sleep state, it should write the stored value to
- * 'wakeup_count'.  If that fails, at least one wakeup event has occured since
+ * 'wakeup_count'.  If that fails, at least one wakeup event has occurred since
  * 'wakeup_count' was read and 'state' should not be written to.  Otherwise, it
  * is allowed to write to 'state', but the transition will be aborted if there
  * are any wakeup events detected after 'wakeup_count' was written to.
index 2814c32aed51c121a7ff9689aa38f6b98d025b15..8935369d503a309a036e75f975a903982fa6af80 100644 (file)
@@ -164,8 +164,11 @@ static int suspend_enter(suspend_state_t state)
        BUG_ON(!irqs_disabled());
 
        error = sysdev_suspend(PMSG_SUSPEND);
-       if (!error)
+       if (!error) {
                error = syscore_suspend();
+               if (error)
+                       sysdev_resume();
+       }
        if (!error) {
                if (!(suspend_test(TEST_CORE) || pm_wakeup_pending())) {
                        error = suspend_ops->enter(state);
index f592ce6f861624857597199920bc5a12900136a7..312f8b95c2d44fbbc7c7097de04b52d92abc0648 100644 (file)
@@ -2309,7 +2309,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
  * Cause a process which is running on another CPU to enter
  * kernel-mode, without any delay. (to get signals handled.)
  *
- * NOTE: this function doesnt have to take the runqueue lock,
+ * NOTE: this function doesn't have to take the runqueue lock,
  * because all it wants to ensure is that the remote task enters
  * the kernel. If the IPI races and the task has been migrated
  * to another CPU then no harm is done and the purpose has been
@@ -4111,20 +4111,20 @@ need_resched:
                                        try_to_wake_up_local(to_wakeup);
                        }
                        deactivate_task(rq, prev, DEQUEUE_SLEEP);
+
+                       /*
+                        * If we are going to sleep and we have plugged IO queued, make
+                        * sure to submit it to avoid deadlocks.
+                        */
+                       if (blk_needs_flush_plug(prev)) {
+                               raw_spin_unlock(&rq->lock);
+                               blk_schedule_flush_plug(prev);
+                               raw_spin_lock(&rq->lock);
+                       }
                }
                switch_count = &prev->nvcsw;
        }
 
-       /*
-        * If we are going to sleep and we have plugged IO queued, make
-        * sure to submit it to avoid deadlocks.
-        */
-       if (prev->state != TASK_RUNNING && blk_needs_flush_plug(prev)) {
-               raw_spin_unlock(&rq->lock);
-               blk_flush_plug(prev);
-               raw_spin_lock(&rq->lock);
-       }
-
        pre_schedule(rq, prev);
 
        if (unlikely(!rq->nr_running))
@@ -4997,7 +4997,7 @@ recheck:
         */
        raw_spin_lock_irqsave(&p->pi_lock, flags);
        /*
-        * To be able to change p->policy safely, the apropriate
+        * To be able to change p->policy safely, the appropriate
         * runqueue lock must be held.
         */
        rq = __task_rq_lock(p);
@@ -5011,6 +5011,17 @@ recheck:
                return -EINVAL;
        }
 
+       /*
+        * If not changing anything there's no need to proceed further:
+        */
+       if (unlikely(policy == p->policy && (!rt_policy(policy) ||
+                       param->sched_priority == p->rt_priority))) {
+
+               __task_rq_unlock(rq);
+               raw_spin_unlock_irqrestore(&p->pi_lock, flags);
+               return 0;
+       }
+
 #ifdef CONFIG_RT_GROUP_SCHED
        if (user) {
                /*
@@ -5705,7 +5716,7 @@ void show_state_filter(unsigned long state_filter)
        do_each_thread(g, p) {
                /*
                 * reset the NMI-timeout, listing all files on a slow
-                * console might take alot of time:
+                * console might take a lot of time:
                 */
                touch_nmi_watchdog();
                if (!state_filter || (p->state & state_filter))
@@ -6320,6 +6331,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
                break;
 #endif
        }
+
+       update_max_interval();
+
        return NOTIFY_OK;
 }
 
index 5946ac51560244c9443be785b652886405de1888..429242f3c48485f35f2173aa3ea0cd8f8baac9a8 100644 (file)
@@ -179,7 +179,7 @@ void sched_autogroup_create_attach(struct task_struct *p)
        struct autogroup *ag = autogroup_create();
 
        autogroup_move_group(p, ag);
-       /* drop extra refrence added by autogroup_create() */
+       /* drop extra reference added by autogroup_create() */
        autogroup_kref_put(ag);
 }
 EXPORT_SYMBOL(sched_autogroup_create_attach);
index 3f7ec9e27ee1a259f223549211ab9fe6ec75c3fa..6fa833ab2cb80ebac3e3f38007f0d7c47995769e 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/latencytop.h>
 #include <linux/sched.h>
+#include <linux/cpumask.h>
 
 /*
  * Targeted preemption latency for CPU-bound tasks:
@@ -2103,21 +2104,20 @@ balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest,
              enum cpu_idle_type idle, int *all_pinned,
              int *this_best_prio, struct cfs_rq *busiest_cfs_rq)
 {
-       int loops = 0, pulled = 0, pinned = 0;
+       int loops = 0, pulled = 0;
        long rem_load_move = max_load_move;
        struct task_struct *p, *n;
 
        if (max_load_move == 0)
                goto out;
 
-       pinned = 1;
-
        list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) {
                if (loops++ > sysctl_sched_nr_migrate)
                        break;
 
                if ((p->se.load.weight >> 1) > rem_load_move ||
-                   !can_migrate_task(p, busiest, this_cpu, sd, idle, &pinned))
+                   !can_migrate_task(p, busiest, this_cpu, sd, idle,
+                                     all_pinned))
                        continue;
 
                pull_task(busiest, p, this_rq, this_cpu);
@@ -2152,9 +2152,6 @@ out:
         */
        schedstat_add(sd, lb_gained[idle], pulled);
 
-       if (all_pinned)
-               *all_pinned = pinned;
-
        return max_load_move - rem_load_move;
 }
 
@@ -3061,7 +3058,7 @@ static inline void calculate_imbalance(struct sd_lb_stats *sds, int this_cpu,
 
        /*
         * if *imbalance is less than the average load per runnable task
-        * there is no gaurantee that any tasks will be moved so we'll have
+        * there is no guarantee that any tasks will be moved so we'll have
         * a think about bumping its value to force at least one task to be
         * moved
         */
@@ -3126,6 +3123,8 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
        if (!sds.busiest || sds.busiest_nr_running == 0)
                goto out_balanced;
 
+       sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr;
+
        /*
         * If the busiest group is imbalanced the below checks don't
         * work because they assumes all things are equal, which typically
@@ -3150,7 +3149,6 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
         * Don't pull any tasks if this group is already above the domain
         * average load.
         */
-       sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr;
        if (sds.this_load >= sds.avg_load)
                goto out_balanced;
 
@@ -3339,6 +3337,7 @@ redo:
                 * still unbalanced. ld_moved simply stays zero, so it is
                 * correctly treated as an imbalance.
                 */
+               all_pinned = 1;
                local_irq_save(flags);
                double_rq_lock(this_rq, busiest);
                ld_moved = move_tasks(this_rq, this_cpu, busiest,
@@ -3819,6 +3818,17 @@ void select_nohz_load_balancer(int stop_tick)
 
 static DEFINE_SPINLOCK(balancing);
 
+static unsigned long __read_mostly max_load_balance_interval = HZ/10;
+
+/*
+ * Scale the max load_balance interval with the number of CPUs in the system.
+ * This trades load-balance latency on larger machines for less cross talk.
+ */
+static void update_max_interval(void)
+{
+       max_load_balance_interval = HZ*num_online_cpus()/10;
+}
+
 /*
  * It checks each scheduling domain to see if it is due to be balanced,
  * and initiates a balancing operation if so.
@@ -3848,10 +3858,7 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle)
 
                /* scale ms to jiffies */
                interval = msecs_to_jiffies(interval);
-               if (unlikely(!interval))
-                       interval = 1;
-               if (interval > HZ*NR_CPUS/10)
-                       interval = HZ*NR_CPUS/10;
+               interval = clamp(interval, 1UL, max_load_balance_interval);
 
                need_serialize = sd->flags & SD_SERIALIZE;
 
index db308cb08b75051ab459c61efea28f52c736ea7b..e7cebdc65f82d50e9f426a82a928d85c41f560a7 100644 (file)
@@ -1378,7 +1378,7 @@ retry:
                task = pick_next_pushable_task(rq);
                if (task_cpu(next_task) == rq->cpu && task == next_task) {
                        /*
-                        * If we get here, the task hasnt moved at all, but
+                        * If we get here, the task hasn't moved at all, but
                         * it has failed to push.  We will not try again,
                         * since the other cpus will pull from us when they
                         * are ready.
@@ -1488,7 +1488,7 @@ static int pull_rt_task(struct rq *this_rq)
                        /*
                         * We continue with the search, just in
                         * case there's an even higher prio task
-                        * in another runqueue. (low likelyhood
+                        * in another runqueue. (low likelihood
                         * but possible)
                         */
                }
index 1186cf7fac772ddfe6943078d246f8987356e59c..7165af5f1b116fed3b5c5751d83e7e355e27ddab 100644 (file)
@@ -226,7 +226,7 @@ static inline void print_dropped_signal(int sig)
 /*
  * allocate a new signal queue record
  * - this may be called without locks if and only if t == current, otherwise an
- *   appopriate lock must be held to stop the target task from exiting
+ *   appropriate lock must be held to stop the target task from exiting
  */
 static struct sigqueue *
 __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimit)
@@ -375,15 +375,15 @@ int unhandled_signal(struct task_struct *tsk, int sig)
        return !tracehook_consider_fatal_signal(tsk, sig);
 }
 
-
-/* Notify the system that a driver wants to block all signals for this
+/*
+ * Notify the system that a driver wants to block all signals for this
  * process, and wants to be notified if any signals at all were to be
  * sent/acted upon.  If the notifier routine returns non-zero, then the
  * signal will be acted upon after all.  If the notifier routine returns 0,
  * then then signal will be blocked.  Only one block per process is
  * allowed.  priv is a pointer to private data that the notifier routine
- * can use to determine if the signal should be blocked or not.  */
-
+ * can use to determine if the signal should be blocked or not.
+ */
 void
 block_all_signals(int (*notifier)(void *priv), void *priv, sigset_t *mask)
 {
@@ -434,9 +434,10 @@ still_pending:
                copy_siginfo(info, &first->info);
                __sigqueue_free(first);
        } else {
-               /* Ok, it wasn't in the queue.  This must be
-                  a fast-pathed signal or we must have been
-                  out of queue space.  So zero out the info.
+               /*
+                * Ok, it wasn't in the queue.  This must be
+                * a fast-pathed signal or we must have been
+                * out of queue space.  So zero out the info.
                 */
                info->si_signo = sig;
                info->si_errno = 0;
@@ -468,7 +469,7 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
 }
 
 /*
- * Dequeue a signal and return the element to the caller, which is 
+ * Dequeue a signal and return the element to the caller, which is
  * expected to free it.
  *
  * All callers have to hold the siglock.
@@ -490,7 +491,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
                 * itimers are process shared and we restart periodic
                 * itimers in the signal delivery path to prevent DoS
                 * attacks in the high resolution timer case. This is
-                * compliant with the old way of self restarting
+                * compliant with the old way of self-restarting
                 * itimers, as the SIGALRM is a legacy signal and only
                 * queued once. Changing the restart behaviour to
                 * restart the timer in the signal dequeue path is
@@ -923,14 +924,15 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
        if (info == SEND_SIG_FORCED)
                goto out_set;
 
-       /* Real-time signals must be queued if sent by sigqueue, or
-          some other real-time mechanism.  It is implementation
-          defined whether kill() does so.  We attempt to do so, on
-          the principle of least surprise, but since kill is not
-          allowed to fail with EAGAIN when low on memory we just
-          make sure at least one signal gets delivered and don't
-          pass on the info struct.  */
-
+       /*
+        * Real-time signals must be queued if sent by sigqueue, or
+        * some other real-time mechanism.  It is implementation
+        * defined whether kill() does so.  We attempt to do so, on
+        * the principle of least surprise, but since kill is not
+        * allowed to fail with EAGAIN when low on memory we just
+        * make sure at least one signal gets delivered and don't
+        * pass on the info struct.
+        */
        if (sig < SIGRTMIN)
                override_rlimit = (is_si_special(info) || info->si_code >= 0);
        else
@@ -1201,8 +1203,7 @@ retry:
        return error;
 }
 
-int
-kill_proc_info(int sig, struct siginfo *info, pid_t pid)
+int kill_proc_info(int sig, struct siginfo *info, pid_t pid)
 {
        int error;
        rcu_read_lock();
@@ -1299,8 +1300,7 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
  * These are for backward compatibility with the rest of the kernel source.
  */
 
-int
-send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
+int send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
 {
        /*
         * Make sure legacy kernel users don't send in bad values
@@ -1368,7 +1368,7 @@ EXPORT_SYMBOL(kill_pid);
  * These functions support sending signals using preallocated sigqueue
  * structures.  This is needed "because realtime applications cannot
  * afford to lose notifications of asynchronous events, like timer
- * expirations or I/O completions".  In the case of Posix Timers
+ * expirations or I/O completions".  In the case of POSIX Timers
  * we allocate the sigqueue structure from the timer_create.  If this
  * allocation fails we are able to report the failure to the application
  * with an EAGAIN error.
@@ -1553,7 +1553,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
        info.si_signo = SIGCHLD;
        info.si_errno = 0;
        /*
-        * see comment in do_notify_parent() abot the following 3 lines
+        * see comment in do_notify_parent() about the following 4 lines
         */
        rcu_read_lock();
        info.si_pid = task_pid_nr_ns(tsk, parent->nsproxy->pid_ns);
@@ -1611,7 +1611,7 @@ static inline int may_ptrace_stop(void)
 }
 
 /*
- * Return nonzero if there is a SIGKILL that should be waking us up.
+ * Return non-zero if there is a SIGKILL that should be waking us up.
  * Called with the siglock held.
  */
 static int sigkill_pending(struct task_struct *tsk)
@@ -1735,7 +1735,7 @@ void ptrace_notify(int exit_code)
 /*
  * This performs the stopping for SIGSTOP and other stop signals.
  * We have to stop all threads in the thread group.
- * Returns nonzero if we've actually stopped and released the siglock.
+ * Returns non-zero if we've actually stopped and released the siglock.
  * Returns zero if we didn't stop and still hold the siglock.
  */
 static int do_signal_stop(int signr)
@@ -1823,10 +1823,12 @@ static int ptrace_signal(int signr, siginfo_t *info,
 
        current->exit_code = 0;
 
-       /* Update the siginfo structure if the signal has
-          changed.  If the debugger wanted something
-          specific in the siginfo structure then it should
-          have updated *info via PTRACE_SETSIGINFO.  */
+       /*
+        * Update the siginfo structure if the signal has
+        * changed.  If the debugger wanted something
+        * specific in the siginfo structure then it should
+        * have updated *info via PTRACE_SETSIGINFO.
+        */
        if (signr != info->si_signo) {
                info->si_signo = signr;
                info->si_errno = 0;
@@ -1885,7 +1887,7 @@ relock:
        for (;;) {
                struct k_sigaction *ka;
                /*
-                * Tracing can induce an artifical signal and choose sigaction.
+                * Tracing can induce an artificial signal and choose sigaction.
                 * The return value in @signr determines the default action,
                 * but @info->si_signo is the signal number we will report.
                 */
@@ -2034,7 +2036,8 @@ void exit_signals(struct task_struct *tsk)
        if (!signal_pending(tsk))
                goto out;
 
-       /* It could be that __group_complete_signal() choose us to
+       /*
+        * It could be that __group_complete_signal() choose us to
         * notify about group-wide signal. Another thread should be
         * woken now to take the signal since we will not.
         */
@@ -2072,6 +2075,9 @@ EXPORT_SYMBOL(unblock_all_signals);
  * System call entry points.
  */
 
+/**
+ *  sys_restart_syscall - restart a system call
+ */
 SYSCALL_DEFINE0(restart_syscall)
 {
        struct restart_block *restart = &current_thread_info()->restart_block;
@@ -2125,6 +2131,13 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset)
        return error;
 }
 
+/**
+ *  sys_rt_sigprocmask - change the list of currently blocked signals
+ *  @how: whether to add, remove, or set signals
+ *  @set: stores pending signals
+ *  @oset: previous value of signal mask if non-null
+ *  @sigsetsize: size of sigset_t type
+ */
 SYSCALL_DEFINE4(rt_sigprocmask, int, how, sigset_t __user *, set,
                sigset_t __user *, oset, size_t, sigsetsize)
 {
@@ -2183,8 +2196,14 @@ long do_sigpending(void __user *set, unsigned long sigsetsize)
 
 out:
        return error;
-}      
+}
 
+/**
+ *  sys_rt_sigpending - examine a pending signal that has been raised
+ *                     while blocked
+ *  @set: stores pending signals
+ *  @sigsetsize: size of sigset_t type or larger
+ */
 SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, set, size_t, sigsetsize)
 {
        return do_sigpending(set, sigsetsize);
@@ -2233,9 +2252,9 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from)
                err |= __put_user(from->si_trapno, &to->si_trapno);
 #endif
 #ifdef BUS_MCEERR_AO
-               /* 
+               /*
                 * Other callers might not initialize the si_lsb field,
-                * so check explicitely for the right codes here.
+                * so check explicitly for the right codes here.
                 */
                if (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO)
                        err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb);
@@ -2264,6 +2283,14 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from)
 
 #endif
 
+/**
+ *  sys_rt_sigtimedwait - synchronously wait for queued signals specified
+ *                     in @uthese
+ *  @uthese: queued signals to wait for
+ *  @uinfo: if non-null, the signal's siginfo is returned here
+ *  @uts: upper bound on process time suspension
+ *  @sigsetsize: size of sigset_t type
+ */
 SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese,
                siginfo_t __user *, uinfo, const struct timespec __user *, uts,
                size_t, sigsetsize)
@@ -2280,7 +2307,7 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese,
 
        if (copy_from_user(&these, uthese, sizeof(these)))
                return -EFAULT;
-               
+
        /*
         * Invert the set of allowed signals to get those we
         * want to block.
@@ -2305,9 +2332,11 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese,
                                   + (ts.tv_sec || ts.tv_nsec));
 
                if (timeout) {
-                       /* None ready -- temporarily unblock those we're
+                       /*
+                        * None ready -- temporarily unblock those we're
                         * interested while we are sleeping in so that we'll
-                        * be awakened when they arrive.  */
+                        * be awakened when they arrive.
+                        */
                        current->real_blocked = current->blocked;
                        sigandsets(&current->blocked, &current->blocked, &these);
                        recalc_sigpending();
@@ -2339,6 +2368,11 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese,
        return ret;
 }
 
+/**
+ *  sys_kill - send a signal to a process
+ *  @pid: the PID of the process
+ *  @sig: signal to be sent
+ */
 SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
 {
        struct siginfo info;
@@ -2414,7 +2448,11 @@ SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig)
        return do_tkill(tgid, pid, sig);
 }
 
-/*
+/**
+ *  sys_tkill - send signal to one specific task
+ *  @pid: the PID of the task
+ *  @sig: signal to be sent
+ *
  *  Send a signal to only one task, even if it's a CLONE_THREAD task.
  */
 SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig)
@@ -2426,6 +2464,12 @@ SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig)
        return do_tkill(0, pid, sig);
 }
 
+/**
+ *  sys_rt_sigqueueinfo - send signal information to a signal
+ *  @pid: the PID of the thread
+ *  @sig: signal to be sent
+ *  @uinfo: signal info to be sent
+ */
 SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
                siginfo_t __user *, uinfo)
 {
@@ -2553,12 +2597,11 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s
 
                error = -EINVAL;
                /*
-                *
-                * Note - this code used to test ss_flags incorrectly
+                * Note - this code used to test ss_flags incorrectly:
                 *        old code may have been written using ss_flags==0
                 *        to mean ss_flags==SS_ONSTACK (as this was the only
                 *        way that worked) - this fix preserves that older
-                *        mechanism
+                *        mechanism.
                 */
                if (ss_flags != SS_DISABLE && ss_flags != SS_ONSTACK && ss_flags != 0)
                        goto out;
@@ -2592,6 +2635,10 @@ out:
 
 #ifdef __ARCH_WANT_SYS_SIGPENDING
 
+/**
+ *  sys_sigpending - examine pending signals
+ *  @set: where mask of pending signal is returned
+ */
 SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
 {
        return do_sigpending(set, sizeof(*set));
@@ -2600,8 +2647,15 @@ SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
 #endif
 
 #ifdef __ARCH_WANT_SYS_SIGPROCMASK
-/* Some platforms have their own version with special arguments others
-   support only sys_rt_sigprocmask.  */
+/**
+ *  sys_sigprocmask - examine and change blocked signals
+ *  @how: whether to add, remove, or set signals
+ *  @set: signals to add or remove (if non-null)
+ *  @oset: previous value of signal mask if non-null
+ *
+ * Some platforms have their own version with special arguments;
+ * others support only sys_rt_sigprocmask.
+ */
 
 SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
                old_sigset_t __user *, oset)
@@ -2654,6 +2708,13 @@ out:
 #endif /* __ARCH_WANT_SYS_SIGPROCMASK */
 
 #ifdef __ARCH_WANT_SYS_RT_SIGACTION
+/**
+ *  sys_rt_sigaction - alter an action taken by a process
+ *  @sig: signal to be sent
+ *  @act: new sigaction
+ *  @oact: used to save the previous sigaction
+ *  @sigsetsize: size of sigset_t type
+ */
 SYSCALL_DEFINE4(rt_sigaction, int, sig,
                const struct sigaction __user *, act,
                struct sigaction __user *, oact,
@@ -2740,6 +2801,12 @@ SYSCALL_DEFINE0(pause)
 #endif
 
 #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
+/**
+ *  sys_rt_sigsuspend - replace the signal mask for a value with the
+ *     @unewset value until a signal is received
+ *  @unewset: new signal mask value
+ *  @sigsetsize: size of sigset_t type
+ */
 SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize)
 {
        sigset_t newset;
index 735d8709517228195b8a95f737bf555e7de712c3..174f976c2874a19f1d06fee972468e2c730bc7f9 100644 (file)
@@ -567,7 +567,7 @@ static void __tasklet_hrtimer_trampoline(unsigned long data)
 /**
  * tasklet_hrtimer_init - Init a tasklet/hrtimer combo for softirq callbacks
  * @ttimer:     tasklet_hrtimer which is initialized
- * @function:   hrtimer callback funtion which gets called from softirq context
+ * @function:   hrtimer callback function which gets called from softirq context
  * @which_clock: clock id (CLOCK_MONOTONIC/CLOCK_REALTIME)
  * @mode:       hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL)
  */
index b2fa506667c0ab0091365052b5411b3d8335ab8c..a470154e040826f9549e5faf9ed4aefd174de698 100644 (file)
@@ -34,7 +34,7 @@
  * inaccuracies caused by missed or lost timer
  * interrupts and the inability for the timer
  * interrupt hardware to accuratly tick at the
- * requested HZ value. It is also not reccomended
+ * requested HZ value. It is also not recommended
  * for "tick-less" systems.
  */
 #define NSEC_PER_JIFFY ((u32)((((u64)NSEC_PER_SEC)<<8)/ACTHZ))
index 25028dd4fa18044846caa1098bf87b28c1c81be4..c340ca658f37a0c09726a31a6f126f18c9380355 100644 (file)
@@ -19,7 +19,6 @@
  */
 #include <linux/device.h>
 #include <linux/file.h>
-#include <linux/mutex.h>
 #include <linux/posix-clock.h>
 #include <linux/slab.h>
 #include <linux/syscalls.h>
@@ -34,19 +33,19 @@ static struct posix_clock *get_posix_clock(struct file *fp)
 {
        struct posix_clock *clk = fp->private_data;
 
-       mutex_lock(&clk->mutex);
+       down_read(&clk->rwsem);
 
        if (!clk->zombie)
                return clk;
 
-       mutex_unlock(&clk->mutex);
+       up_read(&clk->rwsem);
 
        return NULL;
 }
 
 static void put_posix_clock(struct posix_clock *clk)
 {
-       mutex_unlock(&clk->mutex);
+       up_read(&clk->rwsem);
 }
 
 static ssize_t posix_clock_read(struct file *fp, char __user *buf,
@@ -156,7 +155,7 @@ static int posix_clock_open(struct inode *inode, struct file *fp)
        struct posix_clock *clk =
                container_of(inode->i_cdev, struct posix_clock, cdev);
 
-       mutex_lock(&clk->mutex);
+       down_read(&clk->rwsem);
 
        if (clk->zombie) {
                err = -ENODEV;
@@ -172,7 +171,7 @@ static int posix_clock_open(struct inode *inode, struct file *fp)
                fp->private_data = clk;
        }
 out:
-       mutex_unlock(&clk->mutex);
+       up_read(&clk->rwsem);
        return err;
 }
 
@@ -211,25 +210,20 @@ int posix_clock_register(struct posix_clock *clk, dev_t devid)
        int err;
 
        kref_init(&clk->kref);
-       mutex_init(&clk->mutex);
+       init_rwsem(&clk->rwsem);
 
        cdev_init(&clk->cdev, &posix_clock_file_operations);
        clk->cdev.owner = clk->ops.owner;
        err = cdev_add(&clk->cdev, devid, 1);
-       if (err)
-               goto no_cdev;
 
        return err;
-no_cdev:
-       mutex_destroy(&clk->mutex);
-       return err;
 }
 EXPORT_SYMBOL_GPL(posix_clock_register);
 
 static void delete_clock(struct kref *kref)
 {
        struct posix_clock *clk = container_of(kref, struct posix_clock, kref);
-       mutex_destroy(&clk->mutex);
+
        if (clk->release)
                clk->release(clk);
 }
@@ -238,9 +232,9 @@ void posix_clock_unregister(struct posix_clock *clk)
 {
        cdev_del(&clk->cdev);
 
-       mutex_lock(&clk->mutex);
+       down_write(&clk->rwsem);
        clk->zombie = true;
-       mutex_unlock(&clk->mutex);
+       up_write(&clk->rwsem);
 
        kref_put(&clk->kref, delete_clock);
 }
index 2f3b585b8d7d2f9b728cc86469c7188dfe232b23..a5d0a3a85dd8233ddf515c50d73c4f1a585d6359 100644 (file)
@@ -236,7 +236,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
                              unsigned int timer_flag)
 {
        /*
-        * It doesnt matter which lock we take:
+        * It doesn't matter which lock we take:
         */
        raw_spinlock_t *lock;
        struct entry *entry, input;
index 61d7d59f4a1ad5175cfb14a5922c14270919167b..2ad39e556cb4a408ca09ba408e8a1ecf85fd756b 100644 (file)
@@ -141,7 +141,7 @@ if FTRACE
 config FUNCTION_TRACER
        bool "Kernel Function Tracer"
        depends on HAVE_FUNCTION_TRACER
-       select FRAME_POINTER if !ARM_UNWIND && !S390
+       select FRAME_POINTER if !ARM_UNWIND && !S390 && !MICROBLAZE
        select KALLSYMS
        select GENERIC_TRACER
        select CONTEXT_SWITCH_TRACER
index 7aa40f8e182d569bcba8c0a3f33bb0f73b6f4950..6957aa298dfa45581b45832b7251a2ee4029000e 100644 (file)
@@ -850,29 +850,21 @@ static void blk_add_trace_plug(void *ignore, struct request_queue *q)
                __blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL);
 }
 
-static void blk_add_trace_unplug_io(void *ignore, struct request_queue *q)
+static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
+                                   unsigned int depth, bool explicit)
 {
        struct blk_trace *bt = q->blk_trace;
 
        if (bt) {
-               unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE];
-               __be64 rpdu = cpu_to_be64(pdu);
+               __be64 rpdu = cpu_to_be64(depth);
+               u32 what;
 
-               __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_IO, 0,
-                               sizeof(rpdu), &rpdu);
-       }
-}
-
-static void blk_add_trace_unplug_timer(void *ignore, struct request_queue *q)
-{
-       struct blk_trace *bt = q->blk_trace;
-
-       if (bt) {
-               unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE];
-               __be64 rpdu = cpu_to_be64(pdu);
+               if (explicit)
+                       what = BLK_TA_UNPLUG_IO;
+               else
+                       what = BLK_TA_UNPLUG_TIMER;
 
-               __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_TIMER, 0,
-                               sizeof(rpdu), &rpdu);
+               __blk_add_trace(bt, 0, 0, 0, what, 0, sizeof(rpdu), &rpdu);
        }
 }
 
@@ -1015,9 +1007,7 @@ static void blk_register_tracepoints(void)
        WARN_ON(ret);
        ret = register_trace_block_plug(blk_add_trace_plug, NULL);
        WARN_ON(ret);
-       ret = register_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL);
-       WARN_ON(ret);
-       ret = register_trace_block_unplug_io(blk_add_trace_unplug_io, NULL);
+       ret = register_trace_block_unplug(blk_add_trace_unplug, NULL);
        WARN_ON(ret);
        ret = register_trace_block_split(blk_add_trace_split, NULL);
        WARN_ON(ret);
@@ -1032,8 +1022,7 @@ static void blk_unregister_tracepoints(void)
        unregister_trace_block_rq_remap(blk_add_trace_rq_remap, NULL);
        unregister_trace_block_bio_remap(blk_add_trace_bio_remap, NULL);
        unregister_trace_block_split(blk_add_trace_split, NULL);
-       unregister_trace_block_unplug_io(blk_add_trace_unplug_io, NULL);
-       unregister_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL);
+       unregister_trace_block_unplug(blk_add_trace_unplug, NULL);
        unregister_trace_block_plug(blk_add_trace_plug, NULL);
        unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL);
        unregister_trace_block_getrq(blk_add_trace_getrq, NULL);
index c075f4ea6b94f1c9772915b064082341d843e9d5..ee24fa1935ac7d25ec593ebfe3824f6339c0cea5 100644 (file)
@@ -1268,7 +1268,7 @@ static int ftrace_update_code(struct module *mod)
                p->flags = 0L;
 
                /*
-                * Do the initial record convertion from mcount jump
+                * Do the initial record conversion from mcount jump
                 * to the NOP instructions.
                 */
                if (!ftrace_code_disable(mod, p)) {
@@ -3425,7 +3425,7 @@ graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
        atomic_set(&t->tracing_graph_pause, 0);
        atomic_set(&t->trace_overrun, 0);
        t->ftrace_timestamp = 0;
-       /* make curr_ret_stack visable before we add the ret_stack */
+       /* make curr_ret_stack visible before we add the ret_stack */
        smp_wmb();
        t->ret_stack = ret_stack;
 }
index d9c8bcafb120f56763a3a9f868ad755b5a836dbc..0ef7b4b2a1f7a15d315f1fb1fd76deed790b3acf 100644 (file)
@@ -1478,7 +1478,7 @@ static inline unsigned long rb_page_entries(struct buffer_page *bpage)
        return local_read(&bpage->entries) & RB_WRITE_MASK;
 }
 
-/* Size is determined by what has been commited */
+/* Size is determined by what has been committed */
 static inline unsigned rb_page_size(struct buffer_page *bpage)
 {
        return rb_page_commit(bpage);
@@ -2932,7 +2932,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
        /*
         * cpu_buffer->pages just needs to point to the buffer, it
         *  has no specific buffer page to point to. Lets move it out
-        *  of our way so we don't accidently swap it.
+        *  of our way so we don't accidentally swap it.
         */
        cpu_buffer->pages = reader->list.prev;
 
index 9541c27c1cf2a8da8e75cbed00d2c09596dabe38..d38c16a06a6fb25d4f31559af0c1544f6cae987f 100644 (file)
@@ -3239,7 +3239,7 @@ waitagain:
                trace_seq_init(&iter->seq);
 
        /*
-        * If there was nothing to send to user, inspite of consuming trace
+        * If there was nothing to send to user, in spite of consuming trace
         * entries, go back to wait for more entries.
         */
        if (sret == -EBUSY)
index 685a67d55db09ced33759b19e56aecb73db7696b..6302747a13988300345bb4c9db51888a52794dd4 100644 (file)
@@ -46,7 +46,7 @@ u64 notrace trace_clock_local(void)
 }
 
 /*
- * trace_clock(): 'inbetween' trace clock. Not completely serialized,
+ * trace_clock(): 'between' trace clock. Not completely serialized,
  * but not completely incorrect when crossing CPUs either.
  *
  * This is based on cpu_clock(), which will allow at most ~1 jiffy of
index 1516cb3ec549a1bd090df147cc156686df3fcd6a..e32744c84d9497bd041a2e612d82f1f859406af9 100644 (file)
@@ -27,7 +27,7 @@
  *       in the structure.
  *
  *   * for structures within structures, the format of the internal
- *     structure is layed out. This allows the internal structure
+ *     structure is laid out. This allows the internal structure
  *     to be deciphered for the format file. Although these macros
  *     may become out of sync with the internal structure, they
  *     will create a compile error if it happens. Since the
index 76b05980225cb79df8bfad7bb35cd64bd52bcaf2..962cdb24ed817b380a4ea753e4f7f501b937b4cb 100644 (file)
@@ -905,7 +905,7 @@ print_graph_prologue(struct trace_iterator *iter, struct trace_seq *s,
  *
  * returns 1 if
  *  - we are inside irq code
- *  - we just extered irq code
+ *  - we just entered irq code
  *
  * retunns 0 if
  *  - funcgraph-interrupts option is set
index 92b6e1e12d982931309e4ecf431a923ffff56c84..a4969b47afc1e8120b149d22e73357393be2056b 100644 (file)
@@ -80,7 +80,7 @@ static struct tracer_flags tracer_flags = {
  * skip the latency if the sequence has changed - some other section
  * did a maximum and could disturb our measurement with serial console
  * printouts, etc. Truly coinciding maximum latencies should be rare
- * and what happens together happens separately as well, so this doesnt
+ * and what happens together happens separately as well, so this doesn't
  * decrease the validity of the maximum found:
  */
 static __cacheline_aligned_in_smp      unsigned long max_sequence;
index 8435b43b1782d5b455f80415452ac1e5dd1f6e0e..35d55a386145aed31dcd698f16e1f38246c808fb 100644 (file)
@@ -1839,7 +1839,7 @@ static void unregister_probe_event(struct trace_probe *tp)
        kfree(tp->call.print_fmt);
 }
 
-/* Make a debugfs interface for controling probe points */
+/* Make a debugfs interface for controlling probe points */
 static __init int init_kprobe_trace(void)
 {
        struct dentry *d_tracer;
index eb27fd3430a291df4c714b1b462b69d5f9490366..92cb706c7fc83babcb43b7028e2bff25ce00ba80 100644 (file)
@@ -20,7 +20,7 @@ EXPORT_SYMBOL_GPL(user_return_notifier_register);
 
 /*
  * Removes a registered user return notifier.  Must be called from atomic
- * context, and from the same cpu registration occured in.
+ * context, and from the same cpu registration occurred in.
  */
 void user_return_notifier_unregister(struct user_return_notifier *urn)
 {
index b0310eb6cc1e85433a502e7c93c62651e216f47a..f45ea8d2a1ceee7612878cdc0c0a492d1333b91f 100644 (file)
@@ -142,7 +142,7 @@ EXPORT_SYMBOL(finish_wait);
  * woken up through the queue.
  *
  * This prevents waiter starvation where an exclusive waiter
- * aborts and is woken up concurrently and noone wakes up
+ * aborts and is woken up concurrently and no one wakes up
  * the next waiter.
  */
 void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait,
index 140dce750450edc8db5285817c26fd354ec0c56a..14733d4d156b5e90603cafec70eb9907b141b6dd 100644 (file)
@@ -430,9 +430,12 @@ static int watchdog_enable(int cpu)
                p = kthread_create(watchdog, (void *)(unsigned long)cpu, "watchdog/%d", cpu);
                if (IS_ERR(p)) {
                        printk(KERN_ERR "softlockup watchdog for %i failed\n", cpu);
-                       if (!err)
+                       if (!err) {
                                /* if hardlockup hasn't already set this */
                                err = PTR_ERR(p);
+                               /* and disable the perf event */
+                               watchdog_nmi_disable(cpu);
+                       }
                        goto out;
                }
                kthread_bind(p, cpu);
index 04ef830690eceea974d90add3de55b57bc4048f6..e3378e8d3a5ce7e16fbbbb35ebd30a1c51fde650 100644 (file)
@@ -1291,8 +1291,14 @@ __acquires(&gcwq->lock)
                        return true;
                spin_unlock_irq(&gcwq->lock);
 
-               /* CPU has come up inbetween, retry migration */
+               /*
+                * We've raced with CPU hot[un]plug.  Give it a breather
+                * and retry migration.  cond_resched() is required here;
+                * otherwise, we might deadlock against cpu_stop trying to
+                * bring down the CPU on non-preemptive kernel.
+                */
                cpu_relax();
+               cond_resched();
        }
 }
 
index df9234c5f9d1c003a4b93e71df13248edba836a9..c768bcdda1b700331a991cad681c5c2d6862c419 100644 (file)
@@ -434,11 +434,9 @@ config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
 
 config DEBUG_KMEMLEAK_TEST
        tristate "Simple test for the kernel memory leak detector"
-       depends on DEBUG_KMEMLEAK
+       depends on DEBUG_KMEMLEAK && m
        help
-         Say Y or M here to build a test for the kernel memory leak
-         detector. This option enables a module that explicitly leaks
-         memory.
+         This option enables a module that explicitly leaks memory.
 
          If unsure, say N.
 
index 741fae905ae3ba8d81c0a4cbe9564cdd4e0d4ce7..91e0ccfdb4241b1651d70d8b8bd2e4c903a4599e 100644 (file)
@@ -830,7 +830,7 @@ EXPORT_SYMBOL(bitmap_bitremap);
  *  @orig (i.e. bits 3, 5, 7 and 9) were also set.
  *
  *  When bit 11 is set in @orig, it means turn on the bit in
- *  @dst corresponding to whatever is the twelth bit that is
+ *  @dst corresponding to whatever is the twelfth bit that is
  *  turned on in @relmap.  In the above example, there were
  *  only ten bits turned on in @relmap (30..39), so that bit
  *  11 was set in @orig had no affect on @dst.
index c9c6f03515269aa78baad42ecf86f4d649a45a5c..2a34392bcecc3680dfb10fbbc7ae126792aa6713 100644 (file)
@@ -11,7 +11,7 @@
  * see http://programming.kicks-ass.net/kernel-patches/vma_lookup/btree.patch
  *
  * A relatively simple B+Tree implementation.  I have written it as a learning
- * excercise to understand how B+Trees work.  Turned out to be useful as well.
+ * exercise to understand how B+Trees work.  Turned out to be useful as well.
  *
  * B+Trees can be used similar to Linux radix trees (which don't have anything
  * in common with textbook radix trees, beware).  Prerequisite for them working
@@ -541,7 +541,7 @@ static void rebalance(struct btree_head *head, struct btree_geo *geo,
        int i, no_left, no_right;
 
        if (fill == 0) {
-               /* Because we don't steal entries from a neigbour, this case
+               /* Because we don't steal entries from a neighbour, this case
                 * can happen.  Parent node contains a single child, this
                 * node, so merging with a sibling never happens.
                 */
index cecd23df2b9a6e986ea6cbdd3418015a5ecf4a8f..9f34eb56854d64eeebd4dcfcc9993a64c6aa585a 100644 (file)
@@ -83,7 +83,7 @@
  *    safety_margin = 128 + uncompressed_size * 8 / 32768 + 65536
  *                  = 128 + (uncompressed_size >> 12) + 65536
  *
- * For comparision, according to arch/x86/boot/compressed/misc.c, the
+ * For comparison, according to arch/x86/boot/compressed/misc.c, the
  * equivalent formula for Deflate is this:
  *
  *    safety_margin = 18 + (uncompressed_size >> 12) + 32768
index c0ea40ba20828b67c10e29d790ca13846572b8a0..854b57bd7d9d346276fe83599f5cbd306c6e0fe4 100644 (file)
@@ -232,10 +232,10 @@ EXPORT_SYMBOL(flex_array_clear);
 
 /**
  * flex_array_prealloc - guarantee that array space exists
- * @fa:                the flex array for which to preallocate parts
- * @start:     index of first array element for which space is allocated
- * @end:       index of last (inclusive) element for which space is allocated
- * @flags:     page allocation flags
+ * @fa:                        the flex array for which to preallocate parts
+ * @start:             index of first array element for which space is allocated
+ * @nr_elements:       number of elements for which space is allocated
+ * @flags:             page allocation flags
  *
  * This will guarantee that no future calls to flex_array_put()
  * will allocate memory.  It can be used if you are expecting to
@@ -245,14 +245,24 @@ EXPORT_SYMBOL(flex_array_clear);
  * Locking must be provided by the caller.
  */
 int flex_array_prealloc(struct flex_array *fa, unsigned int start,
-                       unsigned int end, gfp_t flags)
+                       unsigned int nr_elements, gfp_t flags)
 {
        int start_part;
        int end_part;
        int part_nr;
+       unsigned int end;
        struct flex_array_part *part;
 
-       if (start >= fa->total_nr_elements || end >= fa->total_nr_elements)
+       if (!start && !nr_elements)
+               return 0;
+       if (start >= fa->total_nr_elements)
+               return -ENOSPC;
+       if (!nr_elements)
+               return 0;
+
+       end = start + nr_elements - 1;
+
+       if (end >= fa->total_nr_elements)
                return -ENOSPC;
        if (elements_fit_in_base(fa))
                return 0;
@@ -343,6 +353,8 @@ int flex_array_shrink(struct flex_array *fa)
        int part_nr;
        int ret = 0;
 
+       if (!fa->total_nr_elements)
+               return 0;
        if (elements_fit_in_base(fa))
                return ret;
        for (part_nr = 0; part_nr < FLEX_ARRAY_NR_BASE_PTRS; part_nr++) {
index 05672e819f8c4c9164dd40e3752d23b8b5f63577..a235f3cc471c6d427fd4c2e713a701fa0b1e7e1b 100644 (file)
@@ -49,12 +49,9 @@ static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res)
                        val = *s - '0';
                else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f')
                        val = _tolower(*s) - 'a' + 10;
-               else if (*s == '\n') {
-                       if (*(s + 1) == '\0')
-                               break;
-                       else
-                               return -EINVAL;
-               } else
+               else if (*s == '\n' && *(s + 1) == '\0')
+                       break;
+               else
                        return -EINVAL;
 
                if (val >= base)
index 6e89eca5cca00b6fb059bae5135b0ee381a5d5d5..dcbaaef6cf11127388bd7d245782f47bf667c8bb 100644 (file)
@@ -13,7 +13,7 @@
 
 /**
  * match_one: - Determines if a string matches a simple pattern
- * @s: the string to examine for presense of the pattern
+ * @s: the string to examine for presence of the pattern
  * @p: the string containing the pattern
  * @args: array of %MAX_OPT_ARGS &substring_t elements. Used to return match
  * locations.
index 325c2f9ecebdc431e87fc1ab375c1ac5e1365d64..d55769d63cb8b3efb8182a0f58a73ed496768b21 100644 (file)
@@ -315,12 +315,12 @@ static void __init test_kstrtou64_ok(void)
                {"65537",       10,     65537},
                {"2147483646",  10,     2147483646},
                {"2147483647",  10,     2147483647},
-               {"2147483648",  10,     2147483648},
-               {"2147483649",  10,     2147483649},
-               {"4294967294",  10,     4294967294},
-               {"4294967295",  10,     4294967295},
-               {"4294967296",  10,     4294967296},
-               {"4294967297",  10,     4294967297},
+               {"2147483648",  10,     2147483648ULL},
+               {"2147483649",  10,     2147483649ULL},
+               {"4294967294",  10,     4294967294ULL},
+               {"4294967295",  10,     4294967295ULL},
+               {"4294967296",  10,     4294967296ULL},
+               {"4294967297",  10,     4294967297ULL},
                {"9223372036854775806", 10,     9223372036854775806ULL},
                {"9223372036854775807", 10,     9223372036854775807ULL},
                {"9223372036854775808", 10,     9223372036854775808ULL},
@@ -369,12 +369,12 @@ static void __init test_kstrtos64_ok(void)
                {"65537",       10,     65537},
                {"2147483646",  10,     2147483646},
                {"2147483647",  10,     2147483647},
-               {"2147483648",  10,     2147483648},
-               {"2147483649",  10,     2147483649},
-               {"4294967294",  10,     4294967294},
-               {"4294967295",  10,     4294967295},
-               {"4294967296",  10,     4294967296},
-               {"4294967297",  10,     4294967297},
+               {"2147483648",  10,     2147483648LL},
+               {"2147483649",  10,     2147483649LL},
+               {"4294967294",  10,     4294967294LL},
+               {"4294967295",  10,     4294967295LL},
+               {"4294967296",  10,     4294967296LL},
+               {"4294967297",  10,     4294967297LL},
                {"9223372036854775806", 10,     9223372036854775806LL},
                {"9223372036854775807", 10,     9223372036854775807LL},
        };
@@ -418,10 +418,10 @@ static void __init test_kstrtou32_ok(void)
                {"65537",       10,     65537},
                {"2147483646",  10,     2147483646},
                {"2147483647",  10,     2147483647},
-               {"2147483648",  10,     2147483648},
-               {"2147483649",  10,     2147483649},
-               {"4294967294",  10,     4294967294},
-               {"4294967295",  10,     4294967295},
+               {"2147483648",  10,     2147483648U},
+               {"2147483649",  10,     2147483649U},
+               {"4294967294",  10,     4294967294U},
+               {"4294967295",  10,     4294967295U},
        };
        TEST_OK(kstrtou32, u32, "%u", test_u32_ok);
 }
index e3a1050e6820e8a360b1ebf84b6a9103b9bd626f..191176a43e9a2523d37aa4381d08b3421c3bcfa7 100644 (file)
@@ -5,7 +5,7 @@
  *  Uses rbtrees for quick list adds and expiration.
  *
  *  NOTE: All of the following functions need to be serialized
- *  to avoid races. No locking is done by this libary code.
+ *  to avoid races. No locking is done by this library code.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index ea5fa4fe9d67879aa47be92ad9220a4d8d1beb31..a6cdc969ea42a7b5df5e74e8cb4d712f6f7bbd3b 100644 (file)
@@ -969,6 +969,9 @@ XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,
                         */
                        tmp = b->in[b->in_pos++];
 
+                       if (tmp == 0x00)
+                               return XZ_STREAM_END;
+
                        if (tmp >= 0xE0 || tmp == 0x01) {
                                s->lzma2.need_props = true;
                                s->lzma2.need_dict_reset = false;
@@ -1001,9 +1004,6 @@ XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,
                                                lzma_reset(s);
                                }
                        } else {
-                               if (tmp == 0x00)
-                                       return XZ_STREAM_END;
-
                                if (tmp > 0x02)
                                        return XZ_DATA_ERROR;
 
index 0d9a036ada66358f1d5bb37baf4f269f6e3fef18..befc87531e4fe0f7630f65195f00806d1feaaeef 100644 (file)
@@ -787,7 +787,7 @@ EXPORT_SYMBOL(congestion_wait);
  * jiffies for either a BDI to exit congestion of the given @sync queue
  * or a write to complete.
  *
- * In the absense of zone congestion, cond_resched() is called to yield
+ * In the absence of zone congestion, cond_resched() is called to yield
  * the processor if necessary but otherwise does not sleep.
  *
  * The return value is 0 if the sleep is for the full timeout. Otherwise,
index 0a619e0e2e0bd26da68b26948f065e1be72a8aa0..83326ad66d9b15df1027a0274d92886c85386394 100644 (file)
@@ -244,24 +244,28 @@ static ssize_t single_flag_show(struct kobject *kobj,
                                struct kobj_attribute *attr, char *buf,
                                enum transparent_hugepage_flag flag)
 {
-       if (test_bit(flag, &transparent_hugepage_flags))
-               return sprintf(buf, "[yes] no\n");
-       else
-               return sprintf(buf, "yes [no]\n");
+       return sprintf(buf, "%d\n",
+                      !!test_bit(flag, &transparent_hugepage_flags));
 }
+
 static ssize_t single_flag_store(struct kobject *kobj,
                                 struct kobj_attribute *attr,
                                 const char *buf, size_t count,
                                 enum transparent_hugepage_flag flag)
 {
-       if (!memcmp("yes", buf,
-                   min(sizeof("yes")-1, count))) {
+       unsigned long value;
+       int ret;
+
+       ret = kstrtoul(buf, 10, &value);
+       if (ret < 0)
+               return ret;
+       if (value > 1)
+               return -EINVAL;
+
+       if (value)
                set_bit(flag, &transparent_hugepage_flags);
-       } else if (!memcmp("no", buf,
-                          min(sizeof("no")-1, count))) {
+       else
                clear_bit(flag, &transparent_hugepage_flags);
-       } else
-               return -EINVAL;
 
        return count;
 }
@@ -680,8 +684,11 @@ int do_huge_pmd_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
                        return VM_FAULT_OOM;
                page = alloc_hugepage_vma(transparent_hugepage_defrag(vma),
                                          vma, haddr, numa_node_id(), 0);
-               if (unlikely(!page))
+               if (unlikely(!page)) {
+                       count_vm_event(THP_FAULT_FALLBACK);
                        goto out;
+               }
+               count_vm_event(THP_FAULT_ALLOC);
                if (unlikely(mem_cgroup_newpage_charge(page, mm, GFP_KERNEL))) {
                        put_page(page);
                        goto out;
@@ -909,11 +916,13 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
                new_page = NULL;
 
        if (unlikely(!new_page)) {
+               count_vm_event(THP_FAULT_FALLBACK);
                ret = do_huge_pmd_wp_page_fallback(mm, vma, address,
                                                   pmd, orig_pmd, page, haddr);
                put_page(page);
                goto out;
        }
+       count_vm_event(THP_FAULT_ALLOC);
 
        if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) {
                put_page(new_page);
@@ -1390,6 +1399,7 @@ int split_huge_page(struct page *page)
 
        BUG_ON(!PageSwapBacked(page));
        __split_huge_page(page, anon_vma);
+       count_vm_event(THP_SPLIT);
 
        BUG_ON(PageCompound(page));
 out_unlock:
@@ -1398,6 +1408,9 @@ out:
        return ret;
 }
 
+#define VM_NO_THP (VM_SPECIAL|VM_INSERTPAGE|VM_MIXEDMAP|VM_SAO| \
+                  VM_HUGETLB|VM_SHARED|VM_MAYSHARE)
+
 int hugepage_madvise(struct vm_area_struct *vma,
                     unsigned long *vm_flags, int advice)
 {
@@ -1406,11 +1419,7 @@ int hugepage_madvise(struct vm_area_struct *vma,
                /*
                 * Be somewhat over-protective like KSM for now!
                 */
-               if (*vm_flags & (VM_HUGEPAGE |
-                                VM_SHARED   | VM_MAYSHARE   |
-                                VM_PFNMAP   | VM_IO      | VM_DONTEXPAND |
-                                VM_RESERVED | VM_HUGETLB | VM_INSERTPAGE |
-                                VM_MIXEDMAP | VM_SAO))
+               if (*vm_flags & (VM_HUGEPAGE | VM_NO_THP))
                        return -EINVAL;
                *vm_flags &= ~VM_NOHUGEPAGE;
                *vm_flags |= VM_HUGEPAGE;
@@ -1426,11 +1435,7 @@ int hugepage_madvise(struct vm_area_struct *vma,
                /*
                 * Be somewhat over-protective like KSM for now!
                 */
-               if (*vm_flags & (VM_NOHUGEPAGE |
-                                VM_SHARED   | VM_MAYSHARE   |
-                                VM_PFNMAP   | VM_IO      | VM_DONTEXPAND |
-                                VM_RESERVED | VM_HUGETLB | VM_INSERTPAGE |
-                                VM_MIXEDMAP | VM_SAO))
+               if (*vm_flags & (VM_NOHUGEPAGE | VM_NO_THP))
                        return -EINVAL;
                *vm_flags &= ~VM_HUGEPAGE;
                *vm_flags |= VM_NOHUGEPAGE;
@@ -1564,10 +1569,14 @@ int khugepaged_enter_vma_merge(struct vm_area_struct *vma)
                 * page fault if needed.
                 */
                return 0;
-       if (vma->vm_file || vma->vm_ops)
+       if (vma->vm_ops)
                /* khugepaged not yet working on file or special mappings */
                return 0;
-       VM_BUG_ON(is_linear_pfn_mapping(vma) || is_pfn_mapping(vma));
+       /*
+        * If is_pfn_mapping() is true is_learn_pfn_mapping() must be
+        * true too, verify it here.
+        */
+       VM_BUG_ON(is_linear_pfn_mapping(vma) || vma->vm_flags & VM_NO_THP);
        hstart = (vma->vm_start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK;
        hend = vma->vm_end & HPAGE_PMD_MASK;
        if (hstart < hend)
@@ -1784,9 +1793,11 @@ static void collapse_huge_page(struct mm_struct *mm,
                                      node, __GFP_OTHER_NODE);
        if (unlikely(!new_page)) {
                up_read(&mm->mmap_sem);
+               count_vm_event(THP_COLLAPSE_ALLOC_FAILED);
                *hpage = ERR_PTR(-ENOMEM);
                return;
        }
+       count_vm_event(THP_COLLAPSE_ALLOC);
        if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) {
                up_read(&mm->mmap_sem);
                put_page(new_page);
@@ -1816,12 +1827,15 @@ static void collapse_huge_page(struct mm_struct *mm,
            (vma->vm_flags & VM_NOHUGEPAGE))
                goto out;
 
-       /* VM_PFNMAP vmas may have vm_ops null but vm_file set */
-       if (!vma->anon_vma || vma->vm_ops || vma->vm_file)
+       if (!vma->anon_vma || vma->vm_ops)
                goto out;
        if (is_vma_temporary_stack(vma))
                goto out;
-       VM_BUG_ON(is_linear_pfn_mapping(vma) || is_pfn_mapping(vma));
+       /*
+        * If is_pfn_mapping() is true is_learn_pfn_mapping() must be
+        * true too, verify it here.
+        */
+       VM_BUG_ON(is_linear_pfn_mapping(vma) || vma->vm_flags & VM_NO_THP);
 
        pgd = pgd_offset(mm, address);
        if (!pgd_present(*pgd))
@@ -2054,13 +2068,16 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages,
                        progress++;
                        continue;
                }
-               /* VM_PFNMAP vmas may have vm_ops null but vm_file set */
-               if (!vma->anon_vma || vma->vm_ops || vma->vm_file)
+               if (!vma->anon_vma || vma->vm_ops)
                        goto skip;
                if (is_vma_temporary_stack(vma))
                        goto skip;
-
-               VM_BUG_ON(is_linear_pfn_mapping(vma) || is_pfn_mapping(vma));
+               /*
+                * If is_pfn_mapping() is true is_learn_pfn_mapping()
+                * must be true too, verify it here.
+                */
+               VM_BUG_ON(is_linear_pfn_mapping(vma) ||
+                         vma->vm_flags & VM_NO_THP);
 
                hstart = (vma->vm_start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK;
                hend = vma->vm_end & HPAGE_PMD_MASK;
@@ -2151,8 +2168,11 @@ static void khugepaged_do_scan(struct page **hpage)
 #ifndef CONFIG_NUMA
                if (!*hpage) {
                        *hpage = alloc_hugepage(khugepaged_defrag());
-                       if (unlikely(!*hpage))
+                       if (unlikely(!*hpage)) {
+                               count_vm_event(THP_COLLAPSE_ALLOC_FAILED);
                                break;
+                       }
+                       count_vm_event(THP_COLLAPSE_ALLOC);
                }
 #else
                if (IS_ERR(*hpage))
@@ -2192,8 +2212,11 @@ static struct page *khugepaged_alloc_hugepage(void)
 
        do {
                hpage = alloc_hugepage(khugepaged_defrag());
-               if (!hpage)
+               if (!hpage) {
+                       count_vm_event(THP_COLLAPSE_ALLOC_FAILED);
                        khugepaged_alloc_sleep();
+               } else
+                       count_vm_event(THP_COLLAPSE_ALLOC);
        } while (unlikely(!hpage) &&
                 likely(khugepaged_enabled()));
        return hpage;
@@ -2210,8 +2233,11 @@ static void khugepaged_loop(void)
        while (likely(khugepaged_enabled())) {
 #ifndef CONFIG_NUMA
                hpage = khugepaged_alloc_hugepage();
-               if (unlikely(!hpage))
+               if (unlikely(!hpage)) {
+                       count_vm_event(THP_COLLAPSE_ALLOC_FAILED);
                        break;
+               }
+               count_vm_event(THP_COLLAPSE_ALLOC);
 #else
                if (IS_ERR(hpage)) {
                        khugepaged_alloc_sleep();
index 06de5aa4d64415af31fc5137ded307b634ae2c7b..8ee3bd8ec5b535b7e7f30cd063d840d65d614fff 100644 (file)
@@ -146,7 +146,7 @@ static long region_chg(struct list_head *head, long f, long t)
                if (rg->from > t)
                        return chg;
 
-               /* We overlap with this area, if it extends futher than
+               /* We overlap with this area, if it extends further than
                 * us then we must extend ourselves.  Account for its
                 * existing reservation. */
                if (rg->to > t) {
@@ -842,7 +842,7 @@ struct page *alloc_huge_page_node(struct hstate *h, int nid)
 }
 
 /*
- * Increase the hugetlb pool such that it can accomodate a reservation
+ * Increase the hugetlb pool such that it can accommodate a reservation
  * of size 'delta'.
  */
 static int gather_surplus_pages(struct hstate *h, int delta)
@@ -890,7 +890,7 @@ retry:
 
        /*
         * The surplus_list now contains _at_least_ the number of extra pages
-        * needed to accomodate the reservation.  Add the appropriate number
+        * needed to accommodate the reservation.  Add the appropriate number
         * of pages to the hugetlb pool and free the extras back to the buddy
         * allocator.  Commit the entire reservation here to prevent another
         * process from stealing the pages as they are added to the pool but
@@ -2043,7 +2043,7 @@ static void hugetlb_vm_op_open(struct vm_area_struct *vma)
         * This new VMA should share its siblings reservation map if present.
         * The VMA will only ever have a valid reservation map pointer where
         * it is being copied for another still existing VMA.  As that VMA
-        * has a reference to the reservation map it cannot dissappear until
+        * has a reference to the reservation map it cannot disappear until
         * after this open call completes.  It is therefore safe to take a
         * new reference here without additional locking.
         */
@@ -2490,7 +2490,7 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
        /*
         * Currently, we are forced to kill the process in the event the
         * original mapper has unmapped pages from the child due to a failed
-        * COW. Warn that such a situation has occured as it may not be obvious
+        * COW. Warn that such a situation has occurred as it may not be obvious
         */
        if (is_vma_resv_set(vma, HPAGE_RESV_UNMAPPED)) {
                printk(KERN_WARNING
index 0948f1072d6b150f145a159a89ae1aab364d9f0c..c7fc7fd00e32695a62f8a55363e8b1b88f4815a8 100644 (file)
@@ -1,4 +1,4 @@
-/* Inject a hwpoison memory failure on a arbitary pfn */
+/* Inject a hwpoison memory failure on a arbitrary pfn */
 #include <linux/module.h>
 #include <linux/debugfs.h>
 #include <linux/kernel.h>
index 3438dd43a062203a86a6f4b3e65e531ca8ae9384..9d0ced8e505e9276dabb42e129a4b918966a2421 100644 (file)
@@ -162,7 +162,7 @@ static inline struct page *mem_map_offset(struct page *base, int offset)
 }
 
 /*
- * Iterator over all subpages withing the maximally aligned gigantic
+ * Iterator over all subpages within the maximally aligned gigantic
  * page 'base'.  Handle any discontiguity in the mem_map.
  */
 static inline struct page *mem_map_next(struct page *iter,
index 84225f3b71905ba8a2aa639a3007486b97715db1..c1d5867543e4da3962b8ee36bf191f89f6870e99 100644 (file)
@@ -265,7 +265,7 @@ static void kmemleak_disable(void);
 } while (0)
 
 /*
- * Macro invoked when a serious kmemleak condition occured and cannot be
+ * Macro invoked when a serious kmemleak condition occurred and cannot be
  * recovered from. Kmemleak will be disabled and further allocation/freeing
  * tracing no longer available.
  */
@@ -1006,7 +1006,7 @@ static bool update_checksum(struct kmemleak_object *object)
 
 /*
  * Memory scanning is a long process and it needs to be interruptable. This
- * function checks whether such interrupt condition occured.
+ * function checks whether such interrupt condition occurred.
  */
 static int scan_should_stop(void)
 {
@@ -1733,7 +1733,7 @@ static int __init kmemleak_late_init(void)
 
        if (atomic_read(&kmemleak_error)) {
                /*
-                * Some error occured and kmemleak was disabled. There is a
+                * Some error occurred and kmemleak was disabled. There is a
                 * small chance that kmemleak_disable() was called immediately
                 * after setting kmemleak_initialized and we may end up with
                 * two clean-up threads but serialized by scan_mutex.
index 1bbe785aa559cb2f1c8bb87c329b4b9239b4d01d..942dfc73a2ff89c3c7c96b3f9b1838c99ec16d02 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -720,7 +720,7 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page,
                swapped = PageSwapCache(page);
                flush_cache_page(vma, addr, page_to_pfn(page));
                /*
-                * Ok this is tricky, when get_user_pages_fast() run it doesnt
+                * Ok this is tricky, when get_user_pages_fast() run it doesn't
                 * take any lock, therefore the check that we are going to make
                 * with the pagecount against the mapcount is racey and
                 * O_DIRECT can happen right after the check.
index 1f0b460fe58c5308caae219343e415ec75f59f0d..010f9166fa6ea099b7ab7b5ccdefe7af8cf033f4 100644 (file)
@@ -1466,7 +1466,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
                                        break;
                                }
                                /*
-                                * We want to do more targetted reclaim.
+                                * We want to do more targeted reclaim.
                                 * excess >> 2 is not to excessive so as to
                                 * reclaim too much, nor too less that we keep
                                 * coming back to reclaim from this cgroup
@@ -2265,7 +2265,7 @@ void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail)
  * - compound_lock is held when nr_pages > 1
  *
  * This function doesn't do "charge" nor css_get to new cgroup. It should be
- * done by a caller(__mem_cgroup_try_charge would be usefull). If @uncharge is
+ * done by a caller(__mem_cgroup_try_charge would be useful). If @uncharge is
  * true, this function does "uncharge" from old cgroup, but it doesn't if
  * @uncharge is false, so a caller should do "uncharge".
  */
@@ -2318,7 +2318,7 @@ static int mem_cgroup_move_account(struct page *page,
         * We charges against "to" which may not have any tasks. Then, "to"
         * can be under rmdir(). But in current implementation, caller of
         * this function is just force_empty() and move charge, so it's
-        * garanteed that "to" is never removed. So, we don't check rmdir
+        * guaranteed that "to" is never removed. So, we don't check rmdir
         * status here.
         */
        move_unlock_page_cgroup(pc, &flags);
@@ -2648,7 +2648,7 @@ static void mem_cgroup_do_uncharge(struct mem_cgroup *mem,
                batch->memcg = mem;
        /*
         * do_batch > 0 when unmapping pages or inode invalidate/truncate.
-        * In those cases, all pages freed continously can be expected to be in
+        * In those cases, all pages freed continuously can be expected to be in
         * the same cgroup and we have chance to coalesce uncharges.
         * But we do uncharge one by one if this is killed by OOM(TIF_MEMDIE)
         * because we want to do uncharge as soon as possible.
index 37feb9fec228ae6a8f34ba42d0845ca33ed5da32..2b9a5eef39e0661d48e7a9976780345587aff80c 100644 (file)
@@ -208,7 +208,7 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno,
         * Don't use force here, it's convenient if the signal
         * can be temporarily blocked.
         * This could cause a loop when the user sets SIGBUS
-        * to SIG_IGN, but hopefully noone will do that?
+        * to SIG_IGN, but hopefully no one will do that?
         */
        ret = send_sig_info(SIGBUS, &si, t);  /* synchronous? */
        if (ret < 0)
@@ -634,7 +634,7 @@ static int me_pagecache_dirty(struct page *p, unsigned long pfn)
                 * when the page is reread or dropped.  If an
                 * application assumes it will always get error on
                 * fsync, but does other operations on the fd before
-                * and the page is dropped inbetween then the error
+                * and the page is dropped between then the error
                 * will not be properly reported.
                 *
                 * This can already happen even without hwpoisoned
@@ -728,7 +728,7 @@ static int me_huge_page(struct page *p, unsigned long pfn)
  * The table matches them in order and calls the right handler.
  *
  * This is quite tricky because we can access page at any time
- * in its live cycle, so all accesses have to be extremly careful.
+ * in its live cycle, so all accesses have to be extremely careful.
  *
  * This is not complete. More states could be added.
  * For any missing state don't attempt recovery.
index 9da8cab1b1b0abceae9569a794447f3ddb0c1134..607098d47e745b37d375c0aa49d63e5507a9f4b0 100644 (file)
@@ -1410,6 +1410,13 @@ no_page_table:
        return page;
 }
 
+static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long addr)
+{
+       return (vma->vm_flags & VM_GROWSDOWN) &&
+               (vma->vm_start == addr) &&
+               !vma_stack_continue(vma->vm_prev, addr);
+}
+
 /**
  * __get_user_pages() - pin user pages in memory
  * @tsk:       task_struct of target task
@@ -1488,7 +1495,6 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                vma = find_extend_vma(mm, start);
                if (!vma && in_gate_area(mm, start)) {
                        unsigned long pg = start & PAGE_MASK;
-                       struct vm_area_struct *gate_vma = get_gate_vma(mm);
                        pgd_t *pgd;
                        pud_t *pud;
                        pmd_t *pmd;
@@ -1513,10 +1519,11 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                                pte_unmap(pte);
                                return i ? : -EFAULT;
                        }
+                       vma = get_gate_vma(mm);
                        if (pages) {
                                struct page *page;
 
-                               page = vm_normal_page(gate_vma, start, *pte);
+                               page = vm_normal_page(vma, start, *pte);
                                if (!page) {
                                        if (!(gup_flags & FOLL_DUMP) &&
                                             is_zero_pfn(pte_pfn(*pte)))
@@ -1530,12 +1537,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                                get_page(page);
                        }
                        pte_unmap(pte);
-                       if (vmas)
-                               vmas[i] = gate_vma;
-                       i++;
-                       start += PAGE_SIZE;
-                       nr_pages--;
-                       continue;
+                       goto next_page;
                }
 
                if (!vma ||
@@ -1549,6 +1551,13 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                        continue;
                }
 
+               /*
+                * If we don't actually want the page itself,
+                * and it's the stack guard page, just skip it.
+                */
+               if (!pages && stack_guard_page(vma, start))
+                       goto next_page;
+
                do {
                        struct page *page;
                        unsigned int foll_flags = gup_flags;
@@ -1631,6 +1640,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                                flush_anon_page(vma, page, start);
                                flush_dcache_page(page);
                        }
+next_page:
                        if (vmas)
                                vmas[i] = vma;
                        i++;
@@ -3386,7 +3396,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
         * run pte_offset_map on the pmd, if an huge pmd could
         * materialize from under us from a different thread.
         */
-       if (unlikely(__pte_alloc(mm, vma, pmd, address)))
+       if (unlikely(pmd_none(*pmd)) && __pte_alloc(mm, vma, pmd, address))
                return VM_FAULT_OOM;
        /* if an huge pmd materialized from under us just retry later */
        if (unlikely(pmd_trans_huge(*pmd)))
@@ -3678,7 +3688,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
                         */
 #ifdef CONFIG_HAVE_IOREMAP_PROT
                        vma = find_vma(mm, addr);
-                       if (!vma)
+                       if (!vma || vma->vm_start > addr)
                                break;
                        if (vma->vm_ops && vma->vm_ops->access)
                                ret = vma->vm_ops->access(vma, addr, buf,
index 321fc7455df7328c08441b54300054ff963e487b..9ca1d604f7cd74aab7a897de22e0784a8c0bcb45 100644 (file)
@@ -375,7 +375,7 @@ void online_page(struct page *page)
 #endif
 
 #ifdef CONFIG_FLATMEM
-       max_mapnr = max(page_to_pfn(page), max_mapnr);
+       max_mapnr = max(pfn, max_mapnr);
 #endif
 
        ClearPageReserved(page);
@@ -724,7 +724,7 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
                               pfn);
                        dump_page(page);
 #endif
-                       /* Becasue we don't have big zone->lock. we should
+                       /* Because we don't have big zone->lock. we should
                           check this again here. */
                        if (page_count(page)) {
                                not_managed++;
index b0406d739ea7a07b282e3e65a387a31770b40d11..34132f8e9109e1b2af4c92fdd74c5df7ef073392 100644 (file)
@@ -375,7 +375,7 @@ void migrate_page_copy(struct page *newpage, struct page *page)
                 * redo the accounting that clear_page_dirty_for_io undid,
                 * but we can't use set_page_dirty because that function
                 * is actually a signal that all of the page has become dirty.
-                * Wheras only part of our page may be dirty.
+                * Whereas only part of our page may be dirty.
                 */
                __set_page_dirty_nobuffers(newpage);
        }
index 2689a08c79affabda1e46b65271c60e3ba653ab7..6b55e3efe0df4ebd9aafd71e9317bc664956006f 100644 (file)
@@ -135,13 +135,6 @@ void munlock_vma_page(struct page *page)
        }
 }
 
-static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long addr)
-{
-       return (vma->vm_flags & VM_GROWSDOWN) &&
-               (vma->vm_start == addr) &&
-               !vma_stack_continue(vma->vm_prev, addr);
-}
-
 /**
  * __mlock_vma_pages_range() -  mlock a range of pages in the vma.
  * @vma:   target vma
@@ -188,12 +181,6 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
        if (vma->vm_flags & VM_LOCKED)
                gup_flags |= FOLL_MLOCK;
 
-       /* We don't try to access the guard page of a stack vma */
-       if (stack_guard_page(vma, start)) {
-               addr += PAGE_SIZE;
-               nr_pages--;
-       }
-
        return __get_user_pages(current, mm, addr, nr_pages, gup_flags,
                                NULL, NULL, nonblocking);
 }
index 2ec8eb5a9cdd0b4ae2e20471858bd4e09d83af00..e27e0cf0de03ccb81b252953932fc356c3499c10 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -259,7 +259,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
         * randomize_va_space to 2, which will still cause mm->start_brk
         * to be arbitrarily shifted
         */
-       if (mm->start_brk > PAGE_ALIGN(mm->end_data))
+       if (current->brk_randomized)
                min_brk = mm->start_brk;
        else
                min_brk = mm->end_data;
@@ -1814,11 +1814,14 @@ static int expand_downwards(struct vm_area_struct *vma,
                size = vma->vm_end - address;
                grow = (vma->vm_start - address) >> PAGE_SHIFT;
 
-               error = acct_stack_growth(vma, size, grow);
-               if (!error) {
-                       vma->vm_start = address;
-                       vma->vm_pgoff -= grow;
-                       perf_event_mmap(vma);
+               error = -ENOMEM;
+               if (grow <= vma->vm_pgoff) {
+                       error = acct_stack_growth(vma, size, grow);
+                       if (!error) {
+                               vma->vm_start = address;
+                               vma->vm_pgoff -= grow;
+                               perf_event_mmap(vma);
+                       }
                }
        }
        vma_unlock_anon_vma(vma);
index 1de98d492ddcd7adde4508bc3af3b5fcb6a465fe..a7c1f9f9b94157033e232ef2618ebb67e0eef99d 100644 (file)
@@ -277,9 +277,16 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
        if (old_len > vma->vm_end - addr)
                goto Efault;
 
-       if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) {
-               if (new_len > old_len)
+       /* Need to be careful about a growing mapping */
+       if (new_len > old_len) {
+               unsigned long pgoff;
+
+               if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP))
                        goto Efault;
+               pgoff = (addr - vma->vm_start) >> PAGE_SHIFT;
+               pgoff += vma->vm_pgoff;
+               if (pgoff + (new_len >> PAGE_SHIFT) < pgoff)
+                       goto Einval;
        }
 
        if (vma->vm_flags & VM_LOCKED) {
index e99f6cd1da1fccbb1756782c2218a75623b61b2f..9109049f0bbce176071d1776da87e12087485a12 100644 (file)
@@ -150,7 +150,7 @@ unsigned long __init free_all_bootmem(void)
 {
        /*
         * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id
-        *  because in some case like Node0 doesnt have RAM installed
+        *  because in some case like Node0 doesn't have RAM installed
         *  low ram will be on Node1
         * Use MAX_NUMNODES will make sure all ranges in early_node_map[]
         *  will be used instead of only Node0 related
index 6a819d1b2c7dd70015b9fadff8f28d70f3b6f422..f52e85c80e8d554fcae1a7ad40e0617c0bb1318f 100644 (file)
@@ -83,24 +83,6 @@ static bool has_intersects_mems_allowed(struct task_struct *tsk,
 }
 #endif /* CONFIG_NUMA */
 
-/*
- * If this is a system OOM (not a memcg OOM) and the task selected to be
- * killed is not already running at high (RT) priorities, speed up the
- * recovery by boosting the dying task to the lowest FIFO priority.
- * That helps with the recovery and avoids interfering with RT tasks.
- */
-static void boost_dying_task_prio(struct task_struct *p,
-                                 struct mem_cgroup *mem)
-{
-       struct sched_param param = { .sched_priority = 1 };
-
-       if (mem)
-               return;
-
-       if (!rt_task(p))
-               sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
-}
-
 /*
  * The process p may have detached its own ->mm while exiting or through
  * use_mm(), but one or more of its subthreads may still have a valid
@@ -190,10 +172,13 @@ unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,
 
        /*
         * The baseline for the badness score is the proportion of RAM that each
-        * task's rss and swap space use.
+        * task's rss, pagetable and swap space use.
         */
-       points = (get_mm_rss(p->mm) + get_mm_counter(p->mm, MM_SWAPENTS)) * 1000 /
-                       totalpages;
+       points = get_mm_rss(p->mm) + p->mm->nr_ptes;
+       points += get_mm_counter(p->mm, MM_SWAPENTS);
+
+       points *= 1000;
+       points /= totalpages;
        task_unlock(p);
 
        /*
@@ -452,13 +437,6 @@ static int oom_kill_task(struct task_struct *p, struct mem_cgroup *mem)
        set_tsk_thread_flag(p, TIF_MEMDIE);
        force_sig(SIGKILL, p);
 
-       /*
-        * We give our sacrificial lamb high priority and access to
-        * all the memory it needs. That way it should be able to
-        * exit() and clear out its resources quickly...
-        */
-       boost_dying_task_prio(p, mem);
-
        return 0;
 }
 #undef K
@@ -482,7 +460,6 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
         */
        if (p->flags & PF_EXITING) {
                set_tsk_thread_flag(p, TIF_MEMDIE);
-               boost_dying_task_prio(p, mem);
                return 0;
        }
 
@@ -556,7 +533,6 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask)
         */
        if (fatal_signal_pending(current)) {
                set_thread_flag(TIF_MEMDIE);
-               boost_dying_task_prio(current, NULL);
                return;
        }
 
@@ -712,7 +688,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
         */
        if (fatal_signal_pending(current)) {
                set_thread_flag(TIF_MEMDIE);
-               boost_dying_task_prio(current, NULL);
                return;
        }
 
index d6e7ba7373be7caea9f12eb73bf994df5ddc7467..9f8a97b9a350d17ec070d5e741c04f8d9998e7a8 100644 (file)
@@ -942,7 +942,7 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
                         * If breaking a large block of pages, move all free
                         * pages to the preferred allocation list. If falling
                         * back for a reclaimable kernel allocation, be more
-                        * agressive about taking ownership of free pages
+                        * aggressive about taking ownership of free pages
                         */
                        if (unlikely(current_order >= (pageblock_order >> 1)) ||
                                        start_migratetype == MIGRATE_RECLAIMABLE ||
@@ -3176,7 +3176,7 @@ static __init_refok int __build_all_zonelists(void *data)
  * Called with zonelists_mutex held always
  * unless system_state == SYSTEM_BOOTING.
  */
-void build_all_zonelists(void *data)
+void __ref build_all_zonelists(void *data)
 {
        set_zonelist_order();
 
@@ -3926,7 +3926,7 @@ static void __init find_usable_zone_for_movable(void)
 
 /*
  * The zone ranges provided by the architecture do not include ZONE_MOVABLE
- * because it is sized independant of architecture. Unlike the other zones,
+ * because it is sized independent of architecture. Unlike the other zones,
  * the starting point for ZONE_MOVABLE is not fixed. It may be different
  * in each node depending on the size of each node and how evenly kernelcore
  * is distributed. This helper function adjusts the zone ranges
index a12cc3fa98594b931c16012dd53a52dbd49fdb6f..99055010cecef74586af9490be326fbd8bd6b1e5 100644 (file)
@@ -377,7 +377,7 @@ not_enough_page:
  * @new: new id
  *
  * Returns old id at success, 0 at failure.
- * (There is no mem_cgroup useing 0 as its id)
+ * (There is no mem_cgroup using 0 as its id)
  */
 unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
                                        unsigned short old, unsigned short new)
index 55d4d113fbd37fe4edb7531dc61102fc8f7c1bcc..a160db39b810d3e7cd5981298b125c807419e964 100644 (file)
@@ -342,7 +342,7 @@ static void pcpu_chunk_relocate(struct pcpu_chunk *chunk, int oslot)
  * @chunk: chunk of interest
  *
  * Determine whether area map of @chunk needs to be extended to
- * accomodate a new allocation.
+ * accommodate a new allocation.
  *
  * CONTEXT:
  * pcpu_lock.
@@ -431,7 +431,7 @@ out_unlock:
  * depending on @head, is reduced by @tail bytes and @tail byte block
  * is inserted after the target block.
  *
- * @chunk->map must have enough free slots to accomodate the split.
+ * @chunk->map must have enough free slots to accommodate the split.
  *
  * CONTEXT:
  * pcpu_lock.
@@ -1435,7 +1435,7 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info(
        /*
         * Determine min_unit_size, alloc_size and max_upa such that
         * alloc_size is multiple of atom_size and is the smallest
-        * which can accomodate 4k aligned segments which are equal to
+        * which can accommodate 4k aligned segments which are equal to
         * or larger than min_unit_size.
         */
        min_unit_size = max_t(size_t, size_sum, PCPU_MIN_UNIT_SIZE);
@@ -1550,7 +1550,7 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info(
  * @atom_size: allocation atom size
  * @cpu_distance_fn: callback to determine distance between cpus, optional
  * @alloc_fn: function to allocate percpu page
- * @free_fn: funtion to free percpu page
+ * @free_fn: function to free percpu page
  *
  * This is a helper to ease setting up embedded first percpu chunk and
  * can be called where pcpu_setup_first_chunk() is expected.
@@ -1678,7 +1678,7 @@ out_free:
  * pcpu_page_first_chunk - map the first chunk using PAGE_SIZE pages
  * @reserved_size: the size of reserved percpu area in bytes
  * @alloc_fn: function to allocate percpu page, always called with PAGE_SIZE
- * @free_fn: funtion to free percpu page, always called with PAGE_SIZE
+ * @free_fn: function to free percpu page, always called with PAGE_SIZE
  * @populate_pte_fn: function to populate pte
  *
  * This is a helper to ease setting up page-remapped first percpu
index 58da7c150ba6d7b4132f423663ff920345038d7c..8fa27e4e582a236886eba7d875e6c612130468fc 100644 (file)
@@ -421,7 +421,8 @@ static swp_entry_t *shmem_swp_alloc(struct shmem_inode_info *info, unsigned long
                 * a waste to allocate index if we cannot allocate data.
                 */
                if (sbinfo->max_blocks) {
-                       if (percpu_counter_compare(&sbinfo->used_blocks, (sbinfo->max_blocks - 1)) > 0)
+                       if (percpu_counter_compare(&sbinfo->used_blocks,
+                                               sbinfo->max_blocks - 1) >= 0)
                                return ERR_PTR(-ENOSPC);
                        percpu_counter_inc(&sbinfo->used_blocks);
                        spin_lock(&inode->i_lock);
@@ -1397,7 +1398,8 @@ repeat:
                shmem_swp_unmap(entry);
                sbinfo = SHMEM_SB(inode->i_sb);
                if (sbinfo->max_blocks) {
-                       if ((percpu_counter_compare(&sbinfo->used_blocks, sbinfo->max_blocks) > 0) ||
+                       if (percpu_counter_compare(&sbinfo->used_blocks,
+                                               sbinfo->max_blocks) >= 0 ||
                            shmem_acct_block(info->flags)) {
                                spin_unlock(&info->lock);
                                error = -ENOSPC;
index 568803f121a8769b73b5d76c7b49ea82b3f8e10f..46a9c163a92f222aeab9adc3a7ed56511e89a23b 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -878,7 +878,7 @@ static struct array_cache *alloc_arraycache(int node, int entries,
        nc = kmalloc_node(memsize, gfp, node);
        /*
         * The array_cache structures contain pointers to free object.
-        * However, when such objects are allocated or transfered to another
+        * However, when such objects are allocated or transferred to another
         * cache the pointers are not cleared and they could be counted as
         * valid references during a kmemleak scan. Therefore, kmemleak must
         * not scan such objects.
@@ -2606,7 +2606,7 @@ EXPORT_SYMBOL(kmem_cache_shrink);
  *
  * The cache must be empty before calling this function.
  *
- * The caller must guarantee that noone will allocate memory from the cache
+ * The caller must guarantee that no one will allocate memory from the cache
  * during the kmem_cache_destroy().
  */
 void kmem_cache_destroy(struct kmem_cache *cachep)
index f881874843a5ff67a3d1cef595c35bf72a3c3565..9d2e5e46bf09b85f6038232b6b3f32f928862ea4 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -64,7 +64,7 @@
  *   we must stay away from it for a while since we may cause a bouncing
  *   cacheline if we try to acquire the lock. So go onto the next slab.
  *   If all pages are busy then we may allocate a new slab instead of reusing
- *   a partial slab. A new slab has noone operating on it and thus there is
+ *   a partial slab. A new slab has no one operating on it and thus there is
  *   no danger of cacheline contention.
  *
  *   Interrupts are disabled during allocation and deallocation in order to
@@ -1929,7 +1929,7 @@ redo:
        else {
 #ifdef CONFIG_CMPXCHG_LOCAL
                /*
-                * The cmpxchg will only match if there was no additonal
+                * The cmpxchg will only match if there was no additional
                 * operation and if we are on the right processor.
                 *
                 * The cmpxchg does the following atomically (without lock semantics!)
@@ -1940,7 +1940,7 @@ redo:
                 * Since this is without lock semantics the protection is only against
                 * code executing on this cpu *not* from access by other cpus.
                 */
-               if (unlikely(!this_cpu_cmpxchg_double(
+               if (unlikely(!irqsafe_cpu_cmpxchg_double(
                                s->cpu_slab->freelist, s->cpu_slab->tid,
                                object, tid,
                                get_freepointer(s, object), next_tid(tid)))) {
@@ -2145,7 +2145,7 @@ redo:
                set_freepointer(s, object, c->freelist);
 
 #ifdef CONFIG_CMPXCHG_LOCAL
-               if (unlikely(!this_cpu_cmpxchg_double(
+               if (unlikely(!irqsafe_cpu_cmpxchg_double(
                                s->cpu_slab->freelist, s->cpu_slab->tid,
                                c->freelist, tid,
                                object, next_tid(tid)))) {
@@ -3547,7 +3547,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller)
 
        ret = slab_alloc(s, gfpflags, NUMA_NO_NODE, caller);
 
-       /* Honor the call site pointer we recieved. */
+       /* Honor the call site pointer we received. */
        trace_kmalloc(caller, ret, size, s->size, gfpflags);
 
        return ret;
@@ -3577,7 +3577,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
 
        ret = slab_alloc(s, gfpflags, node, caller);
 
-       /* Honor the call site pointer we recieved. */
+       /* Honor the call site pointer we received. */
        trace_kmalloc_node(caller, ret, size, s->size, gfpflags, node);
 
        return ret;
index 93250207c5cf94f9ad58a528299a23390cc84ff5..aa64b12831a24b8c831878b1ea8b66c2553a619e 100644 (file)
@@ -500,7 +500,7 @@ void __init sparse_init(void)
         * so alloc 2M (with 2M align) and 24 bytes in turn will
         * make next 2M slip to one more 2M later.
         * then in big system, the memory will have a lot of holes...
-        * here try to allocate 2M pages continously.
+        * here try to allocate 2M pages continuously.
         *
         * powerpc need to call sparse_init_one_section right after each
         * sparse_early_mem_map_alloc, so allocate usemap_map at first.
index f126975ef23e7bea33e5fa5e15d191bb8dfd1b2e..e7b103a6fd21c50857eda25cb5750e6d319e6498 100644 (file)
--- a/mm/util.c
+++ b/mm/util.c
@@ -227,7 +227,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
 /*
  * Like get_user_pages_fast() except its IRQ-safe in that it won't fall
  * back to the regular GUP.
- * If the architecture not support this fucntion, simply return with no
+ * If the architecture not support this function, simply return with no
  * page pinned
  */
 int __attribute__((weak)) __get_user_pages_fast(unsigned long start,
index f73b8657c2d03053f9b0340a55132ee2d3ebd2f0..f6b435c80079337489b17122f0d0ab1b829e12c3 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/memcontrol.h>
 #include <linux/delayacct.h>
 #include <linux/sysctl.h>
+#include <linux/oom.h>
 
 #include <asm/tlbflush.h>
 #include <asm/div64.h>
@@ -1065,7 +1066,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
                 * surrounding the tag page.  Only take those pages of
                 * the same active state as that tag page.  We may safely
                 * round the target page pfn down to the requested order
-                * as the mem_map is guarenteed valid out to MAX_ORDER,
+                * as the mem_map is guaranteed valid out to MAX_ORDER,
                 * where that page is in a different zone we will detect
                 * it from its zone id and abort this block scan.
                 */
@@ -1988,17 +1989,12 @@ static bool zone_reclaimable(struct zone *zone)
        return zone->pages_scanned < zone_reclaimable_pages(zone) * 6;
 }
 
-/*
- * As hibernation is going on, kswapd is freezed so that it can't mark
- * the zone into all_unreclaimable. It can't handle OOM during hibernation.
- * So let's check zone's unreclaimable in direct reclaim as well as kswapd.
- */
+/* All zones in zonelist are unreclaimable? */
 static bool all_unreclaimable(struct zonelist *zonelist,
                struct scan_control *sc)
 {
        struct zoneref *z;
        struct zone *zone;
-       bool all_unreclaimable = true;
 
        for_each_zone_zonelist_nodemask(zone, z, zonelist,
                        gfp_zone(sc->gfp_mask), sc->nodemask) {
@@ -2006,13 +2002,11 @@ static bool all_unreclaimable(struct zonelist *zonelist,
                        continue;
                if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
                        continue;
-               if (zone_reclaimable(zone)) {
-                       all_unreclaimable = false;
-                       break;
-               }
+               if (!zone->all_unreclaimable)
+                       return false;
        }
 
-       return all_unreclaimable;
+       return true;
 }
 
 /*
@@ -2108,6 +2102,14 @@ out:
        if (sc->nr_reclaimed)
                return sc->nr_reclaimed;
 
+       /*
+        * As hibernation is going on, kswapd is freezed so that it can't mark
+        * the zone into all_unreclaimable. Thus bypassing all_unreclaimable
+        * check.
+        */
+       if (oom_killer_disabled)
+               return 0;
+
        /* top priority shrink_zones still had more to do? don't OOM, then */
        if (scanning_global_lru(sc) && !all_unreclaimable(zonelist, sc))
                return 1;
@@ -2224,7 +2226,7 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont,
  *   o a 16M DMA zone that is balanced will not balance a zone on any
  *     reasonable sized machine
  *   o On all other machines, the top zone must be at least a reasonable
- *     precentage of the middle zones. For example, on 32-bit x86, highmem
+ *     percentage of the middle zones. For example, on 32-bit x86, highmem
  *     would need to be at least 256M for it to be balance a whole node.
  *     Similarly, on x86-64 the Normal zone would need to be at least 1G
  *     to balance a node on its own. These seemed like reasonable ratios.
index 772b39b87d955078b4f0d7a1b7114751e0ef9a74..897ea9e88238d1a9ffd99c4f35124988bbc85ef0 100644 (file)
@@ -321,9 +321,12 @@ static inline void mod_state(struct zone *zone,
                /*
                 * The fetching of the stat_threshold is racy. We may apply
                 * a counter threshold to the wrong the cpu if we get
-                * rescheduled while executing here. However, the following
-                * will apply the threshold again and therefore bring the
-                * counter under the threshold.
+                * rescheduled while executing here. However, the next
+                * counter update will apply the threshold again and
+                * therefore bring the counter under the threshold again.
+                *
+                * Most of the time the thresholds are the same anyways
+                * for all cpus in a zone.
                 */
                t = this_cpu_read(pcp->stat_threshold);
 
@@ -945,7 +948,16 @@ static const char * const vmstat_text[] = {
        "unevictable_pgs_cleared",
        "unevictable_pgs_stranded",
        "unevictable_pgs_mlockfreed",
+
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+       "thp_fault_alloc",
+       "thp_fault_fallback",
+       "thp_collapse_alloc",
+       "thp_collapse_alloc_failed",
+       "thp_split",
 #endif
+
+#endif /* CONFIG_VM_EVENTS_COUNTERS */
 };
 
 static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
index d1314cf18adf53dfeaf81e1f97ff7e853ca42b93..d940c49d168ac031f667f0ba6340e239d8b79667 100644 (file)
@@ -54,7 +54,7 @@ static const char name_conf[]  = "config";
 
 /*
  *     Structures for interfacing with the /proc filesystem.
- *     VLAN creates its own directory /proc/net/vlan with the folowing
+ *     VLAN creates its own directory /proc/net/vlan with the following
  *     entries:
  *     config          device status/configuration
  *     <device>        entry for each  device
index 2ccbf04d37dfd22a7a65a36cd3c63887d58b823d..77367745be9bd4d03c3b7100c8108d71c8536d98 100644 (file)
@@ -178,7 +178,7 @@ free_and_return:
  * @tag: numeric id for transaction
  *
  * this is a simple array lookup, but will grow the
- * request_slots as necessary to accomodate transaction
+ * request_slots as necessary to accommodate transaction
  * ids which did not previously have a slot.
  *
  * this code relies on the client spinlock to manage locks, its
@@ -929,15 +929,15 @@ error:
 }
 EXPORT_SYMBOL(p9_client_attach);
 
-struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames,
-       int clone)
+struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname,
+               char **wnames, int clone)
 {
        int err;
        struct p9_client *clnt;
        struct p9_fid *fid;
        struct p9_qid *wqids;
        struct p9_req_t *req;
-       int16_t nwqids, count;
+       uint16_t nwqids, count;
 
        err = 0;
        wqids = NULL;
@@ -955,7 +955,7 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames,
                fid = oldfid;
 
 
-       P9_DPRINTK(P9_DEBUG_9P, ">>> TWALK fids %d,%d nwname %d wname[0] %s\n",
+       P9_DPRINTK(P9_DEBUG_9P, ">>> TWALK fids %d,%d nwname %ud wname[0] %s\n",
                oldfid->fid, fid->fid, nwname, wnames ? wnames[0] : NULL);
 
        req = p9_client_rpc(clnt, P9_TWALK, "ddT", oldfid->fid, fid->fid,
@@ -1220,27 +1220,6 @@ error:
 }
 EXPORT_SYMBOL(p9_client_fsync);
 
-int p9_client_sync_fs(struct p9_fid *fid)
-{
-       int err = 0;
-       struct p9_req_t *req;
-       struct p9_client *clnt;
-
-       P9_DPRINTK(P9_DEBUG_9P, ">>> TSYNC_FS fid %d\n", fid->fid);
-
-       clnt = fid->clnt;
-       req = p9_client_rpc(clnt, P9_TSYNCFS, "d", fid->fid);
-       if (IS_ERR(req)) {
-               err = PTR_ERR(req);
-               goto error;
-       }
-       P9_DPRINTK(P9_DEBUG_9P, "<<< RSYNCFS fid %d\n", fid->fid);
-       p9_free_req(clnt, req);
-error:
-       return err;
-}
-EXPORT_SYMBOL(p9_client_sync_fs);
-
 int p9_client_clunk(struct p9_fid *fid)
 {
        int err;
index 8a4084fa8b5a907df17db9b023c215d1bb7da772..b58a501cf3d124a06939d266002bf48a92863ee1 100644 (file)
@@ -265,7 +265,7 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,
                        }
                        break;
                case 'T':{
-                               int16_t *nwname = va_arg(ap, int16_t *);
+                               uint16_t *nwname = va_arg(ap, uint16_t *);
                                char ***wnames = va_arg(ap, char ***);
 
                                errcode = p9pdu_readf(pdu, proto_version,
@@ -468,7 +468,8 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt,
                case 'E':{
                                 int32_t cnt = va_arg(ap, int32_t);
                                 const char *k = va_arg(ap, const void *);
-                                const char *u = va_arg(ap, const void *);
+                                const char __user *u = va_arg(ap,
+                                                       const void __user *);
                                 errcode = p9pdu_writef(pdu, proto_version, "d",
                                                 cnt);
                                 if (!errcode && pdu_write_urw(pdu, k, u, cnt))
@@ -495,7 +496,7 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt,
                        }
                        break;
                case 'T':{
-                               int16_t nwname = va_arg(ap, int);
+                               uint16_t nwname = va_arg(ap, int);
                                const char **wnames = va_arg(ap, const char **);
 
                                errcode = p9pdu_writef(pdu, proto_version, "w",
index 9172ab78fcb0e90f48f81ea48810bc7eb8a160c7..e883172f9aa2c1096d363483f252a603bba7f108 100644 (file)
@@ -36,7 +36,7 @@ p9_release_req_pages(struct trans_rpage_info *rpinfo)
 EXPORT_SYMBOL(p9_release_req_pages);
 
 /**
- * p9_nr_pages - Return number of pages needed to accomodate the payload.
+ * p9_nr_pages - Return number of pages needed to accommodate the payload.
  */
 int
 p9_nr_pages(struct p9_req_t *req)
@@ -55,7 +55,7 @@ EXPORT_SYMBOL(p9_nr_pages);
  * @req: Request to be sent to server.
  * @pdata_off: data offset into the first page after translation (gup).
  * @pdata_len: Total length of the IO. gup may not return requested # of pages.
- * @nr_pages: number of pages to accomodate the payload
+ * @nr_pages: number of pages to accommodate the payload
  * @rw: Indicates if the pages are for read or write.
  */
 int
@@ -66,7 +66,7 @@ p9_payload_gup(struct p9_req_t *req, size_t *pdata_off, int *pdata_len,
        uint32_t pdata_mapped_pages;
        struct trans_rpage_info  *rpinfo;
 
-       *pdata_off = (size_t)req->tc->pubuf & (PAGE_SIZE-1);
+       *pdata_off = (__force size_t)req->tc->pubuf & (PAGE_SIZE-1);
 
        if (*pdata_off)
                first_page_bytes = min(((size_t)PAGE_SIZE - *pdata_off),
index e8f046b071821636daf99ae9ef79e88f28ef7a09..244e70742183dd689c347166885905baa1584e43 100644 (file)
@@ -326,8 +326,11 @@ req_retry_pinned:
                        outp = pack_sg_list_p(chan->sg, out, VIRTQUEUE_NUM,
                                        pdata_off, rpinfo->rp_data, pdata_len);
                } else {
-                       char *pbuf = req->tc->pubuf ? req->tc->pubuf :
-                                                               req->tc->pkbuf;
+                       char *pbuf;
+                       if (req->tc->pubuf)
+                               pbuf = (__force char *) req->tc->pubuf;
+                       else
+                               pbuf = req->tc->pkbuf;
                        outp = pack_sg_list(chan->sg, out, VIRTQUEUE_NUM, pbuf,
                                        req->tc->pbuf_size);
                }
@@ -352,8 +355,12 @@ req_retry_pinned:
                        in = pack_sg_list_p(chan->sg, out+inp, VIRTQUEUE_NUM,
                                        pdata_off, rpinfo->rp_data, pdata_len);
                } else {
-                       char *pbuf = req->tc->pubuf ? req->tc->pubuf :
-                                                               req->tc->pkbuf;
+                       char *pbuf;
+                       if (req->tc->pubuf)
+                               pbuf = (__force char *) req->tc->pubuf;
+                       else
+                               pbuf = req->tc->pkbuf;
+
                        in = pack_sg_list(chan->sg, out+inp, VIRTQUEUE_NUM,
                                        pbuf, req->tc->pbuf_size);
                }
index b84619b5ba221e4576b2e8ad99256bb4f91f47cb..da6af81e59d9fa504345c306e6636acd1f91b093 100644 (file)
@@ -67,7 +67,7 @@ EXPORT_SYMBOL(p9_idpool_create);
 
 /**
  * p9_idpool_destroy - create a new per-connection id pool
- * @p: idpool to destory
+ * @p: idpool to destroy
  */
 
 void p9_idpool_destroy(struct p9_idpool *p)
index fce2eae8d47697ba4e4a6ce1deea8e3359112539..2252c2085dacd583d1894e2a5e47d010f82394e4 100644 (file)
@@ -509,7 +509,7 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
        write_lock_irq(&devs_lock);
        net_dev = br2684_find_dev(&be.ifspec);
        if (net_dev == NULL) {
-               pr_err("tried to attach to non-existant device\n");
+               pr_err("tried to attach to non-existent device\n");
                err = -ENXIO;
                goto error;
        }
index 9d14d196cc1d74aa9ea06baec24ba5772cc2c24b..dfc0719664631c7d506712cf253474a8d4a26c2a 100644 (file)
@@ -35,7 +35,7 @@ struct lecdatahdr_8025 {
  * Operations that LANE2 capable device can do. Two first functions
  * are used to make the device do things. See spec 3.1.3 and 3.1.4.
  *
- * The third function is intented for the MPOA component sitting on
+ * The third function is intended for the MPOA component sitting on
  * top of the LANE device. The MPOA component assigns it's own function
  * to (*associate_indicator)() and the LANE device will use that
  * function to tell about TLVs it sees floating through.
index 9ed26140a2696aa19d87534e15b4609d5901b66b..824e1f6e50f2f702fb7de6887e573a8b9d4590d8 100644 (file)
@@ -474,7 +474,7 @@ void interface_rx(struct net_device *soft_iface,
                goto dropped;
        skb->protocol = eth_type_trans(skb, soft_iface);
 
-       /* should not be neccesary anymore as we use skb_pull_rcsum()
+       /* should not be necessary anymore as we use skb_pull_rcsum()
         * TODO: please verify this and remove this TODO
         * -- Dec 21st 2009, Simon Wunderlich */
 
index b372fb8bcdcfdbbcbb7c190ce9b12baff125c12d..b5a8afc2be331f5ac5b26649e4609e21039f8b85 100644 (file)
@@ -186,6 +186,7 @@ static void hci_reset_req(struct hci_dev *hdev, unsigned long opt)
        BT_DBG("%s %ld", hdev->name, opt);
 
        /* Reset device */
+       set_bit(HCI_RESET, &hdev->flags);
        hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);
 }
 
@@ -213,8 +214,10 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
        /* Mandatory initialization */
 
        /* Reset */
-       if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks))
+       if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) {
+                       set_bit(HCI_RESET, &hdev->flags);
                        hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);
+       }
 
        /* Read Local Supported Features */
        hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL);
@@ -585,6 +588,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
        hci_req_lock(hdev);
 
        if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
+               del_timer_sync(&hdev->cmd_timer);
                hci_req_unlock(hdev);
                return 0;
        }
@@ -1074,6 +1078,7 @@ static void hci_cmd_timer(unsigned long arg)
 
        BT_ERR("%s command tx timeout", hdev->name);
        atomic_set(&hdev->cmd_cnt, 1);
+       clear_bit(HCI_RESET, &hdev->flags);
        tasklet_schedule(&hdev->cmd_task);
 }
 
@@ -1877,7 +1882,7 @@ static void hci_tx_task(unsigned long arg)
        read_unlock(&hci_task_lock);
 }
 
-/* ----- HCI RX task (incoming data proccessing) ----- */
+/* ----- HCI RX task (incoming data processing) ----- */
 
 /* ACL data packet */
 static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
index 3fbfa50c2bff8a1fc9412319d5887aefa4938de0..b2570159a04418bf213a512f6f1e1589faf7ff8a 100644 (file)
@@ -183,6 +183,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
 
        BT_DBG("%s status 0x%x", hdev->name, status);
 
+       clear_bit(HCI_RESET, &hdev->flags);
+
        hci_req_complete(hdev, HCI_OP_RESET, status);
 }
 
@@ -1847,7 +1849,7 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
        if (ev->opcode != HCI_OP_NOP)
                del_timer(&hdev->cmd_timer);
 
-       if (ev->ncmd) {
+       if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) {
                atomic_set(&hdev->cmd_cnt, 1);
                if (!skb_queue_empty(&hdev->cmd_q))
                        tasklet_schedule(&hdev->cmd_task);
@@ -2385,8 +2387,6 @@ static inline void hci_io_capa_reply_evt(struct hci_dev *hdev, struct sk_buff *s
        if (!conn)
                goto unlock;
 
-       hci_conn_hold(conn);
-
        conn->remote_cap = ev->capability;
        conn->remote_oob = ev->oob_data;
        conn->remote_auth = ev->authentication;
index c9f9cecca5270f129217a691a16115ebbaddbf92..2c8dd4494c63966ffd0e5df4f66546139dea2f81 100644 (file)
@@ -1051,6 +1051,7 @@ static void l2cap_retransmit_one_frame(struct sock *sk, u8 tx_seq)
        tx_skb = skb_clone(skb, GFP_ATOMIC);
        bt_cb(skb)->retries++;
        control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE);
+       control &= L2CAP_CTRL_SAR;
 
        if (pi->conn_state & L2CAP_CONN_SEND_FBIT) {
                control |= L2CAP_CTRL_FINAL;
@@ -1116,7 +1117,9 @@ int l2cap_ertm_send(struct sock *sk)
                bt_cb(skb)->tx_seq = pi->next_tx_seq;
                pi->next_tx_seq = (pi->next_tx_seq + 1) % 64;
 
-               pi->unacked_frames++;
+               if (bt_cb(skb)->retries == 1)
+                       pi->unacked_frames++;
+
                pi->frames_sent++;
 
                if (skb_queue_is_last(TX_QUEUE(sk), skb))
index fc85e7ae33c732fe729ee76db3d8df03e0e5d572..299fe56a9668e677457d23b691ac38521c61a1fe 100644 (file)
@@ -679,7 +679,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ch
 
                if (opt == BT_FLUSHABLE_OFF) {
                        struct l2cap_conn *conn = l2cap_pi(sk)->conn;
-                       /* proceed futher only when we have l2cap_conn and
+                       /* proceed further only when we have l2cap_conn and
                           No Flush support in the LM */
                        if (!conn || !lmp_no_flush_capable(conn->hcon->hdev)) {
                                err = -EINVAL;
@@ -923,8 +923,9 @@ void __l2cap_sock_close(struct sock *sk, int reason)
                        rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO);
                        l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
                                        L2CAP_CONN_RSP, sizeof(rsp), &rsp);
-               } else
-                       l2cap_chan_del(sk, reason);
+               }
+
+               l2cap_chan_del(sk, reason);
                break;
 
        case BT_CONNECT:
index 0054c74e27b7fcd4971477408721b003e773f37a..4476d8e3c0f2e5942830e34b6772ed5609ff3afe 100644 (file)
@@ -1230,6 +1230,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data,
        if (!hdev)
                return cmd_status(sk, index, mgmt_op, ENODEV);
 
+       hci_dev_lock_bh(hdev);
+
        if (!test_bit(HCI_UP, &hdev->flags)) {
                err = cmd_status(sk, index, mgmt_op, ENETDOWN);
                goto failed;
index 42fdffd1d76c0c17c5ab3382b94ea5bf4fcc62c9..94954c74f6ae61e5df6a5bcf9bb301300bd37eda 100644 (file)
@@ -369,6 +369,15 @@ static void __sco_sock_close(struct sock *sk)
 
        case BT_CONNECTED:
        case BT_CONFIG:
+               if (sco_pi(sk)->conn) {
+                       sk->sk_state = BT_DISCONN;
+                       sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT);
+                       hci_conn_put(sco_pi(sk)->conn->hcon);
+                       sco_pi(sk)->conn = NULL;
+               } else
+                       sco_chan_del(sk, ECONNRESET);
+               break;
+
        case BT_CONNECT:
        case BT_DISCONN:
                sco_chan_del(sk, ECONNRESET);
index 88485cc74dc31c697d33ddc5eb2c5f2a0d3d0dee..cc4d3c5ab1c62dcb9a3cfe66343e6adbdfe6f463 100644 (file)
@@ -169,7 +169,7 @@ void br_fdb_flush(struct net_bridge *br)
        spin_unlock_bh(&br->hash_lock);
 }
 
-/* Flush all entries refering to a specific port.
+/* Flush all entries referring to a specific port.
  * if do_all is set also flush static entries
  */
 void br_fdb_delete_by_port(struct net_bridge *br,
index e2160792e1bce49869fb5137a73deeabed8e1135..0c7badad62af07ab3e983c0871311a9212c481a3 100644 (file)
@@ -164,7 +164,7 @@ rx_handler_result_t br_handle_frame(struct sk_buff **pskb)
                        goto drop;
 
                /* If STP is turned off, then forward */
-               if (p->br->stp_enabled == BR_NO_STP)
+               if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0)
                        goto forward;
 
                if (NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
index cb43312b846ee8f33be636e7ca69df3dd2eeb455..3d9fca0e3370abf75ef2bb095da21cd937ecbbdb 100644 (file)
@@ -106,7 +106,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd)
 /*
  * Legacy ioctl's through SIOCDEVPRIVATE
  * This interface is deprecated because it was too difficult to
- * to do the translation for 32/64bit ioctl compatability.
+ * to do the translation for 32/64bit ioctl compatibility.
  */
 static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
index 008ff6c4eecf3da16c55901afd9e9fbde9f5ee2f..f3bc322c589128d14d6367368597f6da66958bcb 100644 (file)
@@ -249,11 +249,9 @@ static int br_parse_ip_options(struct sk_buff *skb)
                goto drop;
        }
 
-       /* Zero out the CB buffer if no options present */
-       if (iph->ihl == 5) {
-               memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
+       memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
+       if (iph->ihl == 5)
                return 0;
-       }
 
        opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
        if (ip_options_compile(dev_net(dev), opt, skb))
index 8184c031d028b01fdcc435d7729cda022f925535..37a4034dfc29ddbc8a1185bd3daf42ab617e30d3 100644 (file)
@@ -852,7 +852,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
        sock->state = SS_CONNECTING;
        sk->sk_state = CAIF_CONNECTING;
 
-       /* Check priority value comming from socket */
+       /* Check priority value coming from socket */
        /* if priority value is out of range it will be ajusted */
        if (cf_sk->sk.sk_priority > CAIF_PRIO_MAX)
                cf_sk->conn_req.priority = CAIF_PRIO_MAX;
index 27dab26ad3b84ff213497bcd9029b7af75688560..054fdb5aeb88073d89293a424fcf7c6458f4bd51 100644 (file)
@@ -13,6 +13,7 @@
 #include <net/caif/cfsrvl.h>
 #include <net/caif/cfpkt.h>
 
+
 #define container_obj(layr) ((struct cfsrvl *) layr)
 
 #define DGM_CMD_BIT  0x80
@@ -83,6 +84,7 @@ static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt)
 
 static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt)
 {
+       u8 packet_type;
        u32 zero = 0;
        struct caif_payload_info *info;
        struct cfsrvl *service = container_obj(layr);
@@ -94,7 +96,9 @@ static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt)
        if (cfpkt_getlen(pkt) > DGM_MTU)
                return -EMSGSIZE;
 
-       cfpkt_add_head(pkt, &zero, 4);
+       cfpkt_add_head(pkt, &zero, 3);
+       packet_type = 0x08; /* B9 set - UNCLASSIFIED */
+       cfpkt_add_head(pkt, &packet_type, 1);
 
        /* Add info for MUX-layer to route the packet out. */
        info = cfpkt_info(pkt);
index 46f34b2e04784d8fd379384851c3d5b19377ddee..24f1ffa74b06dbc17a751eef251f1c73f111d064 100644 (file)
@@ -244,9 +244,9 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
                                int phyid)
 {
        struct cfmuxl *muxl = container_obj(layr);
-       struct list_head *node;
+       struct list_head *node, *next;
        struct cflayer *layer;
-       list_for_each(node, &muxl->srvl_list) {
+       list_for_each_safe(node, next, &muxl->srvl_list) {
                layer = list_entry(node, struct cflayer, node);
                if (cfsrvl_phyid_match(layer, phyid))
                        layer->ctrlcmd(layer, ctrl, phyid);
index 871a0ad510257e6a6d45409edfe6e6bdcbf7ddc5..8a6a05e7c3c8de434caf5ffbbb42316086c847b2 100644 (file)
@@ -387,7 +387,7 @@ static void bcm_tx_timeout_tsklet(unsigned long data)
 }
 
 /*
- * bcm_tx_timeout_handler - performes cyclic CAN frame transmissions
+ * bcm_tx_timeout_handler - performs cyclic CAN frame transmissions
  */
 static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
 {
@@ -1427,9 +1427,14 @@ static int bcm_init(struct sock *sk)
 static int bcm_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
-       struct bcm_sock *bo = bcm_sk(sk);
+       struct bcm_sock *bo;
        struct bcm_op *op, *next;
 
+       if (sk == NULL)
+               return 0;
+
+       bo = bcm_sk(sk);
+
        /* remove bcm_ops, timer, rx_unregister(), etc. */
 
        unregister_netdevice_notifier(&bo->notifier);
index 649acfa7c70a98ceb5fd3f131544f02e3cf838c8..0eb39a7fdf64afff51c7e59bd0985433302c60ee 100644 (file)
@@ -305,7 +305,12 @@ static int raw_init(struct sock *sk)
 static int raw_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
-       struct raw_sock *ro = raw_sk(sk);
+       struct raw_sock *ro;
+
+       if (!sk)
+               return 0;
+
+       ro = raw_sk(sk);
 
        unregister_netdevice_notifier(&ro->notifier);
 
index 3b91d651fe08f995c193eaa6357d1d993f8c89eb..5a80f41c0cbaf207cf71310161856b5a31e65b4a 100644 (file)
@@ -579,9 +579,15 @@ static void __kick_osd_requests(struct ceph_osd_client *osdc,
 
        list_for_each_entry_safe(req, nreq, &osd->o_linger_requests,
                                 r_linger_osd) {
-               __unregister_linger_request(osdc, req);
+               /*
+                * reregister request prior to unregistering linger so
+                * that r_osd is preserved.
+                */
+               BUG_ON(!list_empty(&req->r_req_lru_item));
                __register_request(osdc, req);
-               list_move(&req->r_req_lru_item, &osdc->req_unsent);
+               list_add(&req->r_req_lru_item, &osdc->req_unsent);
+               list_add(&req->r_osd_item, &req->r_osd->o_requests);
+               __unregister_linger_request(osdc, req);
                dout("requeued lingering %p tid %llu osd%d\n", req, req->r_tid,
                     osd->o_osd);
        }
@@ -798,7 +804,7 @@ static void __register_request(struct ceph_osd_client *osdc,
        req->r_request->hdr.tid = cpu_to_le64(req->r_tid);
        INIT_LIST_HEAD(&req->r_req_lru_item);
 
-       dout("register_request %p tid %lld\n", req, req->r_tid);
+       dout("__register_request %p tid %lld\n", req, req->r_tid);
        __insert_request(osdc, req);
        ceph_osdc_get_request(req);
        osdc->num_requests++;
@@ -917,7 +923,7 @@ EXPORT_SYMBOL(ceph_osdc_set_request_linger);
 /*
  * Pick an osd (the first 'up' osd in the pg), allocate the osd struct
  * (as needed), and set the request r_osd appropriately.  If there is
- * no up osd, set r_osd to NULL.  Move the request to the appropiate list
+ * no up osd, set r_osd to NULL.  Move the request to the appropriate list
  * (unsent, homeless) or leave on in-flight lru.
  *
  * Return 0 if unchanged, 1 if changed, or negative on error.
index 3da9fb06d47a658a59ce619f8aaa3d34caaedf26..856b6ee9a1d5d5c1d4347d54048ac4f5d6bc73a1 100644 (file)
@@ -2091,7 +2091,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
                u32 features;
 
                /*
-                * If device doesnt need skb->dst, release it right now while
+                * If device doesn't need skb->dst, release it right now while
                 * its hot in this cpu cache
                 */
                if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
@@ -2151,7 +2151,7 @@ gso:
                nskb->next = NULL;
 
                /*
-                * If device doesnt need nskb->dst, release it right now while
+                * If device doesn't need nskb->dst, release it right now while
                 * its hot in this cpu cache
                 */
                if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
@@ -2970,8 +2970,8 @@ EXPORT_SYMBOL_GPL(br_fdb_test_addr_hook);
  * when CONFIG_NET_CLS_ACT is? otherwise some useless instructions
  * a compare and 2 stores extra right now if we dont have it on
  * but have CONFIG_NET_CLS_ACT
- * NOTE: This doesnt stop any functionality; if you dont have
- * the ingress scheduler, you just cant add policies on ingress.
+ * NOTE: This doesn't stop any functionality; if you dont have
+ * the ingress scheduler, you just can't add policies on ingress.
  *
  */
 static int ing_filter(struct sk_buff *skb, struct netdev_queue *rxq)
@@ -3800,7 +3800,7 @@ static void net_rx_action(struct softirq_action *h)
                 * with netpoll's poll_napi().  Only the entity which
                 * obtains the lock and sees NAPI_STATE_SCHED set will
                 * actually make the ->poll() call.  Therefore we avoid
-                * accidently calling ->poll() when NAPI is not scheduled.
+                * accidentally calling ->poll() when NAPI is not scheduled.
                 */
                work = 0;
                if (test_bit(NAPI_STATE_SCHED, &n->state)) {
@@ -4773,7 +4773,7 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm
                 * is never reached
                 */
                WARN_ON(1);
-               err = -EINVAL;
+               err = -ENOTTY;
                break;
 
        }
@@ -5041,7 +5041,7 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
                /* Set the per device memory buffer space.
                 * Not applicable in our case */
        case SIOCSIFLINK:
-               return -EINVAL;
+               return -ENOTTY;
 
        /*
         *      Unknown or private ioctl.
@@ -5062,7 +5062,7 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
                /* Take care of Wireless Extensions */
                if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST)
                        return wext_handle_ioctl(net, &ifr, cmd, arg);
-               return -EINVAL;
+               return -ENOTTY;
        }
 }
 
@@ -5203,11 +5203,15 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
        }
 
        /* TSO requires that SG is present as well. */
-       if ((features & NETIF_F_TSO) && !(features & NETIF_F_SG)) {
-               netdev_info(dev, "Dropping NETIF_F_TSO since no SG feature.\n");
-               features &= ~NETIF_F_TSO;
+       if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) {
+               netdev_info(dev, "Dropping TSO features since no SG feature.\n");
+               features &= ~NETIF_F_ALL_TSO;
        }
 
+       /* TSO ECN requires that TSO is present as well. */
+       if ((features & NETIF_F_ALL_TSO) == NETIF_F_TSO_ECN)
+               features &= ~NETIF_F_TSO_ECN;
+
        /* Software GSO depends on SG. */
        if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
                netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
@@ -6336,7 +6340,7 @@ static void __net_exit default_device_exit(struct net *net)
                if (dev->rtnl_link_ops)
                        continue;
 
-               /* Push remaing network devices to init_net */
+               /* Push remaining network devices to init_net */
                snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex);
                err = dev_change_net_namespace(dev, &init_net, fb_name);
                if (err) {
index 232b1873bb28988069ef1b1642ad8cd7ef689b8f..afb8afb066bbd184d57742a58f1bd42a09541577 100644 (file)
@@ -425,7 +425,7 @@ EXPORT_SYMBOL(sk_run_filter);
  * As we dont want to clear mem[] array for each packet going through
  * sk_run_filter(), we check that filter loaded by user never try to read
  * a cell if not previously written, and we check all branches to be sure
- * a malicious user doesnt try to abuse us.
+ * a malicious user doesn't try to abuse us.
  */
 static int check_load_and_stores(struct sock_filter *filter, int flen)
 {
index 01a1101b5936a7d4b87a3542fe0c9192c550b717..a7b3421318696e0e8dc596f19658774810f44a59 100644 (file)
@@ -129,7 +129,7 @@ static void linkwatch_schedule_work(int urgent)
        if (!cancel_delayed_work(&linkwatch_work))
                return;
 
-       /* Otherwise we reschedule it again for immediate exection. */
+       /* Otherwise we reschedule it again for immediate execution. */
        schedule_delayed_work(&linkwatch_work, 0);
 }
 
index 49f7ea5b4c7510ca9caeb9d494486fea71c04c9d..d7c4bb4b18208e894c78a4a858b0a9237dab1246 100644 (file)
@@ -196,7 +196,7 @@ EXPORT_SYMBOL_GPL(__rtnl_register);
  * as failure of this function is very unlikely, it can only happen due
  * to lack of memory when allocating the chain to store all message
  * handlers for a protocol. Meant for use in init functions where lack
- * of memory implies no sense in continueing.
+ * of memory implies no sense in continuing.
  */
 void rtnl_register(int protocol, int msgtype,
                   rtnl_doit_func doit, rtnl_dumpit_func dumpit)
@@ -1440,7 +1440,7 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
 errout:
        if (err < 0 && modified && net_ratelimit())
                printk(KERN_WARNING "A link change request failed with "
-                      "some changes comitted already. Interface %s may "
+                      "some changes committed already. Interface %s may "
                       "have been left with an inconsistent configuration, "
                       "please check.\n", dev->name);
 
index 801dd08908f91bfb29e645a102188ea9b33fd3d3..7ebeed0a877cf4bb244d488346e745d45da93959 100644 (file)
@@ -2267,7 +2267,7 @@ EXPORT_SYMBOL(skb_prepare_seq_read);
  * of bytes already consumed and the next call to
  * skb_seq_read() will return the remaining part of the block.
  *
- * Note 1: The size of each block of data returned can be arbitary,
+ * Note 1: The size of each block of data returned can be arbitrary,
  *       this limitation is the cost for zerocopy seqeuental
  *       reads of potentially non linear data.
  *
index 7dfed792434dd009b965f0c287cb6f2abeeb7289..6e819780c23252b3387c1b2daec25a261fa1f2fb 100644 (file)
@@ -215,7 +215,7 @@ __u32 sysctl_rmem_max __read_mostly = SK_RMEM_MAX;
 __u32 sysctl_wmem_default __read_mostly = SK_WMEM_MAX;
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
-/* Maximal space eaten by iovec or ancilliary data plus some space */
+/* Maximal space eaten by iovec or ancillary data plus some space */
 int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
@@ -1175,7 +1175,7 @@ static void __sk_free(struct sock *sk)
 void sk_free(struct sock *sk)
 {
        /*
-        * We substract one from sk_wmem_alloc and can know if
+        * We subtract one from sk_wmem_alloc and can know if
         * some packets are still in some tx queue.
         * If not null, sock_wfree() will call __sk_free(sk) later
         */
@@ -1185,10 +1185,10 @@ void sk_free(struct sock *sk)
 EXPORT_SYMBOL(sk_free);
 
 /*
- * Last sock_put should drop referrence to sk->sk_net. It has already
- * been dropped in sk_change_net. Taking referrence to stopping namespace
+ * Last sock_put should drop reference to sk->sk_net. It has already
+ * been dropped in sk_change_net. Taking reference to stopping namespace
  * is not an option.
- * Take referrence to a socket to remove it from hash _alive_ and after that
+ * Take reference to a socket to remove it from hash _alive_ and after that
  * destroy it in the context of init_net.
  */
 void sk_release_kernel(struct sock *sk)
index 784d302105439434ef7182e9a4f7b7d167a44baa..136d41cbcd02a903527643d69e397f0ceed26b9c 100644 (file)
@@ -143,7 +143,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
 }
 
 /**
- * dccp_determine_ccmps  -  Find out about CCID-specfic packet-size limits
+ * dccp_determine_ccmps  -  Find out about CCID-specific packet-size limits
  * We only consider the HC-sender CCID for setting the CCMPS (RFC 4340, 14.),
  * since the RX CCID is restricted to feedback packets (Acks), which are small
  * in comparison with the data traffic. A value of 0 means "no current CCMPS".
index 87bb5f4de0e84601817a0f63733a725ebb478b03..c53ded2a98dfbcd26113a2265fc14f22fa352971 100644 (file)
@@ -41,12 +41,12 @@ config NET_DSA_MV88E6XXX_NEED_PPU
        default n
 
 config NET_DSA_MV88E6131
-       bool "Marvell 88E6095/6095F/6131 ethernet switch chip support"
+       bool "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
        select NET_DSA_MV88E6XXX
        select NET_DSA_MV88E6XXX_NEED_PPU
        select NET_DSA_TAG_DSA
        ---help---
-         This enables support for the Marvell 88E6095/6095F/6131
+         This enables support for the Marvell 88E6085/6095/6095F/6131
          ethernet switch chips.
 
 config NET_DSA_MV88E6123_61_65
index bb2b41bc854e4d7d98afb08bdd3892d4145ed375..45f7411e90baf02fbed1642676f6448b74d024cb 100644 (file)
 #include "dsa_priv.h"
 #include "mv88e6xxx.h"
 
+/*
+ * Switch product IDs
+ */
+#define ID_6085                0x04a0
+#define ID_6095                0x0950
+#define ID_6131                0x1060
+
 static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr)
 {
        int ret;
@@ -21,9 +28,11 @@ static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr)
        ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
        if (ret >= 0) {
                ret &= 0xfff0;
-               if (ret == 0x0950)
+               if (ret == ID_6085)
+                       return "Marvell 88E6085";
+               if (ret == ID_6095)
                        return "Marvell 88E6095/88E6095F";
-               if (ret == 0x1060)
+               if (ret == ID_6131)
                        return "Marvell 88E6131";
        }
 
@@ -124,7 +133,7 @@ static int mv88e6131_setup_global(struct dsa_switch *ds)
         * Ignore removed tag data on doubly tagged packets, disable
         * flow control messages, force flow control priority to the
         * highest, and send all special multicast frames to the CPU
-        * port at the higest priority.
+        * port at the highest priority.
         */
        REG_WRITE(REG_GLOBAL2, 0x05, 0x00ff);
 
@@ -164,6 +173,7 @@ static int mv88e6131_setup_global(struct dsa_switch *ds)
 
 static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
 {
+       struct mv88e6xxx_priv_state *ps = (void *)(ds + 1);
        int addr = REG_PORT(p);
        u16 val;
 
@@ -171,10 +181,13 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
         * MAC Forcing register: don't force link, speed, duplex
         * or flow control state to any particular values on physical
         * ports, but force the CPU port and all DSA ports to 1000 Mb/s
-        * full duplex.
+        * (100 Mb/s on 6085) full duplex.
         */
        if (dsa_is_cpu_port(ds, p) || ds->dsa_port_mask & (1 << p))
-               REG_WRITE(addr, 0x01, 0x003e);
+               if (ps->id == ID_6085)
+                       REG_WRITE(addr, 0x01, 0x003d); /* 100 Mb/s */
+               else
+                       REG_WRITE(addr, 0x01, 0x003e); /* 1000 Mb/s */
        else
                REG_WRITE(addr, 0x01, 0x0003);
 
@@ -194,8 +207,15 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
         * mode, but do not enable forwarding of unknown unicasts.
         */
        val = 0x0433;
-       if (p == dsa_upstream_port(ds))
+       if (p == dsa_upstream_port(ds)) {
                val |= 0x0104;
+               /*
+                * On 6085, unknown multicast forward is controlled
+                * here rather than in Port Control 2 register.
+                */
+               if (ps->id == ID_6085)
+                       val |= 0x0008;
+       }
        if (ds->dsa_port_mask & (1 << p))
                val |= 0x0100;
        REG_WRITE(addr, 0x04, val);
@@ -238,10 +258,19 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
         * If this is the upstream port for this switch, enable
         * forwarding of unknown multicast addresses.
         */
-       val = 0x0080 | dsa_upstream_port(ds);
-       if (p == dsa_upstream_port(ds))
-               val |= 0x0040;
-       REG_WRITE(addr, 0x08, val);
+       if (ps->id == ID_6085)
+               /*
+                * on 6085, bits 3:0 are reserved, bit 6 control ARP
+                * mirroring, and multicast forward is handled in
+                * Port Control register.
+                */
+               REG_WRITE(addr, 0x08, 0x0080);
+       else {
+               val = 0x0080 | dsa_upstream_port(ds);
+               if (p == dsa_upstream_port(ds))
+                       val |= 0x0040;
+               REG_WRITE(addr, 0x08, val);
+       }
 
        /*
         * Rate Control: disable ingress rate limiting.
@@ -286,6 +315,8 @@ static int mv88e6131_setup(struct dsa_switch *ds)
        mv88e6xxx_ppu_state_init(ds);
        mutex_init(&ps->stats_mutex);
 
+       ps->id = REG_READ(REG_PORT(0), 0x03) & 0xfff0;
+
        ret = mv88e6131_switch_reset(ds);
        if (ret < 0)
                return ret;
index eb0e0aaa9f1b586e12031d3ed355fc1dce67c16c..61156ca26a0da3d17e7be6bc70bc7c11de4c6489 100644 (file)
@@ -39,6 +39,8 @@ struct mv88e6xxx_priv_state {
         * Hold this mutex over snapshot + dump sequences.
         */
        struct mutex    stats_mutex;
+
+       int             id; /* switch product id */
 };
 
 struct mv88e6xxx_hw_stat {
index ce2d33582859df2dd139941f79a70340c4775edc..5761185f884e8d72d32257476e94b273da0190d0 100644 (file)
@@ -1,5 +1,3 @@
 obj-$(CONFIG_IEEE802154) +=    ieee802154.o af_802154.o
 ieee802154-y           := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o
 af_802154-y            := af_ieee802154.o raw.o dgram.o
-
-ccflags-y += -Wall -DDEBUG
index 094e150c626033a05b87fd697cd2f2cf08a082b5..a0af7ea87870a8690a03758442e40a97b7131056 100644 (file)
@@ -112,7 +112,7 @@ int cipso_v4_rbm_strictvalid = 1;
 /* The maximum number of category ranges permitted in the ranged category tag
  * (tag #5).  You may note that the IETF draft states that the maximum number
  * of category ranges is 7, but if the low end of the last category range is
- * zero then it is possibile to fit 8 category ranges because the zero should
+ * zero then it is possible to fit 8 category ranges because the zero should
  * be omitted. */
 #define CIPSO_V4_TAG_RNG_CAT_MAX      8
 
@@ -438,7 +438,7 @@ cache_add_failure:
  *
  * Description:
  * Search the DOI definition list for a DOI definition with a DOI value that
- * matches @doi.  The caller is responsibile for calling rcu_read_[un]lock().
+ * matches @doi.  The caller is responsible for calling rcu_read_[un]lock().
  * Returns a pointer to the DOI definition on success and NULL on failure.
  */
 static struct cipso_v4_doi *cipso_v4_doi_search(u32 doi)
@@ -1293,7 +1293,7 @@ static int cipso_v4_gentag_rbm(const struct cipso_v4_doi *doi_def,
                        return ret_val;
 
                /* This will send packets using the "optimized" format when
-                * possibile as specified in  section 3.4.2.6 of the
+                * possible as specified in  section 3.4.2.6 of the
                 * CIPSO draft. */
                if (cipso_v4_rbm_optfmt && ret_val > 0 && ret_val <= 10)
                        tag_len = 14;
@@ -1752,7 +1752,7 @@ validate_return:
 }
 
 /**
- * cipso_v4_error - Send the correct reponse for a bad packet
+ * cipso_v4_error - Send the correct response for a bad packet
  * @skb: the packet
  * @error: the error code
  * @gateway: CIPSO gateway flag
index 5345b0bee6df816858c1424d0ccb50988d133aa2..cd9ca0811cfaf30a179db870bfe628d4d0261a2e 100644 (file)
@@ -1680,7 +1680,7 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)
                return;
 
        cnf->sysctl = NULL;
-       unregister_sysctl_table(t->sysctl_header);
+       unregister_net_sysctl_table(t->sysctl_header);
        kfree(t->dev_name);
        kfree(t);
 }
index b92c86f6e9b3e92d44e127f9df39b21b55fb2868..5fe9b8b41df34fe8cdf7af72ce10138a3f92191a 100644 (file)
@@ -12,7 +12,7 @@
  *
  *   Hans Liss <hans.liss@its.uu.se>  Uppsala Universitet
  *
- * This work is based on the LPC-trie which is originally descibed in:
+ * This work is based on the LPC-trie which is originally described in:
  *
  * An experimental study of compression methods for dynamic tries
  * Stefan Nilsson and Matti Tikkanen. Algorithmica, 33(1):19-33, 2002.
@@ -1978,9 +1978,6 @@ struct fib_table *fib_trie_table(u32 id)
        t = (struct trie *) tb->tb_data;
        memset(t, 0, sizeof(*t));
 
-       if (id == RT_TABLE_LOCAL)
-               pr_info("IPv4 FIB: Using LC-trie version %s\n", VERSION);
-
        return tb;
 }
 
index a91dc16110810adb1fb86cd0789e457f88760e6b..e5f8a71d3a2a38ba58ff4b2b3cb4b2d33605bbf4 100644 (file)
@@ -704,7 +704,7 @@ static void icmp_unreach(struct sk_buff *skb)
         */
 
        /*
-        *      Check the other end isnt violating RFC 1122. Some routers send
+        *      Check the other end isn't violating RFC 1122. Some routers send
         *      bogus responses to broadcast frames. If you see this message
         *      first check your netmask matches at both ends, if it does then
         *      get the other vendor to fix their kit.
index 6c0b7f4a3d7d3c97e83a197e16809e6fdb071234..38f23e721b80108d0a9ae3716fca5212cf8f737d 100644 (file)
@@ -73,7 +73,7 @@ int inet_csk_bind_conflict(const struct sock *sk,
                     !sk2->sk_bound_dev_if ||
                     sk->sk_bound_dev_if == sk2->sk_bound_dev_if)) {
                        if (!reuse || !sk2->sk_reuse ||
-                           ((1 << sk2->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))) {
+                           sk2->sk_state == TCP_LISTEN) {
                                const __be32 sk2_rcv_saddr = sk_rcv_saddr(sk2);
                                if (!sk2_rcv_saddr || !sk_rcv_saddr(sk) ||
                                    sk2_rcv_saddr == sk_rcv_saddr(sk))
@@ -122,8 +122,7 @@ again:
                                            (tb->num_owners < smallest_size || smallest_size == -1)) {
                                                smallest_size = tb->num_owners;
                                                smallest_rover = rover;
-                                               if (atomic_read(&hashinfo->bsockets) > (high - low) + 1 &&
-                                                   !inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb)) {
+                                               if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) {
                                                        spin_unlock(&head->lock);
                                                        snum = smallest_rover;
                                                        goto have_snum;
index dd1b20eca1a25fd845e03ecc077a1e0f43412eff..9df4e635fb5fe5d4a0c92526ad68b845094aa39d 100644 (file)
@@ -354,7 +354,8 @@ static void inetpeer_free_rcu(struct rcu_head *head)
 }
 
 /* May be called with local BH enabled. */
-static void unlink_from_pool(struct inet_peer *p, struct inet_peer_base *base)
+static void unlink_from_pool(struct inet_peer *p, struct inet_peer_base *base,
+                            struct inet_peer __rcu **stack[PEER_MAXDEPTH])
 {
        int do_free;
 
@@ -368,7 +369,6 @@ static void unlink_from_pool(struct inet_peer *p, struct inet_peer_base *base)
         * We use refcnt=-1 to alert lockless readers this entry is deleted.
         */
        if (atomic_cmpxchg(&p->refcnt, 1, -1) == 1) {
-               struct inet_peer __rcu **stack[PEER_MAXDEPTH];
                struct inet_peer __rcu ***stackptr, ***delp;
                if (lookup(&p->daddr, stack, base) != p)
                        BUG();
@@ -422,7 +422,7 @@ static struct inet_peer_base *peer_to_base(struct inet_peer *p)
 }
 
 /* May be called with local BH enabled. */
-static int cleanup_once(unsigned long ttl)
+static int cleanup_once(unsigned long ttl, struct inet_peer __rcu **stack[PEER_MAXDEPTH])
 {
        struct inet_peer *p = NULL;
 
@@ -454,7 +454,7 @@ static int cleanup_once(unsigned long ttl)
                 * happen because of entry limits in route cache. */
                return -1;
 
-       unlink_from_pool(p, peer_to_base(p));
+       unlink_from_pool(p, peer_to_base(p), stack);
        return 0;
 }
 
@@ -524,7 +524,7 @@ struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create)
 
        if (base->total >= inet_peer_threshold)
                /* Remove one less-recently-used entry. */
-               cleanup_once(0);
+               cleanup_once(0, stack);
 
        return p;
 }
@@ -540,6 +540,7 @@ static void peer_check_expire(unsigned long dummy)
 {
        unsigned long now = jiffies;
        int ttl, total;
+       struct inet_peer __rcu **stack[PEER_MAXDEPTH];
 
        total = compute_total();
        if (total >= inet_peer_threshold)
@@ -548,7 +549,7 @@ static void peer_check_expire(unsigned long dummy)
                ttl = inet_peer_maxttl
                                - (inet_peer_maxttl - inet_peer_minttl) / HZ *
                                        total / inet_peer_threshold * HZ;
-       while (!cleanup_once(ttl)) {
+       while (!cleanup_once(ttl, stack)) {
                if (jiffies != now)
                        break;
        }
index 28a736f3442f456c1abd7b7d56eb2e9c4ffdb493..2391b24e8251e62e2c71eadad172a673a1e76c2f 100644 (file)
@@ -329,7 +329,7 @@ int ip_options_compile(struct net *net,
                                        pp_ptr = optptr + 2;
                                        goto error;
                                }
-                               if (skb) {
+                               if (rt) {
                                        memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4);
                                        opt->is_changed = 1;
                                }
@@ -371,7 +371,7 @@ int ip_options_compile(struct net *net,
                                                goto error;
                                        }
                                        opt->ts = optptr - iph;
-                                       if (skb) {
+                                       if (rt)  {
                                                memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4);
                                                timeptr = (__be32*)&optptr[optptr[2]+3];
                                        }
@@ -603,7 +603,7 @@ int ip_options_rcv_srr(struct sk_buff *skb)
        unsigned long orefdst;
        int err;
 
-       if (!opt->srr)
+       if (!opt->srr || !rt)
                return 0;
 
        if (skb->pkt_type != PACKET_HOST)
index 67f241b9764923815c11aecffc543001c3d3823b..459c011b1d4a7cff1bba4f40126ad22947996b2c 100644 (file)
@@ -603,7 +603,7 @@ slow_path:
                /* IF: it doesn't fit, use 'mtu' - the data space left */
                if (len > mtu)
                        len = mtu;
-               /* IF: we are not sending upto and including the packet end
+               /* IF: we are not sending up to and including the packet end
                   then align the next start on an eight byte boundary */
                if (len < left) {
                        len &= ~7;
index 2b097752426b96f9f177fe965322d941829e2280..cbff2ecccf3d5ea71b629e54c03e4dd4ed435176 100644 (file)
@@ -1444,7 +1444,7 @@ static int __init ip_auto_config(void)
                root_server_addr = addr;
 
        /*
-        * Use defaults whereever applicable.
+        * Use defaults wherever applicable.
         */
        if (ic_defaults() < 0)
                return -1;
index f3c0b549b8e18fefb7797b4a69570f6e681ef13e..4614babdc45fec0a2c5dbf553576267ba78d79b8 100644 (file)
@@ -221,9 +221,10 @@ static __sum16 nf_ip_checksum_partial(struct sk_buff *skb, unsigned int hook,
        return csum;
 }
 
-static int nf_ip_route(struct dst_entry **dst, struct flowi *fl)
+static int nf_ip_route(struct net *net, struct dst_entry **dst,
+                      struct flowi *fl, bool strict __always_unused)
 {
-       struct rtable *rt = ip_route_output_key(&init_net, &fl->u.ip4);
+       struct rtable *rt = ip_route_output_key(net, &fl->u.ip4);
        if (IS_ERR(rt))
                return PTR_ERR(rt);
        *dst = &rt->dst;
index 4b5d457c2d7675559cba588f605dbbff0c69b74e..89bc7e66d598ff3c1fbc414ee6d78558c8107edc 100644 (file)
@@ -76,7 +76,7 @@ static inline int arp_devaddr_compare(const struct arpt_devaddr_info *ap,
 }
 
 /*
- * Unfortunatly, _b and _mask are not aligned to an int (or long int)
+ * Unfortunately, _b and _mask are not aligned to an int (or long int)
  * Some arches dont care, unrolling the loop is a win on them.
  * For other arches, we only have a 16bit alignement.
  */
@@ -1874,7 +1874,7 @@ static int __init arp_tables_init(void)
        if (ret < 0)
                goto err1;
 
-       /* Noone else will be downing sem now, so we won't sleep */
+       /* No one else will be downing sem now, so we won't sleep */
        ret = xt_register_targets(arpt_builtin_tg, ARRAY_SIZE(arpt_builtin_tg));
        if (ret < 0)
                goto err2;
index ffcea0d1678eef1aece342dd6dab60c74e58ebaa..70491502800937a70626ae0fbb1356b8679d51b4 100644 (file)
@@ -2233,7 +2233,7 @@ static int __init ip_tables_init(void)
        if (ret < 0)
                goto err1;
 
-       /* Noone else will be downing sem now, so we won't sleep */
+       /* No one else will be downing sem now, so we won't sleep */
        ret = xt_register_targets(ipt_builtin_tg, ARRAY_SIZE(ipt_builtin_tg));
        if (ret < 0)
                goto err2;
index 21bcf471b25a022615ff3878da3b495df5b3ef07..9c71b2755ce3e4eea5331fe17a49ec1701dccf02 100644 (file)
@@ -521,7 +521,7 @@ int nf_nat_protocol_register(const struct nf_nat_protocol *proto)
 }
 EXPORT_SYMBOL(nf_nat_protocol_register);
 
-/* Noone stores the protocol anywhere; simply delete it. */
+/* No one stores the protocol anywhere; simply delete it. */
 void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto)
 {
        spin_lock_bh(&nf_nat_lock);
@@ -532,7 +532,7 @@ void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto)
 }
 EXPORT_SYMBOL(nf_nat_protocol_unregister);
 
-/* Noone using conntrack by the time this called. */
+/* No one using conntrack by the time this called. */
 static void nf_nat_cleanup_conntrack(struct nf_conn *ct)
 {
        struct nf_conn_nat *nat = nf_ct_ext_find(ct, NF_CT_EXT_NAT);
index 2d3c72e5bbbf054b16f88d50b606d22673f1e5b5..bceaec42c37d5d11375c25388c71a76f8bad8f25 100644 (file)
@@ -622,7 +622,7 @@ do_confirm:
 static void raw_close(struct sock *sk, long timeout)
 {
        /*
-        * Raw sockets may have direct kernel refereneces. Kill them.
+        * Raw sockets may have direct kernel references. Kill them.
         */
        ip_ra_control(sk, 0, NULL);
 
index 4b0c81180804cbe3b4290052200ebdd0102a30a5..99e6e4bb1c72d044b97ba93ad6c0bd944d170edd 100644 (file)
@@ -821,7 +821,7 @@ static int has_noalias(const struct rtable *head, const struct rtable *rth)
 }
 
 /*
- * Pertubation of rt_genid by a small quantity [1..256]
+ * Perturbation of rt_genid by a small quantity [1..256]
  * Using 8 bits of shuffling ensure we can call rt_cache_invalidate()
  * many times (2^24) without giving recent rt_genid.
  * Jenkins hash is strong enough that litle changes of rt_genid are OK.
@@ -1191,7 +1191,7 @@ restart:
 #endif
        /*
         * Since lookup is lockfree, we must make sure
-        * previous writes to rt are comitted to memory
+        * previous writes to rt are committed to memory
         * before making rt visible to other CPUS.
         */
        rcu_assign_pointer(rt_hash_table[hash].chain, rt);
@@ -1891,6 +1891,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 #ifdef CONFIG_IP_ROUTE_CLASSID
        rth->dst.tclassid = itag;
 #endif
+       rth->rt_route_iif = dev->ifindex;
        rth->rt_iif     = dev->ifindex;
        rth->dst.dev    = init_net.loopback_dev;
        dev_hold(rth->dst.dev);
@@ -2026,6 +2027,7 @@ static int __mkroute_input(struct sk_buff *skb,
        rth->rt_key_src = saddr;
        rth->rt_src     = saddr;
        rth->rt_gateway = daddr;
+       rth->rt_route_iif = in_dev->dev->ifindex;
        rth->rt_iif     = in_dev->dev->ifindex;
        rth->dst.dev    = (out_dev)->dev;
        dev_hold(rth->dst.dev);
@@ -2202,6 +2204,7 @@ local_input:
 #ifdef CONFIG_IP_ROUTE_CLASSID
        rth->dst.tclassid = itag;
 #endif
+       rth->rt_route_iif = dev->ifindex;
        rth->rt_iif     = dev->ifindex;
        rth->dst.dev    = net->loopback_dev;
        dev_hold(rth->dst.dev);
@@ -2401,7 +2404,8 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
        rth->rt_mark    = oldflp4->flowi4_mark;
        rth->rt_dst     = fl4->daddr;
        rth->rt_src     = fl4->saddr;
-       rth->rt_iif     = 0;
+       rth->rt_route_iif = 0;
+       rth->rt_iif     = oldflp4->flowi4_oif ? : dev_out->ifindex;
        /* get references to the devices that are to be hold by the routing
           cache entry */
        rth->dst.dev    = dev_out;
@@ -2686,6 +2690,12 @@ static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)
 {
 }
 
+static u32 *ipv4_rt_blackhole_cow_metrics(struct dst_entry *dst,
+                                         unsigned long old)
+{
+       return NULL;
+}
+
 static struct dst_ops ipv4_dst_blackhole_ops = {
        .family                 =       AF_INET,
        .protocol               =       cpu_to_be16(ETH_P_IP),
@@ -2694,6 +2704,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = {
        .default_mtu            =       ipv4_blackhole_default_mtu,
        .default_advmss         =       ipv4_default_advmss,
        .update_pmtu            =       ipv4_rt_blackhole_update_pmtu,
+       .cow_metrics            =       ipv4_rt_blackhole_cow_metrics,
 };
 
 struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig)
@@ -2716,6 +2727,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
                rt->rt_key_dst = ort->rt_key_dst;
                rt->rt_key_src = ort->rt_key_src;
                rt->rt_tos = ort->rt_tos;
+               rt->rt_route_iif = ort->rt_route_iif;
                rt->rt_iif = ort->rt_iif;
                rt->rt_oif = ort->rt_oif;
                rt->rt_mark = ort->rt_mark;
@@ -2725,7 +2737,6 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
                rt->rt_type = ort->rt_type;
                rt->rt_dst = ort->rt_dst;
                rt->rt_src = ort->rt_src;
-               rt->rt_iif = ort->rt_iif;
                rt->rt_gateway = ort->rt_gateway;
                rt->rt_spec_dst = ort->rt_spec_dst;
                rt->peer = ort->peer;
index 1a456652086b7b4837b8e1035f0a96bb12eb6700..321e6e84dbccb93e08741263815aaae82610b0a8 100644 (file)
@@ -311,7 +311,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_do_large_bitmap,
        },
-#ifdef CONFIG_IP_MULTICAST
        {
                .procname       = "igmp_max_memberships",
                .data           = &sysctl_igmp_max_memberships,
@@ -319,8 +318,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
-
-#endif
        {
                .procname       = "igmp_max_msf",
                .data           = &sysctl_igmp_max_msf,
index 656d431c99adcad51bf6a85d13d427729ba1ff5d..72f7218b03f57856194d39872737d12f2113883c 100644 (file)
@@ -12,7 +12,7 @@
  *     within cong_avoid.
  *   o Error correcting in remote HZ, therefore remote HZ will be keeped
  *     on checking and updating.
- *   o Handling calculation of One-Way-Delay (OWD) within rtt_sample, sicne
+ *   o Handling calculation of One-Way-Delay (OWD) within rtt_sample, since
  *     OWD have a similar meaning as RTT. Also correct the buggy formular.
  *   o Handle reaction for Early Congestion Indication (ECI) within
  *     pkts_acked, as mentioned within pseudo code.
index dfa5beb0c1c8c4819d8bd59a17b8a9328ed31a96..17388c7f49c4544127c63f1aefc18c8e3c0bf4ed 100644 (file)
@@ -73,7 +73,7 @@ static void tcp_event_new_data_sent(struct sock *sk, struct sk_buff *skb)
        tcp_advance_send_head(sk, skb);
        tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 
-       /* Don't override Nagle indefinately with F-RTO */
+       /* Don't override Nagle indefinitely with F-RTO */
        if (tp->frto_counter == 2)
                tp->frto_counter = 3;
 
@@ -1003,7 +1003,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
        int nlen;
        u8 flags;
 
-       BUG_ON(len > skb->len);
+       if (WARN_ON(len > skb->len))
+               return -EINVAL;
 
        nsize = skb_headlen(skb) - len;
        if (nsize < 0)
index dc7f43179c9a15fb858295fb0c6c960ac416959f..05c3b6f0e8e1cfa4b6f0530c826df9f5402dfe7d 100644 (file)
@@ -20,7 +20,7 @@
 #define TCP_YEAH_DELTA        3 //log minimum fraction of cwnd to be removed on loss
 #define TCP_YEAH_EPSILON      1 //log maximum fraction to be removed on early decongestion
 #define TCP_YEAH_PHY          8 //lin maximum delta from base
-#define TCP_YEAH_RHO         16 //lin minumum number of consecutive rtt to consider competition on loss
+#define TCP_YEAH_RHO         16 //lin minimum number of consecutive rtt to consider competition on loss
 #define TCP_YEAH_ZETA        50 //lin minimum number of state switchs to reset reno_count
 
 #define TCP_SCALABLE_AI_CNT     100U
index 588f47af5faf6e0603b3b060d8f777d64505f7a4..f87a8eb76f3be1fdc83e4e32f0e057d923205035 100644 (file)
@@ -189,7 +189,7 @@ static int udp_lib_lport_inuse2(struct net *net, __u16 num,
  *  @sk:          socket struct in question
  *  @snum:        port number to look up
  *  @saddr_comp:  AF-dependent comparison of bound local IP addresses
- *  @hash2_nulladdr: AF-dependant hash value in secondary hash chains,
+ *  @hash2_nulladdr: AF-dependent hash value in secondary hash chains,
  *                   with NULL address
  */
 int udp_lib_get_port(struct sock *sk, unsigned short snum,
index 13e0e7f659ffa7ef57e611548fc77f5920600f82..d20a05e970d83fc76df80c3170515e6d06272ed9 100644 (file)
@@ -74,6 +74,7 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
        rt->rt_key_dst = fl4->daddr;
        rt->rt_key_src = fl4->saddr;
        rt->rt_tos = fl4->flowi4_tos;
+       rt->rt_route_iif = fl4->flowi4_iif;
        rt->rt_iif = fl4->flowi4_iif;
        rt->rt_oif = fl4->flowi4_oif;
        rt->rt_mark = fl4->flowi4_mark;
index 3daaf3c7703c7354f13268aac9f8c267bb2d6ba1..a7bda0757053278e58218766df54cb49fac100d6 100644 (file)
@@ -1084,7 +1084,7 @@ static int ipv6_get_saddr_eval(struct net *net,
        case IPV6_SADDR_RULE_PRIVACY:
            {
                /* Rule 7: Prefer public address
-                * Note: prefer temprary address if use_tempaddr >= 2
+                * Note: prefer temporary address if use_tempaddr >= 2
                 */
                int preftmp = dst->prefs & (IPV6_PREFER_SRC_PUBLIC|IPV6_PREFER_SRC_TMP) ?
                                !!(dst->prefs & IPV6_PREFER_SRC_TMP) :
@@ -1968,7 +1968,7 @@ ok:
                                         *  to the stored lifetime since we'll
                                         *  be updating the timestamp below,
                                         *  else we'll set it back to the
-                                        *  minumum.
+                                        *  minimum.
                                         */
                                        if (prefered_lft != ifp->prefered_lft) {
                                                valid_lft = stored_lft;
@@ -4537,7 +4537,7 @@ static void __addrconf_sysctl_unregister(struct ipv6_devconf *p)
 
        t = p->sysctl;
        p->sysctl = NULL;
-       unregister_sysctl_table(t->sysctl_header);
+       unregister_net_sysctl_table(t->sysctl_header);
        kfree(t->dev_name);
        kfree(t);
 }
index 4b13d5d8890efede4ac855356d17b2e50e995e9c..afcc7099f96de4c3eb991a4006936b5c7e95b978 100644 (file)
@@ -1113,7 +1113,7 @@ static int __init inet6_init(void)
        /*
         *      ipngwg API draft makes clear that the correct semantics
         *      for TCP and UDP is to consider one TCP and UDP instance
-        *      in a host availiable by both INET and INET6 APIs and
+        *      in a host available by both INET and INET6 APIs and
         *      able to communicate via both network protocols.
         */
 
index 5aa8ec88f1946296ce4f776f8927f764cf4edbc1..59dccfbb5b11332f7f3957d2fb80a0f94a2784da 100644 (file)
@@ -371,7 +371,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
        iv = esp_tmp_iv(aead, tmp, seqhilen);
        req = esp_tmp_req(aead, iv);
        asg = esp_req_sg(aead, req);
-       sg = asg + 1;
+       sg = asg + sglists;
 
        skb->ip_summed = CHECKSUM_NONE;
 
index 1660546504668a1c0378e23fec57112cc9710826..f2c5b0fc0f218a0294b1c4308a46374bc3410d99 100644 (file)
@@ -44,7 +44,7 @@ int inet6_csk_bind_conflict(const struct sock *sk,
                     !sk2->sk_bound_dev_if ||
                     sk->sk_bound_dev_if == sk2->sk_bound_dev_if) &&
                    (!sk->sk_reuse || !sk2->sk_reuse ||
-                    ((1 << sk2->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))) &&
+                    sk2->sk_state == TCP_LISTEN) &&
                     ipv6_rcv_saddr_equal(sk, sk2))
                        break;
        }
index 18208876aa8a287c8fd176e47ff55a4629859f3c..46cf7bea6769441ab2ab2067faeddc4319254f76 100644 (file)
@@ -779,7 +779,7 @@ slow_path:
                /* IF: it doesn't fit, use 'mtu' - the data space left */
                if (len > mtu)
                        len = mtu;
-               /* IF: we are not sending upto and including the packet end
+               /* IF: we are not sending up to and including the packet end
                   then align the next start on an eight byte boundary */
                if (len < left) {
                        len &= ~7;
index 39aaca2b4fd2db98d7463110107ecc0ec70b2097..28bc1f644b7b3158470620a9a8ca2b9c0c1f44e8 100644 (file)
@@ -90,9 +90,18 @@ static int nf_ip6_reroute(struct sk_buff *skb,
        return 0;
 }
 
-static int nf_ip6_route(struct dst_entry **dst, struct flowi *fl)
+static int nf_ip6_route(struct net *net, struct dst_entry **dst,
+                       struct flowi *fl, bool strict)
 {
-       *dst = ip6_route_output(&init_net, NULL, &fl->u.ip6);
+       static const struct ipv6_pinfo fake_pinfo;
+       static const struct inet_sock fake_sk = {
+               /* makes ip6_route_output set RT6_LOOKUP_F_IFACE: */
+               .sk.sk_bound_dev_if = 1,
+               .pinet6 = (struct ipv6_pinfo *) &fake_pinfo,
+       };
+       const void *sk = strict ? &fake_sk : NULL;
+
+       *dst = ip6_route_output(net, sk, &fl->u.ip6);
        return (*dst)->error;
 }
 
index 0b2af9b85cecd9ba7a34983f52595ad8849efa1b..5a1c6f27ffafea92e271ff211f1d59317b22e4cc 100644 (file)
@@ -2248,7 +2248,7 @@ static int __init ip6_tables_init(void)
        if (ret < 0)
                goto err1;
 
-       /* Noone else will be downing sem now, so we won't sleep */
+       /* No one else will be downing sem now, so we won't sleep */
        ret = xt_register_targets(ip6t_builtin_tg, ARRAY_SIZE(ip6t_builtin_tg));
        if (ret < 0)
                goto err2;
index 97c5b21b9674f3fb005da40235e78303f6323a9a..cdd6d045e42e7ff2098adebe149640811ad109e0 100644 (file)
@@ -71,7 +71,7 @@ static unsigned int ipv6_defrag(unsigned int hooknum,
        if (reasm == NULL)
                return NF_STOLEN;
 
-       /* error occured or not fragmented */
+       /* error occurred or not fragmented */
        if (reasm == skb)
                return NF_ACCEPT;
 
index 843406f14d7b2b37ac33b039f52fe80feb132cba..fd0eec6f88c6d71d9eba6f1d104001d23bcb2721 100644 (file)
@@ -153,6 +153,12 @@ static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)
 {
 }
 
+static u32 *ip6_rt_blackhole_cow_metrics(struct dst_entry *dst,
+                                        unsigned long old)
+{
+       return NULL;
+}
+
 static struct dst_ops ip6_dst_blackhole_ops = {
        .family                 =       AF_INET6,
        .protocol               =       cpu_to_be16(ETH_P_IPV6),
@@ -161,6 +167,7 @@ static struct dst_ops ip6_dst_blackhole_ops = {
        .default_mtu            =       ip6_blackhole_default_mtu,
        .default_advmss         =       ip6_default_advmss,
        .update_pmtu            =       ip6_rt_blackhole_update_pmtu,
+       .cow_metrics            =       ip6_rt_blackhole_cow_metrics,
 };
 
 static const u32 ip6_template_metrics[RTAX_MAX] = {
@@ -2012,7 +2019,6 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
        rt->dst.output = ip6_output;
        rt->rt6i_dev = net->loopback_dev;
        rt->rt6i_idev = idev;
-       dst_metric_set(&rt->dst, RTAX_HOPLIMIT, -1);
        rt->dst.obsolete = -1;
 
        rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP;
index 2b0c186862c81fa23fb115cc11dc2eb5772ab7be..4f49e5dd41bbb2681111cc992b91409e33b68c0f 100644 (file)
@@ -503,6 +503,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
        dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
        if (IS_ERR(dst)) {
                err = PTR_ERR(dst);
+               dst = NULL;
                goto done;
        }
        skb = tcp_make_synack(sk, dst, req, rvp);
@@ -1621,6 +1622,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
                opt_skb = skb_clone(skb, GFP_ATOMIC);
 
        if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */
+               sock_rps_save_rxhash(sk, skb->rxhash);
                if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len))
                        goto reset;
                if (opt_skb)
@@ -1648,7 +1650,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
                                __kfree_skb(opt_skb);
                        return 0;
                }
-       }
+       } else
+               sock_rps_save_rxhash(sk, skb->rxhash);
 
        if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len))
                goto reset;
index d7037c006e1321923d654bbb2b45f457994662cd..9e305d74b3d41a99a065da67fe54bd3a4a9ebaa6 100644 (file)
@@ -505,6 +505,9 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
        int rc;
        int is_udplite = IS_UDPLITE(sk);
 
+       if (!ipv6_addr_any(&inet6_sk(sk)->daddr))
+               sock_rps_save_rxhash(sk, skb->rxhash);
+
        if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
                goto drop;
 
@@ -1332,7 +1335,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u32 features)
        skb->ip_summed = CHECKSUM_NONE;
 
        /* Check if there is enough headroom to insert fragment header. */
-       if ((skb_headroom(skb) < frag_hdr_sz) &&
+       if ((skb_mac_header(skb) < skb->head + frag_hdr_sz) &&
            pskb_expand_head(skb, frag_hdr_sz, 0, GFP_ATOMIC))
                goto out;
 
index c9890e25cd4c9681b14f838976a97ed4db560ac7..cc616974a447d582a66c837a09c8c95b1fb8900a 100644 (file)
@@ -1297,8 +1297,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
        /* Note : socket.c set MSG_EOR on SEQPACKET sockets */
        if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT |
                               MSG_NOSIGNAL)) {
-               err = -EINVAL;
-               goto out;
+               return -EINVAL;
        }
 
        lock_sock(sk);
index 783c5f367d29edf25673916146d2906b694ec527..005b424494a0bd4009fac7910cbb81f37bf5837c 100644 (file)
@@ -165,7 +165,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
 
        irlap_apply_default_connection_parameters(self);
 
-       self->N3 = 3; /* # connections attemts to try before giving up */
+       self->N3 = 3; /* # connections attempts to try before giving up */
 
        self->state = LAP_NDM;
 
index d434c888074509f37d414bb93c30664f1d678cc3..bb47021c9a55cc969427ef619f42a20c37eab2b5 100644 (file)
@@ -708,7 +708,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
 
                                self->frame_sent = TRUE;
                        }
-                       /* Readjust our timer to accomodate devices
+                       /* Readjust our timer to accommodate devices
                         * doing faster or slower discovery than us...
                         * Jean II */
                        irlap_start_query_timer(self, info->S, info->s);
@@ -931,7 +931,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
                irlap_send_rr_frame(self, CMD_FRAME);
 
                /* The timer is set to half the normal timer to quickly
-                * detect a failure to negociate the new connection
+                * detect a failure to negotiate the new connection
                 * parameters. IrLAP 6.11.3.2, note 3.
                 * Note that currently we don't process this failure
                 * properly, as we should do a quick disconnect.
@@ -1052,7 +1052,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
                                return -EPROTO;
                        }
 
-                       /* Substract space used by this skb */
+                       /* Subtract space used by this skb */
                        self->bytes_left -= skb->len;
 #else  /* CONFIG_IRDA_DYNAMIC_WINDOW */
                        /* Window has been adjusted for the max packet
@@ -1808,7 +1808,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
 
                                return -EPROTO; /* Try again later */
                        }
-                       /* Substract space used by this skb */
+                       /* Subtract space used by this skb */
                        self->bytes_left -= skb->len;
 #else  /* CONFIG_IRDA_DYNAMIC_WINDOW */
                        /* Window has been adjusted for the max packet
index 688222cbf55be317ecf187cc15d6a4144bded236..8c004161a843a2e33a963ddd254c4a0e5a129969 100644 (file)
@@ -848,7 +848,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb)
         * though IrLAP is currently sending the *last* frame of the
         * tx-window, the driver most likely has only just started
         * sending the *first* frame of the same tx-window.
-        * I.e. we are always at the very begining of or Tx window.
+        * I.e. we are always at the very beginning of or Tx window.
         * Now, we are supposed to set the final timer from the end
         * of our tx-window to let the other peer reply. So, we need
         * to add extra time to compensate for the fact that we
index c1fb5db8104215642371b1ff664c96e4f4b62a6c..9505a7d06f1a8483a7b5658c702273df660f13b0 100644 (file)
@@ -498,7 +498,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
        switch (event) {
 #ifdef CONFIG_IRDA_ULTRA
        case LM_UDATA_INDICATION:
-               /* This is most bizzare. Those packets are  aka unreliable
+               /* This is most bizarre. Those packets are  aka unreliable
                 * connected, aka IrLPT or SOCK_DGRAM/IRDAPROTO_UNITDATA.
                 * Why do we pass them as Ultra ??? Jean II */
                irlmp_connless_data_indication(self, skb);
index 0d82ff5aeff1e0629348739788026f2ce151edca..979ecb2435a70f98248593e3b8fc586c09c7cb38 100644 (file)
@@ -73,7 +73,7 @@
  * Infinite thanks to those brave souls for providing the infrastructure
  * upon which IrNET is built.
  *
- * Thanks to all my collegues in HP for helping me. In particular,
+ * Thanks to all my colleagues in HP for helping me. In particular,
  * thanks to Salil Pradhan and Bill Serra for W2k testing...
  * Thanks to Luiz Magalhaes for irnetd and much testing...
  *
index 849aaf0dabb5ec8a1be02ab471a84d6d736b5f06..9715e6e5900b37afbe87a29af13b4af058211c64 100644 (file)
@@ -40,7 +40,7 @@
  *     o the hash function for ints is pathetic (but could be changed)
  *     o locking is sometime suspicious (especially during enumeration)
  *     o most users have only a few elements (== overhead)
- *     o most users never use seach, so don't benefit from hashing
+ *     o most users never use search, so don't benefit from hashing
  * Problem already fixed :
  *     o not 64 bit compliant (most users do hashv = (int) self)
  *     o hashbin_remove() is broken => use hashbin_remove_this()
index f6054f9ccbe33c2fbd9aef8c88551c84bb5fbf62..9d9af4606970359584801d40470c4d490e9231ab 100644 (file)
@@ -1193,7 +1193,7 @@ EXPORT_SYMBOL(irttp_connect_request);
 /*
  * Function irttp_connect_confirm (handle, qos, skb)
  *
- *    Sevice user confirms TSAP connection with peer.
+ *    Service user confirms TSAP connection with peer.
  *
  */
 static void irttp_connect_confirm(void *instance, void *sap,
index 2b00974e5bae93c138f61e3fae0e99cd9f1a92fe..1b51bcf423945bc036022465e51ebaffed7a10f1 100644 (file)
 #include <net/irda/irlap_frame.h>
 
 /*
- * Maximum values of the baud rate we negociate with the other end.
+ * Maximum values of the baud rate we negotiate with the other end.
  * Most often, you don't have to change that, because Linux-IrDA will
  * use the maximum offered by the link layer, which usually works fine.
  * In some very rare cases, you may want to limit it to lower speeds...
  */
 int sysctl_max_baud_rate = 16000000;
 /*
- * Maximum value of the lap disconnect timer we negociate with the other end.
+ * Maximum value of the lap disconnect timer we negotiate with the other end.
  * Most often, the value below represent the best compromise, but some user
- * may want to keep the LAP alive longuer or shorter in case of link failure.
+ * may want to keep the LAP alive longer or shorter in case of link failure.
  * Remember that the threshold time (early warning) is fixed to 3s...
  */
 int sysctl_max_noreply_time = 12;
@@ -411,7 +411,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
         * Fix tx data size according to user limits - Jean II
         */
        if (qos->data_size.value > sysctl_max_tx_data_size)
-               /* Allow non discrete adjustement to avoid loosing capacity */
+               /* Allow non discrete adjustement to avoid losing capacity */
                qos->data_size.value = sysctl_max_tx_data_size;
        /*
         * Override Tx window if user request it. - Jean II
index 0335ba0cc5939d19d317563a3ffad6bcca1e0b2d..f418cb2ad49ccdf00557e673147f93d748c74409 100644 (file)
@@ -59,7 +59,7 @@ void irlap_start_query_timer(struct irlap_cb *self, int S, int s)
         * slot time, plus add some extra time to properly receive the last
         * discovery packet (which is longer due to extra discovery info),
         * to avoid messing with for incomming connections requests and
-        * to accomodate devices that perform discovery slower than us.
+        * to accommodate devices that perform discovery slower than us.
         * Jean II */
        timeout = ((sysctl_slot_timeout * HZ / 1000) * (S - s)
                   + XIDEXTRA_TIMEOUT + SMALLBUSY_TIMEOUT);
index 9637e45744fa2f818c94aa66e284f2ba0026f65b..986b2a5e87699db2404fe6608ed07102c2c7b2b0 100644 (file)
@@ -250,7 +250,7 @@ static struct device *af_iucv_dev;
  *     PRMDATA[0..6]   socket data (max 7 bytes);
  *     PRMDATA[7]      socket data length value (len is 0xff - PRMDATA[7])
  *
- * The socket data length is computed by substracting the socket data length
+ * The socket data length is computed by subtracting the socket data length
  * value from 0xFF.
  * If the socket data len is greater 7, then PRMDATA can be used for special
  * notifications (see iucv_sock_shutdown); and further,
index 1ee5dab3cfaedf26fdab349aa19a3805318a08b2..8f156bd86be784584dbb03fcdfaa697d2bb569be 100644 (file)
@@ -735,7 +735,7 @@ static void iucv_cleanup_queue(void)
        struct iucv_irq_list *p, *n;
 
        /*
-        * When a path is severed, the pathid can be reused immediatly
+        * When a path is severed, the pathid can be reused immediately
         * on a iucv connect or a connection pending interrupt. Remove
         * all entries from the task queue that refer to a stale pathid
         * (iucv_path_table[ix] == NULL). Only then do the iucv connect
@@ -807,7 +807,7 @@ void iucv_unregister(struct iucv_handler *handler, int smp)
        spin_lock_bh(&iucv_table_lock);
        /* Remove handler from the iucv_handler_list. */
        list_del_init(&handler->list);
-       /* Sever all pathids still refering to the handler. */
+       /* Sever all pathids still referring to the handler. */
        list_for_each_entry_safe(p, n, &handler->paths, list) {
                iucv_sever_pathid(p->pathid, NULL);
                iucv_path_table[p->pathid] = NULL;
index fce9bd3bd3feb61c3b6a2fbc078d9a5b8f7462c5..5c04f3e42704feda18993bcac15dc29b0f66c933 100644 (file)
@@ -667,7 +667,7 @@ MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
 MODULE_DESCRIPTION("L2TP over IP");
 MODULE_VERSION("1.0");
 
-/* Use the value of SOCK_DGRAM (2) directory, because __stringify does't like
+/* Use the value of SOCK_DGRAM (2) directory, because __stringify doesn't like
  * enums
  */
 MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 2, IPPROTO_L2TP);
index 058f1e9a91281859bf39501619da6eb5ece8d16a..903242111317f14438bc84881358875729e21948 100644 (file)
@@ -121,8 +121,7 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
                s32 data_size = ntohs(pdulen) - llc_len;
 
                if (data_size < 0 ||
-                   ((skb_tail_pointer(skb) -
-                     (u8 *)pdu) - llc_len) < data_size)
+                   !pskb_may_pull(skb, data_size))
                        return 0;
                if (unlikely(pskb_trim_rcsum(skb, data_size)))
                        return 0;
index 334213571ad0ef9257c73a7d6ab81febb3ef9c36..44049733c4eaf6ab450e9ea48e676102669531ba 100644 (file)
@@ -1504,6 +1504,8 @@ int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
        enum ieee80211_smps_mode old_req;
        int err;
 
+       lockdep_assert_held(&sdata->u.mgd.mtx);
+
        old_req = sdata->u.mgd.req_smps;
        sdata->u.mgd.req_smps = smps_mode;
 
index dacace6b139301ad5625a738465190e2827af160..9ea7c0d0103f8d9f15fc5b7d04109316ee675ea2 100644 (file)
@@ -177,9 +177,9 @@ static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata,
        if (sdata->vif.type != NL80211_IFTYPE_STATION)
                return -EOPNOTSUPP;
 
-       mutex_lock(&local->iflist_mtx);
+       mutex_lock(&sdata->u.mgd.mtx);
        err = __ieee80211_request_smps(sdata, smps_mode);
-       mutex_unlock(&local->iflist_mtx);
+       mutex_unlock(&sdata->u.mgd.mtx);
 
        return err;
 }
index a404017014246c19fd9c64d6edda717015cbe140..c18396c248d7738133b7796f9424d52542f132df 100644 (file)
@@ -97,7 +97,7 @@ struct ieee80211_bss {
        size_t supp_rates_len;
 
        /*
-        * During assocation, we save an ERP value from a probe response so
+        * During association, we save an ERP value from a probe response so
         * that we can feed ERP info to the driver when handling the
         * association completes. these fields probably won't be up-to-date
         * otherwise, you probably don't want to use them.
index 8c02469b7176526994fc1bb749eee30e943ef5ca..af3c56482c80b519d97d166373c05860b47f28dd 100644 (file)
@@ -342,7 +342,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len,
                if (IS_ERR(key->u.ccmp.tfm)) {
                        err = PTR_ERR(key->u.ccmp.tfm);
                        kfree(key);
-                       key = ERR_PTR(err);
+                       return ERR_PTR(err);
                }
                break;
        case WLAN_CIPHER_SUITE_AES_CMAC:
@@ -360,7 +360,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len,
                if (IS_ERR(key->u.aes_cmac.tfm)) {
                        err = PTR_ERR(key->u.aes_cmac.tfm);
                        kfree(key);
-                       key = ERR_PTR(err);
+                       return ERR_PTR(err);
                }
                break;
        }
@@ -400,11 +400,12 @@ int ieee80211_key_link(struct ieee80211_key *key,
 {
        struct ieee80211_key *old_key;
        int idx, ret;
-       bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
+       bool pairwise;
 
        BUG_ON(!sdata);
        BUG_ON(!key);
 
+       pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
        idx = key->conf.keyidx;
        key->local = sdata->local;
        key->sdata = sdata;
index 8d65b47d9837582cfa5cce46e59b4bc401a28025..336ca9d0c5c44aac5c7f7eb88b42c18cfefaa5b8 100644 (file)
@@ -628,7 +628,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
  *
  * @mpath: mesh path whose queue has to be freed
  *
- * Locking: the function must me called withing a rcu_read_lock region
+ * Locking: the function must me called within a rcu_read_lock region
  */
 void mesh_path_flush_pending(struct mesh_path *mpath)
 {
index 8212a8bebf06942fcb121ec0c6bed8c0fc3fbd60..c06aa3ac6b9d1ad5219da7eb2d0677cef31628b3 100644 (file)
@@ -259,7 +259,7 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
                }
        }
 
-       /* try to sample up to half of the availble rates during each interval */
+       /* try to sample up to half of the available rates during each interval */
        mi->sample_count *= 4;
 
        cur_prob = 0;
@@ -659,18 +659,14 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
        struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
        struct ieee80211_local *local = hw_to_local(mp->hw);
        u16 sta_cap = sta->ht_cap.cap;
+       int n_supported = 0;
        int ack_dur;
        int stbc;
        int i;
 
        /* fall back to the old minstrel for legacy stations */
-       if (!sta->ht_cap.ht_supported) {
-               msp->is_ht = false;
-               memset(&msp->legacy, 0, sizeof(msp->legacy));
-               msp->legacy.r = msp->ratelist;
-               msp->legacy.sample_table = msp->sample_table;
-               return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
-       }
+       if (!sta->ht_cap.ht_supported)
+               goto use_legacy;
 
        BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) !=
                MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS);
@@ -725,7 +721,22 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
 
                mi->groups[i].supported =
                        mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
+
+               if (mi->groups[i].supported)
+                       n_supported++;
        }
+
+       if (!n_supported)
+               goto use_legacy;
+
+       return;
+
+use_legacy:
+       msp->is_ht = false;
+       memset(&msp->legacy, 0, sizeof(msp->legacy));
+       msp->legacy.r = msp->ratelist;
+       msp->legacy.sample_table = msp->sample_table;
+       return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
 }
 
 static void
index 6510f8ee738eca7303ff77c8583e7659dbfe4040..19111c7bf454bc022eff5dfca098af465b25b8a8 100644 (file)
@@ -77,7 +77,7 @@ union rc_pid_event_data {
 };
 
 struct rc_pid_event {
-       /* The time when the event occured */
+       /* The time when the event occurred */
        unsigned long timestamp;
 
        /* Event ID number */
index 5c1930ba8ebe98d1727d014a182e9057d00bced4..c5d4530d8284e59f07b44af1ce904fea5fc26018 100644 (file)
@@ -381,7 +381,7 @@ static void ieee80211_parse_qos(struct ieee80211_rx_data *rx)
  * specs were sane enough this time around to require padding each A-MSDU
  * subframe to a length that is a multiple of four.
  *
- * Padding like Atheros hardware adds which is inbetween the 802.11 header and
+ * Padding like Atheros hardware adds which is between the 802.11 header and
  * the payload is not supported, the driver is required to move the 802.11
  * header to be directly in front of the payload in that case.
  */
@@ -612,7 +612,8 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw,
                                skipped++;
                                continue;
                        }
-                       if (!time_after(jiffies, tid_agg_rx->reorder_time[j] +
+                       if (skipped &&
+                           !time_after(jiffies, tid_agg_rx->reorder_time[j] +
                                        HT_RX_REORDER_BUF_TIMEOUT))
                                goto set_release_timer;
 
@@ -2540,7 +2541,6 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx)
                 * same TID from the same station
                 */
                rx->skb = skb;
-               rx->flags = 0;
 
                CALL_RXH(ieee80211_rx_h_decrypt)
                CALL_RXH(ieee80211_rx_h_check_more_data)
@@ -2611,6 +2611,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
                .sdata = sta->sdata,
                .local = sta->local,
                .queue = tid,
+               .flags = 0,
        };
        struct tid_ampdu_rx *tid_agg_rx;
 
index d0311a322ddd9908007eb7c23a189ff2590fef51..13e8c30adf010183cc0830ba7eec7708f372f326 100644 (file)
@@ -47,9 +47,9 @@
  * Station entries are added by mac80211 when you establish a link with a
  * peer. This means different things for the different type of interfaces
  * we support. For a regular station this mean we add the AP sta when we
- * receive an assocation response from the AP. For IBSS this occurs when
+ * receive an association response from the AP. For IBSS this occurs when
  * get to know about a peer on the same IBSS. For WDS we add the sta for
- * the peer imediately upon device open. When using AP mode we add stations
+ * the peer immediately upon device open. When using AP mode we add stations
  * for each respective station upon request from userspace through nl80211.
  *
  * In order to remove a STA info structure, various sta_info_destroy_*()
index 57681149e37fd1cf45bb4540f9a2a2ae8fe8e68c..b2f95966c7f458b73d35ac55581b5daa486d164c 100644 (file)
@@ -173,7 +173,7 @@ struct sta_ampdu_mlme {
 /**
  * enum plink_state - state of a mesh peer link finite state machine
  *
- * @PLINK_LISTEN: initial state, considered the implicit state of non existant
+ * @PLINK_LISTEN: initial state, considered the implicit state of non existent
  *     mesh peer links
  * @PLINK_OPN_SNT: mesh plink open frame has been sent to this mesh peer
  * @PLINK_OPN_RCVD: mesh plink open frame has been received from this mesh peer
index c3f988aa1152ece13b58fa4d75e13263577aaf61..32bff6d86cb24911c6f7206c31668dc4c8e0c36e 100644 (file)
@@ -652,7 +652,6 @@ comment "Xtables matches"
 config NETFILTER_XT_MATCH_ADDRTYPE
        tristate '"addrtype" address type match support'
        depends on NETFILTER_ADVANCED
-       depends on (IPV6 || IPV6=n)
        ---help---
          This option allows you to match what routing thinks of an address,
          eg. UNICAST, LOCAL, BROADCAST, ...
index bca96990218dedeb2791d9df35727a9f47b20ea7..a113ff066928445902ce5a4e43f51c115586c894 100644 (file)
@@ -338,8 +338,7 @@ bitmap_ip_head(struct ip_set *set, struct sk_buff *skb)
        NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP_TO, htonl(map->last_ip));
        if (map->netmask != 32)
                NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, map->netmask);
-       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES,
-                     htonl(atomic_read(&set->ref) - 1));
+       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1));
        NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE,
                      htonl(sizeof(*map) + map->memsize));
        if (with_timeout(map->timeout))
index 5e790172deffb36638c8cbf5a0bdfe54067f820d..a274300b6a566faee28c3e10d31fdba1bbd212c0 100644 (file)
@@ -343,6 +343,10 @@ bitmap_ipmac_kadt(struct ip_set *set, const struct sk_buff *skb,
        ipset_adtfn adtfn = set->variant->adt[adt];
        struct ipmac data;
 
+       /* MAC can be src only */
+       if (!(flags & IPSET_DIM_TWO_SRC))
+               return 0;
+
        data.id = ntohl(ip4addr(skb, flags & IPSET_DIM_ONE_SRC));
        if (data.id < map->first_ip || data.id > map->last_ip)
                return -IPSET_ERR_BITMAP_RANGE;
@@ -434,8 +438,7 @@ bitmap_ipmac_head(struct ip_set *set, struct sk_buff *skb)
                goto nla_put_failure;
        NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP, htonl(map->first_ip));
        NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP_TO, htonl(map->last_ip));
-       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES,
-                     htonl(atomic_read(&set->ref) - 1));
+       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1));
        NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE,
                      htonl(sizeof(*map)
                            + (map->last_ip - map->first_ip + 1) * map->dsize));
index 165f09b1a9cb22cad3f3db40f2a13ed905eefd9c..6b38eb8f6ed823fc42ca7d0443349b506b8623f3 100644 (file)
@@ -320,8 +320,7 @@ bitmap_port_head(struct ip_set *set, struct sk_buff *skb)
                goto nla_put_failure;
        NLA_PUT_NET16(skb, IPSET_ATTR_PORT, htons(map->first_port));
        NLA_PUT_NET16(skb, IPSET_ATTR_PORT_TO, htons(map->last_port));
-       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES,
-                     htonl(atomic_read(&set->ref) - 1));
+       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1));
        NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE,
                      htonl(sizeof(*map) + map->memsize));
        if (with_timeout(map->timeout))
index d6b48230a54015d9b8cac977fe913e36ab07c79e..72d1ac611fdc8e70124c6fca29686ffa416e9cd3 100644 (file)
@@ -26,6 +26,7 @@
 
 static LIST_HEAD(ip_set_type_list);            /* all registered set types */
 static DEFINE_MUTEX(ip_set_type_mutex);                /* protects ip_set_type_list */
+static DEFINE_RWLOCK(ip_set_ref_lock);         /* protects the set refs */
 
 static struct ip_set **ip_set_list;            /* all individual sets */
 static ip_set_id_t ip_set_max = CONFIG_IP_SET_MAX; /* max number of sets */
@@ -301,13 +302,18 @@ EXPORT_SYMBOL_GPL(ip_set_get_ipaddr6);
 static inline void
 __ip_set_get(ip_set_id_t index)
 {
-       atomic_inc(&ip_set_list[index]->ref);
+       write_lock_bh(&ip_set_ref_lock);
+       ip_set_list[index]->ref++;
+       write_unlock_bh(&ip_set_ref_lock);
 }
 
 static inline void
 __ip_set_put(ip_set_id_t index)
 {
-       atomic_dec(&ip_set_list[index]->ref);
+       write_lock_bh(&ip_set_ref_lock);
+       BUG_ON(ip_set_list[index]->ref == 0);
+       ip_set_list[index]->ref--;
+       write_unlock_bh(&ip_set_ref_lock);
 }
 
 /*
@@ -324,7 +330,7 @@ ip_set_test(ip_set_id_t index, const struct sk_buff *skb,
        struct ip_set *set = ip_set_list[index];
        int ret = 0;
 
-       BUG_ON(set == NULL || atomic_read(&set->ref) == 0);
+       BUG_ON(set == NULL);
        pr_debug("set %s, index %u\n", set->name, index);
 
        if (dim < set->type->dimension ||
@@ -356,7 +362,7 @@ ip_set_add(ip_set_id_t index, const struct sk_buff *skb,
        struct ip_set *set = ip_set_list[index];
        int ret;
 
-       BUG_ON(set == NULL || atomic_read(&set->ref) == 0);
+       BUG_ON(set == NULL);
        pr_debug("set %s, index %u\n", set->name, index);
 
        if (dim < set->type->dimension ||
@@ -378,7 +384,7 @@ ip_set_del(ip_set_id_t index, const struct sk_buff *skb,
        struct ip_set *set = ip_set_list[index];
        int ret = 0;
 
-       BUG_ON(set == NULL || atomic_read(&set->ref) == 0);
+       BUG_ON(set == NULL);
        pr_debug("set %s, index %u\n", set->name, index);
 
        if (dim < set->type->dimension ||
@@ -397,7 +403,6 @@ EXPORT_SYMBOL_GPL(ip_set_del);
  * Find set by name, reference it once. The reference makes sure the
  * thing pointed to, does not go away under our feet.
  *
- * The nfnl mutex must already be activated.
  */
 ip_set_id_t
 ip_set_get_byname(const char *name, struct ip_set **set)
@@ -423,15 +428,12 @@ EXPORT_SYMBOL_GPL(ip_set_get_byname);
  * reference count by 1. The caller shall not assume the index
  * to be valid, after calling this function.
  *
- * The nfnl mutex must already be activated.
  */
 void
 ip_set_put_byindex(ip_set_id_t index)
 {
-       if (ip_set_list[index] != NULL) {
-               BUG_ON(atomic_read(&ip_set_list[index]->ref) == 0);
+       if (ip_set_list[index] != NULL)
                __ip_set_put(index);
-       }
 }
 EXPORT_SYMBOL_GPL(ip_set_put_byindex);
 
@@ -441,7 +443,6 @@ EXPORT_SYMBOL_GPL(ip_set_put_byindex);
  * can't be destroyed. The set cannot be renamed due to
  * the referencing either.
  *
- * The nfnl mutex must already be activated.
  */
 const char *
 ip_set_name_byindex(ip_set_id_t index)
@@ -449,7 +450,7 @@ ip_set_name_byindex(ip_set_id_t index)
        const struct ip_set *set = ip_set_list[index];
 
        BUG_ON(set == NULL);
-       BUG_ON(atomic_read(&set->ref) == 0);
+       BUG_ON(set->ref == 0);
 
        /* Referenced, so it's safe */
        return set->name;
@@ -515,10 +516,7 @@ void
 ip_set_nfnl_put(ip_set_id_t index)
 {
        nfnl_lock();
-       if (ip_set_list[index] != NULL) {
-               BUG_ON(atomic_read(&ip_set_list[index]->ref) == 0);
-               __ip_set_put(index);
-       }
+       ip_set_put_byindex(index);
        nfnl_unlock();
 }
 EXPORT_SYMBOL_GPL(ip_set_nfnl_put);
@@ -526,7 +524,7 @@ EXPORT_SYMBOL_GPL(ip_set_nfnl_put);
 /*
  * Communication protocol with userspace over netlink.
  *
- * We already locked by nfnl_lock.
+ * The commands are serialized by the nfnl mutex.
  */
 
 static inline bool
@@ -657,7 +655,6 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
                return -ENOMEM;
        rwlock_init(&set->lock);
        strlcpy(set->name, name, IPSET_MAXNAMELEN);
-       atomic_set(&set->ref, 0);
        set->family = family;
 
        /*
@@ -690,8 +687,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
 
        /*
         * Here, we have a valid, constructed set and we are protected
-        * by nfnl_lock. Find the first free index in ip_set_list and
-        * check clashing.
+        * by the nfnl mutex. Find the first free index in ip_set_list
+        * and check clashing.
         */
        if ((ret = find_free_id(set->name, &index, &clash)) != 0) {
                /* If this is the same set and requested, ignore error */
@@ -751,31 +748,51 @@ ip_set_destroy(struct sock *ctnl, struct sk_buff *skb,
               const struct nlattr * const attr[])
 {
        ip_set_id_t i;
+       int ret = 0;
 
        if (unlikely(protocol_failed(attr)))
                return -IPSET_ERR_PROTOCOL;
 
-       /* References are protected by the nfnl mutex */
+       /* Commands are serialized and references are
+        * protected by the ip_set_ref_lock.
+        * External systems (i.e. xt_set) must call
+        * ip_set_put|get_nfnl_* functions, that way we
+        * can safely check references here.
+        *
+        * list:set timer can only decrement the reference
+        * counter, so if it's already zero, we can proceed
+        * without holding the lock.
+        */
+       read_lock_bh(&ip_set_ref_lock);
        if (!attr[IPSET_ATTR_SETNAME]) {
                for (i = 0; i < ip_set_max; i++) {
-                       if (ip_set_list[i] != NULL &&
-                           (atomic_read(&ip_set_list[i]->ref)))
-                               return -IPSET_ERR_BUSY;
+                       if (ip_set_list[i] != NULL && ip_set_list[i]->ref) {
+                               ret = IPSET_ERR_BUSY;
+                               goto out;
+                       }
                }
+               read_unlock_bh(&ip_set_ref_lock);
                for (i = 0; i < ip_set_max; i++) {
                        if (ip_set_list[i] != NULL)
                                ip_set_destroy_set(i);
                }
        } else {
                i = find_set_id(nla_data(attr[IPSET_ATTR_SETNAME]));
-               if (i == IPSET_INVALID_ID)
-                       return -ENOENT;
-               else if (atomic_read(&ip_set_list[i]->ref))
-                       return -IPSET_ERR_BUSY;
+               if (i == IPSET_INVALID_ID) {
+                       ret = -ENOENT;
+                       goto out;
+               } else if (ip_set_list[i]->ref) {
+                       ret = -IPSET_ERR_BUSY;
+                       goto out;
+               }
+               read_unlock_bh(&ip_set_ref_lock);
 
                ip_set_destroy_set(i);
        }
        return 0;
+out:
+       read_unlock_bh(&ip_set_ref_lock);
+       return ret;
 }
 
 /* Flush sets */
@@ -834,6 +851,7 @@ ip_set_rename(struct sock *ctnl, struct sk_buff *skb,
        struct ip_set *set;
        const char *name2;
        ip_set_id_t i;
+       int ret = 0;
 
        if (unlikely(protocol_failed(attr) ||
                     attr[IPSET_ATTR_SETNAME] == NULL ||
@@ -843,25 +861,33 @@ ip_set_rename(struct sock *ctnl, struct sk_buff *skb,
        set = find_set(nla_data(attr[IPSET_ATTR_SETNAME]));
        if (set == NULL)
                return -ENOENT;
-       if (atomic_read(&set->ref) != 0)
-               return -IPSET_ERR_REFERENCED;
+
+       read_lock_bh(&ip_set_ref_lock);
+       if (set->ref != 0) {
+               ret = -IPSET_ERR_REFERENCED;
+               goto out;
+       }
 
        name2 = nla_data(attr[IPSET_ATTR_SETNAME2]);
        for (i = 0; i < ip_set_max; i++) {
                if (ip_set_list[i] != NULL &&
-                   STREQ(ip_set_list[i]->name, name2))
-                       return -IPSET_ERR_EXIST_SETNAME2;
+                   STREQ(ip_set_list[i]->name, name2)) {
+                       ret = -IPSET_ERR_EXIST_SETNAME2;
+                       goto out;
+               }
        }
        strncpy(set->name, name2, IPSET_MAXNAMELEN);
 
-       return 0;
+out:
+       read_unlock_bh(&ip_set_ref_lock);
+       return ret;
 }
 
 /* Swap two sets so that name/index points to the other.
  * References and set names are also swapped.
  *
- * We are protected by the nfnl mutex and references are
- * manipulated only by holding the mutex. The kernel interfaces
+ * The commands are serialized by the nfnl mutex and references are
+ * protected by the ip_set_ref_lock. The kernel interfaces
  * do not hold the mutex but the pointer settings are atomic
  * so the ip_set_list always contains valid pointers to the sets.
  */
@@ -874,7 +900,6 @@ ip_set_swap(struct sock *ctnl, struct sk_buff *skb,
        struct ip_set *from, *to;
        ip_set_id_t from_id, to_id;
        char from_name[IPSET_MAXNAMELEN];
-       u32 from_ref;
 
        if (unlikely(protocol_failed(attr) ||
                     attr[IPSET_ATTR_SETNAME] == NULL ||
@@ -893,23 +918,21 @@ ip_set_swap(struct sock *ctnl, struct sk_buff *skb,
        to = ip_set_list[to_id];
 
        /* Features must not change.
-        * Not an artifical restriction anymore, as we must prevent
+        * Not an artificial restriction anymore, as we must prevent
         * possible loops created by swapping in setlist type of sets. */
        if (!(from->type->features == to->type->features &&
              from->type->family == to->type->family))
                return -IPSET_ERR_TYPE_MISMATCH;
 
-       /* No magic here: ref munging protected by the nfnl_lock */
        strncpy(from_name, from->name, IPSET_MAXNAMELEN);
-       from_ref = atomic_read(&from->ref);
-
        strncpy(from->name, to->name, IPSET_MAXNAMELEN);
-       atomic_set(&from->ref, atomic_read(&to->ref));
        strncpy(to->name, from_name, IPSET_MAXNAMELEN);
-       atomic_set(&to->ref, from_ref);
 
+       write_lock_bh(&ip_set_ref_lock);
+       swap(from->ref, to->ref);
        ip_set_list[from_id] = to;
        ip_set_list[to_id] = from;
+       write_unlock_bh(&ip_set_ref_lock);
 
        return 0;
 }
@@ -926,7 +949,7 @@ ip_set_dump_done(struct netlink_callback *cb)
 {
        if (cb->args[2]) {
                pr_debug("release set %s\n", ip_set_list[cb->args[1]]->name);
-               __ip_set_put((ip_set_id_t) cb->args[1]);
+               ip_set_put_byindex((ip_set_id_t) cb->args[1]);
        }
        return 0;
 }
@@ -999,8 +1022,9 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
        if (cb->args[1] >= ip_set_max)
                goto out;
 
-       pr_debug("args[0]: %ld args[1]: %ld\n", cb->args[0], cb->args[1]);
        max = cb->args[0] == DUMP_ONE ? cb->args[1] + 1 : ip_set_max;
+dump_last:
+       pr_debug("args[0]: %ld args[1]: %ld\n", cb->args[0], cb->args[1]);
        for (; cb->args[1] < max; cb->args[1]++) {
                index = (ip_set_id_t) cb->args[1];
                set = ip_set_list[index];
@@ -1015,8 +1039,8 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
                 * so that lists (unions of sets) are dumped last.
                 */
                if (cb->args[0] != DUMP_ONE &&
-                   !((cb->args[0] == DUMP_ALL) ^
-                     (set->type->features & IPSET_DUMP_LAST)))
+                   ((cb->args[0] == DUMP_ALL) ==
+                    !!(set->type->features & IPSET_DUMP_LAST)))
                        continue;
                pr_debug("List set: %s\n", set->name);
                if (!cb->args[2]) {
@@ -1060,6 +1084,12 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
                        goto release_refcount;
                }
        }
+       /* If we dump all sets, continue with dumping last ones */
+       if (cb->args[0] == DUMP_ALL) {
+               cb->args[0] = DUMP_LAST;
+               cb->args[1] = 0;
+               goto dump_last;
+       }
        goto out;
 
 nla_put_failure:
@@ -1068,13 +1098,8 @@ release_refcount:
        /* If there was an error or set is done, release set */
        if (ret || !cb->args[2]) {
                pr_debug("release set %s\n", ip_set_list[index]->name);
-               __ip_set_put(index);
+               ip_set_put_byindex(index);
        }
-
-       /* If we dump all sets, continue with dumping last ones */
-       if (cb->args[0] == DUMP_ALL && cb->args[1] >= max && !cb->args[2])
-               cb->args[0] = DUMP_LAST;
-
 out:
        if (nlh) {
                nlmsg_end(skb, nlh);
index a47c32982f06233b48b37c386b32842cdf122614..e9159e99fc4bd491f2e0d11cecabed5172b1bd27 100644 (file)
@@ -43,14 +43,19 @@ struct list_set {
 static inline struct set_elem *
 list_set_elem(const struct list_set *map, u32 id)
 {
-       return (struct set_elem *)((char *)map->members + id * map->dsize);
+       return (struct set_elem *)((void *)map->members + id * map->dsize);
+}
+
+static inline struct set_telem *
+list_set_telem(const struct list_set *map, u32 id)
+{
+       return (struct set_telem *)((void *)map->members + id * map->dsize);
 }
 
 static inline bool
 list_set_timeout(const struct list_set *map, u32 id)
 {
-       const struct set_telem *elem =
-               (const struct set_telem *) list_set_elem(map, id);
+       const struct set_telem *elem = list_set_telem(map, id);
 
        return ip_set_timeout_test(elem->timeout);
 }
@@ -58,19 +63,11 @@ list_set_timeout(const struct list_set *map, u32 id)
 static inline bool
 list_set_expired(const struct list_set *map, u32 id)
 {
-       const struct set_telem *elem =
-               (const struct set_telem *) list_set_elem(map, id);
+       const struct set_telem *elem = list_set_telem(map, id);
 
        return ip_set_timeout_expired(elem->timeout);
 }
 
-static inline int
-list_set_exist(const struct set_telem *elem)
-{
-       return elem->id != IPSET_INVALID_ID &&
-              !ip_set_timeout_expired(elem->timeout);
-}
-
 /* Set list without and with timeout */
 
 static int
@@ -146,11 +143,11 @@ list_elem_tadd(struct list_set *map, u32 i, ip_set_id_t id,
        struct set_telem *e;
 
        for (; i < map->size; i++) {
-               e = (struct set_telem *)list_set_elem(map, i);
+               e = list_set_telem(map, i);
                swap(e->id, id);
+               swap(e->timeout, timeout);
                if (e->id == IPSET_INVALID_ID)
                        break;
-               swap(e->timeout, timeout);
        }
 }
 
@@ -164,7 +161,7 @@ list_set_add(struct list_set *map, u32 i, ip_set_id_t id,
                /* Last element replaced: e.g. add new,before,last */
                ip_set_put_byindex(e->id);
        if (with_timeout(map->timeout))
-               list_elem_tadd(map, i, id, timeout);
+               list_elem_tadd(map, i, id, ip_set_timeout_set(timeout));
        else
                list_elem_add(map, i, id);
 
@@ -172,11 +169,11 @@ list_set_add(struct list_set *map, u32 i, ip_set_id_t id,
 }
 
 static int
-list_set_del(struct list_set *map, ip_set_id_t id, u32 i)
+list_set_del(struct list_set *map, u32 i)
 {
        struct set_elem *a = list_set_elem(map, i), *b;
 
-       ip_set_put_byindex(id);
+       ip_set_put_byindex(a->id);
 
        for (; i < map->size - 1; i++) {
                b = list_set_elem(map, i + 1);
@@ -308,11 +305,11 @@ list_set_uadt(struct ip_set *set, struct nlattr *tb[],
                                 (before == 0 ||
                                  (before > 0 &&
                                   next_id_eq(map, i, refid))))
-                               ret = list_set_del(map, id, i);
+                               ret = list_set_del(map, i);
                        else if (before < 0 &&
                                 elem->id == refid &&
                                 next_id_eq(map, i, id))
-                               ret = list_set_del(map, id, i + 1);
+                               ret = list_set_del(map, i + 1);
                }
                break;
        default:
@@ -369,8 +366,7 @@ list_set_head(struct ip_set *set, struct sk_buff *skb)
        NLA_PUT_NET32(skb, IPSET_ATTR_SIZE, htonl(map->size));
        if (with_timeout(map->timeout))
                NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(map->timeout));
-       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES,
-                     htonl(atomic_read(&set->ref) - 1));
+       NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1));
        NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE,
                      htonl(sizeof(*map) + map->size * map->dsize));
        ipset_nest_end(skb, nested);
@@ -461,16 +457,13 @@ list_set_gc(unsigned long ul_set)
        struct set_telem *e;
        u32 i;
 
-       /* We run parallel with other readers (test element)
-        * but adding/deleting new entries is locked out */
-       read_lock_bh(&set->lock);
-       for (i = map->size - 1; i >= 0; i--) {
-               e = (struct set_telem *) list_set_elem(map, i);
-               if (e->id != IPSET_INVALID_ID &&
-                   list_set_expired(map, i))
-                       list_set_del(map, e->id, i);
+       write_lock_bh(&set->lock);
+       for (i = 0; i < map->size; i++) {
+               e = list_set_telem(map, i);
+               if (e->id != IPSET_INVALID_ID && list_set_expired(map, i))
+                       list_set_del(map, i);
        }
-       read_unlock_bh(&set->lock);
+       write_unlock_bh(&set->lock);
 
        map->gc.expires = jiffies + IPSET_GC_PERIOD(map->timeout) * HZ;
        add_timer(&map->gc);
index f289306cbf12aa22970ba62646ed501d38ca93b1..c97bd45975bed636c99dd55e263869f8be11a98b 100644 (file)
@@ -595,7 +595,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
                        atomic_inc(&dest->inactconns);
        } else {
                /* It is a persistent connection/template, so increase
-                  the peristent connection counter */
+                  the persistent connection counter */
                atomic_inc(&dest->persistconns);
        }
 
@@ -657,7 +657,7 @@ static inline void ip_vs_unbind_dest(struct ip_vs_conn *cp)
                }
        } else {
                /* It is a persistent connection/template, so decrease
-                  the peristent connection counter */
+                  the persistent connection counter */
                atomic_dec(&dest->persistconns);
        }
 
index 33733c8872e70230587b7d1ef7f34147a3058374..ae47090bf45fe1fdfbf99192950aacb951cb1af1 100644 (file)
@@ -3120,7 +3120,7 @@ nla_put_failure:
 static int ip_vs_genl_dump_daemons(struct sk_buff *skb,
                                   struct netlink_callback *cb)
 {
-       struct net *net = skb_net(skb);
+       struct net *net = skb_sknet(skb);
        struct netns_ipvs *ipvs = net_ipvs(net);
 
        mutex_lock(&__ip_vs_mutex);
index f276df9896b30a26f0b4f46850a05fc1f5a39bcd..87e40ea77a95244e6ca94c21c9475ed296e21d1b 100644 (file)
@@ -131,7 +131,7 @@ static inline void ip_vs_lblc_free(struct ip_vs_lblc_entry *en)
 {
        list_del(&en->list);
        /*
-        * We don't kfree dest because it is refered either by its service
+        * We don't kfree dest because it is referred either by its service
         * or the trash dest list.
         */
        atomic_dec(&en->dest->refcnt);
index cb1c9913d38b463855de82319fc666af013dd9cc..90f618ab6ddac3b04fe118c3573cf0fad779f744 100644 (file)
@@ -152,7 +152,7 @@ static void ip_vs_dest_set_eraseall(struct ip_vs_dest_set *set)
        write_lock(&set->lock);
        list_for_each_entry_safe(e, ep, &set->list, list) {
                /*
-                * We don't kfree dest because it is refered either
+                * We don't kfree dest because it is referred either
                 * by its service or by the trash dest list.
                 */
                atomic_dec(&e->dest->refcnt);
index b027ccc49f43cba6fdbc3ceaa293b50fc7e1d857..d12ed53ec95ff6a67950ce39b902e6816d40b249 100644 (file)
@@ -566,7 +566,7 @@ static struct ipvs_sctp_nextstate
         * SHUTDOWN sent from the client, waitinf for SHUT ACK from the server
         */
        /*
-        * We recieved the data chuck, keep the state unchanged. I assume
+        * We received the data chuck, keep the state unchanged. I assume
         * that still data chuncks  can be received by both the peers in
         * SHUDOWN state
         */
@@ -633,7 +633,7 @@ static struct ipvs_sctp_nextstate
         * SHUTDOWN sent from the server, waitinf for SHUTDOWN ACK from client
         */
        /*
-        * We recieved the data chuck, keep the state unchanged. I assume
+        * We received the data chuck, keep the state unchanged. I assume
         * that still data chuncks  can be received by both the peers in
         * SHUDOWN state
         */
@@ -701,7 +701,7 @@ static struct ipvs_sctp_nextstate
         * SHUTDOWN ACK from the client, awaiting for SHUTDOWN COM from server
         */
        /*
-        * We recieved the data chuck, keep the state unchanged. I assume
+        * We received the data chuck, keep the state unchanged. I assume
         * that still data chuncks  can be received by both the peers in
         * SHUDOWN state
         */
@@ -771,7 +771,7 @@ static struct ipvs_sctp_nextstate
         * SHUTDOWN ACK from the server, awaiting for SHUTDOWN COM from client
         */
        /*
-        * We recieved the data chuck, keep the state unchanged. I assume
+        * We received the data chuck, keep the state unchanged. I assume
         * that still data chuncks  can be received by both the peers in
         * SHUDOWN state
         */
index 941286ca911d793f5325ae884e9f387290298cc1..2e1c11f784193b4b319b37f246cc8f7d6fded26b 100644 (file)
@@ -453,7 +453,7 @@ __nf_conntrack_confirm(struct sk_buff *skb)
           REJECT will give spurious warnings here. */
        /* NF_CT_ASSERT(atomic_read(&ct->ct_general.use) == 1); */
 
-       /* No external references means noone else could have
+       /* No external references means no one else could have
           confirmed us. */
        NF_CT_ASSERT(!nf_ct_is_confirmed(ct));
        pr_debug("Confirming conntrack %p\n", ct);
@@ -901,7 +901,7 @@ nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum,
        ret = l3proto->get_l4proto(skb, skb_network_offset(skb),
                                   &dataoff, &protonum);
        if (ret <= 0) {
-               pr_debug("not prepared to track yet or error occured\n");
+               pr_debug("not prepared to track yet or error occurred\n");
                NF_CT_STAT_INC_ATOMIC(net, error);
                NF_CT_STAT_INC_ATOMIC(net, invalid);
                ret = -ret;
index 867882313e499931b9e89416326937398a655ccb..bcd5ed6b713048e781f73f91e80a0e055eafb6d5 100644 (file)
@@ -631,7 +631,7 @@ static int decode_seqof(bitstr_t *bs, const struct field_t *f,
                CHECK_BOUND(bs, 2);
                count = *bs->cur++;
                count <<= 8;
-               count = *bs->cur++;
+               count += *bs->cur++;
                break;
        case SEMI:
                BYTE_ALIGN(bs);
index 533a183e666108eff291f7072e5d4b4a27a0c4fe..18b2ce5c8ced1c82f5f4e3f41af1ed1e659079f9 100644 (file)
@@ -731,10 +731,10 @@ static int callforward_do_filter(const union nf_inet_addr *src,
 
                memset(&fl2, 0, sizeof(fl2));
                fl2.daddr = dst->ip;
-               if (!afinfo->route((struct dst_entry **)&rt1,
-                                  flowi4_to_flowi(&fl1))) {
-                       if (!afinfo->route((struct dst_entry **)&rt2,
-                                          flowi4_to_flowi(&fl2))) {
+               if (!afinfo->route(&init_net, (struct dst_entry **)&rt1,
+                                  flowi4_to_flowi(&fl1), false)) {
+                       if (!afinfo->route(&init_net, (struct dst_entry **)&rt2,
+                                          flowi4_to_flowi(&fl2), false)) {
                                if (rt1->rt_gateway == rt2->rt_gateway &&
                                    rt1->dst.dev  == rt2->dst.dev)
                                        ret = 1;
@@ -755,10 +755,10 @@ static int callforward_do_filter(const union nf_inet_addr *src,
 
                memset(&fl2, 0, sizeof(fl2));
                ipv6_addr_copy(&fl2.daddr, &dst->in6);
-               if (!afinfo->route((struct dst_entry **)&rt1,
-                                  flowi6_to_flowi(&fl1))) {
-                       if (!afinfo->route((struct dst_entry **)&rt2,
-                                          flowi6_to_flowi(&fl2))) {
+               if (!afinfo->route(&init_net, (struct dst_entry **)&rt1,
+                                  flowi6_to_flowi(&fl1), false)) {
+                       if (!afinfo->route(&init_net, (struct dst_entry **)&rt2,
+                                          flowi6_to_flowi(&fl2), false)) {
                                if (!memcmp(&rt1->rt6i_gateway, &rt2->rt6i_gateway,
                                            sizeof(rt1->rt6i_gateway)) &&
                                    rt1->dst.dev == rt2->dst.dev)
index 9ae57c57c50eaf2b1cd20013a41d72d3acfdb584..2e664a69d7dbc4907d7c589b2a5addc6b48ef739 100644 (file)
@@ -98,7 +98,7 @@ static const char * const dccp_state_names[] = {
 #define sIV    CT_DCCP_INVALID
 
 /*
- * DCCP state transistion table
+ * DCCP state transition table
  *
  * The assumption is the same as for TCP tracking:
  *
index 6f4ee70f460b028b3b45c7e8f2adbea47a108cbd..6772b11546543a628706f765eb23b06ecf3e6b74 100644 (file)
@@ -107,9 +107,9 @@ static const u8 sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
 /* abort        */ {sCL, sCL, sCL, sCL, sCL, sCL, sCL, sCL},
 /* shutdown     */ {sCL, sCL, sCW, sCE, sSS, sSS, sSR, sSA},
 /* shutdown_ack */ {sSA, sCL, sCW, sCE, sES, sSA, sSA, sSA},
-/* error        */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant have Stale cookie*/
+/* error        */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Can't have Stale cookie*/
 /* cookie_echo  */ {sCL, sCL, sCE, sCE, sES, sSS, sSR, sSA},/* 5.2.4 - Big TODO */
-/* cookie_ack   */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come in orig dir */
+/* cookie_ack   */ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Can't come in orig dir */
 /* shutdown_comp*/ {sCL, sCL, sCW, sCE, sES, sSS, sSR, sCL}
        },
        {
@@ -121,7 +121,7 @@ static const u8 sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
 /* shutdown     */ {sIV, sCL, sCW, sCE, sSR, sSS, sSR, sSA},
 /* shutdown_ack */ {sIV, sCL, sCW, sCE, sES, sSA, sSA, sSA},
 /* error        */ {sIV, sCL, sCW, sCL, sES, sSS, sSR, sSA},
-/* cookie_echo  */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Cant come in reply dir */
+/* cookie_echo  */ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sSA},/* Can't come in reply dir */
 /* cookie_ack   */ {sIV, sCL, sCW, sES, sES, sSS, sSR, sSA},
 /* shutdown_comp*/ {sIV, sCL, sCW, sCE, sES, sSS, sSR, sCL}
        }
index bcf47eb518effb4645440a6f64726089984eaeb7..237cc1981b8917f8d47b8fcd578e9844692a02cb 100644 (file)
@@ -707,7 +707,7 @@ static const char *ct_sdp_header_search(const char *dptr, const char *limit,
 }
 
 /* Locate a SDP header (optionally a substring within the header value),
- * optionally stopping at the first occurence of the term header, parse
+ * optionally stopping at the first occurrence of the term header, parse
  * it and return the offset and length of the data we're interested in.
  */
 int ct_sip_get_sdp_header(const struct nf_conn *ct, const char *dptr,
index 5ab22e2bbd7de8814d5cc2f3d17f4fe9158b2f68..5b466cd1272feaf0d9b66caa42a542c8370bd1bf 100644 (file)
@@ -134,7 +134,7 @@ static int __nf_queue(struct sk_buff *skb,
        const struct nf_afinfo *afinfo;
        const struct nf_queue_handler *qh;
 
-       /* QUEUE == DROP if noone is waiting, to be safe. */
+       /* QUEUE == DROP if no one is waiting, to be safe. */
        rcu_read_lock();
 
        qh = rcu_dereference(queue_handler[pf]);
index 6e6b46cb1db9ba6c75c98bf742ef02e3022fe0cd..9e63b43faeed030b5b51118f54722bc68cd2997d 100644 (file)
@@ -166,7 +166,7 @@ static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb,
        rcu_read_lock();
        ai = nf_get_afinfo(family);
        if (ai != NULL)
-               ai->route((struct dst_entry **)&rt, &fl);
+               ai->route(&init_net, (struct dst_entry **)&rt, &fl, false);
        rcu_read_unlock();
 
        if (rt != NULL) {
index 2220b85e95190794aa69d2cf292410c5b2a6b41c..b77d383cec7818387d3703ba01b79b0c74bf5f52 100644 (file)
@@ -32,11 +32,32 @@ MODULE_ALIAS("ipt_addrtype");
 MODULE_ALIAS("ip6t_addrtype");
 
 #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
-static u32 xt_addrtype_rt6_to_type(const struct rt6_info *rt)
+static u32 match_lookup_rt6(struct net *net, const struct net_device *dev,
+                           const struct in6_addr *addr)
 {
+       const struct nf_afinfo *afinfo;
+       struct flowi6 flow;
+       struct rt6_info *rt;
        u32 ret;
+       int route_err;
 
-       if (!rt)
+       memset(&flow, 0, sizeof(flow));
+       ipv6_addr_copy(&flow.daddr, addr);
+       if (dev)
+               flow.flowi6_oif = dev->ifindex;
+
+       rcu_read_lock();
+
+       afinfo = nf_get_afinfo(NFPROTO_IPV6);
+       if (afinfo != NULL)
+               route_err = afinfo->route(net, (struct dst_entry **)&rt,
+                                       flowi6_to_flowi(&flow), !!dev);
+       else
+               route_err = 1;
+
+       rcu_read_unlock();
+
+       if (route_err)
                return XT_ADDRTYPE_UNREACHABLE;
 
        if (rt->rt6i_flags & RTF_REJECT)
@@ -48,6 +69,9 @@ static u32 xt_addrtype_rt6_to_type(const struct rt6_info *rt)
                ret |= XT_ADDRTYPE_LOCAL;
        if (rt->rt6i_flags & RTF_ANYCAST)
                ret |= XT_ADDRTYPE_ANYCAST;
+
+
+       dst_release(&rt->dst);
        return ret;
 }
 
@@ -65,18 +89,8 @@ static bool match_type6(struct net *net, const struct net_device *dev,
                return false;
 
        if ((XT_ADDRTYPE_LOCAL | XT_ADDRTYPE_ANYCAST |
-            XT_ADDRTYPE_UNREACHABLE) & mask) {
-               struct rt6_info *rt;
-               u32 type;
-               int ifindex = dev ? dev->ifindex : 0;
-
-               rt = rt6_lookup(net, addr, NULL, ifindex, !!dev);
-
-               type = xt_addrtype_rt6_to_type(rt);
-
-               dst_release(&rt->dst);
-               return !!(mask & type);
-       }
+            XT_ADDRTYPE_UNREACHABLE) & mask)
+               return !!(mask & match_lookup_rt6(net, dev, addr));
        return true;
 }
 
index 2c0086a4751e3a846d517236869d52a5ae6f548a..481a86fdc40973bb43f62cfd2a36b0d4746f8a63 100644 (file)
@@ -195,7 +195,7 @@ conntrack_mt(const struct sk_buff *skb, struct xt_action_param *par,
                return info->match_flags & XT_CONNTRACK_STATE;
        if ((info->match_flags & XT_CONNTRACK_DIRECTION) &&
            (CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL) ^
-           !!(info->invert_flags & XT_CONNTRACK_DIRECTION))
+           !(info->invert_flags & XT_CONNTRACK_DIRECTION))
                return false;
 
        if (info->match_flags & XT_CONNTRACK_ORIGSRC)
index 061d48cec137e3a88a3a98153d6d5cbd9d1c3464..b3babaed7719b770e02d478091885e7692eac68a 100644 (file)
@@ -81,6 +81,7 @@ set_match_v0_checkentry(const struct xt_mtchk_param *par)
        if (info->match_set.u.flags[IPSET_DIM_MAX-1] != 0) {
                pr_warning("Protocol error: set match dimension "
                           "is over the limit!\n");
+               ip_set_nfnl_put(info->match_set.index);
                return -ERANGE;
        }
 
@@ -135,6 +136,8 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
                if (index == IPSET_INVALID_ID) {
                        pr_warning("Cannot find del_set index %u as target\n",
                                   info->del_set.index);
+                       if (info->add_set.index != IPSET_INVALID_ID)
+                               ip_set_nfnl_put(info->add_set.index);
                        return -ENOENT;
                }
        }
@@ -142,6 +145,10 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
            info->del_set.u.flags[IPSET_DIM_MAX-1] != 0) {
                pr_warning("Protocol error: SET target dimension "
                           "is over the limit!\n");
+               if (info->add_set.index != IPSET_INVALID_ID)
+                       ip_set_nfnl_put(info->add_set.index);
+               if (info->del_set.index != IPSET_INVALID_ID)
+                       ip_set_nfnl_put(info->del_set.index);
                return -ERANGE;
        }
 
@@ -192,6 +199,7 @@ set_match_checkentry(const struct xt_mtchk_param *par)
        if (info->match_set.dim > IPSET_DIM_MAX) {
                pr_warning("Protocol error: set match dimension "
                           "is over the limit!\n");
+               ip_set_nfnl_put(info->match_set.index);
                return -ERANGE;
        }
 
@@ -219,7 +227,7 @@ set_target(struct sk_buff *skb, const struct xt_action_param *par)
        if (info->del_set.index != IPSET_INVALID_ID)
                ip_set_del(info->del_set.index,
                           skb, par->family,
-                          info->add_set.dim,
+                          info->del_set.dim,
                           info->del_set.flags);
 
        return XT_CONTINUE;
@@ -245,13 +253,19 @@ set_target_checkentry(const struct xt_tgchk_param *par)
                if (index == IPSET_INVALID_ID) {
                        pr_warning("Cannot find del_set index %u as target\n",
                                   info->del_set.index);
+                       if (info->add_set.index != IPSET_INVALID_ID)
+                               ip_set_nfnl_put(info->add_set.index);
                        return -ENOENT;
                }
        }
        if (info->add_set.dim > IPSET_DIM_MAX ||
-           info->del_set.flags > IPSET_DIM_MAX) {
+           info->del_set.dim > IPSET_DIM_MAX) {
                pr_warning("Protocol error: SET target dimension "
                           "is over the limit!\n");
+               if (info->add_set.index != IPSET_INVALID_ID)
+                       ip_set_nfnl_put(info->add_set.index);
+               if (info->del_set.index != IPSET_INVALID_ID)
+                       ip_set_nfnl_put(info->del_set.index);
                return -ERANGE;
        }
 
index d37b7f80fa374a648e20a50d83b95f033dd9aebe..de0d8e4cbfb64db0794f3f38ad151e607ec30f2f 100644 (file)
@@ -109,7 +109,7 @@ static void netlbl_domhsh_free_entry(struct rcu_head *entry)
  *
  * Description:
  * This is the hashing function for the domain hash table, it returns the
- * correct bucket number for the domain.  The caller is responsibile for
+ * correct bucket number for the domain.  The caller is responsible for
  * ensuring that the hash table is protected with either a RCU read lock or the
  * hash table lock.
  *
@@ -134,7 +134,7 @@ static u32 netlbl_domhsh_hash(const char *key)
  *
  * Description:
  * Searches the domain hash table and returns a pointer to the hash table
- * entry if found, otherwise NULL is returned.  The caller is responsibile for
+ * entry if found, otherwise NULL is returned.  The caller is responsible for
  * ensuring that the hash table is protected with either a RCU read lock or the
  * hash table lock.
  *
@@ -165,7 +165,7 @@ static struct netlbl_dom_map *netlbl_domhsh_search(const char *domain)
  * Searches the domain hash table and returns a pointer to the hash table
  * entry if an exact match is found, if an exact match is not present in the
  * hash table then the default entry is returned if valid otherwise NULL is
- * returned.  The caller is responsibile ensuring that the hash table is
+ * returned.  The caller is responsible ensuring that the hash table is
  * protected with either a RCU read lock or the hash table lock.
  *
  */
@@ -193,7 +193,7 @@ static struct netlbl_dom_map *netlbl_domhsh_search_def(const char *domain)
  *
  * Description:
  * Generate an audit record for adding a new NetLabel/LSM mapping entry with
- * the given information.  Caller is responsibile for holding the necessary
+ * the given information.  Caller is responsible for holding the necessary
  * locks.
  *
  */
@@ -605,7 +605,7 @@ int netlbl_domhsh_remove_default(struct netlbl_audit *audit_info)
  *
  * Description:
  * Look through the domain hash table searching for an entry to match @domain,
- * return a pointer to a copy of the entry or NULL.  The caller is responsibile
+ * return a pointer to a copy of the entry or NULL.  The caller is responsible
  * for ensuring that rcu_read_[un]lock() is called.
  *
  */
index 998e85e895d04e1fc2b26cc856d09fb141cd35a0..4f251b19fbcc827b7cd1da5e765000549e3f9282 100644 (file)
@@ -259,7 +259,7 @@ add_failure:
  *
  * Description:
  * This function is a helper function used by the LISTALL and LISTDEF command
- * handlers.  The caller is responsibile for ensuring that the RCU read lock
+ * handlers.  The caller is responsible for ensuring that the RCU read lock
  * is held.  Returns zero on success, negative values on failure.
  *
  */
index c47a511f203d463d70eea98bc594ae7468bf9919..7c4dce8fa5e6b74972f6537ce8507a10bb908e31 100644 (file)
@@ -355,7 +355,7 @@ void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context)
  *
  * Conceptually, we have two counters:
  *  -  send credits: this tells us how many WRs we're allowed
- *     to submit without overruning the reciever's queue. For
+ *     to submit without overruning the receiver's queue. For
  *     each SEND WR we post, we decrement this by one.
  *
  *  -  posted credits: this tells us how many WRs we recently
index 712cf2d1f28ef36e3bf567540b036ca41179faaf..3a60a15d1b4a96deb7bd5636e8cab8244e64902e 100644 (file)
@@ -181,7 +181,7 @@ static int rds_iw_init_qp_attrs(struct ib_qp_init_attr *attr,
        unsigned int send_size, recv_size;
        int ret;
 
-       /* The offset of 1 is to accomodate the additional ACK WR. */
+       /* The offset of 1 is to accommodate the additional ACK WR. */
        send_size = min_t(unsigned int, rds_iwdev->max_wrs, rds_iw_sysctl_max_send_wr + 1);
        recv_size = min_t(unsigned int, rds_iwdev->max_wrs, rds_iw_sysctl_max_recv_wr + 1);
        rds_iw_ring_resize(send_ring, send_size - 1);
index 59509e9a9e723813d78d930381dccffc588add00..6deaa77495e3fb5aab3e79b2c2e5aa7a7e004af3 100644 (file)
@@ -122,7 +122,7 @@ static int rds_iw_get_device(struct rds_sock *rs, struct rds_iw_device **rds_iwd
 #else
                        /* FIXME - needs to compare the local and remote
                         * ipaddr/port tuple, but the ipaddr is the only
-                        * available infomation in the rds_sock (as the rest are
+                        * available information in the rds_sock (as the rest are
                         * zero'ed.  It doesn't appear to be properly populated
                         * during connection setup...
                         */
index 6280ea020d4eb0293b3c76be3a2e8e87920aff49..545d8ee3efb19b9295f812c0b382efe9cdd6b572 100644 (file)
@@ -307,7 +307,7 @@ void rds_iw_send_cq_comp_handler(struct ib_cq *cq, void *context)
  *
  * Conceptually, we have two counters:
  *  -  send credits: this tells us how many WRs we're allowed
- *     to submit without overruning the reciever's queue. For
+ *     to submit without overruning the receiver's queue. For
  *     each SEND WR we post, we decrement this by one.
  *
  *  -  posted credits: this tells us how many WRs we recently
index 35b9c2e9caf1bc79235b9b43732d398a325d42f4..d58ae5f9339ea6716f5c17973ed9a45d0e66f6a6 100644 (file)
@@ -116,7 +116,7 @@ static void release_in_xmit(struct rds_connection *conn)
 }
 
 /*
- * We're making the concious trade-off here to only send one message
+ * We're making the conscious trade-off here to only send one message
  * down the connection at a time.
  *   Pro:
  *      - tx queueing is a simple fifo list
index 08dcd2f29cdc72b70713054de2c33b502458ff6a..479cae57d1873a97c2f97a6865c873cb12218e37 100644 (file)
@@ -587,7 +587,7 @@ static int rose_clear_routes(void)
 
 /*
  *     Check that the device given is a valid AX.25 interface that is "up".
- *     called whith RTNL
+ *     called with RTNL
  */
 static struct net_device *rose_ax25_dev_find(char *devname)
 {
index 15873e14cb546f5bc75c5baa6b3fb73a00409c34..14b42f4ad791eaf9191adb67e2b6d62d994c4e84 100644 (file)
@@ -999,7 +999,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
        switch (n->nlmsg_type) {
        case RTM_NEWACTION:
                /* we are going to assume all other flags
-                * imply create only if it doesnt exist
+                * imply create only if it doesn't exist
                 * Note that CREATE | EXCL implies that
                 * but since we want avoid ambiguity (eg when flags
                 * is zero) then just set this
index 50c7c06c019d6e217cb55623b8bbd282dfd2b439..7affe9a92757d1611065b54c047b9f6f75f09faa 100644 (file)
@@ -161,7 +161,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
                        }
                        if (offset > 0 && offset > skb->len) {
                                pr_info("tc filter pedit"
-                                       " offset %d cant exceed pkt length %d\n",
+                                       " offset %d can't exceed pkt length %d\n",
                                       offset, skb->len);
                                goto bad;
                        }
index a4de67eca824068ea9c57befc4196d7d36f2b2cb..49130e8abff03df242cba1aa06d16b7017188a13 100644 (file)
@@ -47,7 +47,7 @@
  *     on the meta type. Obviously, the length of the data must also
  *     be provided for non-numeric types.
  *
- *     Additionaly, type dependant modifiers such as shift operators
+ *     Additionally, type dependent modifiers such as shift operators
  *     or mask may be applied to extend the functionaliy. As of now,
  *     the variable length type supports shifting the byte string to
  *     the right, eating up any number of octets and thus supporting
index e1429a85091fc271c85948fff6e0914739ef93ee..29b942ce9e824866c4d74de75a38c652f1999cb3 100644 (file)
@@ -183,7 +183,7 @@ static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch)
  * filters in qdisc and in inner nodes (if higher filter points to the inner
  * node). If we end up with classid MAJOR:0 we enqueue the skb into special
  * internal fifo (direct). These packets then go directly thru. If we still
- * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessfull
+ * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessful
  * then finish and return direct queue.
  */
 #define HTB_DIRECT ((struct htb_class *)-1L)
index edbbf7ad662387506fd3ba070dd628705566e804..69c35f6cd13f329cab2d7442c626a31919fc122e 100644 (file)
@@ -160,7 +160,7 @@ static bool loss_4state(struct netem_sched_data *q)
        u32 rnd = net_random();
 
        /*
-        * Makes a comparision between rnd and the transition
+        * Makes a comparison between rnd and the transition
         * probabilities outgoing from the current state, then decides the
         * next state and if the next packet has to be transmitted or lost.
         * The four states correspond to:
@@ -212,9 +212,9 @@ static bool loss_4state(struct netem_sched_data *q)
  * Generates losses according to the Gilbert-Elliot loss model or
  * its special cases  (Gilbert or Simple Gilbert)
  *
- * Makes a comparision between random number and the transition
+ * Makes a comparison between random number and the transition
  * probabilities outgoing from the current state, then decides the
- * next state. A second random number is extracted and the comparision
+ * next state. A second random number is extracted and the comparison
  * with the loss probability of the current state decides if the next
  * packet will be transmitted or lost.
  */
index 6b04287913cda3dcdc3573357d4856880eefb0bb..1a21c571aa034fc90db2a38d4606681af03f0669 100644 (file)
@@ -569,6 +569,8 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,
                sctp_assoc_set_primary(asoc, transport);
        if (asoc->peer.active_path == peer)
                asoc->peer.active_path = transport;
+       if (asoc->peer.retran_path == peer)
+               asoc->peer.retran_path = transport;
        if (asoc->peer.last_data_from == peer)
                asoc->peer.last_data_from = transport;
 
@@ -1323,6 +1325,8 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
 
        if (t)
                asoc->peer.retran_path = t;
+       else
+               t = asoc->peer.retran_path;
 
        SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association"
                                 " %p addr: ",
@@ -1593,7 +1597,7 @@ void sctp_assoc_clean_asconf_ack_cache(const struct sctp_association *asoc)
        struct sctp_chunk *ack;
        struct sctp_chunk *tmp;
 
-       /* We can remove all the entries from the queue upto
+       /* We can remove all the entries from the queue up to
         * the "Peer-Sequence-Number".
         */
        list_for_each_entry_safe(ack, tmp, &asoc->asconf_ack_list,
index ddbbf7c81fa1d62adf50600b6c788d6769ff5d32..865e68fef21c326c631183c7c7d5ded4ad842647 100644 (file)
@@ -113,7 +113,7 @@ struct sctp_shared_key *sctp_auth_shkey_create(__u16 key_id, gfp_t gfp)
        return new;
 }
 
-/* Free the shared key stucture */
+/* Free the shared key structure */
 static void sctp_auth_shkey_free(struct sctp_shared_key *sh_key)
 {
        BUG_ON(!list_empty(&sh_key->key_list));
@@ -122,7 +122,7 @@ static void sctp_auth_shkey_free(struct sctp_shared_key *sh_key)
        kfree(sh_key);
 }
 
-/* Destory the entire key list.  This is done during the
+/* Destroy the entire key list.  This is done during the
  * associon and endpoint free process.
  */
 void sctp_auth_destroy_keys(struct list_head *keys)
@@ -324,7 +324,7 @@ static struct sctp_auth_bytes *sctp_auth_asoc_create_secret(
        if (!peer_key_vector || !local_key_vector)
                goto out;
 
-       /* Figure out the order in wich the key_vectors will be
+       /* Figure out the order in which the key_vectors will be
         * added to the endpoint shared key.
         * SCTP-AUTH, Section 6.1:
         *   This is performed by selecting the numerically smaller key
index 826661be73e70f9e05824cc4f65f9e3d1e1cd712..5436c69211675a25101db263660cfffc45b84e29 100644 (file)
@@ -1034,7 +1034,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(
 *    association.
 *
 * This means that any chunks that can help us identify the association need
-* to be looked at to find this assocation.
+* to be looked at to find this association.
 */
 static struct sctp_association *__sctp_rcv_walk_lookup(struct sk_buff *skb,
                                      const union sctp_addr *laddr,
index 60600d337a3a9c6d4a589918dee8f18edf5f6961..b4f3cf06d8da7afd6f497d8e3dc1f3e3c7031afd 100644 (file)
@@ -510,7 +510,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
                sh->checksum = sctp_end_cksum(crc32);
        } else {
                if (dst->dev->features & NETIF_F_SCTP_CSUM) {
-                       /* no need to seed psuedo checksum for SCTP */
+                       /* no need to seed pseudo checksum for SCTP */
                        nskb->ip_summed = CHECKSUM_PARTIAL;
                        nskb->csum_start = (skb_transport_header(nskb) -
                                            nskb->head);
index 26dc005113a0972feb1f7f0a8eaa8503ee09504c..bf92a5b68f8bd0ad909630479bf465ea589f7e64 100644 (file)
@@ -177,13 +177,13 @@ static inline int sctp_cacc_skip_3_2(struct sctp_transport *primary, __u32 tsn)
  * 3) If the missing report count for TSN t is to be
  * incremented according to [RFC2960] and
  * [SCTP_STEWART-2002], and CHANGEOVER_ACTIVE is set,
- * then the sender MUST futher execute steps 3.1 and
+ * then the sender MUST further execute steps 3.1 and
  * 3.2 to determine if the missing report count for
  * TSN t SHOULD NOT be incremented.
  *
  * 3.3) If 3.1 and 3.2 do not dictate that the missing
  * report count for t should not be incremented, then
- * the sender SOULD increment missing report count for
+ * the sender SHOULD increment missing report count for
  * t (according to [RFC2960] and [SCTP_STEWART_2002]).
  */
 static inline int sctp_cacc_skip(struct sctp_transport *primary,
@@ -843,7 +843,7 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
                case SCTP_CID_ECN_CWR:
                case SCTP_CID_ASCONF_ACK:
                        one_packet = 1;
-                       /* Fall throught */
+                       /* Fall through */
 
                case SCTP_CID_SACK:
                case SCTP_CID_HEARTBEAT:
index de98665db52440b61b9ca5b688f3812ec96a6d79..b3434cc7d0cf960dc275938054f50c13016a0a42 100644 (file)
@@ -3106,10 +3106,10 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
 
        /* create an ASCONF_ACK chunk.
         * Based on the definitions of parameters, we know that the size of
-        * ASCONF_ACK parameters are less than or equal to the twice of ASCONF
+        * ASCONF_ACK parameters are less than or equal to the fourfold of ASCONF
         * parameters.
         */
-       asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2);
+       asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 4);
        if (!asconf_ack)
                goto done;
 
index b21b218d564f20f9f9b04e39412a0499377d8d62..5f86ee4b54c1113ba065b908bb7ada1b07e2b047 100644 (file)
@@ -482,7 +482,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc,
         * If the timer was a heartbeat, we only increment error counts
         * when we already have an outstanding HEARTBEAT that has not
         * been acknowledged.
-        * Additionaly, some tranport states inhibit error increments.
+        * Additionally, some tranport states inhibit error increments.
         */
        if (!is_hb) {
                asoc->overall_error_count++;
index 4b4eb7c96bbdb32027834f38ec4ad2f307e84616..76792083c3791f78c783d73083abb16d5d73d591 100644 (file)
@@ -551,7 +551,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
                 *
                 * This means that if we only want to abort associations
                 * in an authenticated way (i.e AUTH+ABORT), then we
-                * can't destroy this association just becuase the packet
+                * can't destroy this association just because the packet
                 * was malformed.
                 */
                if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc))
@@ -1546,7 +1546,7 @@ cleanup:
 }
 
 /*
- * Handle simultanous INIT.
+ * Handle simultaneous INIT.
  * This means we started an INIT and then we got an INIT request from
  * our peer.
  *
@@ -2079,7 +2079,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_abort(
         * RFC 2960, Section 3.3.7
         *    If an endpoint receives an ABORT with a format error or for an
         *    association that doesn't exist, it MUST silently discard it.
-        * Becasue the length is "invalid", we can't really discard just
+        * Because the length is "invalid", we can't really discard just
         * as we do not know its true length.  So, to be safe, discard the
         * packet.
         */
@@ -2120,7 +2120,7 @@ sctp_disposition_t sctp_sf_shutdown_sent_abort(const struct sctp_endpoint *ep,
         * RFC 2960, Section 3.3.7
         *    If an endpoint receives an ABORT with a format error or for an
         *    association that doesn't exist, it MUST silently discard it.
-        * Becasue the length is "invalid", we can't really discard just
+        * Because the length is "invalid", we can't really discard just
         * as we do not know its true length.  So, to be safe, discard the
         * packet.
         */
@@ -2381,7 +2381,7 @@ sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
         * RFC 2960, Section 3.3.7
         *    If an endpoint receives an ABORT with a format error or for an
         *    association that doesn't exist, it MUST silently discard it.
-        * Becasue the length is "invalid", we can't really discard just
+        * Because the length is "invalid", we can't really discard just
         * as we do not know its true length.  So, to be safe, discard the
         * packet.
         */
@@ -2448,7 +2448,7 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(const struct sctp_endpoint *ep,
         * RFC 2960, Section 3.3.7
         *    If an endpoint receives an ABORT with a format error or for an
         *    association that doesn't exist, it MUST silently discard it.
-        * Becasue the length is "invalid", we can't really discard just
+        * Because the length is "invalid", we can't really discard just
         * as we do not know its true length.  So, to be safe, discard the
         * packet.
         */
@@ -3855,7 +3855,7 @@ gen_shutdown:
 }
 
 /*
- * SCTP-AUTH Section 6.3 Receving authenticated chukns
+ * SCTP-AUTH Section 6.3 Receiving authenticated chukns
  *
  *    The receiver MUST use the HMAC algorithm indicated in the HMAC
  *    Identifier field.  If this algorithm was not specified by the
@@ -4231,7 +4231,7 @@ static sctp_disposition_t sctp_sf_abort_violation(
         *
         * This means that if we only want to abort associations
         * in an authenticated way (i.e AUTH+ABORT), then we
-        * can't destroy this association just becuase the packet
+        * can't destroy this association just because the packet
         * was malformed.
         */
        if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc))
@@ -4402,9 +4402,9 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
 }
 
 /* Handle protocol violation of an invalid chunk bundling.  For example,
- * when we have an association and we recieve bundled INIT-ACK, or
+ * when we have an association and we receive bundled INIT-ACK, or
  * SHUDOWN-COMPLETE, our peer is clearly violationg the "MUST NOT bundle"
- * statement from the specs.  Additinally, there might be an attacker
+ * statement from the specs.  Additionally, there might be an attacker
  * on the path and we may not want to continue this communication.
  */
 static sctp_disposition_t sctp_sf_violation_chunk(
index 3951a10605bc483a4eac1787ffb08cef97e7d8a2..deb82e35a107e89b9a2328445c46bc8935a143d6 100644 (file)
@@ -1193,7 +1193,7 @@ out_free:
  * an endpoint that is multi-homed.  Much like sctp_bindx() this call
  * allows a caller to specify multiple addresses at which a peer can be
  * reached.  The way the SCTP stack uses the list of addresses to set up
- * the association is implementation dependant.  This function only
+ * the association is implementation dependent.  This function only
  * specifies that the stack will try to make use of all the addresses in
  * the list when needed.
  *
index aa72e89c3ee1685ad6d4096c76072daf80937f16..61b1f5ada96a92aeb403c02c64694cb5e801106c 100644 (file)
@@ -554,7 +554,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_send_failed(
        memcpy(&ssf->ssf_info, &chunk->sinfo, sizeof(struct sctp_sndrcvinfo));
 
        /* Per TSVWG discussion with Randy. Allow the application to
-        * ressemble a fragmented message.
+        * reassemble a fragmented message.
         */
        ssf->ssf_info.sinfo_flags = chunk->chunk_hdr->flags;
 
index 17678189d0540df2895b2e867f5537d8192b9cdb..f2d1de7f2ffbd5a219759f55bdc546f2edbf19b0 100644 (file)
@@ -240,7 +240,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event)
                } else {
                        /*
                         * If fragment interleave is enabled, we
-                        * can queue this to the recieve queue instead
+                        * can queue this to the receive queue instead
                         * of the lobby.
                         */
                        if (sctp_sk(sk)->frag_interleave)
index 5212447c86e72b44a8ab91fabb05781b1a5026d0..310d16b1b3c9cbbb1d401f19f24c6a61d0df4404 100644 (file)
@@ -2986,7 +2986,7 @@ out:
 
 /* Since old style bridge ioctl's endup using SIOCDEVPRIVATE
  * for some operations; this forces use of the newer bridge-utils that
- * use compatiable ioctls
+ * use compatible ioctls
  */
 static int old_bridge_ioctl(compat_ulong_t __user *argp)
 {
index 8873fd8ddacd261ac03bc1bb7d5b7a236579baee..b2198e65d8bbec47798ccd841707e40c844dc908 100644 (file)
@@ -18,14 +18,13 @@ config SUNRPC_XPRT_RDMA
          If unsure, say N.
 
 config RPCSEC_GSS_KRB5
-       tristate
+       tristate "Secure RPC: Kerberos V mechanism"
        depends on SUNRPC && CRYPTO
-       prompt "Secure RPC: Kerberos V mechanism" if !(NFS_V4 || NFSD_V4)
+       depends on CRYPTO_MD5 && CRYPTO_DES && CRYPTO_CBC && CRYPTO_CTS
+       depends on CRYPTO_ECB && CRYPTO_HMAC && CRYPTO_SHA1 && CRYPTO_AES
+       depends on CRYPTO_ARC4
        default y
        select SUNRPC_GSS
-       select CRYPTO_MD5
-       select CRYPTO_DES
-       select CRYPTO_CBC
        help
          Choose Y here to enable Secure RPC using the Kerberos version 5
          GSS-API mechanism (RFC 1964).
index f3914d0c5079596d04af62417ca909693675a64f..339ba64cce1e2ee7134a2c9d09cd64f5fb9cb85e 100644 (file)
@@ -520,7 +520,7 @@ gss_refresh_upcall(struct rpc_task *task)
                warn_gssd();
                task->tk_timeout = 15*HZ;
                rpc_sleep_on(&pipe_version_rpc_waitqueue, task, NULL);
-               return 0;
+               return -EAGAIN;
        }
        if (IS_ERR(gss_msg)) {
                err = PTR_ERR(gss_msg);
@@ -563,10 +563,12 @@ retry:
        if (PTR_ERR(gss_msg) == -EAGAIN) {
                err = wait_event_interruptible_timeout(pipe_version_waitqueue,
                                pipe_version >= 0, 15*HZ);
+               if (pipe_version < 0) {
+                       warn_gssd();
+                       err = -EACCES;
+               }
                if (err)
                        goto out;
-               if (pipe_version < 0)
-                       warn_gssd();
                goto retry;
        }
        if (IS_ERR(gss_msg)) {
index 9022f0a6503e31dd6435da77fee3bda7694d4a53..0a9a2ec2e46983f0b73bf20d267721024c11646c 100644 (file)
@@ -427,7 +427,7 @@ static int
 context_derive_keys_rc4(struct krb5_ctx *ctx)
 {
        struct crypto_hash *hmac;
-       static const char sigkeyconstant[] = "signaturekey";
+       char sigkeyconstant[] = "signaturekey";
        int slen = strlen(sigkeyconstant) + 1;  /* include null terminator */
        struct hash_desc desc;
        struct scatterlist sg[1];
index bcdae78fdfc6b326c6918ec72de4530bbf8e2667..8d0f7d3c71c80864356c6106c36886609c8c3713 100644 (file)
@@ -1101,7 +1101,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp)
 
        /* credential is:
         *   version(==1), proc(0,1,2,3), seq, service (1,2,3), handle
-        * at least 5 u32s, and is preceeded by length, so that makes 6.
+        * at least 5 u32s, and is preceded by length, so that makes 6.
         */
 
        if (argv->iov_len < 5 * 4)
index e7a96e478f63a74da8e90e0f80748857f5c18fb0..8d83f9d487130bb7789fe0dc53201ec3aedc5a95 100644 (file)
@@ -1508,7 +1508,10 @@ call_timeout(struct rpc_task *task)
                if (clnt->cl_chatty)
                        printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
                                clnt->cl_protname, clnt->cl_server);
-               rpc_exit(task, -EIO);
+               if (task->tk_flags & RPC_TASK_TIMEOUT)
+                       rpc_exit(task, -ETIMEDOUT);
+               else
+                       rpc_exit(task, -EIO);
                return;
        }
 
index 9494c376735618c0f67fb3b9a0f88c70875062a4..ce5eb68a9664f6a93776304b304c80029efce84d 100644 (file)
@@ -906,6 +906,7 @@ void xprt_transmit(struct rpc_task *task)
        }
 
        dprintk("RPC: %5u xmit complete\n", task->tk_pid);
+       task->tk_flags |= RPC_TASK_SENT;
        spin_lock_bh(&xprt->transport_lock);
 
        xprt->ops->set_retrans_timeout(task);
index 1e336a06d3e6375af0221b5a65f9db7236c2c4a0..bf005d3c65efbffb46f5f05967de3806d9ac9b7d 100644 (file)
@@ -504,7 +504,7 @@ static int xs_nospace(struct rpc_task *task)
  *   EAGAIN:   The socket was blocked, please call again later to
  *             complete the request
  * ENOTCONN:   Caller needs to invoke connect logic then call again
- *    other:   Some other error occured, the request was not sent
+ *    other:   Some other error occurred, the request was not sent
  */
 static int xs_udp_send_request(struct rpc_task *task)
 {
@@ -590,7 +590,7 @@ static inline void xs_encode_tcp_record_marker(struct xdr_buf *buf)
  *   EAGAIN:   The socket was blocked, please call again later to
  *             complete the request
  * ENOTCONN:   Caller needs to invoke connect logic then call again
- *    other:   Some other error occured, the request was not sent
+ *    other:   Some other error occurred, the request was not sent
  *
  * XXX: In the case of soft timeouts, should we eventually give up
  *     if sendmsg is not able to make progress?
index 43639ff1cbec3480734d36b43bddd0bbffdcd717..ebf338f7b14e7651b57e788fbac1a5057d6a135d 100644 (file)
@@ -2471,7 +2471,7 @@ exit:
  * A pending message being re-assembled must store certain values
  * to handle subsequent fragments correctly. The following functions
  * help storing these values in unused, available fields in the
- * pending message. This makes dynamic memory allocation unecessary.
+ * pending message. This makes dynamic memory allocation unnecessary.
  */
 
 static void set_long_msg_seqno(struct sk_buff *buf, u32 seqno)
index c9fa6dfcf28756d5afe958c2a25fd0a7901a255a..80025a1b3bfda0b8e5b293305300a09ab768a021 100644 (file)
@@ -160,7 +160,7 @@ void tipc_named_withdraw(struct publication *publ)
 
        buf = named_prepare_buf(WITHDRAWAL, ITEM_SIZE, 0);
        if (!buf) {
-               warn("Withdrawl distribution failure\n");
+               warn("Withdrawal distribution failure\n");
                return;
        }
 
index 1663e1a2efdd3f206a5792d79667038c27f78299..b1d75beb7e20e8e3155a84be37161871023396ac 100644 (file)
@@ -207,7 +207,7 @@ static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned *hashp)
                /*
                 * This may look like an off by one error but it is a bit more
                 * subtle. 108 is the longest valid AF_UNIX path for a binding.
-                * sun_path[108] doesnt as such exist.  However in kernel space
+                * sun_path[108] doesn't as such exist.  However in kernel space
                 * we are guaranteed that it is a valid memory location in our
                 * kernel address buffer.
                 */
@@ -524,6 +524,8 @@ static int unix_dgram_connect(struct socket *, struct sockaddr *,
                              int, int);
 static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *,
                                  struct msghdr *, size_t);
+static int unix_seqpacket_recvmsg(struct kiocb *, struct socket *,
+                                 struct msghdr *, size_t, int);
 
 static const struct proto_ops unix_stream_ops = {
        .family =       PF_UNIX,
@@ -583,7 +585,7 @@ static const struct proto_ops unix_seqpacket_ops = {
        .setsockopt =   sock_no_setsockopt,
        .getsockopt =   sock_no_getsockopt,
        .sendmsg =      unix_seqpacket_sendmsg,
-       .recvmsg =      unix_dgram_recvmsg,
+       .recvmsg =      unix_seqpacket_recvmsg,
        .mmap =         sock_no_mmap,
        .sendpage =     sock_no_sendpage,
 };
@@ -1699,6 +1701,18 @@ static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock,
        return unix_dgram_sendmsg(kiocb, sock, msg, len);
 }
 
+static int unix_seqpacket_recvmsg(struct kiocb *iocb, struct socket *sock,
+                             struct msghdr *msg, size_t size,
+                             int flags)
+{
+       struct sock *sk = sock->sk;
+
+       if (sk->sk_state != TCP_ESTABLISHED)
+               return -ENOTCONN;
+
+       return unix_dgram_recvmsg(iocb, sock, msg, size, flags);
+}
+
 static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
 {
        struct unix_sock *u = unix_sk(sk);
index 11f25c7a7a0504baa1c906f28ce452674f45f968..f346395314ba8ba6ba9c3754c91bcf18b735b80f 100644 (file)
@@ -51,7 +51,7 @@
 
 /*
  *     Structures for interfacing with the /proc filesystem.
- *     Router creates its own directory /proc/net/router with the folowing
+ *     Router creates its own directory /proc/net/router with the following
  *     entries:
  *     config          device configuration
  *     status          global device statistics
index 3332d5bce31796b228a630edc69e0a15e019ff4c..ab801a1097b2aa924c935805ce8e8a1656e39254 100644 (file)
@@ -809,7 +809,7 @@ static void handle_channel(struct wiphy *wiphy,
        if (r) {
                /*
                 * We will disable all channels that do not match our
-                * recieved regulatory rule unless the hint is coming
+                * received regulatory rule unless the hint is coming
                 * from a Country IE and the Country IE had no information
                 * about a band. The IEEE 802.11 spec allows for an AP
                 * to send only a subset of the regulatory rules allowed,
@@ -838,7 +838,7 @@ static void handle_channel(struct wiphy *wiphy,
            request_wiphy && request_wiphy == wiphy &&
            request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) {
                /*
-                * This gaurantees the driver's requested regulatory domain
+                * This guarantees the driver's requested regulatory domain
                 * will always be used as a base for further regulatory
                 * settings
                 */
index ea427f418f641c28f3b19b62fce74984ae86d8fd..fbf6f33ae4d0558c68d71efc418db67cedfc8796 100644 (file)
@@ -123,6 +123,15 @@ void cfg80211_bss_age(struct cfg80211_registered_device *dev,
        }
 }
 
+/* must hold dev->bss_lock! */
+static void __cfg80211_unlink_bss(struct cfg80211_registered_device *dev,
+                                 struct cfg80211_internal_bss *bss)
+{
+       list_del_init(&bss->list);
+       rb_erase(&bss->rbn, &dev->bss_tree);
+       kref_put(&bss->ref, bss_release);
+}
+
 /* must hold dev->bss_lock! */
 void cfg80211_bss_expire(struct cfg80211_registered_device *dev)
 {
@@ -134,9 +143,7 @@ void cfg80211_bss_expire(struct cfg80211_registered_device *dev)
                        continue;
                if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE))
                        continue;
-               list_del(&bss->list);
-               rb_erase(&bss->rbn, &dev->bss_tree);
-               kref_put(&bss->ref, bss_release);
+               __cfg80211_unlink_bss(dev, bss);
                expired = true;
        }
 
@@ -585,16 +592,23 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
        struct cfg80211_internal_bss *res;
        size_t ielen = len - offsetof(struct ieee80211_mgmt,
                                      u.probe_resp.variable);
-       size_t privsz = wiphy->bss_priv_size;
+       size_t privsz;
+
+       if (WARN_ON(!mgmt))
+               return NULL;
+
+       if (WARN_ON(!wiphy))
+               return NULL;
 
        if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC &&
                    (signal < 0 || signal > 100)))
                return NULL;
 
-       if (WARN_ON(!mgmt || !wiphy ||
-                   len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable)))
+       if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable)))
                return NULL;
 
+       privsz = wiphy->bss_priv_size;
+
        res = kzalloc(sizeof(*res) + privsz + ielen, gfp);
        if (!res)
                return NULL;
@@ -662,11 +676,8 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
 
        spin_lock_bh(&dev->bss_lock);
        if (!list_empty(&bss->list)) {
-               list_del_init(&bss->list);
+               __cfg80211_unlink_bss(dev, bss);
                dev->bss_generation++;
-               rb_erase(&bss->rbn, &dev->bss_tree);
-
-               kref_put(&bss->ref, bss_release);
        }
        spin_unlock_bh(&dev->bss_lock);
 }
index 406207515b5e509de3a55b9438dafecec9b1dc7d..f77e4e75f914b3a164e55ebf549ad32ec09f9b9c 100644 (file)
@@ -31,7 +31,7 @@
  * x25_parse_facilities - Parse facilities from skb into the facilities structs
  *
  * @skb: sk_buff to parse
- * @facilities: Regular facilites, updated as facilities are found
+ * @facilities: Regular facilities, updated as facilities are found
  * @dte_facs: ITU DTE facilities, updated as DTE facilities are found
  * @vc_fac_mask: mask is updated with all facilities found
  *
index 25a81079396863af36ac7e2eedb27c1d43c00b1d..c541b622ae16a78eee5fb4ebe4d284630dd6a427 100644 (file)
@@ -31,7 +31,7 @@ int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from,
                goto out_no_route;
 
        if ((neigh_new = x25_get_neigh(rt->dev)) == NULL) {
-               /* This shouldnt happen, if it occurs somehow
+               /* This shouldn't happen, if it occurs somehow
                 * do something sensible
                 */
                goto out_put_route;
@@ -45,7 +45,7 @@ int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from,
        }
 
        /* Remote end sending a call request on an already
-        * established LCI? It shouldnt happen, just in case..
+        * established LCI? It shouldn't happen, just in case..
         */
        read_lock_bh(&x25_forward_list_lock);
        list_for_each(entry, &x25_forward_list) {
index f218385950ca06a3a8b6830c51c29ac370ca2ea0..e8a781422feb46b9c456438c47a3324dc7edcdbf 100644 (file)
@@ -532,7 +532,7 @@ int xfrm_init_replay(struct xfrm_state *x)
 
        if (replay_esn) {
                if (replay_esn->replay_window >
-                   replay_esn->bmp_len * sizeof(__u32))
+                   replay_esn->bmp_len * sizeof(__u32) * 8)
                        return -EINVAL;
 
        if ((x->props.flags & XFRM_STATE_ESN) && x->replay_esn)
index 3d15d3e1b2c49b7c124cd08d42ed5a1a77849c57..c658cb3bc7c3ccf213fffee288f8b211a2c93293 100644 (file)
@@ -124,6 +124,9 @@ static inline int verify_replay(struct xfrm_usersa_info *p,
 {
        struct nlattr *rt = attrs[XFRMA_REPLAY_ESN_VAL];
 
+       if ((p->flags & XFRM_STATE_ESN) && !rt)
+               return -EINVAL;
+
        if (!rt)
                return 0;
 
@@ -894,7 +897,7 @@ static int build_spdinfo(struct sk_buff *skb, struct net *net,
        u32 *f;
 
        nlh = nlmsg_put(skb, pid, seq, XFRM_MSG_NEWSPDINFO, sizeof(u32), 0);
-       if (nlh == NULL) /* shouldnt really happen ... */
+       if (nlh == NULL) /* shouldn't really happen ... */
                return -EMSGSIZE;
 
        f = nlmsg_data(nlh);
@@ -954,7 +957,7 @@ static int build_sadinfo(struct sk_buff *skb, struct net *net,
        u32 *f;
 
        nlh = nlmsg_put(skb, pid, seq, XFRM_MSG_NEWSADINFO, sizeof(u32), 0);
-       if (nlh == NULL) /* shouldnt really happen ... */
+       if (nlh == NULL) /* shouldn't really happen ... */
                return -EMSGSIZE;
 
        f = nlmsg_data(nlh);
@@ -1361,7 +1364,7 @@ static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
        if (!xp)
                return err;
 
-       /* shouldnt excl be based on nlh flags??
+       /* shouldn't excl be based on nlh flags??
         * Aha! this is anti-netlink really i.e  more pfkey derived
         * in netlink excl is a flag and you wouldnt need
         * a type XFRM_MSG_UPDPOLICY - JHS */
index e03cf0e374d7e85e72ec93f8ae23e1d5cb480544..41063e7592d2392b231c42cf86b4144d5f7a34b4 100644 (file)
@@ -55,7 +55,7 @@ config SAMPLE_KFIFO
          If in doubt, say "N" here.
 
 config SAMPLE_KDB
-       tristate "Build kdb command exmaple -- loadable modules only"
+       tristate "Build kdb command example -- loadable modules only"
        depends on KGDB_KDB && m
        help
          Build an example of how to dynamically add the hello
index bd0f337afcabfc9ffa9f8008f694fb1f6b0c0152..063653955f9fd7690ba5f588541c2dd288500958 100644 (file)
@@ -19,7 +19,7 @@
  *
  * This file is a kernel module that places a breakpoint over ksym_name kernel
  * variable using Hardware Breakpoint register. The corresponding handler which
- * prints a backtrace is invoked everytime a write operation is performed on
+ * prints a backtrace is invoked every time a write operation is performed on
  * that variable.
  *
  * Copyright (C) IBM Corporation, 2009
index 7d22056582c11619013fbe38ea2c8c126dbab6d9..56dfafc73c1a4559ee63c01b5a4d35dda0f2df73 100644 (file)
 # KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined
 # symbols in the final module linking stage
 # KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
-# This is solely usefull to speed up test compiles
+# This is solely useful to speed up test compiles
 PHONY := _modpost
 _modpost: __modpost
 
 include include/config/auto.conf
 include scripts/Kbuild.include
 
-# When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info
+# When building external modules load the Kbuild file to retrieve EXTRA_SYMBOLS info
 ifneq ($(KBUILD_EXTMOD),)
 
 # set src + obj - they may be used when building the .mod.c file
index 8f9e394298cda6cb17edd29b5239d0a134732650..d8670810db65f664623a18f991a88a7a72a00d5b 100755 (executable)
@@ -1946,13 +1946,13 @@ sub process {
 # printk should use KERN_* levels.  Note that follow on printk's on the
 # same line do not need a level, so we use the current block context
 # to try and find and validate the current printk.  In summary the current
-# printk includes all preceeding printk's which have no newline on the end.
+# printk includes all preceding printk's which have no newline on the end.
 # we assume the first bad printk is the one to report.
                if ($line =~ /\bprintk\((?!KERN_)\s*"/) {
                        my $ok = 0;
                        for (my $ln = $linenr - 1; $ln >= $first_line; $ln--) {
                                #print "CHECK<$lines[$ln - 1]\n";
-                               # we have a preceeding printk if it ends
+                               # we have a preceding printk if it ends
                                # with "\n" ignore it, else it is to blame
                                if ($lines[$ln - 1] =~ m{\bprintk\(}) {
                                        if ($rawlines[$ln - 1] !~ m{\\n"}) {
@@ -2044,7 +2044,7 @@ sub process {
                        for (my $n = 0; $n < $#elements; $n += 2) {
                                $off += length($elements[$n]);
 
-                               # Pick up the preceeding and succeeding characters.
+                               # Pick up the preceding and succeeding characters.
                                my $ca = substr($opline, 0, $off);
                                my $cc = '';
                                if (length($opline) >= ($off + length($elements[$n + 1]))) {
index ce80e4fb41b2b35533a54ac1b0b7fa47a1b53c9b..ff6246f000ce1267f3efaa5432772b7550273623 100644 (file)
@@ -61,7 +61,7 @@
 #define FDT_ERR_NOTFOUND       1
        /* FDT_ERR_NOTFOUND: The requested node or property does not exist */
 #define FDT_ERR_EXISTS         2
-       /* FDT_ERR_EXISTS: Attemped to create a node or property which
+       /* FDT_ERR_EXISTS: Attempted to create a node or property which
         * already exists */
 #define FDT_ERR_NOSPACE                3
        /* FDT_ERR_NOSPACE: Operation needed to expand the device
index c9209d5c999e48d77f39cb13a86ec49efd9c2b8a..26d0e1e60c0ca546fda76f1a6efcd1e07acf7acf 100644 (file)
@@ -155,7 +155,7 @@ struct node *merge_nodes(struct node *old_node, struct node *new_node)
                        }
                }
 
-               /* if no collision occured, add child to the old node. */
+               /* if no collision occurred, add child to the old node. */
                if (new_child)
                        add_child(old_node, new_child);
        }
index 55caecdad995b18940ce746650e45502f2fd11f0..e12b1a7525cf0b040c10252670cd98ae89566b42 100644 (file)
@@ -284,7 +284,7 @@ while [ $# -gt 0 ]; do
 done
 
 # If output_file is set we will generate cpio archive and compress it
-# we are carefull to delete tmp files
+# we are careful to delete tmp files
 if [ ! -z ${output_file} ]; then
        if [ -z ${cpio_file} ]; then
                cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)"
index 659326c3e89579b09f86077dbcbe5e1eb3a12d28..006ad817cd5f003023a7308b471eb9c4e46ba5de 100644 (file)
@@ -332,7 +332,7 @@ static int conf_choice(struct menu *menu)
                }
                if (!child)
                        continue;
-               if (line[strlen(line) - 1] == '?') {
+               if (line[0] && line[strlen(line) - 1] == '?') {
                        print_help(child);
                        continue;
                }
index 9f85012acf0d2fb749a4ded8bb962d514d524c03..d793001929cf40c0e3a773927ac047878a81df30 100755 (executable)
@@ -1705,7 +1705,7 @@ sub push_parameter($$$) {
 
        $param = xml_escape($param);
 
-       # strip spaces from $param so that it is one continous string
+       # strip spaces from $param so that it is one continuous string
        # on @parameterlist;
        # this fixes a problem where check_sections() cannot find
        # a parameter like "addr[6 + 2]" because it actually appears
index 83c9c04102f2bc9fd06d783d31df60eb5e793c5d..8a7b15598ea96c02890050e901d846a0916c7240 100644 (file)
@@ -92,7 +92,7 @@ case "${ARCH}" in
                echo "" >&2
                echo '** ** **  WARNING  ** ** **' >&2
                echo "" >&2
-               echo "Your architecture did not define any architecture-dependant files" >&2
+               echo "Your architecture did not define any architecture-dependent files" >&2
                echo "to be placed into the tarball. Please add those to ${0} ..." >&2
                echo "" >&2
                sleep 5
index 8c81d76959eee335062d090257aa20a383cac423..34186cac1d2ffaff30bca6e0065be69f9e50c7f5 100644 (file)
@@ -180,7 +180,7 @@ while 1:
                 for s in stat:
                    s = s.strip()
                     if s.startswith(testop[0]):
-                        # Seperate status value
+                        # Separate status value
                         val = s[2:].strip()
                         query = analyse(val, testop, dat)
                         break
index 5cb4dc1f699245de14b95111c4ae8ff24e044e57..06d764ccbbe5533f3e77a7d6b00a6bb3c7d3614b 100644 (file)
@@ -195,7 +195,7 @@ void aa_dfa_free_kref(struct kref *kref)
  *
  * Unpack a dfa that has been serialized.  To find information on the dfa
  * format look in Documentation/apparmor.txt
- * Assumes the dfa @blob stream has been aligned on a 8 byte boundry
+ * Assumes the dfa @blob stream has been aligned on a 8 byte boundary
  *
  * Returns: an unpacked dfa ready for matching or ERR_PTR on failure
  */
index eb3700e9fd37ca3786484bba16c3fcc783a52c63..e33aaf7e5744fcec9fd65d0e5974d13303fff506 100644 (file)
@@ -359,7 +359,7 @@ fail:
  * @e: serialized data extent information  (NOT NULL)
  * @profile: profile to add the accept table to (NOT NULL)
  *
- * Returns: 1 if table succesfully unpacked
+ * Returns: 1 if table successfully unpacked
  */
 static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
 {
index 2984ea4f776f0c6cd683d36eb64d096be1ebe337..bbb51156261b723904499c81d563e5632e758bb2 100644 (file)
@@ -181,7 +181,7 @@ static int cap_inode_follow_link(struct dentry *dentry,
        return 0;
 }
 
-static int cap_inode_permission(struct inode *inode, int mask)
+static int cap_inode_permission(struct inode *inode, int mask, unsigned flags)
 {
        return 0;
 }
index 101142369db45c0846ca3dbe064b90a2ea83fbf9..4ba6d4cc061f294142b126b962a99986a1285a6c 100644 (file)
@@ -518,16 +518,14 @@ int security_inode_permission(struct inode *inode, int mask)
 {
        if (unlikely(IS_PRIVATE(inode)))
                return 0;
-       return security_ops->inode_permission(inode, mask);
+       return security_ops->inode_permission(inode, mask, 0);
 }
 
 int security_inode_exec_permission(struct inode *inode, unsigned int flags)
 {
        if (unlikely(IS_PRIVATE(inode)))
                return 0;
-       if (flags)
-               return -ECHILD;
-       return security_ops->inode_permission(inode, MAY_EXEC);
+       return security_ops->inode_permission(inode, MAY_EXEC, flags);
 }
 
 int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
index 9da6420e2056541f330d85e41be66f4742691e2b..1d027e29ce8d5400c9d4a681d52f2f28025aacd2 100644 (file)
@@ -471,6 +471,7 @@ static void avc_audit_post_callback(struct audit_buffer *ab, void *a)
  * @avd: access vector decisions
  * @result: result from avc_has_perm_noaudit
  * @a:  auxiliary audit data
+ * @flags: VFS walk flags
  *
  * Audit the granting or denial of permissions in accordance
  * with the policy.  This function is typically called by
@@ -481,9 +482,10 @@ static void avc_audit_post_callback(struct audit_buffer *ab, void *a)
  * be performed under a lock, to allow the lock to be released
  * before calling the auditing code.
  */
-void avc_audit(u32 ssid, u32 tsid,
+int avc_audit(u32 ssid, u32 tsid,
               u16 tclass, u32 requested,
-              struct av_decision *avd, int result, struct common_audit_data *a)
+              struct av_decision *avd, int result, struct common_audit_data *a,
+              unsigned flags)
 {
        struct common_audit_data stack_data;
        u32 denied, audited;
@@ -515,11 +517,24 @@ void avc_audit(u32 ssid, u32 tsid,
        else
                audited = requested & avd->auditallow;
        if (!audited)
-               return;
+               return 0;
+
        if (!a) {
                a = &stack_data;
                COMMON_AUDIT_DATA_INIT(a, NONE);
        }
+
+       /*
+        * When in a RCU walk do the audit on the RCU retry.  This is because
+        * the collection of the dname in an inode audit message is not RCU
+        * safe.  Note this may drop some audits when the situation changes
+        * during retry. However this is logically just as if the operation
+        * happened a little later.
+        */
+       if ((a->type == LSM_AUDIT_DATA_FS) &&
+           (flags & IPERM_FLAG_RCU))
+               return -ECHILD;
+
        a->selinux_audit_data.tclass = tclass;
        a->selinux_audit_data.requested = requested;
        a->selinux_audit_data.ssid = ssid;
@@ -529,6 +544,7 @@ void avc_audit(u32 ssid, u32 tsid,
        a->lsm_pre_audit = avc_audit_pre_callback;
        a->lsm_post_audit = avc_audit_post_callback;
        common_lsm_audit(a);
+       return 0;
 }
 
 /**
@@ -793,6 +809,7 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,
  * @tclass: target security class
  * @requested: requested permissions, interpreted based on @tclass
  * @auditdata: auxiliary audit data
+ * @flags: VFS walk flags
  *
  * Check the AVC to determine whether the @requested permissions are granted
  * for the SID pair (@ssid, @tsid), interpreting the permissions
@@ -802,14 +819,19 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,
  * permissions are granted, -%EACCES if any permissions are denied, or
  * another -errno upon other errors.
  */
-int avc_has_perm(u32 ssid, u32 tsid, u16 tclass,
-                u32 requested, struct common_audit_data *auditdata)
+int avc_has_perm_flags(u32 ssid, u32 tsid, u16 tclass,
+                      u32 requested, struct common_audit_data *auditdata,
+                      unsigned flags)
 {
        struct av_decision avd;
-       int rc;
+       int rc, rc2;
 
        rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, 0, &avd);
-       avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata);
+
+       rc2 = avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata,
+                       flags);
+       if (rc2)
+               return rc2;
        return rc;
 }
 
index f9c3764e48590e5737a0afddb63043b25675f23b..8fb248843009de5e6b71a01cae7b884cd597ba36 100644 (file)
@@ -1446,8 +1446,11 @@ static int task_has_capability(struct task_struct *tsk,
        }
 
        rc = avc_has_perm_noaudit(sid, sid, sclass, av, 0, &avd);
-       if (audit == SECURITY_CAP_AUDIT)
-               avc_audit(sid, sid, sclass, av, &avd, rc, &ad);
+       if (audit == SECURITY_CAP_AUDIT) {
+               int rc2 = avc_audit(sid, sid, sclass, av, &avd, rc, &ad, 0);
+               if (rc2)
+                       return rc2;
+       }
        return rc;
 }
 
@@ -1467,7 +1470,8 @@ static int task_has_system(struct task_struct *tsk,
 static int inode_has_perm(const struct cred *cred,
                          struct inode *inode,
                          u32 perms,
-                         struct common_audit_data *adp)
+                         struct common_audit_data *adp,
+                         unsigned flags)
 {
        struct inode_security_struct *isec;
        struct common_audit_data ad;
@@ -1487,7 +1491,7 @@ static int inode_has_perm(const struct cred *cred,
                ad.u.fs.inode = inode;
        }
 
-       return avc_has_perm(sid, isec->sid, isec->sclass, perms, adp);
+       return avc_has_perm_flags(sid, isec->sid, isec->sclass, perms, adp, flags);
 }
 
 /* Same as inode_has_perm, but pass explicit audit data containing
@@ -1504,7 +1508,7 @@ static inline int dentry_has_perm(const struct cred *cred,
        COMMON_AUDIT_DATA_INIT(&ad, FS);
        ad.u.fs.path.mnt = mnt;
        ad.u.fs.path.dentry = dentry;
-       return inode_has_perm(cred, inode, av, &ad);
+       return inode_has_perm(cred, inode, av, &ad, 0);
 }
 
 /* Check whether a task can use an open file descriptor to
@@ -1540,7 +1544,7 @@ static int file_has_perm(const struct cred *cred,
        /* av is zero if only checking access to the descriptor. */
        rc = 0;
        if (av)
-               rc = inode_has_perm(cred, inode, av, &ad);
+               rc = inode_has_perm(cred, inode, av, &ad, 0);
 
 out:
        return rc;
@@ -1574,7 +1578,8 @@ static int may_create(struct inode *dir,
                return rc;
 
        if (!newsid || !(sbsec->flags & SE_SBLABELSUPP)) {
-               rc = security_transition_sid(sid, dsec->sid, tclass, NULL, &newsid);
+               rc = security_transition_sid(sid, dsec->sid, tclass,
+                                            &dentry->d_name, &newsid);
                if (rc)
                        return rc;
        }
@@ -2103,7 +2108,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
                        file = file_priv->file;
                        inode = file->f_path.dentry->d_inode;
                        if (inode_has_perm(cred, inode,
-                                          FILE__READ | FILE__WRITE, NULL)) {
+                                          FILE__READ | FILE__WRITE, NULL, 0)) {
                                drop_tty = 1;
                        }
                }
@@ -2635,7 +2640,7 @@ static int selinux_inode_follow_link(struct dentry *dentry, struct nameidata *na
        return dentry_has_perm(cred, NULL, dentry, FILE__READ);
 }
 
-static int selinux_inode_permission(struct inode *inode, int mask)
+static int selinux_inode_permission(struct inode *inode, int mask, unsigned flags)
 {
        const struct cred *cred = current_cred();
        struct common_audit_data ad;
@@ -2657,7 +2662,7 @@ static int selinux_inode_permission(struct inode *inode, int mask)
 
        perms = file_mask_to_av(inode->i_mode, mask);
 
-       return inode_has_perm(cred, inode, perms, &ad);
+       return inode_has_perm(cred, inode, perms, &ad, flags);
 }
 
 static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
@@ -3205,7 +3210,7 @@ static int selinux_dentry_open(struct file *file, const struct cred *cred)
         * new inode label or new policy.
         * This check is not redundant - do not remove.
         */
-       return inode_has_perm(cred, inode, open_file_to_av(file), NULL);
+       return inode_has_perm(cred, inode, open_file_to_av(file), NULL, 0);
 }
 
 /* task security operations */
index 5615081b73eca403e438678fcea782dc06e580e3..e77b2ac2908b7f754113bb6dd5023427da5f35fb 100644 (file)
@@ -54,11 +54,11 @@ struct avc_cache_stats {
 
 void __init avc_init(void);
 
-void avc_audit(u32 ssid, u32 tsid,
+int avc_audit(u32 ssid, u32 tsid,
               u16 tclass, u32 requested,
               struct av_decision *avd,
               int result,
-              struct common_audit_data *a);
+             struct common_audit_data *a, unsigned flags);
 
 #define AVC_STRICT 1 /* Ignore permissive mode. */
 int avc_has_perm_noaudit(u32 ssid, u32 tsid,
@@ -66,9 +66,17 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,
                         unsigned flags,
                         struct av_decision *avd);
 
-int avc_has_perm(u32 ssid, u32 tsid,
-                u16 tclass, u32 requested,
-                struct common_audit_data *auditdata);
+int avc_has_perm_flags(u32 ssid, u32 tsid,
+                      u16 tclass, u32 requested,
+                      struct common_audit_data *auditdata,
+                      unsigned);
+
+static inline int avc_has_perm(u32 ssid, u32 tsid,
+                              u16 tclass, u32 requested,
+                              struct common_audit_data *auditdata)
+{
+       return avc_has_perm_flags(ssid, tsid, tclass, requested, auditdata, 0);
+}
 
 u32 avc_policy_seqno(void);
 
index 1c2fc46544bf65bb5165b5d22af806e1659737a3..c3bf3ed07b06275b6e71f3f07177e327b42e9e5b 100644 (file)
@@ -151,7 +151,7 @@ void selinux_netlbl_sk_security_free(struct sk_security_struct *sksec)
  *
  * Description:
  * Called when the NetLabel state of a sk_security_struct needs to be reset.
- * The caller is responsibile for all the NetLabel sk_security_struct locking.
+ * The caller is responsible for all the NetLabel sk_security_struct locking.
  *
  */
 void selinux_netlbl_sk_security_reset(struct sk_security_struct *sksec)
index e7b850ad57ee1547018ff37c4c3bb496d6bccb21..e6e7ce0d3d5546a052f1e2a66568536e398c9c1a 100644 (file)
@@ -502,7 +502,7 @@ static int policydb_index(struct policydb *p)
                goto out;
 
        rc = flex_array_prealloc(p->type_val_to_struct_array, 0,
-                                p->p_types.nprim - 1, GFP_KERNEL | __GFP_ZERO);
+                                p->p_types.nprim, GFP_KERNEL | __GFP_ZERO);
        if (rc)
                goto out;
 
@@ -519,7 +519,7 @@ static int policydb_index(struct policydb *p)
                        goto out;
 
                rc = flex_array_prealloc(p->sym_val_to_name[i],
-                                        0, p->symtab[i].nprim - 1,
+                                        0, p->symtab[i].nprim,
                                         GFP_KERNEL | __GFP_ZERO);
                if (rc)
                        goto out;
@@ -2375,7 +2375,7 @@ int policydb_read(struct policydb *p, void *fp)
                goto bad;
 
        /* preallocate so we don't have to worry about the put ever failing */
-       rc = flex_array_prealloc(p->type_attr_map_array, 0, p->p_types.nprim - 1,
+       rc = flex_array_prealloc(p->type_attr_map_array, 0, p->p_types.nprim,
                                 GFP_KERNEL | __GFP_ZERO);
        if (rc)
                goto bad;
index ea7c01f4a2bf8388f27beda3e8c33d25baf7914f..6ef4af47dac497be5b8b2cc2ed64aeab4c3ee936 100644 (file)
@@ -2806,7 +2806,7 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **vrule)
        case AUDIT_SUBJ_CLR:
        case AUDIT_OBJ_LEV_LOW:
        case AUDIT_OBJ_LEV_HIGH:
-               /* we do not allow a range, indicated by the presense of '-' */
+               /* we do not allow a range, indicated by the presence of '-' */
                if (strchr(rulestr, '-'))
                        return -EINVAL;
                break;
@@ -3075,7 +3075,7 @@ static void security_netlbl_cache_add(struct netlbl_lsm_secattr *secattr,
  * Description:
  * Convert the given NetLabel security attributes in @secattr into a
  * SELinux SID.  If the @secattr field does not contain a full SELinux
- * SID/context then use SECINITSID_NETMSG as the foundation.  If possibile the
+ * SID/context then use SECINITSID_NETMSG as the foundation.  If possible the
  * 'cache' field of @secattr is set and the CACHE flag is set; this is to
  * allow the @secattr to be used by NetLabel to cache the secattr to SID
  * conversion for future lookups.  Returns zero on success, negative values on
index 86453db4333d2b4f5973f04ecc8563986871bac3..9637e107f7ea6366f719f1af284c4c82f3e1e755 100644 (file)
@@ -431,7 +431,7 @@ char *smk_import(const char *string, int len)
  * smack_from_secid - find the Smack label associated with a secid
  * @secid: an integer that might be associated with a Smack label
  *
- * Returns a pointer to the appropraite Smack label if there is one,
+ * Returns a pointer to the appropriate Smack label if there is one,
  * otherwise a pointer to the invalid Smack label.
  */
 char *smack_from_secid(const u32 secid)
index 23c7a6d0c80c5d33d2a9605e4c8ae92ed1e04739..400a5d5cde6183c9bc3c6d348f58b623e2821b46 100644 (file)
@@ -686,7 +686,7 @@ static int smack_inode_rename(struct inode *old_inode,
  *
  * Returns 0 if access is permitted, -EACCES otherwise
  */
-static int smack_inode_permission(struct inode *inode, int mask)
+static int smack_inode_permission(struct inode *inode, int mask, unsigned flags)
 {
        struct smk_audit_info ad;
 
@@ -696,6 +696,10 @@ static int smack_inode_permission(struct inode *inode, int mask)
         */
        if (mask == 0)
                return 0;
+
+       /* May be droppable after audit */
+       if (flags & IPERM_FLAG_RCU)
+               return -ECHILD;
        smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_FS);
        smk_ad_setfield_u_fs_inode(&ad, inode);
        return smk_curacc(smk_of_inode(inode), mask, &ad);
@@ -1794,7 +1798,7 @@ static void smack_set_catset(char *catset, struct netlbl_lsm_secattr *sap)
  * Casey says that CIPSO is good enough for now.
  * It can be used to effect.
  * It can also be abused to effect when necessary.
- * Appologies to the TSIG group in general and GW in particular.
+ * Apologies to the TSIG group in general and GW in particular.
  */
 static void smack_to_secattr(char *smack, struct netlbl_lsm_secattr *nlsp)
 {
@@ -2530,7 +2534,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
        switch (sbp->s_magic) {
        case SMACK_MAGIC:
                /*
-                * Casey says that it's a little embarassing
+                * Casey says that it's a little embarrassing
                 * that the smack file system doesn't do
                 * extended attributes.
                 */
@@ -3084,7 +3088,7 @@ static int smack_inet_conn_request(struct sock *sk, struct sk_buff *skb,
        /*
         * We need to decide if we want to label the incoming connection here
         * if we do we only need to label the request_sock and the stack will
-        * propogate the wire-label to the sock when it is created.
+        * propagate the wire-label to the sock when it is created.
         */
        hdr = ip_hdr(skb);
        addr.sin_addr.s_addr = hdr->saddr;
index 90d1bbaaa6f3aa31c8b844f5d6543e924e471cc9..f93460156dce640cd3bdcf636d66a4158a52283f 100644 (file)
@@ -208,7 +208,7 @@ static ssize_t smk_write_load_list(struct file *file, const char __user *buf,
        if (*ppos != 0)
                return -EINVAL;
        /*
-        * Minor hack for backward compatability
+        * Minor hack for backward compatibility
         */
        if (count < (SMK_OLOADLEN) || count > SMK_LOADLEN)
                return -EINVAL;
@@ -223,7 +223,7 @@ static ssize_t smk_write_load_list(struct file *file, const char __user *buf,
        }
 
        /*
-        * More on the minor hack for backward compatability
+        * More on the minor hack for backward compatibility
         */
        if (count == (SMK_OLOADLEN))
                data[SMK_OLOADLEN] = '-';
@@ -927,7 +927,7 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf,
                }
        } else {
                /* we delete the unlabeled entry, only if the previous label
-                * wasnt the special CIPSO option */
+                * wasn't the special CIPSO option */
                if (skp->smk_label != smack_cipso_option)
                        rc = netlbl_cfg_unlbl_static_del(&init_net, NULL,
                                        &skp->smk_host.sin_addr, &skp->smk_mask,
index bbada7ca1b910c38fa0ec0a0911035c1d1428806..3312e5624f246d0a663077ab24a4407ce4aafbdb 100644 (file)
@@ -23,7 +23,7 @@ static bool tomoyo_policy_loader_exists(void)
         * If the initrd includes /sbin/init but real-root-dev has not
         * mounted on / yet, activating MAC will block the system since
         * policies are not loaded yet.
-        * Thus, let do_execve() call this function everytime.
+        * Thus, let do_execve() call this function every time.
         */
        struct path path;
 
index 8808b82311b1eb207a2fb3306548666ad6dd6a8b..76e0d56950751a8a60074d5a9a7df6232a1ee472 100644 (file)
@@ -140,6 +140,9 @@ int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream)
        if (!prtd || !prtd->params)
                return 0;
 
+       if (prtd->dma_ch == -1)
+               return -EINVAL;
+
        DCSR(prtd->dma_ch) &= ~DCSR_RUN;
        DCSR(prtd->dma_ch) = 0;
        DCMD(prtd->dma_ch) = 0;
index 917e4055ee30fdc37d6726e8af2f8d4d07506410..150cb7edffee44948cd3600b75b5cb37de1c9484 100644 (file)
@@ -253,7 +253,7 @@ static int snd_pcm_lib_preallocate_pages1(struct snd_pcm_substream *substream,
  * snd_pcm_lib_preallocate_pages - pre-allocation for the given DMA type
  * @substream: the pcm substream instance
  * @type: DMA type (SNDRV_DMA_TYPE_*)
- * @data: DMA type dependant data
+ * @data: DMA type dependent data
  * @size: the requested pre-allocation size in bytes
  * @max: the max. allowed pre-allocation size
  *
@@ -278,10 +278,10 @@ int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream,
 EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages);
 
 /**
- * snd_pcm_lib_preallocate_pages_for_all - pre-allocation for continous memory type (all substreams)
+ * snd_pcm_lib_preallocate_pages_for_all - pre-allocation for continuous memory type (all substreams)
  * @pcm: the pcm instance
  * @type: DMA type (SNDRV_DMA_TYPE_*)
- * @data: DMA type dependant data
+ * @data: DMA type dependent data
  * @size: the requested pre-allocation size in bytes
  * @max: the max. allowed pre-allocation size
  *
index fe5c8036bebaf3d9850ce2bfe60cd8b63f551f9d..1a07750f3836ae93826fa20d5c5f7a56511bb3c3 100644 (file)
@@ -460,7 +460,7 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
                                   PM_QOS_CPU_DMA_LATENCY, usecs);
        return 0;
  _error:
-       /* hardware might be unuseable from this time,
+       /* hardware might be unusable from this time,
           so we force application to retry to set
           the correct hardware parameter settings */
        runtime->status->state = SNDRV_PCM_STATE_OPEN;
index f3bdc54b429a91d99549cbb3cf510e04e30e8295..1d7d90ca455e201b4635f2ec553b07075a4292a9 100644 (file)
@@ -50,7 +50,7 @@
 
        option snd-seq-dummy ports=4
 
-  The modle option "duplex=1" enables duplex operation to the port.
+  The model option "duplex=1" enables duplex operation to the port.
   In duplex mode, a pair of ports are created instead of single port,
   and events are tunneled between pair-ports.  For example, input to
   port A is sent to output port of another port B and vice versa.
index a89948ae9e8d4dd6cf8859f4045a025cab92becd..a39d3d8c2f9c9edb53025953c102f5d5cdb89aa3 100644 (file)
@@ -233,7 +233,7 @@ static void slave_free(struct snd_kcontrol *kcontrol)
  * Add a slave control to the group with the given master control
  *
  * All slaves must be the same type (returning the same information
- * via info callback).  The fucntion doesn't check it, so it's your
+ * via info callback).  The function doesn't check it, so it's your
  * responsibility.
  *
  * Also, some additional limitations:
index 3c93c23e4883f602a9928f9dacec9de414e92682..e73fafd761b35c829c90e3443388e5dcf17e06df 100644 (file)
@@ -264,7 +264,7 @@ snd_pcm_indirect2_playback_transfer(struct snd_pcm_substream *substream,
                if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2))
                        diff += runtime->boundary;
                /* number of bytes "added" by ALSA increases the number of
-                * bytes which are ready to "be transfered to HW"/"played"
+                * bytes which are ready to "be transferred to HW"/"played"
                 * Then, set rec->appl_ptr to not count bytes twice next time.
                 */
                rec->sw_ready += (int)frames_to_bytes(runtime, diff);
@@ -330,7 +330,7 @@ snd_pcm_indirect2_playback_transfer(struct snd_pcm_substream *substream,
                /* copy bytes from intermediate buffer position sw_data to the
                 * HW and return number of bytes actually written
                 * Furthermore, set hw_ready to 0, if the fifo isn't empty
-                * now => more could be transfered to fifo
+                * now => more could be transferred to fifo
                 */
                bytes = copy(substream, rec, bytes);
                rec->bytes2hw += bytes;
index 35a2f71a6af5202f49b2e3339c68ebb2575abe7e..5e897b236cec4f3b5c5371f41bb9e925bfab94f7 100644 (file)
@@ -1189,7 +1189,7 @@ void vx_pcm_update_intr(struct vx_core *chip, unsigned int events)
 
 
 /*
- * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays
+ * vx_init_audio_io - check the available audio i/o and allocate pipe arrays
  */
 static int vx_init_audio_io(struct vx_core *chip)
 {
index 0c40951b6523b6b36243906b53bf8ad2e08dacd9..5d61f5a29130eed6ce0b7c68e6d2a5dfc3c6a340 100644 (file)
@@ -370,7 +370,7 @@ init_arrays(struct snd_emu8000 *emu)
 
 /*
  * Size the onboard memory.
- * This is written so as not to need arbitary delays after the write. It
+ * This is written so as not to need arbitrary delays after the write. It
  * seems that the only way to do this is to use the one channel and keep
  * reallocating between read and write.
  */
index f14a7c0b69981ea607236b756588f0919bd3e4fe..65329f3abc302f91b76c2f139e87e1862cfa6cbd 100644 (file)
@@ -537,7 +537,7 @@ snd_wavefront_midi_start (snd_wavefront_card_t *card)
        }
 
        /* Turn on Virtual MIDI, but first *always* turn it off,
-          since otherwise consectutive reloads of the driver will
+          since otherwise consecutive reloads of the driver will
           never cause the hardware to generate the initial "internal" or 
           "external" source bytes in the MIDI data stream. This
           is pretty important, since the internal hardware generally will
index 9191b32d913002fca98baea6b6945ab559156d54..2a42cc37795721c63f48e1939bd5ad1948cd0ae9 100644 (file)
@@ -424,7 +424,7 @@ void snd_wss_mce_down(struct snd_wss *chip)
 
        /*
         * Wait for (possible -- during init auto-calibration may not be set)
-        * calibration process to start. Needs upto 5 sample periods on AD1848
+        * calibration process to start. Needs up to 5 sample periods on AD1848
         * which at the slowest possible rate of 5.5125 kHz means 907 us.
         */
        msleep(1);
index 854c303264dc672eb46abe3f3b3ba79f56a0b406..0cd23d94888f02414bdcffa8a3a4c74d714f3211 100644 (file)
@@ -28,7 +28,7 @@
  *
  * History
  * May 02, 2003 Liam Girdwood <lrg@slimlogic.co.uk>
- *     Removed non existant WM9700
+ *     Removed non existent WM9700
  *     Added support for WM9705, WM9708, WM9709, WM9710, WM9711
  *     WM9712 and WM9717
  * Mar 28, 2002 Randolph Bentson <bentson@holmsjoen.com>
@@ -441,7 +441,7 @@ static void ac97_set_mixer(struct ac97_codec *codec, unsigned int oss_mixer, uns
 }
 
 /* read or write the recmask, the ac97 can really have left and right recording
-   inputs independantly set, but OSS doesn't seem to want us to express that to
+   inputs independently set, but OSS doesn't seem to want us to express that to
    the user. the caller guarantees that we have a supported bit set, and they
    must be holding the card's spinlock */
 static int ac97_recmask_io(struct ac97_codec *codec, int rw, int mask) 
@@ -754,7 +754,7 @@ int ac97_probe_codec(struct ac97_codec *codec)
        if((codec->codec_ops == &null_ops) && (f & 4))
                codec->codec_ops = &default_digital_ops;
        
-       /* A device which thinks its a modem but isnt */
+       /* A device which thinks its a modem but isn't */
        if(codec->flags & AC97_DELUDED_MODEM)
                codec->modem = 0;
                
index 7df48a25c4eeda7ed1a224602c687284163bd888..4b958b1c497c86a75b3984af6d43b553b639c401 100644 (file)
@@ -514,7 +514,7 @@ int audio_ioctl(int dev, struct file *file, unsigned int cmd, void __user *arg)
                                count += dmap->bytes_in_use;    /* Pointer wrap not handled yet */
                        count += dmap->byte_counter;
                
-                       /* Substract current count from the number of bytes written by app */
+                       /* Subtract current count from the number of bytes written by app */
                        count = dmap->user_counter - count;
                        if (count < 0)
                                count = 0;
@@ -931,7 +931,7 @@ static int dma_ioctl(int dev, unsigned int cmd, void __user *arg)
                        if (count < dmap_out->fragment_size && dmap_out->qhead != 0)
                                count += dmap_out->bytes_in_use;        /* Pointer wrap not handled yet */
                        count += dmap_out->byte_counter;
-                       /* Substract current count from the number of bytes written by app */
+                       /* Subtract current count from the number of bytes written by app */
                        count = dmap_out->user_counter - count;
                        if (count < 0)
                                count = 0;
index 87e2c72651f5fa1555f708c743465ee5843134a4..c918313c2206910c7214ad4f2e65d78d750c6789 100644 (file)
@@ -1021,7 +1021,7 @@ static int sq_ioctl(struct file *file, u_int cmd, u_long arg)
        case SNDCTL_DSP_SYNC:
                /* This call, effectively, has the same behaviour as SNDCTL_DSP_RESET
                   except that it waits for output to finish before resetting
-                  everything - read, however, is killed imediately.
+                  everything - read, however, is killed immediately.
                */
                result = 0 ;
                if (file->f_mode & FMODE_WRITE) {
index ceedb1eff203812e85049f7cdb46b92a588fc557..8cdb2cfe65c841a7f942a25fde54b9d04e0d3ea6 100644 (file)
@@ -295,7 +295,7 @@ int MIDIbuf_write(int dev, struct file *file, const char __user *buf, int count)
 
                for (i = 0; i < n; i++)
                {
-                       /* BROKE BROKE BROKE - CANT DO THIS WITH CLI !! */
+                       /* BROKE BROKE BROKE - CAN'T DO THIS WITH CLI !! */
                        /* yes, think the same, so I removed the cli() brackets 
                                QUEUE_BYTE is protected against interrupts */
                        if (copy_from_user((char *) &tmp_data, &(buf)[c], 1)) {
index 84ef4d06c1c287e5ee77b641291c229d244cc0f0..fb5d7250de38d75f5f7b27cafcc7e674390ae7d0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * sound/oss/sb_card.c
  *
- * Detection routine for the ISA Sound Blaster and compatable sound
+ * Detection routine for the ISA Sound Blaster and compatible sound
  * cards.
  *
  * This file is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
index 9890cf2066ffef53e0773961cd0837d42ee4b740..5c773dff5ac5dd702d2f463c348373e999f0ef65 100644 (file)
  * corresponding playback levels, unless recmask says they aren't recorded. In
  * the latter case the recording volumes are 0.
  * Now recording levels of inputs can be controlled, by changing the playback
- * levels. Futhermore several devices can be recorded together (which is not
+ * levels. Furthermore several devices can be recorded together (which is not
  * possible with the ES1688).
  * Besides the separate recording level control for each input, the common
  * recording level can also be controlled by RECLEV as described above.
index 44357d877a275a384ff54fea2e1322eaf7ff37a0..09d46484bc1a1cd209579a13534537f127327e1e 100644 (file)
@@ -875,7 +875,7 @@ static void start_adc(struct cs4297a_state *s)
                if (s->prop_adc.fmt & AFMT_S8 || s->prop_adc.fmt & AFMT_U8) {
                        // 
                        // now only use 16 bit capture, due to truncation issue
-                       // in the chip, noticable distortion occurs.
+                       // in the chip, noticeable distortion occurs.
                        // allocate buffer and then convert from 16 bit to 
                        // 8 bit for the user buffer.
                        //
index f0e0caa53200700c5eaa6353e6d60f77f6bf7ef5..12ba28e7b933d419b56ae4f74381b05073197c5b 100644 (file)
@@ -227,7 +227,7 @@ static int vidc_audio_set_speed(int dev, int rate)
                } else {
                        /*printk("VIDC: internal %d %d %d\n", rate, rate_int, hwrate);*/
                        hwctrl=0x00000003;
-                       /* Allow rougly 0.4% tolerance */
+                       /* Allow roughly 0.4% tolerance */
                        if (diff_int > (rate/256))
                                rate=rate_int;
                }
index 4382d0fa6b9a374c05f3eb674ed82e7d4f9cf7e0..d8f6fd65ebbb323cc2bb039ddda49c581807c941 100644 (file)
@@ -29,7 +29,7 @@
  *     PM support
  *     MIDI support
  *     Game Port support
- *     SG DMA support (this will need *alot* of work)
+ *     SG DMA support (this will need *a lot* of work)
  */
 
 #include <linux/init.h>
index f53a31e939c15bd1f6f33066a2480bfe6fd49589..f8ccc9677c6f394ab85d9fe8bb134a0f75d55961 100644 (file)
@@ -963,7 +963,7 @@ static int snd_card_asihpi_playback_open(struct snd_pcm_substream *substream)
 
        /*? also check ASI5000 samplerate source
            If external, only support external rate.
-           If internal and other stream playing, cant switch
+           If internal and other stream playing, can't switch
        */
 
        init_timer(&dpcm->timer);
index 6fc025c448de838184e801e7a8becee4ae8698e9..255429c32c1c6999db64ad529338167f9857d7f4 100644 (file)
@@ -725,7 +725,7 @@ enum HPI_AESEBU_ERRORS {
 #define HPI_PAD_TITLE_LEN               64
 /** The text string containing the comment. */
 #define HPI_PAD_COMMENT_LEN             256
-/** The PTY when the tuner has not recieved any PTY. */
+/** The PTY when the tuner has not received any PTY. */
 #define HPI_PAD_PROGRAM_TYPE_INVALID    0xffff
 /** \} */
 
index 3e3c2ef6efd855f8efc132c3a407c5d46bfe2489..8c8aac4c567ee45938049900d008d28935a55640 100644 (file)
@@ -423,7 +423,7 @@ static void subsys_create_adapter(struct hpi_message *phm,
 
        ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL);
        if (!ao.priv) {
-               HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n");
+               HPI_DEBUG_LOG(ERROR, "can't get mem for adapter object\n");
                phr->error = HPI_ERROR_MEMORY_ALLOC;
                return;
        }
index 620525bdac599f62b6a50204eef8d3771fd01613..22e9f08dea6de8e94b774d4d3276b99f0ed7644f 100644 (file)
@@ -466,7 +466,7 @@ static void subsys_create_adapter(struct hpi_message *phm,
 
        ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL);
        if (!ao.priv) {
-               HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n");
+               HPI_DEBUG_LOG(ERROR, "can't get mem for adapter object\n");
                phr->error = HPI_ERROR_MEMORY_ALLOC;
                return;
        }
index af678be0aa15bc1133ddb136c5e86650426665d1..3b9fd115da36fc2cf121d47274baf1425b82d5a9 100644 (file)
@@ -607,7 +607,7 @@ struct hpi_data_compat32 {
 #endif
 
 struct hpi_buffer {
-  /** placehoder for backward compatability (see dwBufferSize) */
+  /** placehoder for backward compatibility (see dwBufferSize) */
        struct hpi_msg_format reserved;
        u32 command; /**< HPI_BUFFER_CMD_xxx*/
        u32 pci_address; /**< PCI physical address of buffer for DSP DMA */
index bcbdf30a6aa096071326b2e036aa48fde72f559b..360028b9abf59ea3564735a6ba29992e80a426a9 100644 (file)
@@ -722,7 +722,7 @@ static u16 HPIMSGX__init(struct hpi_message *phm,
                return phr->error;
        }
        if (hr.error == 0) {
-               /* the adapter was created succesfully
+               /* the adapter was created successfully
                   save the mapping for future use */
                hpi_entry_points[hr.u.s.adapter_index] = entry_point_func;
                /* prepare adapter (pre-open streams etc.) */
index ecb8f4daf408f6e53bc6388e82e9802a4580df0a..02f6e08f7592e8bcd6c539598f397ebbf88856aa 100644 (file)
 #define MIX_PLAYB(x) (vortex->mixplayb[x])
 #define MIX_SPDIF(x) (vortex->mixspdif[x])
 
-#define NR_WTPB 0x20           /* WT channels per eahc bank. */
+#define NR_WTPB 0x20           /* WT channels per each bank. */
 
 /* Structs */
 typedef struct {
index f4aa8ff6f5f9d7d5f33935749b6c3100f7f48463..9ae8b3b17651d84bfaed89c015da17e3290640db 100644 (file)
@@ -53,7 +53,7 @@ a3dsrc_GetTimeConsts(a3dsrc_t * a, short *HrtfTrack, short *ItdTrack,
 }
 
 #endif
-/* Atmospheric absorbtion. */
+/* Atmospheric absorption. */
 
 static void
 a3dsrc_SetAtmosTarget(a3dsrc_t * a, short aa, short b, short c, short d,
@@ -835,7 +835,7 @@ snd_vortex_a3d_filter_put(struct snd_kcontrol *kcontrol,
                params[i] = ucontrol->value.integer.value[i];
        /* Translate generic filter params to a3d filter params. */
        vortex_a3d_translate_filter(a->filter, params);
-       /* Atmospheric absorbtion and filtering. */
+       /* Atmospheric absorption and filtering. */
        a3dsrc_SetAtmosTarget(a, a->filter[0],
                              a->filter[1], a->filter[2],
                              a->filter[3], a->filter[4]);
index 5439d662d1047377ddd7d832dbd1791e0ce887fe..62e959120c44cc82542ccca98f0df7791e99b022 100644 (file)
@@ -44,10 +44,10 @@ static struct snd_pcm_hardware snd_vortex_playback_hw_adb = {
        .channels_min = 1,
        .channels_max = 2,
        .buffer_bytes_max = 0x10000,
-       .period_bytes_min = 0x1,
+       .period_bytes_min = 0x20,
        .period_bytes_max = 0x1000,
        .periods_min = 2,
-       .periods_max = 32,
+       .periods_max = 1024,
 };
 
 #ifndef CHIP_AU8820
@@ -140,6 +140,9 @@ static int snd_vortex_pcm_open(struct snd_pcm_substream *substream)
                                        SNDRV_PCM_HW_PARAM_PERIOD_BYTES)) < 0)
                return err;
 
+       snd_pcm_hw_constraint_step(runtime, 0,
+                                       SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 64);
+
        if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
 #ifndef CHIP_AU8820
                if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_A3D) {
@@ -515,7 +518,7 @@ static int __devinit snd_vortex_new_pcm(vortex_t *chip, int idx, int nr)
                return -ENODEV;
 
        /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the 
-        * same dma engine. WT uses it own separate dma engine whcih cant capture. */
+        * same dma engine. WT uses it own separate dma engine which can't capture. */
        if (idx == VORTEX_PCM_ADB)
                nr_capt = nr;
        else
index 5715c4d055735a4bed90f5a53cb75b582db30c95..9b7a6346037ac70c18b4bd1e2112498f51763d80 100644 (file)
  *  Possible remedies:
  *  - use speaker (amplifier) output instead of headphone output
  *    (in case crackling is due to overloaded output clipping)
- *  - plug card into a different PCI slot, preferrably one that isn't shared
+ *  - plug card into a different PCI slot, preferably one that isn't shared
  *    too much (this helps a lot, but not completely!)
  *  - get rid of PCI VGA card, use AGP instead
  *  - upgrade or downgrade BIOS
index fc53b9bca26dab166dbbb7eef05eaf621cf586a8..e8e8ccc964038c1aa29154d83c44b8c2b616b8e5 100644 (file)
@@ -51,7 +51,7 @@
  *    Add support for mute control on SB Live 24bit (cards w/ SPI DAC)
  *
  *
- *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  This code was initially based on code from ALSA's emu10k1x.c which is:
  *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
  *
  *   This program is free software; you can redistribute it and/or modify
 /* CA0106 pointer-offset register set, accessed through the PTR and DATA registers                     */
 /********************************************************************************************************/
                                                                                                                            
-/* Initally all registers from 0x00 to 0x3f have zero contents. */
+/* Initially all registers from 0x00 to 0x3f have zero contents. */
 #define PLAYBACK_LIST_ADDR     0x00            /* Base DMA address of a list of pointers to each period/size */
                                                /* One list entry: 4 bytes for DMA address, 
                                                 * 4 bytes for period_size << 16.
  * The jack has 4 poles. I will call 1 - Tip, 2 - Next to 1, 3 - Next to 2, 4 - Next to 3
  * For Analogue: 1 -> Center Speaker, 2 -> Sub Woofer, 3 -> Ground, 4 -> Ground
  * For Digital: 1 -> Front SPDIF, 2 -> Rear SPDIF, 3 -> Center/Subwoofer SPDIF, 4 -> Ground.
- * Standard 4 pole Video A/V cable with RCA outputs: 1 -> White, 2 -> Yellow, 3 -> Sheild on all three, 4 -> Red.
+ * Standard 4 pole Video A/V cable with RCA outputs: 1 -> White, 2 -> Yellow, 3 -> Shield on all three, 4 -> Red.
  * So, from this you can see that you cannot use a Standard 4 pole Video A/V cable with the SB Audigy LS card.
  */
 /* The Front SPDIF PCM gets mixed with samples from the AC97 codec, so can only work for Stereo PCM and not AC3/DTS
index 01b49388fafdd58d30a12cd13f09182375b55bf1..437759239694b00708919acba5c39be26be3c19c 100644 (file)
  *    DAC: Unknown
  *    Trying to handle it like the SB0410.
  *
- *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  This code was initially based on code from ALSA's emu10k1x.c which is:
  *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
  *
  *   This program is free software; you can redistribute it and/or modify
index 630aa499818947f79f0bd7aba8f750c3a4942de9..84f3f92436b5a34eb414158bea5405288e27e455 100644 (file)
@@ -42,7 +42,7 @@
  *  0.0.18
  *    Add support for mute control on SB Live 24bit (cards w/ SPI DAC)
  *
- *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  This code was initially based on code from ALSA's emu10k1x.c which is:
  *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
  *
  *   This program is free software; you can redistribute it and/or modify
index ba96428c9f4cfc8dfa468b37b6098cd171fc6ec8..c694464b11689136eff0b2afe028d10be789ebf5 100644 (file)
@@ -42,7 +42,7 @@
  *  0.0.18
  *    Implement support for Line-in capture on SB Live 24bit.
  *
- *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  This code was initially based on code from ALSA's emu10k1x.c which is:
  *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
  *
  *   This program is free software; you can redistribute it and/or modify
index b5bb036ef73ce7a04515cd7543d625dfdf11f9d7..f4e573555da346822f630cdd1f032bf0853c4cfb 100644 (file)
@@ -73,7 +73,7 @@ MODULE_PARM_DESC(mpu_port, "MPU-401 port.");
 module_param_array(fm_port, long, NULL, 0444);
 MODULE_PARM_DESC(fm_port, "FM port.");
 module_param_array(soft_ac3, bool, NULL, 0444);
-MODULE_PARM_DESC(soft_ac3, "Sofware-conversion of raw SPDIF packets (model 033 only).");
+MODULE_PARM_DESC(soft_ac3, "Software-conversion of raw SPDIF packets (model 033 only).");
 #ifdef SUPPORT_JOYSTICK
 module_param_array(joystick_port, int, NULL, 0444);
 MODULE_PARM_DESC(joystick_port, "Joystick port address.");
@@ -656,8 +656,8 @@ out:
 }
 
 /*
- * Program pll register bits, I assume that the 8 registers 0xf8 upto 0xff
- * are mapped onto the 8 ADC/DAC sampling frequency which can be choosen
+ * Program pll register bits, I assume that the 8 registers 0xf8 up to 0xff
+ * are mapped onto the 8 ADC/DAC sampling frequency which can be chosen
  * at the register CM_REG_FUNCTRL1 (0x04).
  * Problem: other ways are also possible (any information about that?)
  */
@@ -666,7 +666,7 @@ static void snd_cmipci_set_pll(struct cmipci *cm, unsigned int rate, unsigned in
        unsigned int reg = CM_REG_PLL + slot;
        /*
         * Guess that this programs at reg. 0x04 the pos 15:13/12:10
-        * for DSFC/ASFC (000 upto 111).
+        * for DSFC/ASFC (000 up to 111).
         */
 
        /* FIXME: Init (Do we've to set an other register first before programming?) */
index b9321544c31c4375fb33a17c5bf4b849217cbe61..13f33c0719d34bda8ca71b203a568fbae6745b8c 100644 (file)
@@ -1627,7 +1627,7 @@ static struct ct_atc atc_preset __devinitdata = {
  *  Creates and initializes a hardware manager.
  *
  *  Creates kmallocated ct_atc structure. Initializes hardware.
- *  Returns 0 if suceeds, or negative error code if fails.
+ *  Returns 0 if succeeds, or negative error code if fails.
  */
 
 int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci,
index 0cf400f879f9eb09388b89f5a7d323008cb6533d..a5c957db5cea2fc297c283f3ee339dc960204bf9 100644 (file)
@@ -1285,7 +1285,7 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info)
        hw_write_20kx(hw, PTPALX, ptp_phys_low);
        hw_write_20kx(hw, PTPAHX, ptp_phys_high);
        hw_write_20kx(hw, TRNCTL, trnctl);
-       hw_write_20kx(hw, TRNIS, 0x200c01); /* realy needed? */
+       hw_write_20kx(hw, TRNIS, 0x200c01); /* really needed? */
 
        return 0;
 }
index 957a311514c8ed9fe34586b518aa463ec279dddd..c250614dadd0c9c2d0ed3dc4cdfdca7a8148332b 100644 (file)
@@ -248,7 +248,7 @@ static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr)
 /*
  * map the given memory block on PTB.
  * if the block is already mapped, update the link order.
- * if no empty pages are found, tries to release unsed memory blocks
+ * if no empty pages are found, tries to release unused memory blocks
  * and retry the mapping.
  */
 int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
index 61b8ab39800ff073cc9bf3c82bd4eb428a488350..a81dc44228eab97911ea0cde311014bafa4d2ee9 100644 (file)
@@ -69,7 +69,7 @@
  *    ADC: Philips 1361T (Stereo 24bit)
  *    DAC: CS4382-K (8-channel, 24bit, 192Khz)
  *
- *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  This code was initially based on code from ALSA's emu10k1x.c which is:
  *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
  *
  *   This program is free software; you can redistribute it and/or modify
index 00f4817533b12bf2f1c1a259c5048e7655326620..4e0ee1a9747ad45a968a33634aca8d47d8163567 100644 (file)
@@ -59,7 +59,7 @@
  *    ADC: Philips 1361T (Stereo 24bit)
  *    DAC: CS4382-K (8-channel, 24bit, 192Khz)
  *
- *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  This code was initially based on code from ALSA's emu10k1x.c which is:
  *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
  *
  *   This program is free software; you can redistribute it and/or modify
@@ -86,7 +86,7 @@
  * The sample rate is also controlled by the same registers that control the rate of the EMU10K2 sample rate converters.
  */
 
-/* Initally all registers from 0x00 to 0x3f have zero contents. */
+/* Initially all registers from 0x00 to 0x3f have zero contents. */
 #define PLAYBACK_LIST_ADDR     0x00            /* Base DMA address of a list of pointers to each period/size */
                                                /* One list entry: 4 bytes for DMA address, 
                                                 * 4 bytes for period_size << 16.
index 2c79e96d0324db2042fe973fab81471146cfab77..759ade12e758e541749ad04c199de4e97b069a8f 100644 (file)
@@ -937,6 +937,7 @@ void snd_hda_shutup_pins(struct hda_codec *codec)
 }
 EXPORT_SYMBOL_HDA(snd_hda_shutup_pins);
 
+#ifdef SND_HDA_NEEDS_RESUME
 /* Restore the pin controls cleared previously via snd_hda_shutup_pins() */
 static void restore_shutup_pins(struct hda_codec *codec)
 {
@@ -953,6 +954,7 @@ static void restore_shutup_pins(struct hda_codec *codec)
        }
        codec->pins_shutup = 0;
 }
+#endif
 
 static void init_hda_cache(struct hda_cache_rec *cache,
                           unsigned int record_size);
@@ -1329,6 +1331,7 @@ static void purify_inactive_streams(struct hda_codec *codec)
        }
 }
 
+#ifdef SND_HDA_NEEDS_RESUME
 /* clean up all streams; called from suspend */
 static void hda_cleanup_all_streams(struct hda_codec *codec)
 {
@@ -1340,6 +1343,7 @@ static void hda_cleanup_all_streams(struct hda_codec *codec)
                        really_cleanup_stream(codec, p);
        }
 }
+#endif
 
 /*
  * amp access functions
@@ -3661,7 +3665,7 @@ int snd_hda_codec_build_pcms(struct hda_codec *codec)
  * with the proper parameters for set up.
  * ops.cleanup should be called in hw_free for clean up of streams.
  *
- * This function returns 0 if successfull, or a negative error code.
+ * This function returns 0 if successful, or a negative error code.
  */
 int __devinit snd_hda_build_pcms(struct hda_bus *bus)
 {
@@ -4851,7 +4855,7 @@ EXPORT_SYMBOL_HDA(snd_hda_suspend);
  *
  * Returns 0 if successful.
  *
- * This fucntion is defined only when POWER_SAVE isn't set.
+ * This function is defined only when POWER_SAVE isn't set.
  * In the power-save mode, the codec is resumed dynamically.
  */
 int snd_hda_resume(struct hda_bus *bus)
index 69e33869a53e509d37c86ee1d34364cb822f3f6c..ad97d937d3a8d92d362a108c8285a99c4dbdfc76 100644 (file)
@@ -3035,6 +3035,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
        SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS),
        SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD),
        SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT5066_THINKPAD),
+       SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT5066_THINKPAD),
        SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS),
        SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */
        {}
index 251773e45f61bf0a252ed5c1e888c9853e6b14b9..715615a88a8d4ce7e68adacd4202eaa7a5ab9d56 100644 (file)
@@ -1280,6 +1280,39 @@ static int simple_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
                                             stream_tag, format, substream);
 }
 
+static void nvhdmi_8ch_7x_set_info_frame_parameters(struct hda_codec *codec,
+                                                   int channels)
+{
+       unsigned int chanmask;
+       int chan = channels ? (channels - 1) : 1;
+
+       switch (channels) {
+       default:
+       case 0:
+       case 2:
+               chanmask = 0x00;
+               break;
+       case 4:
+               chanmask = 0x08;
+               break;
+       case 6:
+               chanmask = 0x0b;
+               break;
+       case 8:
+               chanmask = 0x13;
+               break;
+       }
+
+       /* Set the audio infoframe channel allocation and checksum fields.  The
+        * channel count is computed implicitly by the hardware. */
+       snd_hda_codec_write(codec, 0x1, 0,
+                       Nv_VERB_SET_Channel_Allocation, chanmask);
+
+       snd_hda_codec_write(codec, 0x1, 0,
+                       Nv_VERB_SET_Info_Frame_Checksum,
+                       (0x71 - chan - chanmask));
+}
+
 static int nvhdmi_8ch_7x_pcm_close(struct hda_pcm_stream *hinfo,
                                   struct hda_codec *codec,
                                   struct snd_pcm_substream *substream)
@@ -1298,6 +1331,10 @@ static int nvhdmi_8ch_7x_pcm_close(struct hda_pcm_stream *hinfo,
                                AC_VERB_SET_STREAM_FORMAT, 0);
        }
 
+       /* The audio hardware sends a channel count of 0x7 (8ch) when all the
+        * streams are disabled. */
+       nvhdmi_8ch_7x_set_info_frame_parameters(codec, 8);
+
        return snd_hda_multi_out_dig_close(codec, &spec->multiout);
 }
 
@@ -1308,37 +1345,16 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo,
                                     struct snd_pcm_substream *substream)
 {
        int chs;
-       unsigned int dataDCC1, dataDCC2, chan, chanmask, channel_id;
+       unsigned int dataDCC1, dataDCC2, channel_id;
        int i;
 
        mutex_lock(&codec->spdif_mutex);
 
        chs = substream->runtime->channels;
-       chan = chs ? (chs - 1) : 1;
 
-       switch (chs) {
-       default:
-       case 0:
-       case 2:
-               chanmask = 0x00;
-               break;
-       case 4:
-               chanmask = 0x08;
-               break;
-       case 6:
-               chanmask = 0x0b;
-               break;
-       case 8:
-               chanmask = 0x13;
-               break;
-       }
        dataDCC1 = AC_DIG1_ENABLE | AC_DIG1_COPYRIGHT;
        dataDCC2 = 0x2;
 
-       /* set the Audio InforFrame Channel Allocation */
-       snd_hda_codec_write(codec, 0x1, 0,
-                       Nv_VERB_SET_Channel_Allocation, chanmask);
-
        /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
        if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE))
                snd_hda_codec_write(codec,
@@ -1413,10 +1429,7 @@ static int nvhdmi_8ch_7x_pcm_prepare(struct hda_pcm_stream *hinfo,
                }
        }
 
-       /* set the Audio Info Frame Checksum */
-       snd_hda_codec_write(codec, 0x1, 0,
-                       Nv_VERB_SET_Info_Frame_Checksum,
-                       (0x71 - chan - chanmask));
+       nvhdmi_8ch_7x_set_info_frame_parameters(codec, chs);
 
        mutex_unlock(&codec->spdif_mutex);
        return 0;
@@ -1512,6 +1525,11 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec)
        spec->multiout.max_channels = 8;
        spec->pcm_playback = &nvhdmi_pcm_playback_8ch_7x;
        codec->patch_ops = nvhdmi_patch_ops_8ch_7x;
+
+       /* Initialize the audio infoframe channel mask and checksum to something
+        * valid */
+       nvhdmi_8ch_7x_set_info_frame_parameters(codec, 8);
+
        return 0;
 }
 
index 12c6f4508c54ffbf9a31c25f0f6b6b7bdcfa9abb..c82979a8cd0930026e84eced9fa684d4c4ccac84 100644 (file)
@@ -549,7 +549,7 @@ static int alc_ch_mode_put(struct snd_kcontrol *kcontrol,
 
 /*
  * Control the mode of pin widget settings via the mixer.  "pc" is used
- * instead of "%" to avoid consequences of accidently treating the % as
+ * instead of "%" to avoid consequences of accidentally treating the % as
  * being part of a format specifier.  Maximum allowed length of a value is
  * 63 characters plus NULL terminator.
  *
@@ -1704,11 +1704,11 @@ static void alc_apply_fixup(struct hda_codec *codec, int action)
                                   codec->chip_name, fix->type);
                        break;
                }
-               if (!fix[id].chained)
+               if (!fix->chained)
                        break;
                if (++depth > 10)
                        break;
-               id = fix[id].chain_id;
+               id = fix->chain_id;
        }
 }
 
@@ -5645,6 +5645,7 @@ static void fillup_priv_adc_nids(struct hda_codec *codec, hda_nid_t *nids,
 static struct snd_pci_quirk beep_white_list[] = {
        SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
        SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
+       SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
        SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1),
        {}
 };
@@ -9836,7 +9837,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
 
        SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL),
 
-       SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG),
+       SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavilion", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP),
        SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
        SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG),
@@ -9863,6 +9864,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
        SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
        SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL),
        SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch),
+       SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG),
 
        SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG),
        SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG),
@@ -10699,7 +10701,6 @@ enum {
        PINFIX_LENOVO_Y530,
        PINFIX_PB_M5210,
        PINFIX_ACER_ASPIRE_7736,
-       PINFIX_GIGABYTE_880GM,
 };
 
 static const struct alc_fixup alc882_fixups[] = {
@@ -10731,13 +10732,6 @@ static const struct alc_fixup alc882_fixups[] = {
                .type = ALC_FIXUP_SKU,
                .v.sku = ALC_FIXUP_SKU_IGNORE,
        },
-       [PINFIX_GIGABYTE_880GM] = {
-               .type = ALC_FIXUP_PINS,
-               .v.pins = (const struct alc_pincfg[]) {
-                       { 0x14, 0x1114410 }, /* set as speaker */
-                       { }
-               }
-       },
 };
 
 static struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -10745,7 +10739,6 @@ static struct snd_pci_quirk alc882_fixup_tbl[] = {
        SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", PINFIX_LENOVO_Y530),
        SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX),
        SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", PINFIX_ACER_ASPIRE_7736),
-       SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte", PINFIX_GIGABYTE_880GM),
        {}
 };
 
@@ -14124,7 +14117,7 @@ static hda_nid_t alc269vb_capsrc_nids[1] = {
 };
 
 static hda_nid_t alc269_adc_candidates[] = {
-       0x08, 0x09, 0x07,
+       0x08, 0x09, 0x07, 0x11,
 };
 
 #define alc269_modes           alc260_modes
@@ -14868,6 +14861,23 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
        alc_write_coef_idx(codec, 0x1e, coef | 0x80);
 }
 
+static void alc271_fixup_dmic(struct hda_codec *codec,
+                             const struct alc_fixup *fix, int action)
+{
+       static struct hda_verb verbs[] = {
+               {0x20, AC_VERB_SET_COEF_INDEX, 0x0d},
+               {0x20, AC_VERB_SET_PROC_COEF, 0x4000},
+               {}
+       };
+       unsigned int cfg;
+
+       if (strcmp(codec->chip_name, "ALC271X"))
+               return;
+       cfg = snd_hda_codec_get_pincfg(codec, 0x12);
+       if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED)
+               snd_hda_sequence_write(codec, verbs);
+}
+
 enum {
        ALC269_FIXUP_SONY_VAIO,
        ALC275_FIXUP_SONY_VAIO_GPIO2,
@@ -14876,6 +14886,7 @@ enum {
        ALC269_FIXUP_ASUS_G73JW,
        ALC269_FIXUP_LENOVO_EAPD,
        ALC275_FIXUP_SONY_HWEQ,
+       ALC271_FIXUP_DMIC,
 };
 
 static const struct alc_fixup alc269_fixups[] = {
@@ -14929,7 +14940,11 @@ static const struct alc_fixup alc269_fixups[] = {
                .v.func = alc269_fixup_hweq,
                .chained = true,
                .chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2
-       }
+       },
+       [ALC271_FIXUP_DMIC] = {
+               .type = ALC_FIXUP_FUNC,
+               .v.func = alc271_fixup_dmic,
+       },
 };
 
 static struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -14938,6 +14953,7 @@ static struct snd_pci_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
        SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
        SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
+       SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
        SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
        SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
        SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
@@ -18782,6 +18798,8 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = {
                      ALC662_3ST_6ch_DIG),
        SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB20x", ALC662_AUTO),
        SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10),
+       SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L",
+                     ALC662_3ST_6ch_DIG),
        SND_PCI_QUIRK(0x152d, 0x2304, "Quanta WH1", ALC663_ASUS_H13),
        SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG),
        SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA),
@@ -19455,7 +19473,7 @@ enum {
        ALC662_FIXUP_IDEAPAD,
        ALC272_FIXUP_MARIO,
        ALC662_FIXUP_CZC_P10T,
-       ALC662_FIXUP_GIGABYTE,
+       ALC662_FIXUP_SKU_IGNORE,
 };
 
 static const struct alc_fixup alc662_fixups[] = {
@@ -19484,20 +19502,17 @@ static const struct alc_fixup alc662_fixups[] = {
                        {}
                }
        },
-       [ALC662_FIXUP_GIGABYTE] = {
-               .type = ALC_FIXUP_PINS,
-               .v.pins = (const struct alc_pincfg[]) {
-                       { 0x14, 0x1114410 }, /* set as speaker */
-                       { }
-               }
+       [ALC662_FIXUP_SKU_IGNORE] = {
+               .type = ALC_FIXUP_SKU,
+               .v.sku = ALC_FIXUP_SKU_IGNORE,
        },
 };
 
 static struct snd_pci_quirk alc662_fixup_tbl[] = {
        SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),
+       SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE),
        SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
        SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
-       SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte", ALC662_FIXUP_GIGABYTE),
        SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
        SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
        SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
index 05fcd60cc46f79f0d5442f1297639fdf4d3ec79b..94d19c03a7f4f728bf3ddb394c77ba431f52b9b2 100644 (file)
@@ -2475,7 +2475,7 @@ static int stac92xx_hp_switch_put(struct snd_kcontrol *kcontrol,
  
        spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0;
 
-       /* check to be sure that the ports are upto date with
+       /* check to be sure that the ports are up to date with
         * switch changes
         */
        stac_issue_unsol_event(codec, nid);
@@ -3408,6 +3408,9 @@ static int get_connection_index(struct hda_codec *codec, hda_nid_t mux,
        hda_nid_t conn[HDA_MAX_NUM_INPUTS];
        int i, nums;
 
+       if (!(get_wcaps(codec, mux) & AC_WCAP_CONN_LIST))
+               return -1;
+
        nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn));
        for (i = 0; i < nums; i++)
                if (conn[i] == nid)
index 1371b57c11e823209336a3a2f86b6274e550a0b9..0997031c48d228e3e0a2af8d9b1fde55ab54ed8d 100644 (file)
@@ -1292,14 +1292,18 @@ static void notify_aa_path_ctls(struct hda_codec *codec)
 {
        int i;
        struct snd_ctl_elem_id id;
-       const char *labels[] = {"Mic", "Front Mic", "Line"};
+       const char *labels[] = {"Mic", "Front Mic", "Line", "Rear Mic"};
+       struct snd_kcontrol *ctl;
 
        memset(&id, 0, sizeof(id));
        id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
        for (i = 0; i < ARRAY_SIZE(labels); i++) {
                sprintf(id.name, "%s Playback Volume", labels[i]);
-               snd_ctl_notify(codec->bus->card, SNDRV_CTL_EVENT_MASK_VALUE,
-                              &id);
+               ctl = snd_hda_find_mixer_ctl(codec, id.name);
+               if (ctl)
+                       snd_ctl_notify(codec->bus->card,
+                                       SNDRV_CTL_EVENT_MASK_VALUE,
+                                       &ctl->id);
        }
 }
 
index 2f6252266a02f32ecca6b8ee1b3ed5f88fc1af92..3e4f8c12ffceeb7d48b117c50ebce743d408e243 100644 (file)
@@ -148,7 +148,7 @@ static void aureon_pca9554_write(struct snd_ice1712 *ice, unsigned char reg,
        udelay(100);
        /*
         * send device address, command and value,
-        * skipping ack cycles inbetween
+        * skipping ack cycles in between
         */
        for (j = 0; j < 3; j++) {
                switch (j) {
@@ -2143,7 +2143,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice)
                ice->num_total_adcs = 2;
        }
 
-       /* to remeber the register values of CS8415 */
+       /* to remember the register values of CS8415 */
        ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
        if (!ice->akm)
                return -ENOMEM;
index 4fc6d8bc637e1f4498a900b81f8e958c2e8938a1..f4594d76b6ea216a9065a1694189e9838c023e9f 100644 (file)
@@ -2755,7 +2755,7 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
                        return err;
                }
                if (c->mpu401_1_name)
-                       /*  Prefered name available in card_info */
+                       /*  Preferred name available in card_info */
                        snprintf(ice->rmidi[0]->name,
                                 sizeof(ice->rmidi[0]->name),
                                 "%s %d", c->mpu401_1_name, card->number);
@@ -2772,7 +2772,7 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
                                return err;
                        }
                        if (c->mpu401_2_name)
-                               /*  Prefered name available in card_info */
+                               /*  Preferred name available in card_info */
                                snprintf(ice->rmidi[1]->name,
                                         sizeof(ice->rmidi[1]->name),
                                         "%s %d", c->mpu401_2_name,
index cdb873f5da50923fb2ca1a1ff43d57ecf0ff4d01..92c1160d7ab52c52811609008ce9cfc6fbd54c18 100644 (file)
@@ -768,7 +768,7 @@ static int __devinit pontis_init(struct snd_ice1712 *ice)
        ice->num_total_dacs = 2;
        ice->num_total_adcs = 2;
 
-       /* to remeber the register values */
+       /* to remember the register values */
        ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
        if (! ice->akm)
                return -ENOMEM;
index 6a9fee3ee78faee3e31bcd7de5d4873d5a6d461f..764cc93dbca402f6372b6f73a0854470f3046f73 100644 (file)
@@ -1046,7 +1046,7 @@ static int __devinit prodigy_hifi_init(struct snd_ice1712 *ice)
        * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten
        */
        ice->gpio.saved[0] = 0;
-       /* to remeber the register values */
+       /* to remember the register values */
 
        ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
        if (! ice->akm)
@@ -1128,7 +1128,7 @@ static int __devinit prodigy_hd2_init(struct snd_ice1712 *ice)
        * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten
        */
        ice->gpio.saved[0] = 0;
-       /* to remeber the register values */
+       /* to remember the register values */
 
        ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
        if (! ice->akm)
index 629a5494347a021600ed6f2dbf82feb5971d10ac..6c896dbfd796b39a65596783f036f245078f45c4 100644 (file)
@@ -534,7 +534,7 @@ static int snd_intel8x0_codec_semaphore(struct intel8x0 *chip, unsigned int code
                udelay(10);
        } while (time--);
 
-       /* access to some forbidden (non existant) ac97 registers will not
+       /* access to some forbidden (non existent) ac97 registers will not
         * reset the semaphore. So even if you don't get the semaphore, still
         * continue the access. We don't need the semaphore anyway. */
        snd_printk(KERN_ERR "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n",
index 2ae8d29500a87722a86c6a02c59b78ea90acd93e..27709f0cd2a648a04a7b41d5cc309d738cbc9a36 100644 (file)
@@ -331,7 +331,7 @@ static int snd_intel8x0m_codec_semaphore(struct intel8x0m *chip, unsigned int co
                udelay(10);
        } while (time--);
 
-       /* access to some forbidden (non existant) ac97 registers will not
+       /* access to some forbidden (non existent) ac97 registers will not
         * reset the semaphore. So even if you don't get the semaphore, still
         * continue the access. We don't need the semaphore anyway. */
        snd_printk(KERN_ERR "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n",
index d3350f383966b7ec1460282a287c8426f0215480..3df0f530f67c0df6626659c8ad45700b670114c1 100644 (file)
@@ -265,7 +265,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int
        if (! timeout) {
                /* error - no ack */
                mutex_unlock(&mgr->msg_mutex);
-               snd_printk(KERN_ERR "error: no reponse on msg %x\n", msg_frame);
+               snd_printk(KERN_ERR "error: no response on msg %x\n", msg_frame);
                return -EIO;
        }
 
@@ -278,7 +278,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int
        err = get_msg(mgr, &resp, msg_frame);
 
        if( request->message_id != resp.message_id )
-               snd_printk(KERN_ERR "REPONSE ERROR!\n");
+               snd_printk(KERN_ERR "RESPONSE ERROR!\n");
 
        mutex_unlock(&mgr->msg_mutex);
        return err;
index 833e7180ad2de0d0a3f66683274a4446c57dc4e4..304411c1fe4bb6f78fc3160834eeaaf763ed0772 100644 (file)
@@ -1042,11 +1042,11 @@ void pcxhr_msg_tasklet(unsigned long arg)
        int i, j;
 
        if (mgr->src_it_dsp & PCXHR_IRQ_FREQ_CHANGE)
-               snd_printdd("TASKLET : PCXHR_IRQ_FREQ_CHANGE event occured\n");
+               snd_printdd("TASKLET : PCXHR_IRQ_FREQ_CHANGE event occurred\n");
        if (mgr->src_it_dsp & PCXHR_IRQ_TIME_CODE)
-               snd_printdd("TASKLET : PCXHR_IRQ_TIME_CODE event occured\n");
+               snd_printdd("TASKLET : PCXHR_IRQ_TIME_CODE event occurred\n");
        if (mgr->src_it_dsp & PCXHR_IRQ_NOTIFY)
-               snd_printdd("TASKLET : PCXHR_IRQ_NOTIFY event occured\n");
+               snd_printdd("TASKLET : PCXHR_IRQ_NOTIFY event occurred\n");
        if (mgr->src_it_dsp & (PCXHR_IRQ_FREQ_CHANGE | PCXHR_IRQ_TIME_CODE)) {
                /* clear events FREQ_CHANGE and TIME_CODE */
                pcxhr_init_rmh(prmh, CMD_TEST_IT);
@@ -1055,7 +1055,7 @@ void pcxhr_msg_tasklet(unsigned long arg)
                            err, prmh->stat[0]);
        }
        if (mgr->src_it_dsp & PCXHR_IRQ_ASYNC) {
-               snd_printdd("TASKLET : PCXHR_IRQ_ASYNC event occured\n");
+               snd_printdd("TASKLET : PCXHR_IRQ_ASYNC event occurred\n");
 
                pcxhr_init_rmh(prmh, CMD_ASYNC);
                prmh->cmd[0] |= 1;      /* add SEL_ASYNC_EVENTS */
@@ -1233,7 +1233,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id)
        reg = PCXHR_INPL(mgr, PCXHR_PLX_L2PCIDB);
        PCXHR_OUTPL(mgr, PCXHR_PLX_L2PCIDB, reg);
 
-       /* timer irq occured */
+       /* timer irq occurred */
        if (reg & PCXHR_IRQ_TIMER) {
                int timer_toggle = reg & PCXHR_IRQ_TIMER;
                /* is a 24 bit counter */
@@ -1288,7 +1288,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id)
        if (reg & PCXHR_IRQ_MASK) {
                if (reg & PCXHR_IRQ_ASYNC) {
                        /* as we didn't request any async notifications,
-                        * some kind of xrun error will probably occured
+                        * some kind of xrun error will probably occurred
                         */
                        /* better resynchronize all streams next interrupt : */
                        mgr->dsp_time_last = PCXHR_DSP_TIME_INVALID;
index d5f5b440fc40f3ea7024adefe33d88d45e0377a5..9ff247fc887104644d0ac8d34ae68a0086961014 100644 (file)
@@ -150,7 +150,7 @@ MODULE_PARM_DESC(enable, "Enable RME Digi96 soundcard.");
 #define RME96_RCR_BITPOS_F1 28
 #define RME96_RCR_BITPOS_F2 29
 
-/* Additonal register bits */
+/* Additional register bits */
 #define RME96_AR_WSEL       (1 << 0)
 #define RME96_AR_ANALOG     (1 << 1)
 #define RME96_AR_FREQPAD_0  (1 << 2)
index a323eafb9e039b42a02b13139138b9101415a0d8..949691a876d3635798c6000da1b651d13684b1a6 100644 (file)
@@ -391,7 +391,7 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}");
 
 /* Status2 Register bits */ /* MADI ONLY */
 
-#define HDSPM_version0 (1<<0)  /* not realy defined but I guess */
+#define HDSPM_version0 (1<<0)  /* not really defined but I guess */
 #define HDSPM_version1 (1<<1)  /* in former cards it was ??? */
 #define HDSPM_version2 (1<<2)
 
@@ -936,7 +936,7 @@ struct hdspm {
        struct snd_kcontrol *playback_mixer_ctls[HDSPM_MAX_CHANNELS];
        /* but input to much, so not used */
        struct snd_kcontrol *input_mixer_ctls[HDSPM_MAX_CHANNELS];
-       /* full mixer accessable over mixer ioctl or hwdep-device */
+       /* full mixer accessible over mixer ioctl or hwdep-device */
        struct hdspm_mixer *mixer;
 
        struct hdspm_tco *tco;  /* NULL if no TCO detected */
index 1b8f6742b5fa832a030be3ad0ece15fee13c17be..2b5c7a95ae1fa36cd18366f6c93edcb941ea775d 100644 (file)
@@ -308,7 +308,7 @@ static irqreturn_t sis_interrupt(int irq, void *dev)
        u32 intr, status;
 
        /* We only use the DMA interrupts, and we don't enable any other
-        * source of interrupts. But, it is possible to see an interupt
+        * source of interrupts. But, it is possible to see an interrupt
         * status that didn't actually interrupt us, so eliminate anything
         * we're not expecting to avoid falsely claiming an IRQ, and an
         * ensuing endless loop.
@@ -773,7 +773,7 @@ static void sis_prepare_timing_voice(struct voice *voice,
                vperiod = 0;
        }
 
-       /* The interrupt handler implements the timing syncronization, so
+       /* The interrupt handler implements the timing synchronization, so
         * setup its state.
         */
        timing->flags |= VOICE_SYNC_TIMING;
@@ -1139,7 +1139,7 @@ static int sis_chip_init(struct sis7019 *sis)
         */
        outl(SIS_DMA_CSR_PCI_SETTINGS, io + SIS_DMA_CSR);
 
-       /* Reset the syncronization groups for all of the channels
+       /* Reset the synchronization groups for all of the channels
         * to be asyncronous. If we start doing SPDIF or 5.1 sound, etc.
         * we'll need to change how we handle these. Until then, we just
         * assign sub-mixer 0 to all playback channels, and avoid any
index edce8a27e3eedc441a1c6ec1a1d835f99a798918..bc823a547550c740ab9d7871fc2e401a09d7afbd 100644 (file)
@@ -358,7 +358,7 @@ static irqreturn_t snd_ps3_interrupt(int irq, void *dev_id)
                 * filling dummy data, serial automatically start to
                 * consume them and then will generate normal buffer
                 * empty interrupts.
-                * If both buffer underflow and buffer empty are occured,
+                * If both buffer underflow and buffer empty are occurred,
                 * it is better to do nomal data transfer than empty one
                 */
                snd_ps3_program_dma(card,
index 03fdee4aaaf254368c7cbcc790610b6aace15dfb..2e6302079566d17e76ed3be6158ec60930d8a39f 100644 (file)
    transfers.  Any interrupts associated with the canceled transfers
    will occur as if the transfer had finished.
    Since this bit is designed to recover from DMA related issues
-   which are caused by unpredictable situations, it is prefered to wait
+   which are caused by unpredictable situations, it is preferred to wait
    for normal DMA transfer end without using this bit.
 */
 #define PS3_AUDIO_CONFIG_CLEAR          (1 << 8)  /* RWIVF */
@@ -316,13 +316,13 @@ DISABLED=Interrupt generation disabled.
 
 /*
 Audio Port Interrupt Status Register
-Indicates Interrupt status, which interrupt has occured, and can clear
+Indicates Interrupt status, which interrupt has occurred, and can clear
 each interrupt in this register.
 Writing 1b to a field containing 1b clears field and de-asserts interrupt.
 Writing 0b to a field has no effect.
 Field vaules are the following:
-0 - Interrupt hasn't occured.
-1 - Interrupt has occured.
+0 - Interrupt hasn't occurred.
+1 - Interrupt has occurred.
 
 
  31            24 23           16 15            8 7             0
@@ -473,7 +473,7 @@ Channel N is out of action by setting 0 to asoen.
 /*
 Sampling Rate
 Specifies the divide ratio of the bit clock (clock output
-from bclko) used by the 3-wire Audio Output Clock, whcih
+from bclko) used by the 3-wire Audio Output Clock, which
 is applied to the master clock selected by mcksel.
 Data output is synchronized with this clock.
 */
@@ -756,7 +756,7 @@ The STATUS field can be used to monitor the progress of a DMA request.
 DONE indicates the previous request has completed.
 EVENT indicates that the DMA engine is waiting for the EVENT to occur.
 PENDING indicates that the DMA engine has not started processing this
-request, but the EVENT has occured.
+request, but the EVENT has occurred.
 DMA indicates that the data transfer is in progress.
 NOTIFY indicates that the notifier signalling end of transfer is being written.
 CLEAR indicated that the previous transfer was cleared.
@@ -824,7 +824,7 @@ AUDIOFIFO = Audio WriteData FIFO,
 
 /*
 PS3_AUDIO_DMASIZE specifies the number of 128-byte blocks + 1 to transfer.
-So a value of 0 means 128-bytes will get transfered.
+So a value of 0 means 128-bytes will get transferred.
 
 
  31            24 23           16 15            8 7             0
index 5d230cee3fa7a7ad9c0fb2dcb9d39d13bb5759fb..7fbfa051f6e1fb013b8a739cfc2ebe074e0c586b 100644 (file)
@@ -672,7 +672,7 @@ static int atmel_ssc_resume(struct snd_soc_dai *cpu_dai)
        /* re-enable interrupts */
        ssc_writel(ssc_p->ssc->regs, IER, ssc_p->ssc_state.ssc_imr);
 
-       /* Re-enable recieve and transmit as appropriate */
+       /* Re-enable receive and transmit as appropriate */
        cr = 0;
        cr |=
            (ssc_p->ssc_state.ssc_sr & SSC_BIT(SR_RXEN)) ? SSC_BIT(CR_RXEN) : 0;
index 4f377c9e868d48483019820402aa6e80519fff58..eecffb5489476dff195d04a9061fae68d37af638 100644 (file)
@@ -481,7 +481,7 @@ struct _pll_div {
 };
 
 /* Note : pll code from original alc5623 driver. Not sure of how good it is */
-/* usefull only for master mode */
+/* useful only for master mode */
 static const struct _pll_div codec_master_pll_div[] = {
 
        {  2048000,  8192000,   0x0ea0},
index f7cd346fd7275d4dee46261a06f52f877923d30b..f5ccdbf7ebc6e1fb0630b5ef6db426db5c2ba3e8 100644 (file)
@@ -308,8 +308,6 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)
        snd_soc_dapm_add_routes(dapm, jz4740_codec_dapm_routes,
                ARRAY_SIZE(jz4740_codec_dapm_routes));
 
-       snd_soc_dapm_new_widgets(codec);
-
        jz4740_codec_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        return 0;
index 72de47e5d04017a54dfb7cdccc5c14f799e34955..2c2a681da0d7538ab663fcf707b179efe0c62059 100644 (file)
@@ -161,7 +161,7 @@ static const struct snd_kcontrol_new lm4857_controls[] = {
                lm4857_get_mode, lm4857_set_mode),
 };
 
-/* There is a demux inbetween the the input signal and the output signals.
+/* There is a demux between the input signal and the output signals.
  * Currently there is no easy way to model it in ASoC and since it does not make
  * much of a difference in practice simply connect the input direclty to the
  * outputs. */
index 2a30eae1881ce66125ff3ceb581b21e630bf0cc8..4d9fb279e14673344c305a938959a4c6921f7d6f 100644 (file)
@@ -26,7 +26,9 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/slab.h>
+
 #include <asm/intel_scu_ipc.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -925,7 +927,7 @@ static struct platform_driver sn95031_codec_driver = {
                .owner          = THIS_MODULE,
        },
        .probe          = sn95031_device_probe,
-       .remove         = sn95031_device_remove,
+       .remove         = __devexit_p(sn95031_device_remove),
 };
 
 static int __init sn95031_init(void)
index 62b1f2261429cf8c25747b5ecb4c4554c5b6d71f..67f19c3bebe6a88a6d86a81f32b2f6dca25c65ec 100644 (file)
 #define AIC26_PAGE_ADDR(page, offset)  ((page << 6) | offset)
 #define AIC26_NUM_REGS                 AIC26_PAGE_ADDR(3, 0)
 
-/* Page 0: Auxillary data registers */
+/* Page 0: Auxiliary data registers */
 #define AIC26_REG_BAT1                 AIC26_PAGE_ADDR(0, 0x05)
 #define AIC26_REG_BAT2                 AIC26_PAGE_ADDR(0, 0x06)
 #define AIC26_REG_AUX                  AIC26_PAGE_ADDR(0, 0x07)
 #define AIC26_REG_TEMP1                        AIC26_PAGE_ADDR(0, 0x09)
 #define AIC26_REG_TEMP2                        AIC26_PAGE_ADDR(0, 0x0A)
 
-/* Page 1: Auxillary control registers */
+/* Page 1: Auxiliary control registers */
 #define AIC26_REG_AUX_ADC              AIC26_PAGE_ADDR(1, 0x00)
 #define AIC26_REG_STATUS               AIC26_PAGE_ADDR(1, 0x01)
 #define AIC26_REG_REFERENCE            AIC26_PAGE_ADDR(1, 0x03)
index 3bedab26892f9d7243025d05258e028b032a8300..6c43c13f04304543b127fb0e4f6b5eb60d6740e4 100644 (file)
@@ -884,7 +884,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
        if (bypass_pll)
                return 0;
 
-       /* Use PLL, compute apropriate setup for j, d, r and p, the closest
+       /* Use PLL, compute appropriate setup for j, d, r and p, the closest
         * one wins the game. Try with d==0 first, next with d!=0.
         * Constraints for j are according to the datasheet.
         * The sysclk is divided by 1000 to prevent integer overflows.
index eb1a0b4e09b6a49f09fb0f6116cee1ebc41dab6b..082e9d51963fd457261143aa6d50d679731c22d6 100644 (file)
@@ -1027,7 +1027,7 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream)
                /*
                 * For FIFO bypass mode:
                 * Enable the FIFO bypass (Disable the FIFO use)
-                * Set the BCLK as continous
+                * Set the BCLK as continuous
                 */
                fifoctrl_a |= DAC33_FBYPAS;
                aictrl_b |= DAC33_BCLKON;
index 8512800f63260c8fab14431b123fdcd972f09945..575238d68e5eb0b8afbace12f51a14923f1d5f3b 100644 (file)
@@ -281,7 +281,7 @@ static inline void twl4030_check_defaults(struct snd_soc_codec *codec)
                                 i, val, twl4030_reg[i]);
                }
        }
-       dev_dbg(codec->dev, "Found %d non maching registers. %s\n",
+       dev_dbg(codec->dev, "Found %d non-matching registers. %s\n",
                 difference, difference ? "Not OK" : "OK");
 }
 
@@ -2018,7 +2018,7 @@ static int twl4030_voice_startup(struct snd_pcm_substream *substream,
        u8 mode;
 
        /* If the system master clock is not 26MHz, the voice PCM interface is
-        * not avilable.
+        * not available.
         */
        if (twl4030->sysclk != 26000) {
                dev_err(codec->dev, "The board is configured for %u Hz, while"
@@ -2028,7 +2028,7 @@ static int twl4030_voice_startup(struct snd_pcm_substream *substream,
        }
 
        /* If the codec mode is not option2, the voice PCM interface is not
-        * avilable.
+        * available.
         */
        mode = twl4030_read_reg_cache(codec, TWL4030_REG_CODEC_MODE)
                & TWL4030_OPT_MODE;
index 8f6b5ee6645b619a735ba79c79c840d055ee07cc..4bbc0a79f01edf0139f6c1d10c587a82ff778fa9 100644 (file)
@@ -772,7 +772,7 @@ static int wm8580_set_bias_level(struct snd_soc_codec *codec,
                        reg &= ~(WM8580_PWRDN1_PWDN | WM8580_PWRDN1_ALLDACPD);
                        snd_soc_write(codec, WM8580_PWRDN1, reg);
 
-                       /* Make VMID high impedence */
+                       /* Make VMID high impedance */
                        reg = snd_soc_read(codec,  WM8580_ADC_CONTROL1);
                        reg &= ~0x100;
                        snd_soc_write(codec, WM8580_ADC_CONTROL1, reg);
index 3f09deea8d9d393b4f546c3f36e5134325225392..ffa2ffe5ec11aa92ef6c4e55073aae275dc169cc 100644 (file)
@@ -1312,7 +1312,7 @@ static int wm8753_set_bias_level(struct snd_soc_codec *codec,
        SNDRV_PCM_FMTBIT_S24_LE)
 
 /*
- * The WM8753 supports upto 4 different and mutually exclusive DAI
+ * The WM8753 supports up to 4 different and mutually exclusive DAI
  * configurations. This gives 2 PCM's available for use, hifi and voice.
  * NOTE: The Voice PCM cannot play or capture audio to the CPU as it's DAI
  * is connected between the wm8753 and a BT codec or GSM modem.
index ae1cadfae84c1fe173c6ef09939c7b2a6cd70f7f..f52b623bb692c3a0b3954e12e7e5027446a6d136 100644 (file)
@@ -247,8 +247,6 @@ static int wm8903_volatile_register(struct snd_soc_codec *codec, unsigned int re
        case WM8903_REVISION_NUMBER:
        case WM8903_INTERRUPT_STATUS_1:
        case WM8903_WRITE_SEQUENCER_4:
-       case WM8903_POWER_MANAGEMENT_3:
-       case WM8903_POWER_MANAGEMENT_2:
        case WM8903_DC_SERVO_READBACK_1:
        case WM8903_DC_SERVO_READBACK_2:
        case WM8903_DC_SERVO_READBACK_3:
@@ -875,34 +873,40 @@ SND_SOC_DAPM_MIXER("Left Speaker Mixer", WM8903_POWER_MANAGEMENT_4, 1, 0,
 SND_SOC_DAPM_MIXER("Right Speaker Mixer", WM8903_POWER_MANAGEMENT_4, 0, 0,
                   right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)),
 
-SND_SOC_DAPM_PGA_S("Left Headphone Output PGA", 0, WM8903_ANALOGUE_HP_0,
-                  4, 0, NULL, 0),
-SND_SOC_DAPM_PGA_S("Right Headphone Output PGA", 0, WM8903_ANALOGUE_HP_0,
+SND_SOC_DAPM_PGA_S("Left Headphone Output PGA", 0, WM8903_POWER_MANAGEMENT_2,
+                  1, 0, NULL, 0),
+SND_SOC_DAPM_PGA_S("Right Headphone Output PGA", 0, WM8903_POWER_MANAGEMENT_2,
                   0, 0, NULL, 0),
 
-SND_SOC_DAPM_PGA_S("Left Line Output PGA", 0, WM8903_ANALOGUE_LINEOUT_0, 4, 0,
+SND_SOC_DAPM_PGA_S("Left Line Output PGA", 0, WM8903_POWER_MANAGEMENT_3, 1, 0,
                   NULL, 0),
-SND_SOC_DAPM_PGA_S("Right Line Output PGA", 0, WM8903_ANALOGUE_LINEOUT_0, 0, 0,
+SND_SOC_DAPM_PGA_S("Right Line Output PGA", 0, WM8903_POWER_MANAGEMENT_3, 0, 0,
                   NULL, 0),
 
 SND_SOC_DAPM_PGA_S("HPL_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 7, 0, NULL, 0),
 SND_SOC_DAPM_PGA_S("HPL_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 6, 0, NULL, 0),
-SND_SOC_DAPM_PGA_S("HPL_ENA_DLY", 1, WM8903_ANALOGUE_HP_0, 5, 0, NULL, 0),
+SND_SOC_DAPM_PGA_S("HPL_ENA_DLY", 2, WM8903_ANALOGUE_HP_0, 5, 0, NULL, 0),
+SND_SOC_DAPM_PGA_S("HPL_ENA", 1, WM8903_ANALOGUE_HP_0, 4, 0, NULL, 0),
 SND_SOC_DAPM_PGA_S("HPR_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 3, 0, NULL, 0),
 SND_SOC_DAPM_PGA_S("HPR_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 2, 0, NULL, 0),
-SND_SOC_DAPM_PGA_S("HPR_ENA_DLY", 1, WM8903_ANALOGUE_HP_0, 1, 0, NULL, 0),
+SND_SOC_DAPM_PGA_S("HPR_ENA_DLY", 2, WM8903_ANALOGUE_HP_0, 1, 0, NULL, 0),
+SND_SOC_DAPM_PGA_S("HPR_ENA", 1, WM8903_ANALOGUE_HP_0, 0, 0, NULL, 0),
 
 SND_SOC_DAPM_PGA_S("LINEOUTL_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 7, 0,
                   NULL, 0),
 SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 6, 0,
                   NULL, 0),
-SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_DLY", 1, WM8903_ANALOGUE_LINEOUT_0, 5, 0,
+SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_DLY", 2, WM8903_ANALOGUE_LINEOUT_0, 5, 0,
+                  NULL, 0),
+SND_SOC_DAPM_PGA_S("LINEOUTL_ENA", 1, WM8903_ANALOGUE_LINEOUT_0, 4, 0,
                   NULL, 0),
 SND_SOC_DAPM_PGA_S("LINEOUTR_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 3, 0,
                   NULL, 0),
 SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 2, 0,
                   NULL, 0),
-SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_DLY", 1, WM8903_ANALOGUE_LINEOUT_0, 1, 0,
+SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_DLY", 2, WM8903_ANALOGUE_LINEOUT_0, 1, 0,
+                  NULL, 0),
+SND_SOC_DAPM_PGA_S("LINEOUTR_ENA", 1, WM8903_ANALOGUE_LINEOUT_0, 0, 0,
                   NULL, 0),
 
 SND_SOC_DAPM_SUPPLY("DCS Master", WM8903_DC_SERVO_0, 4, 0, NULL, 0),
@@ -1037,10 +1041,14 @@ static const struct snd_soc_dapm_route intercon[] = {
        { "Left Speaker PGA", NULL, "Left Speaker Mixer" },
        { "Right Speaker PGA", NULL, "Right Speaker Mixer" },
 
-       { "HPL_ENA_DLY", NULL, "Left Headphone Output PGA" },
-       { "HPR_ENA_DLY", NULL, "Right Headphone Output PGA" },
-       { "LINEOUTL_ENA_DLY", NULL, "Left Line Output PGA" },
-       { "LINEOUTR_ENA_DLY", NULL, "Right Line Output PGA" },
+       { "HPL_ENA", NULL, "Left Headphone Output PGA" },
+       { "HPR_ENA", NULL, "Right Headphone Output PGA" },
+       { "HPL_ENA_DLY", NULL, "HPL_ENA" },
+       { "HPR_ENA_DLY", NULL, "HPR_ENA" },
+       { "LINEOUTL_ENA", NULL, "Left Line Output PGA" },
+       { "LINEOUTR_ENA", NULL, "Right Line Output PGA" },
+       { "LINEOUTL_ENA_DLY", NULL, "LINEOUTL_ENA" },
+       { "LINEOUTR_ENA_DLY", NULL, "LINEOUTR_ENA" },
 
        { "HPL_DCS", NULL, "DCS Master" },
        { "HPR_DCS", NULL, "DCS Master" },
index 443ae580445cb7f207029a5711eba52a5e49f157..9b3bba4df5b363fdeec2cb23a69af3fe38594477 100644 (file)
@@ -1895,7 +1895,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,
 
        pr_debug("Fvco=%dHz\n", target);
 
-       /* Find an appropraite FLL_FRATIO and factor it out of the target */
+       /* Find an appropriate FLL_FRATIO and factor it out of the target */
        for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) {
                if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) {
                        fll_div->fll_fratio = fll_fratios[i].fll_fratio;
index 5e0214d6293ea57672ebc54c427470e50768e4ca..3c7198779c3173e1408daf2403dc794a5bf4e157 100644 (file)
@@ -176,7 +176,7 @@ static int wm8995_pll_factors(struct device *dev,
        return 0;
 }
 
-/* Lookup table specifiying SRATE (table 25 in datasheet); some of the
+/* Lookup table specifying SRATE (table 25 in datasheet); some of the
  * output frequencies have been rounded to the standard frequencies
  * they are intended to match where the error is slight. */
 static struct {
index 3b71dd65c966c34e0643ae5d9732769b110f86a6..500011eb8b2bdb31d88fa2a8df819c72626a97bc 100644 (file)
@@ -3137,7 +3137,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,
 
        pr_debug("FLL Fvco=%dHz\n", target);
 
-       /* Find an appropraite FLL_FRATIO and factor it out of the target */
+       /* Find an appropriate FLL_FRATIO and factor it out of the target */
        for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) {
                if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) {
                        fll_div->fll_fratio = fll_fratios[i].fll_fratio;
index 28fdfd66661d0828fdab7e8dfab3a28213ae2998..3c2ee1bb73cdb8c85d21372b41d3598cf7b4bcad 100644 (file)
@@ -981,7 +981,7 @@ static int wm8991_set_dai_pll(struct snd_soc_dai *codec_dai,
                reg = snd_soc_read(codec, WM8991_CLOCKING_2);
                snd_soc_write(codec, WM8991_CLOCKING_2, reg | WM8991_SYSCLK_SRC);
 
-               /* set up N , fractional mode and pre-divisor if neccessary */
+               /* set up N , fractional mode and pre-divisor if necessary */
                snd_soc_write(codec, WM8991_PLL1, pll_div.n | WM8991_SDM |
                              (pll_div.div2 ? WM8991_PRESCALE : 0));
                snd_soc_write(codec, WM8991_PLL2, (u8)(pll_div.k>>8));
index 379fa22c5b6c9748cfca06a3bf1cca37c0d20c92..056aef90434774b5382758010fa2c366bb99858d 100644 (file)
@@ -324,7 +324,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,
 
        pr_debug("Fvco=%dHz\n", target);
 
-       /* Find an appropraite FLL_FRATIO and factor it out of the target */
+       /* Find an appropriate FLL_FRATIO and factor it out of the target */
        for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) {
                if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) {
                        fll_div->fll_fratio = fll_fratios[i].fll_fratio;
index 3dc64c8b6a5c534c089f6d7f05becad32bc3bb4c..84e1bd1d2822fcfe7eca4a0bfb8749eff28a7fec 100644 (file)
@@ -82,18 +82,18 @@ struct wm8994_priv {
 
        int mbc_ena[3];
 
-       /* Platform dependant DRC configuration */
+       /* Platform dependent DRC configuration */
        const char **drc_texts;
        int drc_cfg[WM8994_NUM_DRC];
        struct soc_enum drc_enum;
 
-       /* Platform dependant ReTune mobile configuration */
+       /* Platform dependent ReTune mobile configuration */
        int num_retune_mobile_texts;
        const char **retune_mobile_texts;
        int retune_mobile_cfg[WM8994_NUM_EQ];
        struct soc_enum retune_mobile_enum;
 
-       /* Platform dependant MBC configuration */
+       /* Platform dependent MBC configuration */
        int mbc_cfg;
        const char **mbc_texts;
        struct soc_enum mbc_enum;
@@ -3261,20 +3261,36 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
        wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        /* Latch volume updates (right only; we always do left then right). */
+       snd_soc_update_bits(codec, WM8994_AIF1_DAC1_LEFT_VOLUME,
+                           WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
        snd_soc_update_bits(codec, WM8994_AIF1_DAC1_RIGHT_VOLUME,
                            WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
+       snd_soc_update_bits(codec, WM8994_AIF1_DAC2_LEFT_VOLUME,
+                           WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
        snd_soc_update_bits(codec, WM8994_AIF1_DAC2_RIGHT_VOLUME,
                            WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
+       snd_soc_update_bits(codec, WM8994_AIF2_DAC_LEFT_VOLUME,
+                           WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
        snd_soc_update_bits(codec, WM8994_AIF2_DAC_RIGHT_VOLUME,
                            WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
+       snd_soc_update_bits(codec, WM8994_AIF1_ADC1_LEFT_VOLUME,
+                           WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
        snd_soc_update_bits(codec, WM8994_AIF1_ADC1_RIGHT_VOLUME,
                            WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
+       snd_soc_update_bits(codec, WM8994_AIF1_ADC2_LEFT_VOLUME,
+                           WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
        snd_soc_update_bits(codec, WM8994_AIF1_ADC2_RIGHT_VOLUME,
                            WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
+       snd_soc_update_bits(codec, WM8994_AIF2_ADC_LEFT_VOLUME,
+                           WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
        snd_soc_update_bits(codec, WM8994_AIF2_ADC_RIGHT_VOLUME,
                            WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
+       snd_soc_update_bits(codec, WM8994_DAC1_LEFT_VOLUME,
+                           WM8994_DAC1_VU, WM8994_DAC1_VU);
        snd_soc_update_bits(codec, WM8994_DAC1_RIGHT_VOLUME,
                            WM8994_DAC1_VU, WM8994_DAC1_VU);
+       snd_soc_update_bits(codec, WM8994_DAC2_LEFT_VOLUME,
+                           WM8994_DAC2_VU, WM8994_DAC2_VU);
        snd_soc_update_bits(codec, WM8994_DAC2_RIGHT_VOLUME,
                            WM8994_DAC2_VU, WM8994_DAC2_VU);
 
index 55cdf29820200fcb6be534a99905c066f2133c70..91c6b39de50c09ada27a286ef31d3522aaf157f0 100644 (file)
@@ -305,7 +305,7 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol,
 /*
  * Stop any attempts to change speaker mode while the speaker is enabled.
  *
- * We also have some special anti-pop controls dependant on speaker
+ * We also have some special anti-pop controls dependent on speaker
  * mode which must be changed along with the mode.
  */
 static int speaker_mode_put(struct snd_kcontrol *kcontrol,
@@ -456,7 +456,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref,
 
        pr_debug("Fvco=%dHz\n", target);
 
-       /* Find an appropraite FLL_FRATIO and factor it out of the target */
+       /* Find an appropriate FLL_FRATIO and factor it out of the target */
        for (i = 0; i < ARRAY_SIZE(fll_fratios); i++) {
                if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) {
                        fll_div->fll_fratio = fll_fratios[i].fll_fratio;
index 7b6b3c18e2999ae971fe5d5e418289d939d70699..4005e9af5d61acae8ce40c05b2862fcfa20ae4c0 100644 (file)
@@ -740,12 +740,12 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
 
        { "SPKL", "Input Switch", "MIXINL" },
        { "SPKL", "IN1LP Switch", "IN1LP" },
-       { "SPKL", "Output Switch", "Left Output Mixer" },
+       { "SPKL", "Output Switch", "Left Output PGA" },
        { "SPKL", NULL, "TOCLK" },
 
        { "SPKR", "Input Switch", "MIXINR" },
        { "SPKR", "IN1RP Switch", "IN1RP" },
-       { "SPKR", "Output Switch", "Right Output Mixer" },
+       { "SPKR", "Output Switch", "Right Output PGA" },
        { "SPKR", NULL, "TOCLK" },
 
        { "SPKL Boost", "Direct Voice Switch", "Direct Voice" },
@@ -767,8 +767,8 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
        { "SPKOUTRP", NULL, "SPKR Driver" },
        { "SPKOUTRN", NULL, "SPKR Driver" },
 
-       { "Left Headphone Mux", "Mixer", "Left Output Mixer" },
-       { "Right Headphone Mux", "Mixer", "Right Output Mixer" },
+       { "Left Headphone Mux", "Mixer", "Left Output PGA" },
+       { "Right Headphone Mux", "Mixer", "Right Output PGA" },
 
        { "Headphone PGA", NULL, "Left Headphone Mux" },
        { "Headphone PGA", NULL, "Right Headphone Mux" },
index bc92ec620004f16a82feb202ddfc30f57bdf8c8e..ac2ded969253895a0b5df067922e91b1678a12a7 100644 (file)
@@ -16,7 +16,7 @@
  * sane processor vendors have a FIFO per AC97 slot, the i.MX has only
  * one FIFO which combines all valid receive slots. We cannot even select
  * which slots we want to receive. The WM9712 with which this driver
- * was developped with always sends GPIO status data in slot 12 which
+ * was developed with always sends GPIO status data in slot 12 which
  * we receive in our (PCM-) data stream. The only chance we have is to
  * manually skip this data in the FIQ handler. With sampling rates different
  * from 48000Hz not every frame has valid receive data, so the ratio
index 0fd6a630db011eb961406aedb6352f2673fb0f1d..e13c6ce463289a62ac6640743a739d82054b671f 100644 (file)
@@ -132,7 +132,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream)
        priv = snd_soc_dai_get_dma_data(cpu_dai, substream);
        snd_soc_set_runtime_hwparams(substream, &kirkwood_dma_snd_hw);
 
-       /* Ensure that all constraints linked to dma burst are fullfilled */
+       /* Ensure that all constraints linked to dma burst are fulfilled */
        err = snd_pcm_hw_constraint_minmax(runtime,
                        SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
                        priv->burst * 2,
@@ -170,7 +170,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream)
 
                /*
                 * Enable Error interrupts. We're only ack'ing them but
-                * it's usefull for diagnostics
+                * it's useful for diagnostics
                 */
                writel((unsigned long)-1, priv->io + KIRKWOOD_ERR_MASK);
        }
index ee2c22475a76bb54de3faa10f3369fb7af192f87..d567c322a2fb471788d7b8f47345a6b9fd6d5aed 100644 (file)
@@ -116,18 +116,20 @@ struct snd_soc_dai_driver sst_platform_dai[] = {
 static inline void sst_set_stream_status(struct sst_runtime_stream *stream,
                                        int state)
 {
-       spin_lock(&stream->status_lock);
+       unsigned long flags;
+       spin_lock_irqsave(&stream->status_lock, flags);
        stream->stream_status = state;
-       spin_unlock(&stream->status_lock);
+       spin_unlock_irqrestore(&stream->status_lock, flags);
 }
 
 static inline int sst_get_stream_status(struct sst_runtime_stream *stream)
 {
        int state;
+       unsigned long flags;
 
-       spin_lock(&stream->status_lock);
+       spin_lock_irqsave(&stream->status_lock, flags);
        state = stream->stream_status;
-       spin_unlock(&stream->status_lock);
+       spin_unlock_irqrestore(&stream->status_lock, flags);
        return state;
 }
 
@@ -440,7 +442,7 @@ static int sst_platform_remove(struct platform_device *pdev)
 
        snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sst_platform_dai));
        snd_soc_unregister_platform(&pdev->dev);
-       pr_debug("sst_platform_remove sucess\n");
+       pr_debug("sst_platform_remove success\n");
        return 0;
 }
 
@@ -463,7 +465,7 @@ module_init(sst_soc_platform_init);
 static void __exit sst_soc_platform_exit(void)
 {
        platform_driver_unregister(&sst_platform_driver);
-       pr_debug("sst_soc_platform_exit sucess\n");
+       pr_debug("sst_soc_platform_exit success\n");
 }
 module_exit(sst_soc_platform_exit);
 
index 3167be689621ace695b79f4ffa11ea6878a8f933..462cbcbea74a2dc4e5094cef04e09f942a3e235c 100644 (file)
@@ -248,7 +248,7 @@ static struct snd_soc_jack_pin ams_delta_hook_switch_pins[] = {
  */
 
 /* To actually apply any modem controlled configuration changes to the codec,
- * we must connect codec DAI pins to the modem for a moment.  Be carefull not
+ * we must connect codec DAI pins to the modem for a moment.  Be careful not
  * to interfere with our digital mute function that shares the same hardware. */
 static struct timer_list cx81801_timer;
 static bool cx81801_cmd_pending;
@@ -402,9 +402,9 @@ static struct tty_ldisc_ops cx81801_ops = {
 
 
 /*
- * Even if not very usefull, the sound card can still work without any of the
+ * Even if not very useful, the sound card can still work without any of the
  * above functonality activated.  You can still control its audio input/output
- * constellation and speakerphone gain from userspace by issueing AT commands
+ * constellation and speakerphone gain from userspace by issuing AT commands
  * over the modem port.
  */
 
index 02fb66416ddc894c7abdfd2fa52cddc3eb717225..2ce0b2d891d5081df50ed6c677ef835eab845b94 100644 (file)
@@ -65,6 +65,7 @@ static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
        if (prtd->dma_ch >= 0) {
                pxa_free_dma(prtd->dma_ch);
                prtd->dma_ch = -1;
+               prtd->params = NULL;
        }
 
        return 0;
index ac577263b3e3dd7205b7243ae7e434f0aef21575..b6445757fc547d953ca23a0da5dd7a3ff1ab8ccf 100644 (file)
@@ -167,7 +167,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
        .codec_name = "wm9713-codec",
        .platform_name = "pxa-pcm-audio",
        .cpu_dai_name = "pxa2xx-ac97",
-       .codec_name = "wm9713-hifi",
+       .codec_dai_name = "wm9713-hifi",
        .init = zylonite_wm9713_init,
 },
 {
@@ -176,7 +176,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
        .codec_name = "wm9713-codec",
        .platform_name = "pxa-pcm-audio",
        .cpu_dai_name = "pxa2xx-ac97-aux",
-       .codec_name = "wm9713-aux",
+       .codec_dai_name = "wm9713-aux",
 },
 {
        .name = "WM9713 Voice",
@@ -184,7 +184,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
        .codec_name = "wm9713-codec",
        .platform_name = "pxa-pcm-audio",
        .cpu_dai_name = "pxa-ssp-dai.2",
-       .codec_name = "wm9713-voice",
+       .codec_dai_name = "wm9713-voice",
        .ops = &zylonite_voice_ops,
 },
 };
index 78bfdb3f5d7e0a289be0d11a473e74bdec3edd07..4522309756322e1b0dd85f8b5558abfa272b1946 100644 (file)
@@ -228,7 +228,7 @@ static const struct snd_kcontrol_new neo1973_wm8753_controls[] = {
        SOC_DAPM_PIN_SWITCH("Handset Mic"),
 };
 
-/* GTA02 specific routes and controlls */
+/* GTA02 specific routes and controls */
 
 #ifdef CONFIG_MACH_NEO1973_GTA02
 
@@ -372,7 +372,7 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-/* GTA01 specific controlls */
+/* GTA01 specific controls */
 
 #ifdef CONFIG_MACH_NEO1973_GTA01
 
index 38aac7d57a59213a2663cb8bbfab8cacd630fe30..9c7e8b48aed6a4dc2bbc76d1955a5d56025eae9b 100644 (file)
@@ -350,8 +350,8 @@ static int s3c_pcm_set_fmt(struct snd_soc_dai *cpu_dai,
        ctl = readl(regs + S3C_PCM_CTL);
 
        switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
-       case SND_SOC_DAIFMT_NB_NF:
-               /* Nothing to do, NB_NF by default */
+       case SND_SOC_DAIFMT_IB_NF:
+               /* Nothing to do, IB_NF by default */
                break;
        default:
                dev_err(pcm->dev, "Unsupported clock inversion!\n");
index 0c9997e2d8c05d7407b63cff18b3786ad28b28fa..23c0e83d4c19244dc6da7ec326d10f8bce840b5c 100644 (file)
@@ -1200,10 +1200,11 @@ static int fsi_probe(struct platform_device *pdev)
        master->fsib.master     = master;
 
        pm_runtime_enable(&pdev->dev);
-       pm_runtime_resume(&pdev->dev);
        dev_set_drvdata(&pdev->dev, master);
 
+       pm_runtime_get_sync(&pdev->dev);
        fsi_soft_all_reset(master);
+       pm_runtime_put_sync(&pdev->dev);
 
        ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED,
                          id_entry->name, master);
@@ -1218,8 +1219,17 @@ static int fsi_probe(struct platform_device *pdev)
                goto exit_free_irq;
        }
 
-       return snd_soc_register_dais(&pdev->dev, fsi_soc_dai, ARRAY_SIZE(fsi_soc_dai));
+       ret = snd_soc_register_dais(&pdev->dev, fsi_soc_dai,
+                                   ARRAY_SIZE(fsi_soc_dai));
+       if (ret < 0) {
+               dev_err(&pdev->dev, "cannot snd dai register\n");
+               goto exit_snd_soc;
+       }
+
+       return ret;
 
+exit_snd_soc:
+       snd_soc_unregister_platform(&pdev->dev);
 exit_free_irq:
        free_irq(irq, master);
 exit_iounmap:
@@ -1238,12 +1248,11 @@ static int fsi_remove(struct platform_device *pdev)
 
        master = dev_get_drvdata(&pdev->dev);
 
-       snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai));
-       snd_soc_unregister_platform(&pdev->dev);
-
+       free_irq(master->irq, master);
        pm_runtime_disable(&pdev->dev);
 
-       free_irq(master->irq, master);
+       snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai));
+       snd_soc_unregister_platform(&pdev->dev);
 
        iounmap(master->base);
        kfree(master);
@@ -1321,3 +1330,4 @@ module_exit(fsi_mobile_exit);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SuperH onchip FSI audio driver");
 MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");
+MODULE_ALIAS("platform:fsi-pcm-audio");
index 4dda58926bc52c282d29b769b40d6f546a3230fe..d8562ce4de7ab9ea5796e0521261fe520d8a3330 100644 (file)
@@ -92,8 +92,8 @@ static int min_bytes_needed(unsigned long val)
 static int format_register_str(struct snd_soc_codec *codec,
                               unsigned int reg, char *buf, size_t len)
 {
-       int wordsize = codec->driver->reg_word_size * 2;
-       int regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+       int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+       int regsize = codec->driver->reg_word_size * 2;
        int ret;
        char tmpbuf[len + 1];
        char regbuf[regsize + 1];
@@ -132,8 +132,8 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf,
        size_t total = 0;
        loff_t p = 0;
 
-       wordsize = codec->driver->reg_word_size * 2;
-       regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+       wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+       regsize = codec->driver->reg_word_size * 2;
 
        len = wordsize + regsize + 2 + 1;
 
@@ -629,6 +629,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
                        runtime->hw.rates |= codec_dai_drv->capture.rates;
        }
 
+       ret = -EINVAL;
        snd_pcm_limit_hw_rates(runtime);
        if (!runtime->hw.rates) {
                printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
@@ -640,7 +641,8 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
                        codec_dai->name, cpu_dai->name);
                goto config_err;
        }
-       if (!runtime->hw.channels_min || !runtime->hw.channels_max) {
+       if (!runtime->hw.channels_min || !runtime->hw.channels_max ||
+           runtime->hw.channels_min > runtime->hw.channels_max) {
                printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
                                codec_dai->name, cpu_dai->name);
                goto config_err;
@@ -2060,6 +2062,7 @@ const struct dev_pm_ops snd_soc_pm_ops = {
        .resume = snd_soc_resume,
        .poweroff = snd_soc_poweroff,
 };
+EXPORT_SYMBOL_GPL(snd_soc_pm_ops);
 
 /* ASoC platform driver */
 static struct platform_driver soc_driver = {
index 8585957477eb4425f26a7d87d2a33ea36e260d85..556a5713392511cef367595b9d9df3f4cf2abfdc 100644 (file)
@@ -370,6 +370,7 @@ static struct platform_driver tegra_snd_harmony_driver = {
        .driver = {
                .name = DRV_NAME,
                .owner = THIS_MODULE,
+               .pm = &snd_soc_pm_ops,
        },
        .probe = tegra_snd_harmony_probe,
        .remove = __devexit_p(tegra_snd_harmony_remove),
index 9081a54a9c6cecdeb39e05603fc3c775bfe171c7..86c1a3103760eff82f3d8155f396611d9296a200 100644 (file)
@@ -76,7 +76,7 @@ struct ihex_record {
        u16 address;
        u8 len;
        u8 data[256];
-       char error; /* true if an error occured parsing this record */
+       char error; /* true if an error occurred parsing this record */
 
        u8 max_len; /* maximum record length in whole ihex */
 
@@ -107,7 +107,7 @@ static u8 usb6fire_fw_ihex_hex(const u8 *data, u8 *crc)
 
 /*
  * returns true if record is available, false otherwise.
- * iff an error occured, false will be returned and record->error will be true.
+ * iff an error occurred, false will be returned and record->error will be true.
  */
 static bool usb6fire_fw_ihex_next_record(struct ihex_record *record)
 {
index 5b792d2c8061aa0292595186d8cf60fadf8456dc..f079b5e2ab287cd0d726216bd6b656fd15c2e6d6 100644 (file)
@@ -176,9 +176,11 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof
                        if (!rate)
                                continue;
                        /* C-Media CM6501 mislabels its 96 kHz altsetting */
+                       /* Terratec Aureon 7.1 USB C-Media 6206, too */
                        if (rate == 48000 && nr_rates == 1 &&
                            (chip->usb_id == USB_ID(0x0d8c, 0x0201) ||
-                            chip->usb_id == USB_ID(0x0d8c, 0x0102)) &&
+                            chip->usb_id == USB_ID(0x0d8c, 0x0102) ||
+                            chip->usb_id == USB_ID(0x0ccd, 0x00b1)) &&
                            fp->altsetting == 5 && fp->maxpacksize == 392)
                                rate = 96000;
                        /* Creative VF0470 Live Cam reports 16 kHz instead of 8kHz */
index b4b39c0b6c9ed8b1e698213a88ceb9637a082cef..f9289102886ad890987a0d27739a19f1e48afdd4 100644 (file)
@@ -1301,6 +1301,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
        case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */
        case USB_ID(0x15ca, 0x1806): /* Textech USB Midi Cable */
        case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */
+       case USB_ID(0xfc08, 0x0101): /* Unknown vendor Cable */
                ep->max_transfer = 4;
                break;
                /*
index 5e47757166074833159007d725d6dd2ede025bfd..6ec33b62e6cf255b712c4ca5e470ffcd224e7379 100644 (file)
@@ -1182,7 +1182,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
 /*
  * parse a feature unit
  *
- * most of controlls are defined here.
+ * most of controls are defined here.
  */
 static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void *_ftr)
 {
index 355759bad581057e8fefb8e78c36806fc6b5a9cc..1b94ec3a3368bd01c622f686edc74957cee4d36d 100644 (file)
@@ -266,7 +266,7 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
  * audio-interface quirks
  *
  * returns zero if no standard audio/MIDI parsing is needed.
- * returns a postive value if standard audio/midi interfaces are parsed
+ * returns a positive value if standard audio/midi interfaces are parsed
  * after this.
  * returns a negative value at error.
  */
@@ -533,6 +533,7 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
 
        case USB_ID(0x0d8c, 0x0102):
                /* C-Media CM6206 / CM106-Like Sound Device */
+       case USB_ID(0x0ccd, 0x00b1): /* Terratec Aureon 7.1 USB */
                return snd_usb_cm6206_boot_quirk(dev);
 
        case USB_ID(0x133e, 0x0815):
index 287ef73b123728dbe4a60c2cf999ac5eeaffea75..a51340f6f2db8d936321fa77ff7350955034fb30 100644 (file)
@@ -20,7 +20,7 @@
  at standard samplerates,
  what led to this part of the usx2y module: 
  It provides the alsa kernel half of the usx2y-alsa-jack driver pair.
- The pair uses a hardware dependant alsa-device for mmaped pcm transport.
+ The pair uses a hardware dependent alsa-device for mmaped pcm transport.
  Advantage achieved:
          The usb_hc moves pcm data from/into memory via DMA.
          That memory is mmaped by jack's usx2y driver.
@@ -38,7 +38,7 @@
          2periods works but is useless cause of crackling).
 
  This is a first "proof of concept" implementation.
- Later, functionalities should migrate to more apropriate places:
+ Later, functionalities should migrate to more appropriate places:
  Userland:
  - The jackd could mmap its float-pcm buffers directly from alsa-lib.
  - alsa-lib could provide power of 2 period sized shaping combined with int/float
index 158c30e8210c64f7bde2915a7fee4700ee6a4cdd..207dee5c5b163fd51ceafbb6b171df9c0708893f 100644 (file)
@@ -165,8 +165,12 @@ grep-libs = $(filter -l%,$(1))
 strip-libs = $(filter-out -l%,$(1))
 
 $(OUTPUT)python/perf.so: $(PYRF_OBJS)
-       $(QUIET_GEN)python util/setup.py --quiet  build_ext --build-lib='$(OUTPUT)python' \
-                                               --build-temp='$(OUTPUT)python/temp'
+       $(QUIET_GEN)( \
+               export CFLAGS="$(BASIC_CFLAGS)"; \
+               python util/setup.py --quiet  build_ext --build-lib='$(OUTPUT)python' \
+                       --build-temp='$(OUTPUT)python/temp' \
+       )
+
 #
 # No Perl scripts right now:
 #
index 6febcc168a8cc261e2dc10314ef082d40c717ec8..416538248a4bb04eaf2e28a1a2f58f062e6372fc 100644 (file)
@@ -41,7 +41,7 @@ static u64                    user_interval                   = ULLONG_MAX;
 static u64                     default_interval                =      0;
 
 static unsigned int            page_size;
-static unsigned int            mmap_pages                      =    128;
+static unsigned int            mmap_pages                      = UINT_MAX;
 static unsigned int            user_freq                       = UINT_MAX;
 static int                     freq                            =   1000;
 static int                     output;
@@ -163,6 +163,7 @@ static void config_attr(struct perf_evsel *evsel, struct perf_evlist *evlist)
        struct perf_event_attr *attr = &evsel->attr;
        int track = !evsel->idx; /* only the first counter needs these */
 
+       attr->inherit           = !no_inherit;
        attr->read_format       = PERF_FORMAT_TOTAL_TIME_ENABLED |
                                  PERF_FORMAT_TOTAL_TIME_RUNNING |
                                  PERF_FORMAT_ID;
@@ -251,6 +252,9 @@ static void open_counters(struct perf_evlist *evlist)
 {
        struct perf_evsel *pos;
 
+       if (evlist->cpus->map[0] < 0)
+               no_inherit = true;
+
        list_for_each_entry(pos, &evlist->entries, node) {
                struct perf_event_attr *attr = &pos->attr;
                /*
@@ -271,15 +275,13 @@ static void open_counters(struct perf_evlist *evlist)
 retry_sample_id:
                attr->sample_id_all = sample_id_all_avail ? 1 : 0;
 try_again:
-               if (perf_evsel__open(pos, evlist->cpus, evlist->threads, group,
-                                    !no_inherit) < 0) {
+               if (perf_evsel__open(pos, evlist->cpus, evlist->threads, group) < 0) {
                        int err = errno;
 
-                       if (err == EPERM || err == EACCES)
-                               die("Permission error - are you root?\n"
-                                       "\t Consider tweaking"
-                                       " /proc/sys/kernel/perf_event_paranoid.\n");
-                       else if (err ==  ENODEV && cpu_list) {
+                       if (err == EPERM || err == EACCES) {
+                               ui__warning_paranoid();
+                               exit(EXIT_FAILURE);
+                       } else if (err ==  ENODEV && cpu_list) {
                                die("No such device - did you specify"
                                        " an out-of-range profile CPU?\n");
                        } else if (err == EINVAL && sample_id_all_avail) {
@@ -302,11 +304,19 @@ try_again:
                                        && attr->config == PERF_COUNT_HW_CPU_CYCLES) {
 
                                if (verbose)
-                                       warning(" ... trying to fall back to cpu-clock-ticks\n");
+                                       ui__warning("The cycles event is not supported, "
+                                                   "trying to fall back to cpu-clock-ticks\n");
                                attr->type = PERF_TYPE_SOFTWARE;
                                attr->config = PERF_COUNT_SW_CPU_CLOCK;
                                goto try_again;
                        }
+
+                       if (err == ENOENT) {
+                               ui__warning("The %s event is not supported.\n",
+                                           event_name(pos));
+                               exit(EXIT_FAILURE);
+                       }
+
                        printf("\n");
                        error("sys_perf_event_open() syscall returned with %d (%s).  /bin/dmesg may provide additional information.\n",
                              err, strerror(err));
@@ -506,6 +516,10 @@ static int __cmd_record(int argc, const char **argv)
        if (have_tracepoints(&evsel_list->entries))
                perf_header__set_feat(&session->header, HEADER_TRACE_INFO);
 
+       /* 512 kiB: default amount of unprivileged mlocked memory */
+       if (mmap_pages == UINT_MAX)
+               mmap_pages = (512 * 1024) / page_size;
+
        if (forks) {
                child_pid = fork();
                if (child_pid < 0) {
index e2109f9b43eb3ed99a5239805087277b229739d3..03f0e45f1479c2fab31de2624d69d95458886157 100644 (file)
@@ -167,16 +167,17 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
                attr->read_format = PERF_FORMAT_TOTAL_TIME_ENABLED |
                                    PERF_FORMAT_TOTAL_TIME_RUNNING;
 
+       attr->inherit = !no_inherit;
+
        if (system_wide)
-               return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, false, false);
+               return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, false);
 
-       attr->inherit = !no_inherit;
        if (target_pid == -1 && target_tid == -1) {
                attr->disabled = 1;
                attr->enable_on_exec = 1;
        }
 
-       return perf_evsel__open_per_thread(evsel, evsel_list->threads, false, false);
+       return perf_evsel__open_per_thread(evsel, evsel_list->threads, false);
 }
 
 /*
index 1b2106c58f660c83a858636df0862c458d127eb8..11e3c84583622bac20ed799cfab29e7066c6d6eb 100644 (file)
@@ -290,7 +290,7 @@ static int test__open_syscall_event(void)
                goto out_thread_map_delete;
        }
 
-       if (perf_evsel__open_per_thread(evsel, threads, false, false) < 0) {
+       if (perf_evsel__open_per_thread(evsel, threads, false) < 0) {
                pr_debug("failed to open counter: %s, "
                         "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                         strerror(errno));
@@ -303,7 +303,7 @@ static int test__open_syscall_event(void)
        }
 
        if (perf_evsel__read_on_cpu(evsel, 0, 0) < 0) {
-               pr_debug("perf_evsel__open_read_on_cpu\n");
+               pr_debug("perf_evsel__read_on_cpu\n");
                goto out_close_fd;
        }
 
@@ -365,7 +365,7 @@ static int test__open_syscall_event_on_all_cpus(void)
                goto out_thread_map_delete;
        }
 
-       if (perf_evsel__open(evsel, cpus, threads, false, false) < 0) {
+       if (perf_evsel__open(evsel, cpus, threads, false) < 0) {
                pr_debug("failed to open counter: %s, "
                         "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                         strerror(errno));
@@ -418,7 +418,7 @@ static int test__open_syscall_event_on_all_cpus(void)
                        continue;
 
                if (perf_evsel__read_on_cpu(evsel, cpu, 0) < 0) {
-                       pr_debug("perf_evsel__open_read_on_cpu\n");
+                       pr_debug("perf_evsel__read_on_cpu\n");
                        err = -1;
                        break;
                }
@@ -529,7 +529,7 @@ static int test__basic_mmap(void)
 
                perf_evlist__add(evlist, evsels[i]);
 
-               if (perf_evsel__open(evsels[i], cpus, threads, false, false) < 0) {
+               if (perf_evsel__open(evsels[i], cpus, threads, false) < 0) {
                        pr_debug("failed to open counter: %s, "
                                 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                                 strerror(errno));
index 676b4fb0070f09be3d09fcb253f776754f7f711c..7e3d6e310bf839f09e5d6afed39c8c1530a13807 100644 (file)
@@ -845,15 +845,16 @@ static void start_counters(struct perf_evlist *evlist)
                }
 
                attr->mmap = 1;
+               attr->inherit = inherit;
 try_again:
                if (perf_evsel__open(counter, top.evlist->cpus,
-                                    top.evlist->threads, group, inherit) < 0) {
+                                    top.evlist->threads, group) < 0) {
                        int err = errno;
 
-                       if (err == EPERM || err == EACCES)
-                               die("Permission error - are you root?\n"
-                                       "\t Consider tweaking"
-                                       " /proc/sys/kernel/perf_event_paranoid.\n");
+                       if (err == EPERM || err == EACCES) {
+                               ui__warning_paranoid();
+                               goto out_err;
+                       }
                        /*
                         * If it's cycles then fall back to hrtimer
                         * based cpu-clock-tick sw counter, which
@@ -861,25 +862,41 @@ try_again:
                         */
                        if (attr->type == PERF_TYPE_HARDWARE &&
                            attr->config == PERF_COUNT_HW_CPU_CYCLES) {
-
                                if (verbose)
-                                       warning(" ... trying to fall back to cpu-clock-ticks\n");
+                                       ui__warning("Cycles event not supported,\n"
+                                                   "trying to fall back to cpu-clock-ticks\n");
 
                                attr->type = PERF_TYPE_SOFTWARE;
                                attr->config = PERF_COUNT_SW_CPU_CLOCK;
                                goto try_again;
                        }
-                       printf("\n");
-                       error("sys_perf_event_open() syscall returned with %d "
-                             "(%s).  /bin/dmesg may provide additional information.\n",
-                             err, strerror(err));
-                       die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
-                       exit(-1);
+
+                       if (err == ENOENT) {
+                               ui__warning("The %s event is not supported.\n",
+                                           event_name(counter));
+                               goto out_err;
+                       }
+
+                       ui__warning("The sys_perf_event_open() syscall "
+                                   "returned with %d (%s).  /bin/dmesg "
+                                   "may provide additional information.\n"
+                                   "No CONFIG_PERF_EVENTS=y kernel support "
+                                   "configured?\n", err, strerror(err));
+                       goto out_err;
                }
        }
 
-       if (perf_evlist__mmap(evlist, mmap_pages, false) < 0)
-               die("failed to mmap with %d (%s)\n", errno, strerror(errno));
+       if (perf_evlist__mmap(evlist, mmap_pages, false) < 0) {
+               ui__warning("Failed to mmap with %d (%s)\n",
+                           errno, strerror(errno));
+               goto out_err;
+       }
+
+       return;
+
+out_err:
+       exit_browser(0);
+       exit(0);
 }
 
 static int __cmd_top(void)
index 9fea75535221a256aea8dcd344f85e463779a80f..96bee5c46008450519a67785c21e4f0481d1e6c4 100644 (file)
@@ -13,7 +13,7 @@ cgroupfs_find_mountpoint(char *buf, size_t maxlen)
 {
        FILE *fp;
        char mountpoint[MAX_PATH+1], tokens[MAX_PATH+1], type[MAX_PATH+1];
-       char *token, *saved_ptr;
+       char *token, *saved_ptr = NULL;
        int found = 0;
 
        fp = fopen("/proc/mounts", "r");
index d4536a9e0d8cc35a4d1cf49f677cf97932f99482..155749d74350a670c166ed14d7f8f4629e4bea23 100644 (file)
@@ -57,6 +57,16 @@ void ui__warning(const char *format, ...)
 }
 #endif
 
+void ui__warning_paranoid(void)
+{
+       ui__warning("Permission error - are you root?\n"
+                   "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n"
+                   " -1 - Not paranoid at all\n"
+                   "  0 - Disallow raw tracepoint access for unpriv\n"
+                   "  1 - Disallow cpu events for unpriv\n"
+                   "  2 - Disallow kernel profiling for unpriv\n");
+}
+
 void trace_event(union perf_event *event)
 {
        unsigned char *raw_event = (void *)event;
index 93516cf4682ca3127ca36e26049bdfb92681f59f..fd53db47e3de1200ce0229629410b5d8006d1652 100644 (file)
@@ -36,5 +36,6 @@ int ui_helpline__show_help(const char *format, va_list ap);
 #endif
 
 void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
+void ui__warning_paranoid(void);
 
 #endif /* __PERF_DEBUG_H */
index 2b15c362ef568e2ac8b11a581f36ee52f789c2d5..1023f67633a4c16ada61dc8f69796016283dabd4 100644 (file)
@@ -710,7 +710,7 @@ try_again:
                 * in the whole kernel symbol list.
                 */
                if ((long long)al->addr < 0 &&
-                   cpumode == PERF_RECORD_MISC_KERNEL &&
+                   cpumode == PERF_RECORD_MISC_USER &&
                    machine && mg != &machine->kmaps) {
                        mg = &machine->kmaps;
                        goto try_again;
index d852cefa20def5ff48665e7ef44bc842093f6f49..45da8d186b492d4f82512862aef867acd4649f09 100644 (file)
@@ -12,6 +12,7 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "util.h"
+#include "debug.h"
 
 #include <sys/mman.h>
 
@@ -250,15 +251,19 @@ int perf_evlist__alloc_mmap(struct perf_evlist *evlist)
        return evlist->mmap != NULL ? 0 : -ENOMEM;
 }
 
-static int __perf_evlist__mmap(struct perf_evlist *evlist, int cpu, int prot,
-                              int mask, int fd)
+static int __perf_evlist__mmap(struct perf_evlist *evlist, struct perf_evsel *evsel,
+                              int cpu, int prot, int mask, int fd)
 {
        evlist->mmap[cpu].prev = 0;
        evlist->mmap[cpu].mask = mask;
        evlist->mmap[cpu].base = mmap(NULL, evlist->mmap_len, prot,
                                      MAP_SHARED, fd, 0);
-       if (evlist->mmap[cpu].base == MAP_FAILED)
+       if (evlist->mmap[cpu].base == MAP_FAILED) {
+               if (evlist->cpus->map[cpu] == -1 && evsel->attr.inherit)
+                       ui__warning("Inherit is not allowed on per-task "
+                                   "events using mmap.\n");
                return -1;
+       }
 
        perf_evlist__add_pollfd(evlist, fd);
        return 0;
@@ -312,7 +317,8 @@ int perf_evlist__mmap(struct perf_evlist *evlist, int pages, bool overwrite)
                                        if (ioctl(fd, PERF_EVENT_IOC_SET_OUTPUT,
                                                  FD(first_evsel, cpu, 0)) != 0)
                                                goto out_unmap;
-                               } else if (__perf_evlist__mmap(evlist, cpu, prot, mask, fd) < 0)
+                               } else if (__perf_evlist__mmap(evlist, evsel, cpu,
+                                                              prot, mask, fd) < 0)
                                        goto out_unmap;
 
                                if ((evsel->attr.read_format & PERF_FORMAT_ID) &&
index 662596afd7f1d49fccaeb8c95ee7c8c64748b8c9..d6fd59beb860739aea40e1b4052f6eda1a741996 100644 (file)
@@ -175,7 +175,7 @@ int __perf_evsel__read(struct perf_evsel *evsel,
 }
 
 static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
-                             struct thread_map *threads, bool group, bool inherit)
+                             struct thread_map *threads, bool group)
 {
        int cpu, thread;
        unsigned long flags = 0;
@@ -192,19 +192,6 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
 
        for (cpu = 0; cpu < cpus->nr; cpu++) {
                int group_fd = -1;
-               /*
-                * Don't allow mmap() of inherited per-task counters. This
-                * would create a performance issue due to all children writing
-                * to the same buffer.
-                *
-                * FIXME:
-                * Proper fix is not to pass 'inherit' to perf_evsel__open*,
-                * but a 'flags' parameter, with 'group' folded there as well,
-                * then introduce a PERF_O_{MMAP,GROUP,INHERIT} enum, and if
-                * O_MMAP is set, emit a warning if cpu < 0 and O_INHERIT is
-                * set. Lets go for the minimal fix first tho.
-                */
-               evsel->attr.inherit = (cpus->map[cpu] >= 0) && inherit;
 
                for (thread = 0; thread < threads->nr; thread++) {
 
@@ -253,7 +240,7 @@ static struct {
 };
 
 int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
-                    struct thread_map *threads, bool group, bool inherit)
+                    struct thread_map *threads, bool group)
 {
        if (cpus == NULL) {
                /* Work around old compiler warnings about strict aliasing */
@@ -263,19 +250,19 @@ int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
        if (threads == NULL)
                threads = &empty_thread_map.map;
 
-       return __perf_evsel__open(evsel, cpus, threads, group, inherit);
+       return __perf_evsel__open(evsel, cpus, threads, group);
 }
 
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
-                            struct cpu_map *cpus, bool group, bool inherit)
+                            struct cpu_map *cpus, bool group)
 {
-       return __perf_evsel__open(evsel, cpus, &empty_thread_map.map, group, inherit);
+       return __perf_evsel__open(evsel, cpus, &empty_thread_map.map, group);
 }
 
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
-                               struct thread_map *threads, bool group, bool inherit)
+                               struct thread_map *threads, bool group)
 {
-       return __perf_evsel__open(evsel, &empty_cpu_map.map, threads, group, inherit);
+       return __perf_evsel__open(evsel, &empty_cpu_map.map, threads, group);
 }
 
 static int perf_event__parse_id_sample(const union perf_event *event, u64 type,
index 6710ab538342fe1d5970c812423908ddec3ee5a7..f79bb2c09a6cbea510e31d260a1fabb778e13950 100644 (file)
@@ -81,11 +81,11 @@ void perf_evsel__free_id(struct perf_evsel *evsel);
 void perf_evsel__close_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
 
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
-                            struct cpu_map *cpus, bool group, bool inherit);
+                            struct cpu_map *cpus, bool group);
 int perf_evsel__open_per_thread(struct perf_evsel *evsel,
-                               struct thread_map *threads, bool group, bool inherit);
+                               struct thread_map *threads, bool group);
 int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
-                    struct thread_map *threads, bool group, bool inherit);
+                    struct thread_map *threads, bool group);
 
 #define perf_evsel__match(evsel, t, c)         \
        (evsel->attr.type == PERF_TYPE_##t &&   \
index 5ddee66020a70c8b74f4b53caf3aa002f56f3d75..f0223166e76165cd1e25d86cade2d7bb8337c9c6 100644 (file)
@@ -234,7 +234,6 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
 
        /* Searching trace events corresponding to probe event */
        ntevs = find_probe_trace_events(fd, pev, tevs, max_tevs);
-       close(fd);
 
        if (ntevs > 0) {        /* Succeeded to find trace events */
                pr_debug("find %d probe_trace_events.\n", ntevs);
@@ -388,7 +387,6 @@ int show_line_range(struct line_range *lr, const char *module)
        }
 
        ret = find_line_range(fd, lr);
-       close(fd);
        if (ret == 0) {
                pr_warning("Specified source line is not found.\n");
                return -ENOENT;
@@ -512,19 +510,18 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs,
        if (ret < 0)
                return ret;
 
-       fd = open_vmlinux(module);
-       if (fd < 0) {
-               pr_warning("Failed to open debug information file.\n");
-               return fd;
-       }
-
        setup_pager();
 
-       for (i = 0; i < npevs && ret >= 0; i++)
+       for (i = 0; i < npevs && ret >= 0; i++) {
+               fd = open_vmlinux(module);
+               if (fd < 0) {
+                       pr_warning("Failed to open debug information file.\n");
+                       ret = fd;
+                       break;
+               }
                ret = show_available_vars_at(fd, &pevs[i], max_vls, _filter,
                                             externs);
-
-       close(fd);
+       }
        return ret;
 }
 
index 194f9e2a328575ed8fc9bf406bd3f82a667f6c0a..b7c85ce466a15eb72e1390b0808b3a02ec51d442 100644 (file)
@@ -273,6 +273,25 @@ static const char *cu_get_comp_dir(Dwarf_Die *cu_die)
        return dwarf_formstring(&attr);
 }
 
+/* Get a line number and file name for given address */
+static int cu_find_lineinfo(Dwarf_Die *cudie, unsigned long addr,
+                           const char **fname, int *lineno)
+{
+       Dwarf_Line *line;
+       Dwarf_Addr laddr;
+
+       line = dwarf_getsrc_die(cudie, (Dwarf_Addr)addr);
+       if (line && dwarf_lineaddr(line, &laddr) == 0 &&
+           addr == (unsigned long)laddr && dwarf_lineno(line, lineno) == 0) {
+               *fname = dwarf_linesrc(line, NULL, NULL);
+               if (!*fname)
+                       /* line number is useless without filename */
+                       *lineno = 0;
+       }
+
+       return *lineno ?: -ENOENT;
+}
+
 /* Compare diename and tname */
 static bool die_compare_name(Dwarf_Die *dw_die, const char *tname)
 {
@@ -497,7 +516,20 @@ static int __die_find_inline_cb(Dwarf_Die *die_mem, void *data)
 static Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr,
                                      Dwarf_Die *die_mem)
 {
-       return die_find_child(sp_die, __die_find_inline_cb, &addr, die_mem);
+       Dwarf_Die tmp_die;
+
+       sp_die = die_find_child(sp_die, __die_find_inline_cb, &addr, &tmp_die);
+       if (!sp_die)
+               return NULL;
+
+       /* Inlined function could be recursive. Trace it until fail */
+       while (sp_die) {
+               memcpy(die_mem, sp_die, sizeof(Dwarf_Die));
+               sp_die = die_find_child(sp_die, __die_find_inline_cb, &addr,
+                                       &tmp_die);
+       }
+
+       return die_mem;
 }
 
 /* Walker on lines (Note: line number will not be sorted) */
@@ -1395,6 +1427,10 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data)
            !die_compare_name(sp_die, pp->function))
                return DWARF_CB_OK;
 
+       /* Check declared file */
+       if (pp->file && strtailcmp(pp->file, dwarf_decl_file(sp_die)))
+               return DWARF_CB_OK;
+
        pf->fname = dwarf_decl_file(sp_die);
        if (pp->line) { /* Function relative line */
                dwarf_decl_line(sp_die, &pf->lno);
@@ -1451,6 +1487,7 @@ static int find_probes(int fd, struct probe_finder *pf)
        if (!dbg) {
                pr_warning("No debug information found in the vmlinux - "
                        "please rebuild with CONFIG_DEBUG_INFO=y.\n");
+               close(fd);      /* Without dwfl_end(), fd isn't closed. */
                return -EBADF;
        }
 
@@ -1686,11 +1723,9 @@ int find_perf_probe_point(unsigned long addr, struct perf_probe_point *ppt)
        Dwarf_Die cudie, spdie, indie;
        Dwarf *dbg = NULL;
        Dwfl *dwfl = NULL;
-       Dwarf_Line *line;
-       Dwarf_Addr laddr, eaddr, bias = 0;
-       const char *tmp;
-       int lineno, ret = 0;
-       bool found = false;
+       Dwarf_Addr _addr, baseaddr, bias = 0;
+       const char *fname = NULL, *func = NULL, *tmp;
+       int baseline = 0, lineno = 0, ret = 0;
 
        /* Open the live linux kernel */
        dbg = dwfl_init_live_kernel_dwarf(addr, &dwfl, &bias);
@@ -1711,68 +1746,79 @@ int find_perf_probe_point(unsigned long addr, struct perf_probe_point *ppt)
                goto end;
        }
 
-       /* Find a corresponding line */
-       line = dwarf_getsrc_die(&cudie, (Dwarf_Addr)addr);
-       if (line) {
-               if (dwarf_lineaddr(line, &laddr) == 0 &&
-                   (Dwarf_Addr)addr == laddr &&
-                   dwarf_lineno(line, &lineno) == 0) {
-                       tmp = dwarf_linesrc(line, NULL, NULL);
-                       if (tmp) {
-                               ppt->line = lineno;
-                               ppt->file = strdup(tmp);
-                               if (ppt->file == NULL) {
-                                       ret = -ENOMEM;
-                                       goto end;
-                               }
-                               found = true;
-                       }
-               }
-       }
+       /* Find a corresponding line (filename and lineno) */
+       cu_find_lineinfo(&cudie, addr, &fname, &lineno);
+       /* Don't care whether it failed or not */
 
-       /* Find a corresponding function */
+       /* Find a corresponding function (name, baseline and baseaddr) */
        if (die_find_real_subprogram(&cudie, (Dwarf_Addr)addr, &spdie)) {
+               /* Get function entry information */
                tmp = dwarf_diename(&spdie);
-               if (!tmp || dwarf_entrypc(&spdie, &eaddr) != 0)
-                       goto end;
-
-               if (ppt->line) {
-                       if (die_find_inlinefunc(&spdie, (Dwarf_Addr)addr,
-                                               &indie)) {
-                               /* addr in an inline function */
+               if (!tmp ||
+                   dwarf_entrypc(&spdie, &baseaddr) != 0 ||
+                   dwarf_decl_line(&spdie, &baseline) != 0)
+                       goto post;
+               func = tmp;
+
+               if (addr == (unsigned long)baseaddr)
+                       /* Function entry - Relative line number is 0 */
+                       lineno = baseline;
+               else if (die_find_inlinefunc(&spdie, (Dwarf_Addr)addr,
+                                            &indie)) {
+                       if (dwarf_entrypc(&indie, &_addr) == 0 &&
+                           _addr == addr)
+                               /*
+                                * addr is at an inline function entry.
+                                * In this case, lineno should be the call-site
+                                * line number.
+                                */
+                               lineno = die_get_call_lineno(&indie);
+                       else {
+                               /*
+                                * addr is in an inline function body.
+                                * Since lineno points one of the lines
+                                * of the inline function, baseline should
+                                * be the entry line of the inline function.
+                                */
                                tmp = dwarf_diename(&indie);
-                               if (!tmp)
-                                       goto end;
-                               ret = dwarf_decl_line(&indie, &lineno);
-                       } else {
-                               if (eaddr == addr) {    /* Function entry */
-                                       lineno = ppt->line;
-                                       ret = 0;
-                               } else
-                                       ret = dwarf_decl_line(&spdie, &lineno);
-                       }
-                       if (ret == 0) {
-                               /* Make a relative line number */
-                               ppt->line -= lineno;
-                               goto found;
+                               if (tmp &&
+                                   dwarf_decl_line(&spdie, &baseline) == 0)
+                                       func = tmp;
                        }
                }
-               /* We don't have a line number, let's use offset */
-               ppt->offset = addr - (unsigned long)eaddr;
-found:
-               ppt->function = strdup(tmp);
+       }
+
+post:
+       /* Make a relative line number or an offset */
+       if (lineno)
+               ppt->line = lineno - baseline;
+       else if (func)
+               ppt->offset = addr - (unsigned long)baseaddr;
+
+       /* Duplicate strings */
+       if (func) {
+               ppt->function = strdup(func);
                if (ppt->function == NULL) {
                        ret = -ENOMEM;
                        goto end;
                }
-               found = true;
        }
-
+       if (fname) {
+               ppt->file = strdup(fname);
+               if (ppt->file == NULL) {
+                       if (ppt->function) {
+                               free(ppt->function);
+                               ppt->function = NULL;
+                       }
+                       ret = -ENOMEM;
+                       goto end;
+               }
+       }
 end:
        if (dwfl)
                dwfl_end(dwfl);
-       if (ret >= 0)
-               ret = found ? 1 : 0;
+       if (ret == 0 && (fname || func))
+               ret = 1;        /* Found a point */
        return ret;
 }
 
@@ -1840,6 +1886,10 @@ static int line_range_search_cb(Dwarf_Die *sp_die, void *data)
        struct line_finder *lf = param->data;
        struct line_range *lr = lf->lr;
 
+       /* Check declared file */
+       if (lr->file && strtailcmp(lr->file, dwarf_decl_file(sp_die)))
+               return DWARF_CB_OK;
+
        if (dwarf_tag(sp_die) == DW_TAG_subprogram &&
            die_compare_name(sp_die, lr->function)) {
                lf->fname = dwarf_decl_file(sp_die);
@@ -1892,6 +1942,7 @@ int find_line_range(int fd, struct line_range *lr)
        if (!dbg) {
                pr_warning("No debug information found in the vmlinux - "
                        "please rebuild with CONFIG_DEBUG_INFO=y.\n");
+               close(fd);      /* Without dwfl_end(), fd isn't closed. */
                return -EBADF;
        }
 
index a9f2d7e1204d1655b14b99cafb06d08d5046d8a6..f5e38451fdc505e329ac77415e9e8aba5fbe7ebb 100644 (file)
@@ -498,11 +498,11 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
        struct cpu_map *cpus = NULL;
        struct thread_map *threads = NULL;
        PyObject *pcpus = NULL, *pthreads = NULL;
-       int group = 0, overwrite = 0;
-       static char *kwlist[] = {"cpus", "threads", "group", "overwrite", NULL, NULL};
+       int group = 0, inherit = 0;
+       static char *kwlist[] = {"cpus", "threads", "group", "inherit", NULL, NULL};
 
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist,
-                                        &pcpus, &pthreads, &group, &overwrite))
+                                        &pcpus, &pthreads, &group, &inherit))
                return NULL;
 
        if (pthreads != NULL)
@@ -511,7 +511,8 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
        if (pcpus != NULL)
                cpus = ((struct pyrf_cpu_map *)pcpus)->cpus;
 
-       if (perf_evsel__open(evsel, cpus, threads, group, overwrite) < 0) {
+       evsel->attr.inherit = inherit;
+       if (perf_evsel__open(evsel, cpus, threads, group) < 0) {
                PyErr_SetFromErrno(PyExc_OSError);
                return NULL;
        }
index e24ffadb20b29f91cd835914512c7fc9a3f08215..bbc982f5dd8b9ced999577ced4822a21c9a28779 100644 (file)
@@ -1,13 +1,18 @@
 #!/usr/bin/python2
 
 from distutils.core import setup, Extension
+from os import getenv
+
+cflags = ['-fno-strict-aliasing', '-Wno-write-strings']
+cflags += getenv('CFLAGS', '').split()
 
 perf = Extension('perf',
                  sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c',
                             'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c',
                             'util/util.c', 'util/xyarray.c', 'util/cgroup.c'],
                  include_dirs = ['util/include'],
-                 extra_compile_args = ['-fno-strict-aliasing', '-Wno-write-strings'])
+                 extra_compile_args = cflags,
+                 )
 
 setup(name='perf',
       version='0.1',
index 8fc0bd3a3a4a6bd3f816a6619cc1de0793a98caa..b9a985dadd08f67851cc0483bb36bb8d3b014580 100644 (file)
@@ -85,7 +85,7 @@ out:
 
 /*
  * Helper function for splitting a string into an argv-like array.
- * originaly copied from lib/argv_split.c
+ * originally copied from lib/argv_split.c
  */
 static const char *skip_sep(const char *cp)
 {
index 17df793c89243a44324c5c0deafa45807d0b7f6b..f06c10f092ba53036a379a3c05983e3e928808aa 100644 (file)
@@ -1196,6 +1196,8 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name,
                                if (curr_dso == NULL)
                                        goto out_elf_end;
                                curr_dso->kernel = self->kernel;
+                               curr_dso->long_name = self->long_name;
+                               curr_dso->long_name_len = self->long_name_len;
                                curr_map = map__new2(start, curr_dso,
                                                     map->type);
                                if (curr_map == NULL) {
@@ -1842,6 +1844,7 @@ int dso__load_vmlinux(struct dso *self, struct map *map,
        if (fd < 0)
                return -1;
 
+       dso__set_long_name(self, (char *)vmlinux);
        dso__set_loaded(self, map->type);
        err = dso__load_sym(self, map, symfs_vmlinux, fd, filter, 0, 0);
        close(fd);
@@ -2403,6 +2406,8 @@ int symbol__init(void)
        if (symbol_conf.initialized)
                return 0;
 
+       symbol_conf.priv_size = ALIGN(symbol_conf.priv_size, sizeof(u64));
+
        elf_version(EV_CURRENT);
        if (symbol_conf.sort_by_name)
                symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) -
index 8c17a8730e4a36a9923537f79466c3793fd06559..15633d6081332f0204acc978974ff6deec8d2375 100644 (file)
@@ -256,10 +256,9 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
                         int refresh)
 {
        struct objdump_line *pos, *n;
-       struct annotation *notes = symbol__annotation(sym);
+       struct annotation *notes;
        struct annotate_browser browser = {
                .b = {
-                       .entries = &notes->src->source,
                        .refresh = ui_browser__list_head_refresh,
                        .seek    = ui_browser__list_head_seek,
                        .write   = annotate_browser__write,
@@ -281,6 +280,8 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
 
        ui_helpline__push("Press <- or ESC to exit");
 
+       notes = symbol__annotation(sym);
+
        list_for_each_entry(pos, &notes->src->source, node) {
                struct objdump_line_rb_node *rbpos;
                size_t line_len = strlen(pos->line);
@@ -291,6 +292,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
                rbpos->idx = browser.b.nr_entries++;
        }
 
+       browser.b.entries = &notes->src->source,
        browser.b.width += 18; /* Percentage */
        ret = annotate_browser__run(&browser, evidx, refresh);
        list_for_each_entry_safe(pos, n, &notes->src->source, node) {
index 798efdca3eadd9fe89b84157ceba5c56a8d5dcb2..5d767c622dfc1f862fb747ababa610e9031944c8 100644 (file)
@@ -851,7 +851,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel,
                        goto out_free_stack;
                case 'a':
                        if (browser->selection == NULL ||
-                           browser->selection->map == NULL ||
+                           browser->selection->sym == NULL ||
                            browser->selection->map->dso->annotate_warned)
                                continue;
                        goto do_annotate;
index d9678a34dd7063e23eef27a8381797dec09ee6dc..2618ef2ba31fa6af37594202752079f3cee94b4a 100644 (file)
@@ -46,7 +46,7 @@ int cpu = -1;
  *
  *  performance
  *     Performance is paramount.
- *     Unwilling to sacrafice any performance
+ *     Unwilling to sacrifice any performance
  *     for the sake of energy saving. (hardware default)
  *
  *  normal
index 3656849f78a0b722236f25eefd58dac4fc839dcf..73358d256fa2d0e1dca075f0947fc187faf5089d 100644 (file)
@@ -90,7 +90,7 @@ irqfd_shutdown(struct work_struct *work)
         * We know no new events will be scheduled at this point, so block
         * until all previously outstanding events have completed
         */
-       flush_work(&irqfd->inject);
+       flush_work_sync(&irqfd->inject);
 
        /*
         * It is now safe to release the object's resources
@@ -578,7 +578,7 @@ kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
 
        mutex_lock(&kvm->slots_lock);
 
-       /* Verify that there isnt a match already */
+       /* Verify that there isn't a match already */
        if (ioeventfd_check_collision(kvm, p)) {
                ret = -EEXIST;
                goto unlock_fail;
index 556e3efe532523df4f3bc138ba62605c253fd977..6330653480e467d0f79776d0e0a2c90ebe56f7e1 100644 (file)
@@ -1037,6 +1037,17 @@ static pfn_t get_fault_pfn(void)
        return fault_pfn;
 }
 
+int get_user_page_nowait(struct task_struct *tsk, struct mm_struct *mm,
+       unsigned long start, int write, struct page **page)
+{
+       int flags = FOLL_TOUCH | FOLL_NOWAIT | FOLL_HWPOISON | FOLL_GET;
+
+       if (write)
+               flags |= FOLL_WRITE;
+
+       return __get_user_pages(tsk, mm, start, 1, flags, page, NULL, NULL);
+}
+
 static inline int check_user_page_hwpoison(unsigned long addr)
 {
        int rc, flags = FOLL_TOUCH | FOLL_HWPOISON | FOLL_WRITE;
@@ -1070,7 +1081,14 @@ static pfn_t hva_to_pfn(struct kvm *kvm, unsigned long addr, bool atomic,
                if (writable)
                        *writable = write_fault;
 
-               npages = get_user_pages_fast(addr, 1, write_fault, page);
+               if (async) {
+                       down_read(&current->mm->mmap_sem);
+                       npages = get_user_page_nowait(current, current->mm,
+                                                    addr, write_fault, page);
+                       up_read(&current->mm->mmap_sem);
+               } else
+                       npages = get_user_pages_fast(addr, 1, write_fault,
+                                                    page);
 
                /* map read fault as writable if possible */
                if (unlikely(!write_fault) && npages == 1) {
@@ -1093,7 +1111,8 @@ static pfn_t hva_to_pfn(struct kvm *kvm, unsigned long addr, bool atomic,
                        return get_fault_pfn();
 
                down_read(&current->mm->mmap_sem);
-               if (check_user_page_hwpoison(addr)) {
+               if (npages == -EHWPOISON ||
+                       (!async && check_user_page_hwpoison(addr))) {
                        up_read(&current->mm->mmap_sem);
                        get_page(hwpoison_page);
                        return page_to_pfn(hwpoison_page);